From 1697eb6ffa3e9f27da3f5f50629bbe65fbfde2ac Mon Sep 17 00:00:00 2001 From: Peter Z Date: Thu, 7 Aug 2025 15:44:31 +0300 Subject: [PATCH] Regeneration @ SDK commit d046d0216 --- idl/@ohos.InputMethodExtensionAbility.idl | 10 +- idl/@ohos.InputMethodExtensionContext.idl | 12 +- idl/@ohos.InputMethodSubtype.idl | 6 +- idl/@ohos.PiPWindow.idl | 70 +- idl/@ohos.UiTest.idl | 141 +- idl/@ohos.WallpaperExtensionAbility.idl | 6 +- idl/@ohos.WorkSchedulerExtensionAbility.idl | 10 +- idl/@ohos.ability.ability.idl | 15 +- idl/@ohos.ability.dataUriUtils.idl | 26 +- idl/@ohos.ability.errorCode.idl | 4 +- idl/@ohos.ability.featureAbility.idl | 74 +- idl/@ohos.ability.particleAbility.idl | 50 +- idl/@ohos.ability.screenLockFileManager.idl | 42 +- idl/@ohos.ability.wantConstant.idl | 11 +- idl/@ohos.abilityAccessCtrl.idl | 42 +- idl/@ohos.accessibility.GesturePath.idl | 7 +- idl/@ohos.accessibility.GesturePoint.idl | 5 +- idl/@ohos.accessibility.config.idl | 52 +- idl/@ohos.accessibility.idl | 205 ++- idl/@ohos.account.appAccount.idl | 54 +- idl/@ohos.account.distributedAccount.idl | 18 +- idl/@ohos.account.osAccount.idl | 134 +- ...advertising.AdsServiceExtensionAbility.idl | 14 +- idl/@ohos.advertising.idl | 52 +- idl/@ohos.ai.intelligentVoice.idl | 78 +- idl/@ohos.ai.mindSporeLite.idl | 70 +- ...@ohos.animation.windowAnimationManager.idl | 24 +- idl/@ohos.animator.idl | 17 +- idl/@ohos.app.ability.Ability.idl | 10 +- idl/@ohos.app.ability.AbilityConstant.idl | 34 +- ...s.app.ability.AbilityLifecycleCallback.idl | 12 +- idl/@ohos.app.ability.AbilityStage.idl | 16 +- ...hos.app.ability.ActionExtensionAbility.idl | 10 +- ...app.ability.AppServiceExtensionAbility.idl | 14 + ...ability.ApplicationStateChangeCallback.idl | 6 +- ...@ohos.app.ability.AtomicServiceOptions.idl | 13 +- ...s.app.ability.AutoFillExtensionAbility.idl | 14 +- idl/@ohos.app.ability.ChildProcess.idl | 8 +- idl/@ohos.app.ability.ChildProcessArgs.idl | 4 +- idl/@ohos.app.ability.ChildProcessOptions.idl | 4 +- idl/@ohos.app.ability.CompletionHandler.idl | 7 + ...lity.CompletionHandlerForAtomicService.idl | 11 + idl/@ohos.app.ability.Configuration.idl | 8 +- ...ohos.app.ability.ConfigurationConstant.idl | 11 +- ...hos.app.ability.DriverExtensionAbility.idl | 12 +- idl/@ohos.app.ability.EmbeddableUIAbility.idl | 12 +- ...app.ability.EmbeddedUIExtensionAbility.idl | 10 +- idl/@ohos.app.ability.EnvironmentCallback.idl | 10 +- idl/@ohos.app.ability.ExtensionAbility.idl | 10 +- ...ohos.app.ability.FenceExtensionAbility.idl | 10 +- ...ohos.app.ability.FenceExtensionContext.idl | 12 +- ...@ohos.app.ability.InsightIntentContext.idl | 8 +- ...hos.app.ability.InsightIntentDecorator.idl | 69 + ...app.ability.InsightIntentEntryExecutor.idl | 15 + ...ohos.app.ability.InsightIntentExecutor.idl | 14 +- ...p.ability.MediaControlExtensionAbility.idl | 10 +- idl/@ohos.app.ability.OpenLinkOptions.idl | 6 +- ...pp.ability.PhotoEditorExtensionAbility.idl | 16 +- ...ohos.app.ability.PrintExtensionAbility.idl | 10 +- ...os.app.ability.ServiceExtensionAbility.idl | 16 +- ...ohos.app.ability.ShareExtensionAbility.idl | 10 +- idl/@ohos.app.ability.StartOptions.idl | 20 +- idl/@ohos.app.ability.UIAbility.idl | 40 +- idl/@ohos.app.ability.UIExtensionAbility.idl | 20 +- ....app.ability.UIExtensionContentSession.idl | 20 +- ....app.ability.UIServiceExtensionAbility.idl | 18 +- ...s.app.ability.UserAuthExtensionAbility.idl | 10 +- idl/@ohos.app.ability.VpnExtensionAbility.idl | 10 +- idl/@ohos.app.ability.Want.idl | 6 +- ...s.app.ability.abilityDelegatorRegistry.idl | 22 +- idl/@ohos.app.ability.abilityManager.idl | 116 +- idl/@ohos.app.ability.appManager.idl | 237 ++- idl/@ohos.app.ability.appRecovery.idl | 30 +- idl/@ohos.app.ability.application.idl | 37 +- idl/@ohos.app.ability.autoFillManager.idl | 32 +- idl/@ohos.app.ability.autoStartupManager.idl | 46 +- idl/@ohos.app.ability.childProcessManager.idl | 32 +- idl/@ohos.app.ability.common.idl | 67 +- idl/@ohos.app.ability.contextConstant.idl | 16 +- idl/@ohos.app.ability.continueManager.idl | 21 + idl/@ohos.app.ability.dataUriUtils.idl | 26 +- idl/@ohos.app.ability.dialogRequest.idl | 30 +- idl/@ohos.app.ability.dialogSession.idl | 30 +- idl/@ohos.app.ability.errorManager.idl | 70 +- idl/@ohos.app.ability.insightIntent.idl | 23 +- idl/@ohos.app.ability.insightIntentDriver.idl | 97 +- idl/@ohos.app.ability.kioskManager.idl | 13 + idl/@ohos.app.ability.missionManager.idl | 126 +- idl/@ohos.app.ability.quickFixManager.idl | 38 +- idl/@ohos.app.ability.wantAgent.idl | 95 +- idl/@ohos.app.ability.wantConstant.idl | 15 +- idl/@ohos.app.appstartup.StartupConfig.idl | 8 +- ...ohos.app.appstartup.StartupConfigEntry.idl | 10 +- idl/@ohos.app.appstartup.StartupListener.idl | 8 +- idl/@ohos.app.appstartup.startupManager.idl | 33 +- idl/@ohos.app.businessAbilityRouter.idl | 24 +- ...ohos.app.form.FormEditExtensionAbility.idl | 7 + idl/@ohos.app.form.FormExtensionAbility.idl | 21 +- ...ohos.app.form.LiveFormExtensionAbility.idl | 17 + idl/@ohos.app.form.formAgent.idl | 20 +- idl/@ohos.app.form.formBindingData.idl | 19 +- idl/@ohos.app.form.formHost.idl | 256 ++-- idl/@ohos.app.form.formInfo.idl | 125 +- idl/@ohos.app.form.formObserver.idl | 144 +- idl/@ohos.app.form.formProvider.idl | 90 +- ...lication.AccessibilityExtensionAbility.idl | 45 +- ...hos.application.BackupExtensionAbility.idl | 13 +- idl/@ohos.application.Configuration.idl | 6 +- ...ohos.application.ConfigurationConstant.idl | 7 +- ....application.DataShareExtensionAbility.idl | 16 +- ...pplication.DistributedExtensionAbility.idl | 11 + ...pplication.DistributedExtensionContext.idl | 5 + ...ation.StaticSubscriberExtensionAbility.idl | 10 +- ...ation.StaticSubscriberExtensionContext.idl | 12 +- idl/@ohos.application.Want.idl | 8 +- ...hos.application.WindowExtensionAbility.idl | 14 +- ...s.application.abilityDelegatorRegistry.idl | 24 +- idl/@ohos.application.abilityManager.idl | 36 +- idl/@ohos.application.appManager.idl | 94 +- idl/@ohos.application.formBindingData.idl | 16 +- idl/@ohos.application.formError.idl | 7 +- idl/@ohos.application.formHost.idl | 154 +- idl/@ohos.application.formInfo.idl | 23 +- idl/@ohos.application.formProvider.idl | 32 +- idl/@ohos.application.missionManager.idl | 98 +- idl/@ohos.application.testRunner.idl | 4 +- ...@ohos.application.uriPermissionManager.idl | 40 +- idl/@ohos.arkui.ArcAlphabetIndexer.idl | 29 + idl/@ohos.arkui.ArcList.idl | 48 + idl/@ohos.arkui.ArcScrollBar.idl | 15 + idl/@ohos.arkui.ArcSwiper.idl | 64 + idl/@ohos.arkui.Prefetcher.idl | 8 +- idl/@ohos.arkui.StateManagement.idl | 56 +- idl/@ohos.arkui.UIContext.idl | 361 +++-- idl/@ohos.arkui.componentSnapshot.idl | 41 +- idl/@ohos.arkui.componentUtils.idl | 28 +- idl/@ohos.arkui.dragController.idl | 86 +- idl/@ohos.arkui.drawableDescriptor.idl | 46 +- idl/@ohos.arkui.inspector.idl | 27 +- idl/@ohos.arkui.observer.idl | 151 +- idl/@ohos.arkui.performanceMonitor.idl | 22 +- idl/@ohos.arkui.shape.idl | 34 +- idl/@ohos.arkui.theme.idl | 13 +- idl/@ohos.arkui.uiExtension.idl | 31 +- idl/@ohos.backgroundTaskManager.idl | 50 +- idl/@ohos.base.idl | 16 +- idl/@ohos.batteryInfo.idl | 32 +- idl/@ohos.batteryStatistics.idl | 40 +- idl/@ohos.bluetooth.a2dp.idl | 58 +- idl/@ohos.bluetooth.access.idl | 68 +- idl/@ohos.bluetooth.baseProfile.idl | 15 +- idl/@ohos.bluetooth.ble.idl | 211 ++- idl/@ohos.bluetooth.connection.idl | 250 ++-- idl/@ohos.bluetooth.constant.idl | 17 +- idl/@ohos.bluetooth.hfp.idl | 18 +- idl/@ohos.bluetooth.hid.idl | 18 +- idl/@ohos.bluetooth.idl | 277 ++-- idl/@ohos.bluetooth.map.idl | 20 +- idl/@ohos.bluetooth.opp.idl | 68 + idl/@ohos.bluetooth.pan.idl | 18 +- idl/@ohos.bluetooth.pbap.idl | 22 +- idl/@ohos.bluetooth.socket.idl | 52 +- idl/@ohos.bluetooth.wearDetection.idl | 42 +- idl/@ohos.bluetoothManager.idl | 281 ++-- idl/@ohos.brightness.idl | 18 +- idl/@ohos.buffer.idl | 103 +- idl/@ohos.bundle.appControl.idl | 90 +- idl/@ohos.bundle.appDomainVerify.idl | 18 +- idl/@ohos.bundle.bundleManager.idl | 553 +++---- idl/@ohos.bundle.bundleMonitor.idl | 20 +- idl/@ohos.bundle.bundleResourceManager.idl | 54 +- idl/@ohos.bundle.defaultAppManager.idl | 76 +- idl/@ohos.bundle.distributedBundleManager.idl | 46 +- idl/@ohos.bundle.freeInstall.idl | 72 +- idl/@ohos.bundle.idl | 204 ++- idl/@ohos.bundle.innerBundleManager.idl | 54 +- idl/@ohos.bundle.installer.idl | 61 +- idl/@ohos.bundle.launcherBundleManager.idl | 65 +- idl/@ohos.bundle.overlay.idl | 70 +- idl/@ohos.bundle.shortcutManager.idl | 31 +- idl/@ohos.bundleState.idl | 66 +- idl/@ohos.bytrace.idl | 22 +- idl/@ohos.calendarManager.idl | 53 +- idl/@ohos.charger.idl | 7 +- idl/@ohos.commonEvent.idl | 52 +- idl/@ohos.commonEventManager.idl | 89 +- idl/@ohos.configPolicy.idl | 72 +- idl/@ohos.connectedTag.idl | 68 +- idl/@ohos.contact.idl | 432 +++--- ...@ohos.continuation.continuationManager.idl | 130 +- idl/@ohos.convertxml.idl | 7 +- idl/@ohos.cooperate.idl | 130 +- idl/@ohos.curves.idl | 46 +- idl/@ohos.customization.customConfig.idl | 12 +- idl/@ohos.data.DataShareResultSet.idl | 8 +- idl/@ohos.data.ValuesBucket.idl | 2 +- idl/@ohos.data.cloudData.idl | 144 +- idl/@ohos.data.cloudExtension.idl | 68 +- idl/@ohos.data.commonType.idl | 9 +- idl/@ohos.data.dataAbility.idl | 16 +- idl/@ohos.data.dataShare.idl | 131 +- idl/@ohos.data.dataSharePredicates.idl | 9 +- idl/@ohos.data.distributedData.idl | 88 +- idl/@ohos.data.distributedDataObject.idl | 58 +- idl/@ohos.data.distributedKVStore.idl | 62 +- idl/@ohos.data.intelligence.idl | 46 + idl/@ohos.data.preferences.idl | 84 +- idl/@ohos.data.rdb.idl | 45 +- idl/@ohos.data.relationalStore.idl | 189 ++- idl/@ohos.data.storage.idl | 50 +- idl/@ohos.data.unifiedDataChannel.idl | 164 +- idl/@ohos.data.uniformDataStruct.idl | 23 +- idl/@ohos.data.uniformTypeDescriptor.idl | 34 +- idl/@ohos.deviceAttest.idl | 24 +- idl/@ohos.deviceInfo.idl | 19 +- idl/@ohos.deviceStatus.dragInteraction.idl | 34 +- idl/@ohos.display.idl | 213 +-- idl/@ohos.distributedBundle.idl | 30 +- idl/@ohos.distributedDeviceManager.idl | 85 +- ...ohos.distributedHardware.deviceManager.idl | 88 +- ...os.distributedHardware.hardwareManager.idl | 28 +- ...os.distributedHardware.mechanicManager.idl | 155 ++ idl/@ohos.distributedMissionManager.idl | 82 +- ...tributedsched.abilityConnectionManager.idl | 179 +++ idl/@ohos.distributedsched.linkEnhance.idl | 65 + ...s.distributedsched.proxyChannelManager.idl | 47 + idl/@ohos.dlpPermission.idl | 206 ++- idl/@ohos.document.idl | 30 +- idl/@ohos.driver.deviceManager.idl | 104 +- idl/@ohos.effectKit.idl | 40 +- ...rprise.EnterpriseAdminExtensionAbility.idl | 10 +- idl/@ohos.enterprise.accountManager.idl | 59 +- idl/@ohos.enterprise.adminManager.idl | 159 +- idl/@ohos.enterprise.applicationManager.idl | 109 +- idl/@ohos.enterprise.bluetoothManager.idl | 61 +- idl/@ohos.enterprise.browser.idl | 48 +- idl/@ohos.enterprise.bundleManager.idl | 264 ++-- idl/@ohos.enterprise.dateTimeManager.idl | 36 +- idl/@ohos.enterprise.deviceControl.idl | 36 +- idl/@ohos.enterprise.deviceInfo.idl | 40 +- idl/@ohos.enterprise.deviceSettings.idl | 68 +- idl/@ohos.enterprise.locationManager.idl | 22 +- idl/@ohos.enterprise.networkManager.idl | 188 ++- idl/@ohos.enterprise.restrictions.idl | 92 +- idl/@ohos.enterprise.securityManager.idl | 95 +- idl/@ohos.enterprise.systemManager.idl | 80 +- idl/@ohos.enterprise.telephonyManager.idl | 24 + idl/@ohos.enterprise.usbManager.idl | 68 +- idl/@ohos.enterprise.wifiManager.idl | 78 +- idl/@ohos.events.emitter.idl | 74 +- idl/@ohos.fastbuffer.idl | 150 ++ idl/@ohos.faultLogger.idl | 30 +- idl/@ohos.file.BackupExtensionContext.idl | 10 +- idl/@ohos.file.backup.idl | 78 +- idl/@ohos.file.cloudSync.idl | 148 +- idl/@ohos.file.cloudSyncManager.idl | 100 +- idl/@ohos.file.environment.idl | 46 +- idl/@ohos.file.fileAccess.idl | 58 +- idl/@ohos.file.fileExtensionInfo.idl | 33 +- idl/@ohos.file.fileuri.idl | 20 +- idl/@ohos.file.fs.idl | 557 +++---- idl/@ohos.file.hash.idl | 28 +- idl/@ohos.file.keyManager.idl | 6 + idl/@ohos.file.photoAccessHelper.idl | 506 ++++--- idl/@ohos.file.picker.idl | 45 +- idl/@ohos.file.recent.idl | 24 +- idl/@ohos.file.securityLabel.idl | 34 +- idl/@ohos.file.statvfs.idl | 32 +- idl/@ohos.file.storageStatistics.idl | 94 +- idl/@ohos.file.trash.idl | 24 +- idl/@ohos.file.volumeManager.idl | 76 +- idl/@ohos.fileio.idl | 412 +++-- idl/@ohos.filemanagement.userFileManager.idl | 72 +- idl/@ohos.fileshare.idl | 64 +- idl/@ohos.font.idl | 38 +- idl/@ohos.fontManager.idl | 8 + idl/@ohos.geoLocationManager.idl | 370 ++--- idl/@ohos.geolocation.idl | 174 +-- idl/@ohos.graphics.colorSpaceManager.idl | 26 +- idl/@ohos.graphics.common2D.idl | 20 +- idl/@ohos.graphics.displaySync.idl | 16 +- idl/@ohos.graphics.drawing.idl | 227 ++- idl/@ohos.graphics.hdrCapability.idl | 7 +- idl/@ohos.graphics.text.idl | 150 +- idl/@ohos.graphics.uiEffect.idl | 93 +- idl/@ohos.hiAppEvent.idl | 30 +- idl/@ohos.hiSysEvent.idl | 58 +- idl/@ohos.hiTraceChain.idl | 38 +- idl/@ohos.hiTraceMeter.idl | 27 +- idl/@ohos.hichecker.idl | 41 +- idl/@ohos.hidebug.idl | 130 +- idl/@ohos.hilog.idl | 32 +- idl/@ohos.hiviewdfx.hiAppEvent.idl | 96 +- idl/@ohos.hiviewdfx.jsLeakWatcher.idl | 24 +- idl/@ohos.i18n.idl | 253 ++-- idl/@ohos.identifier.oaid.idl | 20 +- idl/@ohos.inputMethod.Panel.idl | 6 - idl/@ohos.inputMethod.idl | 197 ++- idl/@ohos.inputMethodEngine.idl | 209 +-- idl/@ohos.intl.idl | 158 +- idl/@ohos.logLibrary.idl | 36 +- idl/@ohos.matrix4.idl | 58 +- idl/@ohos.measure.idl | 16 +- idl/@ohos.mediaquery.idl | 18 +- idl/@ohos.multimedia.audio.idl | 572 +++---- idl/@ohos.multimedia.audioHaptic.idl | 55 +- idl/@ohos.multimedia.avCastPickerParam.idl | 6 - idl/@ohos.multimedia.avsession.idl | 549 +++---- idl/@ohos.multimedia.camera.idl | 897 +++++------ idl/@ohos.multimedia.cameraPicker.idl | 22 +- idl/@ohos.multimedia.drm.idl | 86 +- idl/@ohos.multimedia.image.idl | 345 ++--- idl/@ohos.multimedia.media.idl | 468 +++--- idl/@ohos.multimedia.movingphotoview.idl | 63 +- idl/@ohos.multimedia.systemSoundManager.idl | 75 +- ...@ohos.multimedia.videoProcessingEngine.idl | 28 + ...@ohos.multimodalAwareness.deviceStatus.idl | 23 + ...os.multimodalAwareness.metadataBinding.idl | 20 + idl/@ohos.multimodalAwareness.motion.idl | 31 + idl/@ohos.multimodalAwareness.userStatus.idl | 22 + idl/@ohos.multimodalInput.gestureEvent.idl | 18 - idl/@ohos.multimodalInput.infraredEmitter.idl | 20 +- idl/@ohos.multimodalInput.inputConsumer.idl | 58 +- idl/@ohos.multimodalInput.inputDevice.idl | 136 +- ...s.multimodalInput.inputDeviceCooperate.idl | 56 +- idl/@ohos.multimodalInput.inputEvent.idl | 4 +- ...@ohos.multimodalInput.inputEventClient.idl | 42 +- idl/@ohos.multimodalInput.inputMonitor.idl | 128 +- idl/@ohos.multimodalInput.intentionCode.idl | 4 +- idl/@ohos.multimodalInput.keyCode.idl | 6 +- idl/@ohos.multimodalInput.keyEvent.idl | 10 +- idl/@ohos.multimodalInput.mouseEvent.idl | 20 +- idl/@ohos.multimodalInput.pointer.idl | 331 ++-- idl/@ohos.multimodalInput.shortKey.idl | 22 +- idl/@ohos.multimodalInput.touchEvent.idl | 22 +- idl/@ohos.net.connection.idl | 250 ++-- idl/@ohos.net.eap.idl | 67 + idl/@ohos.net.ethernet.idl | 78 +- idl/@ohos.net.http.idl | 82 +- idl/@ohos.net.mdns.idl | 64 +- idl/@ohos.net.netFirewall.idl | 72 +- idl/@ohos.net.networkSecurity.idl | 30 +- idl/@ohos.net.policy.idl | 216 ++- idl/@ohos.net.sharing.idl | 122 +- idl/@ohos.net.socket.idl | 169 +-- idl/@ohos.net.statistics.idl | 138 +- idl/@ohos.net.vpn.idl | 60 +- idl/@ohos.net.vpnExtension.idl | 44 +- idl/@ohos.net.webSocket.idl | 108 +- idl/@ohos.nfc.cardEmulation.idl | 36 +- idl/@ohos.nfc.controller.idl | 42 +- idl/@ohos.nfc.tag.idl | 167 +-- idl/@ohos.notification.idl | 402 +++-- idl/@ohos.notificationManager.idl | 585 ++++---- idl/@ohos.notificationSubscribe.idl | 95 +- idl/@ohos.pasteboard.idl | 102 +- idl/@ohos.pluginComponent.idl | 38 +- idl/@ohos.power.idl | 67 +- idl/@ohos.print.idl | 354 +++-- idl/@ohos.privacyManager.idl | 98 +- idl/@ohos.process.idl | 66 +- idl/@ohos.prompt.idl | 46 +- idl/@ohos.promptAction.idl | 168 ++- idl/@ohos.reminderAgent.idl | 84 +- idl/@ohos.reminderAgentManager.idl | 114 +- idl/@ohos.request.cacheDownload.idl | 45 + idl/@ohos.request.idl | 244 ++- idl/@ohos.resourceManager.idl | 170 +-- ...ourceschedule.backgroundProcessManager.idl | 19 + ...resourceschedule.backgroundTaskManager.idl | 161 +- idl/@ohos.resourceschedule.deviceStandby.idl | 32 +- idl/@ohos.resourceschedule.systemload.idl | 22 +- ...@ohos.resourceschedule.usageStatistics.idl | 158 +- idl/@ohos.resourceschedule.workScheduler.idl | 64 +- idl/@ohos.router.idl | 131 +- idl/@ohos.rpc.idl | 84 +- idl/@ohos.runningLock.idl | 45 +- idl/@ohos.screen.idl | 135 +- idl/@ohos.screenLock.idl | 100 +- idl/@ohos.screenshot.idl | 55 +- idl/@ohos.secureElement.idl | 34 +- idl/@ohos.security.asset.idl | 113 +- idl/@ohos.security.cert.idl | 197 +-- idl/@ohos.security.certManager.idl | 161 +- idl/@ohos.security.certManagerDialog.idl | 37 +- idl/@ohos.security.cryptoFramework.idl | 215 +-- idl/@ohos.security.huks.idl | 333 ++--- idl/@ohos.security.securityGuard.idl | 59 +- ...lectionInput.SelectionExtensionAbility.idl | 10 + ...lectionInput.SelectionExtensionContext.idl | 8 + idl/@ohos.selectionInput.SelectionPanel.idl | 13 + idl/@ohos.selectionInput.selectionManager.idl | 61 + idl/@ohos.sensor.idl | 854 +++++------ idl/@ohos.settings.idl | 106 +- idl/@ohos.statfs.idl | 26 +- idl/@ohos.stationary.idl | 22 +- idl/@ohos.systemCapability.idl | 14 +- idl/@ohos.systemDateTime.idl | 106 +- idl/@ohos.systemParameterEnhance.idl | 38 +- idl/@ohos.systemTime.idl | 88 +- idl/@ohos.systemTimer.idl | 46 +- idl/@ohos.systemparameter.idl | 37 +- idl/@ohos.taskpool.idl | 101 +- idl/@ohos.telephony.call.idl | 636 ++++---- idl/@ohos.telephony.data.idl | 117 +- idl/@ohos.telephony.esim.idl | 202 +++ idl/@ohos.telephony.observer.idl | 120 +- idl/@ohos.telephony.radio.idl | 357 ++--- idl/@ohos.telephony.sim.idl | 444 +++--- idl/@ohos.telephony.sms.idl | 244 ++- idl/@ohos.telephony.vcard.idl | 42 +- idl/@ohos.test.PerfTest.idl | 49 + idl/@ohos.thermal.idl | 35 +- idl/@ohos.uiAppearance.idl | 40 +- idl/@ohos.uiExtensionHost.idl | 29 +- idl/@ohos.update.idl | 108 +- idl/@ohos.uri.idl | 36 +- idl/@ohos.url.idl | 48 +- idl/@ohos.usb.idl | 120 +- idl/@ohos.usbManager.idl | 301 ++-- idl/@ohos.usbManager.serial.idl | 93 ++ idl/@ohos.userIAM.faceAuth.idl | 7 +- idl/@ohos.userIAM.userAccessCtrl.idl | 27 + idl/@ohos.userIAM.userAuth.idl | 135 +- idl/@ohos.util.ArrayList.idl | 34 +- idl/@ohos.util.Deque.idl | 39 +- idl/@ohos.util.HashMap.idl | 37 +- idl/@ohos.util.HashSet.idl | 29 +- idl/@ohos.util.LightWeightMap.idl | 41 +- idl/@ohos.util.LightWeightSet.idl | 35 +- idl/@ohos.util.LinkedList.idl | 38 +- idl/@ohos.util.List.idl | 47 +- idl/@ohos.util.PlainArray.idl | 31 +- idl/@ohos.util.Queue.idl | 27 +- idl/@ohos.util.Stack.idl | 27 +- idl/@ohos.util.TreeMap.idl | 52 +- idl/@ohos.util.TreeSet.idl | 52 +- idl/@ohos.util.Vector.idl | 19 +- idl/@ohos.util.idl | 114 +- idl/@ohos.util.json.idl | 37 +- idl/@ohos.util.stream.idl | 48 +- idl/@ohos.vibrator.idl | 150 +- idl/@ohos.wallpaper.idl | 186 ++- idl/@ohos.wantAgent.idl | 76 +- idl/@ohos.web.netErrorList.idl | 2 - idl/@ohos.web.webview.idl | 212 +-- idl/@ohos.wifi.idl | 366 ++--- idl/@ohos.wifiManager.idl | 542 +++---- idl/@ohos.wifiManagerExt.idl | 40 +- idl/@ohos.wifiext.idl | 40 +- idl/@ohos.window.floatingBall.idl | 65 + idl/@ohos.window.idl | 639 +++++--- idl/@ohos.worker.idl | 64 +- idl/@ohos.xml.idl | 43 +- idl/@ohos.zlib.idl | 98 +- idl/@system.app.idl | 10 +- idl/@system.battery.idl | 8 +- idl/@system.bluetooth.idl | 14 +- idl/@system.brightness.idl | 18 +- idl/@system.cipher.idl | 10 +- idl/@system.configuration.idl | 6 +- idl/@system.device.idl | 30 +- idl/@system.fetch.idl | 8 +- idl/@system.file.idl | 36 +- idl/@system.geolocation.idl | 14 +- idl/@system.mediaquery.idl | 12 +- idl/@system.network.idl | 10 +- idl/@system.notification.idl | 10 +- idl/@system.package.idl | 8 +- idl/@system.prompt.idl | 60 +- idl/@system.request.idl | 20 +- idl/@system.router.idl | 16 +- idl/@system.sensor.idl | 46 +- idl/@system.storage.idl | 12 +- idl/@system.vibrator.idl | 6 +- idl/AbilityStageContext.idl | 11 - idl/AutoFillExtensionContext.idl | 10 - idl/DriverExtensionContext.idl | 8 - idl/EmbeddableUIAbilityContext.idl | 7 - idl/ExtensionContext.idl | 13 - idl/NavRouterModifier.idl | 8 - idl/NavigatorModifier.idl | 8 - idl/PanelModifier.idl | 8 - idl/ParticleModifier.idl | 1 - idl/SymbolGlyphModifier.idl | 9 - idl/TextModifier.idl | 8 - idl/VpnExtensionContext.idl | 7 - ...tyResult.idl => ability.abilityResult.idl} | 6 +- ...Options.idl => ability.connectOptions.idl} | 8 +- ...lper.idl => ability.dataAbilityHelper.idl} | 14 +- ...n.idl => ability.dataAbilityOperation.idl} | 10 +- ...sult.idl => ability.dataAbilityResult.idl} | 4 +- ....idl => ability.startAbilityParameter.idl} | 8 +- idl/ability_component.idl | 16 +- idl/action_sheet.idl | 51 +- ...ment.idl => advertising.advertisement.idl} | 4 +- idl/alert_dialog.idl | 57 +- idl/alphabet_indexer.idl | 16 +- idl/animator.idl | 19 +- ...VersionInfo.idl => app.appVersionInfo.idl} | 4 +- idl/app.context.idl | 104 ++ idl/{processInfo.idl => app.processInfo.idl} | 4 +- ...r.idl => application.AbilityDelegator.idl} | 18 +- ...pplication.AbilityFirstFrameStateData.idl} | 6 +- ...cation.AbilityFirstFrameStateObserver.idl} | 8 +- ...cation.AbilityForegroundStateObserver.idl} | 8 +- ...tor.idl => application.AbilityMonitor.idl} | 8 +- ...idl => application.AbilityRunningInfo.idl} | 8 +- idl/application.AbilityStageContext.idl | 9 + ...dl => application.AbilityStageMonitor.idl} | 6 +- ...l => application.AbilityStartCallback.idl} | 8 +- ...a.idl => application.AbilityStateData.idl} | 6 +- ...ication.AccessibilityExtensionContext.idl} | 224 ++- ...pplication.AppForegroundStateObserver.idl} | 8 +- ...application.AppServiceExtensionContext.idl | 16 + ...eData.idl => application.AppStateData.idl} | 6 +- ...idl => application.ApplicationContext.idl} | 32 +- ... application.ApplicationStateObserver.idl} | 12 +- idl/application.AutoFillExtensionContext.idl | 8 + ...dl => application.AutoFillPopupConfig.idl} | 10 +- ...lRect.idl => application.AutoFillRect.idl} | 6 +- ...st.idl => application.AutoFillRequest.idl} | 20 +- ...lType.idl => application.AutoFillType.idl} | 4 +- ...dl => application.AutoStartupCallback.idl} | 8 +- ...fo.idl => application.AutoStartupInfo.idl} | 12 +- ...ontext.idl => application.BaseContext.idl} | 6 +- ...dl => application.BusinessAbilityInfo.idl} | 8 +- idl/{Context.idl => application.Context.idl} | 23 +- ...fo.idl => application.ContinuableInfo.idl} | 4 +- ...k.idl => application.ContinueCallback.idl} | 4 +- ...idl => application.ContinueDeviceInfo.idl} | 4 +- ...dl => application.ContinueMissionInfo.idl} | 4 +- ...tomData.idl => application.CustomData.idl} | 6 +- idl/application.DriverExtensionContext.idl | 6 + ...application.EmbeddableUIAbilityContext.idl | 5 + ...rver.idl => application.ErrorObserver.idl} | 6 +- ...{EventHub.idl => application.EventHub.idl} | 6 +- idl/application.ExtensionContext.idl | 11 + ...l => application.ExtensionRunningInfo.idl} | 8 +- idl/application.FormEditExtensionContext.idl | 9 + ...l => application.FormExtensionContext.idl} | 14 +- idl/application.KioskStatus.idl | 7 + idl/application.LiveFormExtensionContext.idl | 8 + ...erver.idl => application.LoopObserver.idl} | 4 +- ...s.idl => application.MissionCallbacks.idl} | 2 - ....idl => application.MissionDeviceInfo.idl} | 4 +- ...onInfo.idl => application.MissionInfo.idl} | 6 +- ...er.idl => application.MissionListener.idl} | 6 +- ...r.idl => application.MissionParameter.idl} | 4 +- ...ot.idl => application.MissionSnapshot.idl} | 8 +- ...pMode.idl => application.MultiAppMode.idl} | 4 +- ...eInfo.idl => application.PageNodeInfo.idl} | 10 +- ...plication.PhotoEditorExtensionContext.idl} | 14 +- ...ssData.idl => application.ProcessData.idl} | 6 +- ...idl => application.ProcessInformation.idl} | 9 +- ...idl => application.ProcessRunningInfo.idl} | 4 +- ...ne.idl => application.RunningAppClone.idl} | 4 +- ...dl => application.RunningMultiAppInfo.idl} | 10 +- ... application.RunningMultiInstanceInfo.idl} | 4 +- ...> application.ServiceExtensionContext.idl} | 24 +- ...t.idl => application.UIAbilityContext.idl} | 63 +- ...idl => application.UIExtensionContext.idl} | 31 +- ...ion.UIServiceExtensionConnectCallback.idl} | 6 +- ...application.UIServiceExtensionContext.idl} | 18 +- ...idl => application.UIServiceHostProxy.idl} | 6 +- ...oxy.idl => application.UIServiceProxy.idl} | 6 +- ...{ViewData.idl => application.ViewData.idl} | 10 +- idl/application.VpnExtensionContext.idl | 5 + ...=> application.WindowExtensionContext.idl} | 14 +- ...ication.WorkSchedulerExtensionContext.idl} | 12 +- ...l => application.abilityDelegatorArgs.idl} | 4 +- ...ult.idl => application.shellCmdResult.idl} | 4 +- ....idl => arkui.AlphabetIndexerModifier.idl} | 6 +- ...Updater.idl => arkui.AttributeUpdater.idl} | 19 +- ...nkModifier.idl => arkui.BlankModifier.idl} | 6 +- ...{BuilderNode.idl => arkui.BuilderNode.idl} | 42 +- ...nModifier.idl => arkui.ButtonModifier.idl} | 6 +- ...r.idl => arkui.CalendarPickerModifier.idl} | 6 +- ...er.idl => arkui.CheckboxGroupModifier.idl} | 6 +- ...odifier.idl => arkui.CheckboxModifier.idl} | 6 +- ...nModifier.idl => arkui.ColumnModifier.idl} | 6 +- ...fier.idl => arkui.ColumnSplitModifier.idl} | 6 +- ...nModifier.idl => arkui.CommonModifier.idl} | 6 +- ...Content.idl => arkui.ComponentContent.idl} | 38 +- ...er.idl => arkui.ContainerSpanModifier.idl} | 6 +- idl/{Content.idl => arkui.Content.idl} | 4 +- ...Modifier.idl => arkui.CounterModifier.idl} | 6 +- ...difier.idl => arkui.DataPanelModifier.idl} | 6 +- ...ifier.idl => arkui.DatePickerModifier.idl} | 6 +- ...Modifier.idl => arkui.DividerModifier.idl} | 6 +- ...er.idl => arkui.FormComponentModifier.idl} | 6 +- idl/{FrameNode.idl => arkui.FrameNode.idl} | 316 ++-- ...geModifier.idl => arkui.GaugeModifier.idl} | 6 +- idl/{Graphics.idl => arkui.Graphics.idl} | 62 +- ...Modifier.idl => arkui.GridColModifier.idl} | 6 +- ...odifier.idl => arkui.GridItemModifier.idl} | 6 +- ...ridModifier.idl => arkui.GridModifier.idl} | 6 +- ...Modifier.idl => arkui.GridRowModifier.idl} | 6 +- ...difier.idl => arkui.HyperlinkModifier.idl} | 6 +- ...er.idl => arkui.ImageAnimatorModifier.idl} | 6 +- ...geModifier.idl => arkui.ImageModifier.idl} | 6 +- ...difier.idl => arkui.ImageSpanModifier.idl} | 6 +- ...ineModifier.idl => arkui.LineModifier.idl} | 6 +- ...er.idl => arkui.ListItemGroupModifier.idl} | 6 +- ...odifier.idl => arkui.ListItemModifier.idl} | 6 +- ...istModifier.idl => arkui.ListModifier.idl} | 6 +- ....idl => arkui.LoadingProgressModifier.idl} | 6 +- ...Modifier.idl => arkui.MarqueeModifier.idl} | 6 +- ...odifier.idl => arkui.MenuItemModifier.idl} | 6 +- ...enuModifier.idl => arkui.MenuModifier.idl} | 6 +- ...r.idl => arkui.NavDestinationModifier.idl} | 6 +- idl/arkui.NavRouterModifier.idl | 6 + ...ifier.idl => arkui.NavigationModifier.idl} | 6 +- idl/arkui.NavigatorModifier.idl | 6 + ...{NodeContent.idl => arkui.NodeContent.idl} | 10 +- ...ontroller.idl => arkui.NodeController.idl} | 20 +- idl/arkui.PanelModifier.idl | 6 + idl/arkui.ParticleModifier.idl | 1 + ...athModifier.idl => arkui.PathModifier.idl} | 6 +- ...fier.idl => arkui.PatternLockModifier.idl} | 6 +- ...Modifier.idl => arkui.PolygonModifier.idl} | 6 +- ...odifier.idl => arkui.PolylineModifier.idl} | 6 +- ...odifier.idl => arkui.ProgressModifier.idl} | 6 +- ...eModifier.idl => arkui.QRCodeModifier.idl} | 6 +- ...ioModifier.idl => arkui.RadioModifier.idl} | 6 +- ...gModifier.idl => arkui.RatingModifier.idl} | 6 +- ...ectModifier.idl => arkui.RectModifier.idl} | 6 +- ...Modifier.idl => arkui.RefreshModifier.idl} | 6 +- idl/{RenderNode.idl => arkui.RenderNode.idl} | 6 +- ...ifier.idl => arkui.RichEditorModifier.idl} | 6 +- ...{RowModifier.idl => arkui.RowModifier.idl} | 6 +- ...odifier.idl => arkui.RowSplitModifier.idl} | 6 +- ...lModifier.idl => arkui.ScrollModifier.idl} | 6 +- ...hModifier.idl => arkui.SearchModifier.idl} | 6 +- ...tModifier.idl => arkui.SelectModifier.idl} | 6 +- ...peModifier.idl => arkui.ShapeModifier.idl} | 6 +- ...idl => arkui.SideBarContainerModifier.idl} | 6 +- ...rModifier.idl => arkui.SliderModifier.idl} | 6 +- ...panModifier.idl => arkui.SpanModifier.idl} | 6 +- ...ckModifier.idl => arkui.StackModifier.idl} | 6 +- ...fier.idl => arkui.StepperItemModifier.idl} | 6 +- idl/arkui.StepperModifier.idl | 6 + ...rModifier.idl => arkui.SwiperModifier.idl} | 6 +- idl/arkui.SymbolGlyphModifier.idl | 21 + ...ifier.idl => arkui.SymbolSpanModifier.idl} | 6 +- ...absModifier.idl => arkui.TabsModifier.idl} | 6 +- ...odifier.idl => arkui.TextAreaModifier.idl} | 6 +- ...difier.idl => arkui.TextClockModifier.idl} | 6 +- ...difier.idl => arkui.TextInputModifier.idl} | 6 +- idl/arkui.TextModifier.idl | 19 + ...ifier.idl => arkui.TextPickerModifier.idl} | 6 +- ...difier.idl => arkui.TextTimerModifier.idl} | 6 +- ...ifier.idl => arkui.TimePickerModifier.idl} | 6 +- ...eModifier.idl => arkui.ToggleModifier.idl} | 6 +- ...eoModifier.idl => arkui.VideoModifier.idl} | 6 +- ...difier.idl => arkui.WaterFlowModifier.idl} | 6 +- ...onentNode.idl => arkui.XComponentNode.idl} | 15 +- idl/badge.idl | 29 +- idl/blank.idl | 8 +- ...issionDef.idl => bundle.PermissionDef.idl} | 4 +- ...AbilityInfo.idl => bundle.abilityInfo.idl} | 10 +- ...ionInfo.idl => bundle.applicationInfo.idl} | 8 +- idl/{BundleInfo.idl => bundle.bundleInfo.idl} | 12 +- ...staller.idl => bundle.bundleInstaller.idl} | 8 +- ...ck.idl => bundle.bundleStatusCallback.idl} | 4 +- ...omizeData.idl => bundle.customizeData.idl} | 4 +- ...ElementName.idl => bundle.elementName.idl} | 4 +- ...oduleInfo.idl => bundle.hapModuleInfo.idl} | 6 +- idl/bundle.launcherAbilityInfo.idl | 18 + idl/{moduleInfo.idl => bundle.moduleInfo.idl} | 4 +- ...yInfo.idl => bundle.remoteAbilityInfo.idl} | 6 +- idl/bundle.shortcutInfo.idl | 35 + idl/bundleManager.AbilityInfo.idl | 45 + ...idl => bundleManager.AppProvisionInfo.idl} | 6 +- idl/bundleManager.ApplicationInfo.idl | 60 + idl/bundleManager.BundleInfo.idl | 65 + ...o.idl => bundleManager.BundlePackInfo.idl} | 24 +- ...l => bundleManager.BundleResourceInfo.idl} | 4 +- ...nfo.idl => bundleManager.DispatchInfo.idl} | 4 +- idl/bundleManager.ElementName.idl | 14 + ...=> bundleManager.ExtensionAbilityInfo.idl} | 12 +- idl/bundleManager.HapModuleInfo.idl | 52 + ... => bundleManager.LauncherAbilityInfo.idl} | 8 +- ...leManager.LauncherAbilityResourceInfo.idl} | 4 +- ...etadata.idl => bundleManager.Metadata.idl} | 4 +- ...dl => bundleManager.OverlayModuleInfo.idl} | 4 +- idl/bundleManager.PermissionDef.idl | 8 + idl/bundleManager.PluginBundleInfo.idl | 18 + ...dleManager.RecoverableApplicationInfo.idl} | 6 +- idl/bundleManager.RemoteAbilityInfo.idl | 8 + ...idl => bundleManager.SharedBundleInfo.idl} | 10 +- ...nfo.idl => bundleManager.ShortcutInfo.idl} | 10 +- idl/{Skill.idl => bundleManager.Skill.idl} | 6 +- idl/button.idl | 48 +- idl/calendar.idl | 201 +-- idl/calendar_picker.idl | 41 +- idl/canvas.idl | 91 +- idl/checkbox.idl | 26 +- idl/checkboxgroup.idl | 23 +- idl/circle.idl | 19 +- idl/column.idl | 16 +- idl/column_split.idl | 10 +- idl/common.idl | 1330 +++++++++-------- ...ta.idl => commonEvent.commonEventData.idl} | 8 +- ...=> commonEvent.commonEventPublishData.idl} | 8 +- ... commonEvent.commonEventSubscribeInfo.idl} | 4 +- ... => commonEvent.commonEventSubscriber.idl} | 8 +- idl/common_ts_ets_api.idl | 42 +- idl/component3d.idl | 18 +- idl/container_span.idl | 6 +- idl/content_slot.idl | 9 +- idl/context_menu.idl | 6 +- ... continuation.continuationExtraParams.idl} | 6 +- ...dl => continuation.continuationResult.idl} | 4 +- idl/counter.idl | 8 +- idl/custom_dialog_controller.idl | 42 +- idl/{resultSet.idl => data.rdb.resultSet.idl} | 4 +- idl/data_panel.idl | 24 +- idl/date_picker.idl | 55 +- idl/divider.idl | 9 +- idl/effect_component.idl | 21 +- idl/ellipse.idl | 18 +- idl/embedded_component.idl | 28 +- idl/enums.idl | 217 +-- idl/flex.idl | 17 +- idl/flow_item.idl | 7 +- idl/focus.idl | 8 +- idl/folder_stack.idl | 22 +- idl/for_each.idl | 1 - idl/form_component.idl | 58 +- idl/form_link.idl | 9 +- idl/gauge.idl | 27 +- idl/gesture.idl | 315 ++-- idl/{Scene.idl => graphics3d.Scene.idl} | 56 +- ...eneNodes.idl => graphics3d.SceneNodes.idl} | 28 +- ...> graphics3d.ScenePostProcessSettings.idl} | 8 - ...rces.idl => graphics3d.SceneResources.idl} | 102 +- ...eneTypes.idl => graphics3d.SceneTypes.idl} | 36 +- idl/grid.idl | 64 +- idl/gridItem.idl | 14 +- idl/grid_col.idl | 11 +- idl/grid_container.idl | 11 +- idl/grid_row.idl | 23 +- idl/hyperlink.idl | 9 +- idl/image.idl | 101 +- idl/image_animator.idl | 13 +- idl/image_common.idl | 9 - idl/image_span.idl | 16 +- idl/index-full.idl | 1 - idl/indicatorcomponent.idl | 12 +- idl/inspector.idl | 27 +- idl/isolated_component.idl | 19 +- idl/lazy_for_each.idl | 41 +- idl/lazy_grid_layout.idl | 17 + idl/line.idl | 25 +- idl/linearindicator.idl | 16 +- idl/list.idl | 78 +- idl/list_item.idl | 26 +- idl/list_item_group.idl | 15 +- idl/loading_progress.idl | 14 +- idl/location_button.idl | 73 - idl/marquee.idl | 14 +- idl/matrix2d.idl | 3 +- idl/media_cached_image.idl | 14 +- idl/menu.idl | 16 +- idl/menu_item.idl | 14 +- idl/menu_item_group.idl | 11 +- ...ayer.idl => multimedia.ringtonePlayer.idl} | 16 +- ...soundPool.idl => multimedia.soundPool.idl} | 41 +- ...er.idl => multimedia.systemTonePlayer.idl} | 10 +- idl/nav_destination.idl | 64 +- idl/nav_router.idl | 11 +- idl/navigation.idl | 138 +- idl/navigator.idl | 11 +- idl/node_container.idl | 13 +- ...=> notification.NotificationCommonDef.idl} | 2 - ...notification.notificationActionButton.idl} | 13 +- ...l => notification.notificationContent.idl} | 40 +- ...idl => notification.notificationFlags.idl} | 4 - ...l => notification.notificationRequest.idl} | 34 +- ....idl => notification.notificationSlot.idl} | 12 +- ...l => notification.notificationSorting.idl} | 6 +- ...> notification.notificationSortingMap.idl} | 4 +- ...otification.notificationSubscribeInfo.idl} | 7 +- ...> notification.notificationSubscriber.idl} | 25 +- ... => notification.notificationTemplate.idl} | 4 +- ...=> notification.notificationUserInput.idl} | 4 +- idl/page_transition.idl | 35 +- idl/panel.idl | 13 +- idl/particle.idl | 97 +- idl/paste_button.idl | 17 +- idl/path.idl | 21 +- idl/pattern_lock.idl | 21 +- idl/permissions.idl | 1 + idl/plugin_component.idl | 14 +- idl/polygon.idl | 19 +- idl/polyline.idl | 19 +- idl/progress.idl | 74 +- idl/qrcode.idl | 12 +- idl/radio.idl | 22 +- idl/rating.idl | 29 +- idl/rawFileDescriptor.idl | 3 +- idl/rect.idl | 38 +- idl/refresh.idl | 17 +- idl/relative_container.idl | 21 +- idl/remote_window.idl | 11 +- idl/repeat.idl | 9 +- idl/resource.idl | 3 +- idl/rich_editor.idl | 188 ++- idl/rich_text.idl | 9 +- idl/root_scene.idl | 9 +- idl/row.idl | 16 +- idl/row_split.idl | 7 +- idl/save_button.idl | 22 +- idl/screen.idl | 7 +- idl/scroll.idl | 86 +- idl/scroll_bar.idl | 15 +- idl/search.idl | 69 +- ...l => security.PermissionRequestResult.idl} | 10 +- idl/security_component.idl | 10 +- idl/select.idl | 70 +- idl/shape.idl | 31 +- idl/sidebar.idl | 26 +- idl/slider.idl | 70 +- idl/span.idl | 492 +++++- idl/stack.idl | 11 +- idl/state_management.idl | 8 +- idl/stepper.idl | 17 +- idl/stepper_item.idl | 9 +- idl/styled_string.idl | 140 +- idl/swiper.idl | 70 +- idl/symbol_span.idl | 478 +++++- idl/symbolglyph.idl | 68 +- idl/tab_content.idl | 80 +- idl/tabs.idl | 54 +- idl/{nfctech.idl => tag.nfctech.idl} | 26 +- idl/{tagSession.idl => tag.tagSession.idl} | 6 +- idl/text.idl | 62 +- idl/text_area.idl | 70 +- idl/text_clock.idl | 28 +- idl/text_common.idl | 220 ++- idl/text_input.idl | 77 +- idl/text_picker.idl | 141 +- idl/text_timer.idl | 29 +- idl/time_picker.idl | 54 +- idl/toggle.idl | 21 +- idl/toolbar.idl | 17 + idl/ui_extension_component.idl | 71 +- idl/units.idl | 141 +- idl/video.idl | 47 +- ...ggerInfo.idl => wantAgent.triggerInfo.idl} | 12 +- ...ntInfo.idl => wantAgent.wantAgentInfo.idl} | 21 +- idl/water_flow.idl | 51 +- idl/web.idl | 398 ++--- idl/window_scene.idl | 8 +- idl/with_theme.idl | 10 +- idl/xcomponent.idl | 78 +- 857 files changed, 24471 insertions(+), 25116 deletions(-) create mode 100644 idl/@ohos.app.ability.AppServiceExtensionAbility.idl create mode 100644 idl/@ohos.app.ability.CompletionHandler.idl create mode 100644 idl/@ohos.app.ability.CompletionHandlerForAtomicService.idl create mode 100644 idl/@ohos.app.ability.InsightIntentDecorator.idl create mode 100644 idl/@ohos.app.ability.InsightIntentEntryExecutor.idl create mode 100644 idl/@ohos.app.ability.continueManager.idl create mode 100644 idl/@ohos.app.ability.kioskManager.idl create mode 100644 idl/@ohos.app.form.FormEditExtensionAbility.idl create mode 100644 idl/@ohos.app.form.LiveFormExtensionAbility.idl create mode 100644 idl/@ohos.application.DistributedExtensionAbility.idl create mode 100644 idl/@ohos.application.DistributedExtensionContext.idl create mode 100644 idl/@ohos.arkui.ArcAlphabetIndexer.idl create mode 100644 idl/@ohos.arkui.ArcList.idl create mode 100644 idl/@ohos.arkui.ArcScrollBar.idl create mode 100644 idl/@ohos.arkui.ArcSwiper.idl create mode 100644 idl/@ohos.bluetooth.opp.idl create mode 100644 idl/@ohos.data.intelligence.idl create mode 100644 idl/@ohos.distributedHardware.mechanicManager.idl create mode 100644 idl/@ohos.distributedsched.abilityConnectionManager.idl create mode 100644 idl/@ohos.distributedsched.linkEnhance.idl create mode 100644 idl/@ohos.distributedsched.proxyChannelManager.idl create mode 100644 idl/@ohos.enterprise.telephonyManager.idl create mode 100644 idl/@ohos.fastbuffer.idl create mode 100644 idl/@ohos.file.keyManager.idl create mode 100644 idl/@ohos.fontManager.idl create mode 100644 idl/@ohos.multimedia.videoProcessingEngine.idl create mode 100644 idl/@ohos.multimodalAwareness.deviceStatus.idl create mode 100644 idl/@ohos.multimodalAwareness.metadataBinding.idl create mode 100644 idl/@ohos.multimodalAwareness.motion.idl create mode 100644 idl/@ohos.multimodalAwareness.userStatus.idl create mode 100644 idl/@ohos.net.eap.idl create mode 100644 idl/@ohos.request.cacheDownload.idl create mode 100644 idl/@ohos.resourceschedule.backgroundProcessManager.idl create mode 100644 idl/@ohos.selectionInput.SelectionExtensionAbility.idl create mode 100644 idl/@ohos.selectionInput.SelectionExtensionContext.idl create mode 100644 idl/@ohos.selectionInput.SelectionPanel.idl create mode 100644 idl/@ohos.selectionInput.selectionManager.idl create mode 100644 idl/@ohos.telephony.esim.idl create mode 100644 idl/@ohos.test.PerfTest.idl create mode 100644 idl/@ohos.usbManager.serial.idl create mode 100644 idl/@ohos.userIAM.userAccessCtrl.idl create mode 100644 idl/@ohos.window.floatingBall.idl delete mode 100644 idl/AbilityStageContext.idl delete mode 100644 idl/AutoFillExtensionContext.idl delete mode 100644 idl/DriverExtensionContext.idl delete mode 100644 idl/EmbeddableUIAbilityContext.idl delete mode 100644 idl/ExtensionContext.idl delete mode 100644 idl/NavRouterModifier.idl delete mode 100644 idl/NavigatorModifier.idl delete mode 100644 idl/PanelModifier.idl delete mode 100644 idl/ParticleModifier.idl delete mode 100644 idl/SymbolGlyphModifier.idl delete mode 100644 idl/TextModifier.idl delete mode 100644 idl/VpnExtensionContext.idl rename idl/{abilityResult.idl => ability.abilityResult.idl} (60%) rename idl/{connectOptions.idl => ability.connectOptions.idl} (61%) rename idl/{dataAbilityHelper.idl => ability.dataAbilityHelper.idl} (92%) rename idl/{dataAbilityOperation.idl => ability.dataAbilityOperation.idl} (73%) rename idl/{dataAbilityResult.idl => ability.dataAbilityResult.idl} (79%) rename idl/{startAbilityParameter.idl => ability.startAbilityParameter.idl} (79%) rename idl/{advertisement.idl => advertising.advertisement.idl} (87%) rename idl/{appVersionInfo.idl => app.appVersionInfo.idl} (86%) create mode 100644 idl/app.context.idl rename idl/{processInfo.idl => app.processInfo.idl} (80%) rename idl/{AbilityDelegator.idl => application.AbilityDelegator.idl} (88%) rename idl/{AbilityFirstFrameStateData.idl => application.AbilityFirstFrameStateData.idl} (71%) rename idl/{AbilityFirstFrameStateObserver.idl => application.AbilityFirstFrameStateObserver.idl} (37%) rename idl/{AbilityForegroundStateObserver.idl => application.AbilityForegroundStateObserver.idl} (43%) rename idl/{AbilityMonitor.idl => application.AbilityMonitor.idl} (84%) rename idl/{AbilityRunningInfo.idl => application.AbilityRunningInfo.idl} (60%) create mode 100644 idl/application.AbilityStageContext.idl rename idl/{AbilityStageMonitor.idl => application.AbilityStageMonitor.idl} (57%) rename idl/{AbilityStartCallback.idl => application.AbilityStartCallback.idl} (53%) rename idl/{AbilityStateData.idl => application.AbilityStateData.idl} (83%) rename idl/{AccessibilityExtensionContext.idl => application.AccessibilityExtensionContext.idl} (53%) rename idl/{AppForegroundStateObserver.idl => application.AppForegroundStateObserver.idl} (41%) create mode 100644 idl/application.AppServiceExtensionContext.idl rename idl/{AppStateData.idl => application.AppStateData.idl} (75%) rename idl/{ApplicationContext.idl => application.ApplicationContext.idl} (76%) rename idl/{ApplicationStateObserver.idl => application.ApplicationStateObserver.idl} (65%) create mode 100644 idl/application.AutoFillExtensionContext.idl rename idl/{AutoFillPopupConfig.idl => application.AutoFillPopupConfig.idl} (88%) rename idl/{AutoFillRect.idl => application.AutoFillRect.idl} (66%) rename idl/{AutoFillRequest.idl => application.AutoFillRequest.idl} (78%) rename idl/{AutoFillType.idl => application.AutoFillType.idl} (97%) rename idl/{AutoStartupCallback.idl => application.AutoStartupCallback.idl} (47%) rename idl/{AutoStartupInfo.idl => application.AutoStartupInfo.idl} (50%) rename idl/{BaseContext.idl => application.BaseContext.idl} (48%) rename idl/{BusinessAbilityInfo.idl => application.BusinessAbilityInfo.idl} (69%) rename idl/{Context.idl => application.Context.idl} (76%) rename idl/{ContinuableInfo.idl => application.ContinuableInfo.idl} (85%) rename idl/{ContinueCallback.idl => application.ContinueCallback.idl} (70%) rename idl/{ContinueDeviceInfo.idl => application.ContinueDeviceInfo.idl} (83%) rename idl/{ContinueMissionInfo.idl => application.ContinueMissionInfo.idl} (88%) rename idl/{CustomData.idl => application.CustomData.idl} (50%) create mode 100644 idl/application.DriverExtensionContext.idl create mode 100644 idl/application.EmbeddableUIAbilityContext.idl rename idl/{ErrorObserver.idl => application.ErrorObserver.idl} (66%) rename idl/{EventHub.idl => application.EventHub.idl} (81%) create mode 100644 idl/application.ExtensionContext.idl rename idl/{ExtensionRunningInfo.idl => application.ExtensionRunningInfo.idl} (66%) create mode 100644 idl/application.FormEditExtensionContext.idl rename idl/{FormExtensionContext.idl => application.FormExtensionContext.idl} (62%) create mode 100644 idl/application.KioskStatus.idl create mode 100644 idl/application.LiveFormExtensionContext.idl rename idl/{LoopObserver.idl => application.LoopObserver.idl} (74%) rename idl/{MissionCallbacks.idl => application.MissionCallbacks.idl} (99%) rename idl/{MissionDeviceInfo.idl => application.MissionDeviceInfo.idl} (67%) rename idl/{MissionInfo.idl => application.MissionInfo.idl} (82%) rename idl/{MissionListener.idl => application.MissionListener.idl} (82%) rename idl/{MissionParameter.idl => application.MissionParameter.idl} (78%) rename idl/{MissionSnapshot.idl => application.MissionSnapshot.idl} (45%) rename idl/{MultiAppMode.idl => application.MultiAppMode.idl} (77%) rename idl/{PageNodeInfo.idl => application.PageNodeInfo.idl} (69%) rename idl/{PhotoEditorExtensionContext.idl => application.PhotoEditorExtensionContext.idl} (37%) rename idl/{ProcessData.idl => application.ProcessData.idl} (77%) rename idl/{ProcessInformation.idl => application.ProcessInformation.idl} (60%) rename idl/{ProcessRunningInfo.idl => application.ProcessRunningInfo.idl} (86%) rename idl/{RunningAppClone.idl => application.RunningAppClone.idl} (80%) rename idl/{RunningMultiAppInfo.idl => application.RunningMultiAppInfo.idl} (50%) rename idl/{RunningMultiInstanceInfo.idl => application.RunningMultiInstanceInfo.idl} (77%) rename idl/{ServiceExtensionContext.idl => application.ServiceExtensionContext.idl} (83%) rename idl/{UIAbilityContext.idl => application.UIAbilityContext.idl} (75%) rename idl/{UIExtensionContext.idl => application.UIExtensionContext.idl} (71%) rename idl/{UIServiceExtensionConnectCallback.idl => application.UIServiceExtensionConnectCallback.idl} (57%) rename idl/{UIServiceExtensionContext.idl => application.UIServiceExtensionContext.idl} (48%) rename idl/{UIServiceHostProxy.idl => application.UIServiceHostProxy.idl} (55%) rename idl/{UIServiceProxy.idl => application.UIServiceProxy.idl} (56%) rename idl/{ViewData.idl => application.ViewData.idl} (64%) create mode 100644 idl/application.VpnExtensionContext.idl rename idl/{WindowExtensionContext.idl => application.WindowExtensionContext.idl} (48%) rename idl/{WorkSchedulerExtensionContext.idl => application.WorkSchedulerExtensionContext.idl} (34%) rename idl/{abilityDelegatorArgs.idl => application.abilityDelegatorArgs.idl} (87%) rename idl/{shellCmdResult.idl => application.shellCmdResult.idl} (79%) rename idl/{AlphabetIndexerModifier.idl => arkui.AlphabetIndexerModifier.idl} (36%) rename idl/{AttributeUpdater.idl => arkui.AttributeUpdater.idl} (34%) rename idl/{BlankModifier.idl => arkui.BlankModifier.idl} (39%) rename idl/{BuilderNode.idl => arkui.BuilderNode.idl} (40%) rename idl/{ButtonModifier.idl => arkui.ButtonModifier.idl} (39%) rename idl/{CalendarPickerModifier.idl => arkui.CalendarPickerModifier.idl} (36%) rename idl/{CheckboxGroupModifier.idl => arkui.CheckboxGroupModifier.idl} (36%) rename idl/{CheckboxModifier.idl => arkui.CheckboxModifier.idl} (38%) rename idl/{ColumnModifier.idl => arkui.ColumnModifier.idl} (39%) rename idl/{ColumnSplitModifier.idl => arkui.ColumnSplitModifier.idl} (37%) rename idl/{CommonModifier.idl => arkui.CommonModifier.idl} (39%) rename idl/{ComponentContent.idl => arkui.ComponentContent.idl} (30%) rename idl/{ContainerSpanModifier.idl => arkui.ContainerSpanModifier.idl} (40%) rename idl/{Content.idl => arkui.Content.idl} (61%) rename idl/{CounterModifier.idl => arkui.CounterModifier.idl} (38%) rename idl/{DataPanelModifier.idl => arkui.DataPanelModifier.idl} (38%) rename idl/{DatePickerModifier.idl => arkui.DatePickerModifier.idl} (37%) rename idl/{DividerModifier.idl => arkui.DividerModifier.idl} (38%) rename idl/{FormComponentModifier.idl => arkui.FormComponentModifier.idl} (36%) rename idl/{FrameNode.idl => arkui.FrameNode.idl} (39%) rename idl/{GaugeModifier.idl => arkui.GaugeModifier.idl} (39%) rename idl/{Graphics.idl => arkui.Graphics.idl} (87%) rename idl/{GridColModifier.idl => arkui.GridColModifier.idl} (38%) rename idl/{GridItemModifier.idl => arkui.GridItemModifier.idl} (38%) rename idl/{GridModifier.idl => arkui.GridModifier.idl} (40%) rename idl/{GridRowModifier.idl => arkui.GridRowModifier.idl} (38%) rename idl/{HyperlinkModifier.idl => arkui.HyperlinkModifier.idl} (38%) rename idl/{ImageAnimatorModifier.idl => arkui.ImageAnimatorModifier.idl} (36%) rename idl/{ImageModifier.idl => arkui.ImageModifier.idl} (39%) rename idl/{ImageSpanModifier.idl => arkui.ImageSpanModifier.idl} (38%) rename idl/{LineModifier.idl => arkui.LineModifier.idl} (40%) rename idl/{ListItemGroupModifier.idl => arkui.ListItemGroupModifier.idl} (36%) rename idl/{ListItemModifier.idl => arkui.ListItemModifier.idl} (38%) rename idl/{ListModifier.idl => arkui.ListModifier.idl} (40%) rename idl/{LoadingProgressModifier.idl => arkui.LoadingProgressModifier.idl} (36%) rename idl/{MarqueeModifier.idl => arkui.MarqueeModifier.idl} (38%) rename idl/{MenuItemModifier.idl => arkui.MenuItemModifier.idl} (38%) rename idl/{MenuModifier.idl => arkui.MenuModifier.idl} (40%) rename idl/{NavDestinationModifier.idl => arkui.NavDestinationModifier.idl} (36%) create mode 100644 idl/arkui.NavRouterModifier.idl rename idl/{NavigationModifier.idl => arkui.NavigationModifier.idl} (37%) create mode 100644 idl/arkui.NavigatorModifier.idl rename idl/{NodeContent.idl => arkui.NodeContent.idl} (42%) rename idl/{NodeController.idl => arkui.NodeController.idl} (66%) create mode 100644 idl/arkui.PanelModifier.idl create mode 100644 idl/arkui.ParticleModifier.idl rename idl/{PathModifier.idl => arkui.PathModifier.idl} (40%) rename idl/{PatternLockModifier.idl => arkui.PatternLockModifier.idl} (37%) rename idl/{PolygonModifier.idl => arkui.PolygonModifier.idl} (38%) rename idl/{PolylineModifier.idl => arkui.PolylineModifier.idl} (38%) rename idl/{ProgressModifier.idl => arkui.ProgressModifier.idl} (38%) rename idl/{QRCodeModifier.idl => arkui.QRCodeModifier.idl} (39%) rename idl/{RadioModifier.idl => arkui.RadioModifier.idl} (39%) rename idl/{RatingModifier.idl => arkui.RatingModifier.idl} (39%) rename idl/{RectModifier.idl => arkui.RectModifier.idl} (40%) rename idl/{RefreshModifier.idl => arkui.RefreshModifier.idl} (38%) rename idl/{RenderNode.idl => arkui.RenderNode.idl} (95%) rename idl/{RichEditorModifier.idl => arkui.RichEditorModifier.idl} (37%) rename idl/{RowModifier.idl => arkui.RowModifier.idl} (40%) rename idl/{RowSplitModifier.idl => arkui.RowSplitModifier.idl} (38%) rename idl/{ScrollModifier.idl => arkui.ScrollModifier.idl} (39%) rename idl/{SearchModifier.idl => arkui.SearchModifier.idl} (39%) rename idl/{SelectModifier.idl => arkui.SelectModifier.idl} (39%) rename idl/{ShapeModifier.idl => arkui.ShapeModifier.idl} (39%) rename idl/{SideBarContainerModifier.idl => arkui.SideBarContainerModifier.idl} (35%) rename idl/{SliderModifier.idl => arkui.SliderModifier.idl} (39%) rename idl/{SpanModifier.idl => arkui.SpanModifier.idl} (40%) rename idl/{StackModifier.idl => arkui.StackModifier.idl} (39%) rename idl/{StepperItemModifier.idl => arkui.StepperItemModifier.idl} (37%) create mode 100644 idl/arkui.StepperModifier.idl rename idl/{SwiperModifier.idl => arkui.SwiperModifier.idl} (39%) create mode 100644 idl/arkui.SymbolGlyphModifier.idl rename idl/{SymbolSpanModifier.idl => arkui.SymbolSpanModifier.idl} (46%) rename idl/{TabsModifier.idl => arkui.TabsModifier.idl} (40%) rename idl/{TextAreaModifier.idl => arkui.TextAreaModifier.idl} (38%) rename idl/{TextClockModifier.idl => arkui.TextClockModifier.idl} (38%) rename idl/{TextInputModifier.idl => arkui.TextInputModifier.idl} (38%) create mode 100644 idl/arkui.TextModifier.idl rename idl/{TextPickerModifier.idl => arkui.TextPickerModifier.idl} (37%) rename idl/{TextTimerModifier.idl => arkui.TextTimerModifier.idl} (38%) rename idl/{TimePickerModifier.idl => arkui.TimePickerModifier.idl} (37%) rename idl/{ToggleModifier.idl => arkui.ToggleModifier.idl} (39%) rename idl/{VideoModifier.idl => arkui.VideoModifier.idl} (39%) rename idl/{WaterFlowModifier.idl => arkui.WaterFlowModifier.idl} (38%) rename idl/{XComponentNode.idl => arkui.XComponentNode.idl} (50%) rename idl/{PermissionDef.idl => bundle.PermissionDef.idl} (89%) rename idl/{AbilityInfo.idl => bundle.abilityInfo.idl} (90%) rename idl/{ApplicationInfo.idl => bundle.applicationInfo.idl} (90%) rename idl/{BundleInfo.idl => bundle.bundleInfo.idl} (91%) rename idl/{bundleInstaller.idl => bundle.bundleInstaller.idl} (96%) rename idl/{bundleStatusCallback.idl => bundle.bundleStatusCallback.idl} (90%) rename idl/{customizeData.idl => bundle.customizeData.idl} (86%) rename idl/{ElementName.idl => bundle.elementName.idl} (92%) rename idl/{HapModuleInfo.idl => bundle.hapModuleInfo.idl} (92%) create mode 100644 idl/bundle.launcherAbilityInfo.idl rename idl/{moduleInfo.idl => bundle.moduleInfo.idl} (86%) rename idl/{RemoteAbilityInfo.idl => bundle.remoteAbilityInfo.idl} (72%) create mode 100644 idl/bundle.shortcutInfo.idl create mode 100644 idl/bundleManager.AbilityInfo.idl rename idl/{AppProvisionInfo.idl => bundleManager.AppProvisionInfo.idl} (94%) create mode 100644 idl/bundleManager.ApplicationInfo.idl create mode 100644 idl/bundleManager.BundleInfo.idl rename idl/{BundlePackInfo.idl => bundleManager.BundlePackInfo.idl} (98%) rename idl/{BundleResourceInfo.idl => bundleManager.BundleResourceInfo.idl} (89%) rename idl/{DispatchInfo.idl => bundleManager.DispatchInfo.idl} (78%) create mode 100644 idl/bundleManager.ElementName.idl rename idl/{ExtensionAbilityInfo.idl => bundleManager.ExtensionAbilityInfo.idl} (75%) create mode 100644 idl/bundleManager.HapModuleInfo.idl rename idl/{launcherAbilityInfo.idl => bundleManager.LauncherAbilityInfo.idl} (64%) rename idl/{LauncherAbilityResourceInfo.idl => bundleManager.LauncherAbilityResourceInfo.idl} (89%) rename idl/{Metadata.idl => bundleManager.Metadata.idl} (85%) rename idl/{OverlayModuleInfo.idl => bundleManager.OverlayModuleInfo.idl} (86%) create mode 100644 idl/bundleManager.PermissionDef.idl create mode 100644 idl/bundleManager.PluginBundleInfo.idl rename idl/{RecoverableApplicationInfo.idl => bundleManager.RecoverableApplicationInfo.idl} (77%) create mode 100644 idl/bundleManager.RemoteAbilityInfo.idl rename idl/{SharedBundleInfo.idl => bundleManager.SharedBundleInfo.idl} (75%) rename idl/{shortcutInfo.idl => bundleManager.ShortcutInfo.idl} (91%) rename idl/{Skill.idl => bundleManager.Skill.idl} (95%) rename idl/{commonEventData.idl => commonEvent.commonEventData.idl} (78%) rename idl/{commonEventPublishData.idl => commonEvent.commonEventPublishData.idl} (82%) rename idl/{commonEventSubscribeInfo.idl => commonEvent.commonEventSubscribeInfo.idl} (88%) rename idl/{commonEventSubscriber.idl => commonEvent.commonEventSubscriber.idl} (89%) rename idl/{continuationExtraParams.idl => continuation.continuationExtraParams.idl} (76%) rename idl/{continuationResult.idl => continuation.continuationResult.idl} (76%) rename idl/{resultSet.idl => data.rdb.resultSet.idl} (97%) rename idl/{Scene.idl => graphics3d.Scene.idl} (63%) rename idl/{SceneNodes.idl => graphics3d.SceneNodes.idl} (84%) rename idl/{ScenePostProcessSettings.idl => graphics3d.ScenePostProcessSettings.idl} (98%) rename idl/{SceneResources.idl => graphics3d.SceneResources.idl} (58%) rename idl/{SceneTypes.idl => graphics3d.SceneTypes.idl} (88%) create mode 100644 idl/lazy_grid_layout.idl delete mode 100644 idl/location_button.idl rename idl/{ringtonePlayer.idl => multimedia.ringtonePlayer.idl} (77%) rename idl/{soundPool.idl => multimedia.soundPool.idl} (79%) rename idl/{systemTonePlayer.idl => multimedia.systemTonePlayer.idl} (95%) rename idl/{NotificationCommonDef.idl => notification.NotificationCommonDef.idl} (98%) rename idl/{notificationActionButton.idl => notification.notificationActionButton.idl} (53%) rename idl/{notificationContent.idl => notification.notificationContent.idl} (91%) rename idl/{notificationFlags.idl => notification.notificationFlags.idl} (99%) rename idl/{notificationRequest.idl => notification.notificationRequest.idl} (84%) rename idl/{notificationSlot.idl => notification.notificationSlot.idl} (78%) rename idl/{notificationSorting.idl => notification.notificationSorting.idl} (60%) rename idl/{notificationSortingMap.idl => notification.notificationSortingMap.idl} (72%) rename idl/{notificationSubscribeInfo.idl => notification.notificationSubscribeInfo.idl} (57%) rename idl/{notificationSubscriber.idl => notification.notificationSubscriber.idl} (85%) rename idl/{notificationTemplate.idl => notification.notificationTemplate.idl} (74%) rename idl/{notificationUserInput.idl => notification.notificationUserInput.idl} (66%) rename idl/{PermissionRequestResult.idl => security.PermissionRequestResult.idl} (51%) rename idl/{nfctech.idl => tag.nfctech.idl} (98%) rename idl/{tagSession.idl => tag.tagSession.idl} (94%) create mode 100644 idl/toolbar.idl rename idl/{triggerInfo.idl => wantAgent.triggerInfo.idl} (68%) rename idl/{wantAgentInfo.idl => wantAgent.wantAgentInfo.idl} (60%) diff --git a/idl/@ohos.InputMethodExtensionAbility.idl b/idl/@ohos.InputMethodExtensionAbility.idl index 83aa699..a1fa248 100644 --- a/idl/@ohos.InputMethodExtensionAbility.idl +++ b/idl/@ohos.InputMethodExtensionAbility.idl @@ -1,11 +1,9 @@ -package ohos; -import ohos.app.ability.Want as Want; -import ohos.InputMethodExtensionContext as InputMethodExtensionContext; -[Entity=Class] +package ohos.InputMethodExtensionAbility; +import ohos.app.ability.Want.default as Want; +import ohos.InputMethodExtensionContext.default as InputMethodExtensionContext; +[Entity=Class, DefaultExport] interface InputMethodExtensionAbility { - attribute InputMethodExtensionContext context; void onCreate(Want want); void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.InputMethodExtensionContext.idl b/idl/@ohos.InputMethodExtensionContext.idl index 0382b48..3b3dcd2 100644 --- a/idl/@ohos.InputMethodExtensionContext.idl +++ b/idl/@ohos.InputMethodExtensionContext.idl @@ -1,15 +1,13 @@ -package ohos; +package ohos.InputMethodExtensionContext; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import application.ExtensionContext as ExtensionContext; +import ohos.app.ability.Want.default as Want; +import application.ExtensionContext.default as ExtensionContext; [Async, Synthetic] callback AsyncCallback_Void = void (); -[Entity=Class] -interface InputMethodExtensionContext: ExtensionContext { - +[Entity=Class, DefaultExport] +interface InputMethodExtensionContext: [Extends] ExtensionContext { void destroy(AsyncCallback_Void callback_); async void destroy(); [Throws] async void startAbility(Want want); - }; \ No newline at end of file diff --git a/idl/@ohos.InputMethodSubtype.idl b/idl/@ohos.InputMethodSubtype.idl index 65af7ab..38f742a 100644 --- a/idl/@ohos.InputMethodSubtype.idl +++ b/idl/@ohos.InputMethodSubtype.idl @@ -1,7 +1,6 @@ -package ohos; -[Entity=Interface] +package ohos.InputMethodSubtype; +[Entity=Interface, DefaultExport] interface InputMethodSubtype { - [Optional] readonly attribute String label; [Optional] @@ -18,5 +17,4 @@ interface InputMethodSubtype { readonly attribute number iconId; [Optional] attribute Object extra; - }; \ No newline at end of file diff --git a/idl/@ohos.PiPWindow.idl b/idl/@ohos.PiPWindow.idl index 697accd..caf202d 100644 --- a/idl/@ohos.PiPWindow.idl +++ b/idl/@ohos.PiPWindow.idl @@ -1,13 +1,17 @@ -package ohos; -import application.BaseContext as BaseContext; +package ohos.PiPWindow; +import application.BaseContext.default as BaseContext; import ohos.base.Callback as Callback; -import arkui.NodeController as NodeController; -import arkui.typeNode as typeNode; +import arkui.NodeController.NodeController as NodeController; +import arkui.FrameNode.typeNode as typeNode; +[DefaultExport] namespace PiPWindow { - + boolean isPiPEnabled(); + [Throws] + async PiPController create(PiPConfiguration config); + [Throws] + async PiPController create(PiPConfiguration config, typeNode.XComponent contentNode); [Entity=Interface] interface PiPConfiguration { - attribute BaseContext context; attribute XComponentController componentController; [Optional] @@ -22,80 +26,64 @@ namespace PiPWindow { attribute sequence controlGroups; [Optional] attribute NodeController customUIController; - + [Optional] + attribute LocalStorage localStorage; + [Optional] + attribute number defaultWindowSizeType; }; [Entity=Interface] interface PiPWindowSize { - attribute number width; attribute number height; attribute number scale; - }; [Entity=Interface] interface PiPWindowInfo { - attribute number windowId; attribute PiPWindowSize size; - }; dictionary PiPTemplateType { - number VIDEO_PLAY = 0; number VIDEO_CALL = 1; number VIDEO_MEETING = 2; number VIDEO_LIVE = 3; - }; dictionary PiPState { - number ABOUT_TO_START = 1; number STARTED = 2; number ABOUT_TO_STOP = 3; number STOPPED = 4; number ABOUT_TO_RESTORE = 5; number ERROR = 6; - }; typedef (VideoPlayControlGroup or VideoCallControlGroup or VideoMeetingControlGroup or VideoLiveControlGroup) PiPControlGroup; dictionary VideoPlayControlGroup { - number VIDEO_PREVIOUS_NEXT = 101; number FAST_FORWARD_BACKWARD = 102; - }; dictionary VideoCallControlGroup { - number MICROPHONE_SWITCH = 201; number HANG_UP_BUTTON = 202; number CAMERA_SWITCH = 203; number MUTE_SWITCH = 204; - }; dictionary VideoMeetingControlGroup { - number HANG_UP_BUTTON = 301; number CAMERA_SWITCH = 302; number MUTE_SWITCH = 303; number MICROPHONE_SWITCH = 304; - }; dictionary VideoLiveControlGroup { - number VIDEO_PLAY_PAUSE = 401; number MUTE_SWITCH = 402; - }; dictionary PiPControlStatus { - number PLAY = 1; number PAUSE = 0; number OPEN = 1; number CLOSE = 0; - }; dictionary PiPControlType { - number VIDEO_PLAY_PAUSE = 0; number VIDEO_PREVIOUS = 1; number VIDEO_NEXT = 2; @@ -105,7 +93,6 @@ namespace PiPWindow { number MICROPHONE_SWITCH = 6; number CAMERA_SWITCH = 7; number MUTE_SWITCH = 8; - }; typedef (PiPVideoActionEvent or PiPCallActionEvent or PiPMeetingActionEvent or PiPLiveActionEvent) PiPActionEventType; typedef String PiPVideoActionEvent; @@ -115,11 +102,9 @@ namespace PiPWindow { callback ControlPanelActionEventCallback = void (PiPActionEventType event, optional number status); [Entity=Interface] interface ControlEventParam { - attribute PiPControlType controlType; [Optional] attribute PiPControlStatus status; - }; [Synthetic] callback Callback_PiPState_String_Void = void (PiPState state, String reason); @@ -129,7 +114,6 @@ namespace PiPWindow { callback Callback_PiPWindowSize_Void = void (PiPWindowSize parameter); [Entity=Interface] interface PiPController { - [Throws] async void startPiP(); [Throws] @@ -145,33 +129,25 @@ namespace PiPWindow { void setPiPControlEnabled(PiPControlType controlType, boolean enabled); [Throws] async PiPWindowInfo getPiPWindowInfo(); + [Throws] + async boolean getPiPSettingSwitch(); [DtsName="on", DtsTag="'stateChange'"] void onStateChange(Callback_PiPState_String_Void callback_); - [DtsName="off", DtsTag="'stateChange'"] - void offStateChange(); [DtsName="on", DtsTag="'controlPanelActionEvent'"] void onControlPanelActionEvent(ControlPanelActionEventCallback callback_); - [DtsName="off", DtsTag="'controlPanelActionEvent'"] - void offControlPanelActionEvent(); [DtsName="on", DtsTag="'controlEvent'"] void onControlEvent(Callback_ControlEventParam_Void callback_); - [DtsName="off", DtsTag="'controlEvent'"] - void offControlEvent(optional Callback_ControlEventParam_Void callback_); [Throws, DtsName="on", DtsTag="'pipWindowSizeChange'"] void onPipWindowSizeChange(Callback_PiPWindowSize_Void callback_); + [DtsName="off", DtsTag="'stateChange'"] + void offStateChange(); + [DtsName="off", DtsTag="'controlPanelActionEvent'"] + void offControlPanelActionEvent(); + [DtsName="off", DtsTag="'controlEvent'"] + void offControlEvent(optional Callback_ControlEventParam_Void callback_); [Throws, DtsName="off", DtsTag="'pipWindowSizeChange'"] void offPipWindowSizeChange(optional Callback_PiPWindowSize_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_PiPWindow_ohos_PiPWindow { - - static boolean isPiPEnabled(); - [Throws] - static async PiPController create(PiPConfiguration config); [Throws] - static async PiPController create(PiPConfiguration config, typeNode.XComponent contentNode); - + boolean isPiPSupported(); }; - }; \ No newline at end of file diff --git a/idl/@ohos.UiTest.idl b/idl/@ohos.UiTest.idl index 44dba16..66cc79d 100644 --- a/idl/@ohos.UiTest.idl +++ b/idl/@ohos.UiTest.idl @@ -1,18 +1,15 @@ package ohos.UiTest; import ohos.base.Callback as Callback; dictionary MatchPattern { - number EQUALS = 0; number CONTAINS = 1; number STARTS_WITH = 2; number ENDS_WITH = 3; number REG_EXP = 4; number REG_EXP_ICASE = 5; - }; [Entity=Class, Deprecated] interface By { - [Deprecated] By text(String txt, optional MatchPattern pattern); [Deprecated] @@ -35,11 +32,9 @@ interface By { By isBefore(By by); [Deprecated] By isAfter(By by); - }; [Entity=Class, Deprecated] interface UiComponent { - [Deprecated] async void click(); [Deprecated] @@ -68,11 +63,9 @@ interface UiComponent { async void inputText(String text); [Deprecated] async UiComponent scrollSearch(By by); - }; [Entity=Class, Deprecated] interface UiDriver { - [Deprecated] static UiDriver create(); [Deprecated] @@ -97,18 +90,14 @@ interface UiDriver { async void swipe(number startx, number starty, number endx, number endy); [Deprecated] async boolean screenCap(String savePath); - }; dictionary WindowMode { - number FULLSCREEN = 0; number PRIMARY = 1; number SECONDARY = 2; number FLOATING = 3; - }; dictionary ResizeDirection { - number LEFT = 0; number RIGHT = 1; number UP = 2; @@ -117,35 +106,31 @@ dictionary ResizeDirection { number LEFT_DOWN = 5; number RIGHT_UP = 6; number RIGHT_DOWN = 7; - }; dictionary DisplayRotation { - number ROTATION_0 = 0; number ROTATION_90 = 1; number ROTATION_180 = 2; number ROTATION_270 = 3; - }; [Entity=Interface] interface Point { - - readonly attribute number x; - readonly attribute number y; - + attribute number x; + attribute number y; + [Optional] + attribute number displayId; }; [Entity=Interface] interface Rect { - - readonly attribute number left; - readonly attribute number top; - readonly attribute number right; - readonly attribute number bottom; - + attribute number left; + attribute number top; + attribute number right; + attribute number bottom; + [Optional] + attribute number displayId; }; [Entity=Interface] interface WindowFilter { - [Optional] attribute String bundleName; [Optional] @@ -156,61 +141,62 @@ interface WindowFilter { attribute boolean actived; [Optional] attribute boolean active; - + [Optional] + attribute number displayId; }; [Entity=Interface] interface UIElementInfo { - readonly attribute String bundleName; readonly attribute String type; readonly attribute String text; - }; [Synthetic] callback Callback_UIElementInfo_Void = void (UIElementInfo parameter); [Entity=Interface] interface UIEventObserver { - [Throws, DtsName="once", DtsTag="'toastShow'"] void onceToastShow(Callback_UIElementInfo_Void callback_); [Throws, DtsName="once", DtsTag="'dialogShow'"] void onceDialogShow(Callback_UIElementInfo_Void callback_); - }; dictionary UiDirection { - number LEFT = 0; number RIGHT = 1; number UP = 2; number DOWN = 3; - }; dictionary MouseButton { - number MOUSE_BUTTON_LEFT = 0; number MOUSE_BUTTON_RIGHT = 1; number MOUSE_BUTTON_MIDDLE = 2; - }; [Entity=Interface] interface TouchPadSwipeOptions { - [Optional] attribute boolean stay; [Optional] attribute number speed; - +}; +[Entity=Interface] +interface InputTextMode { + [Optional] + attribute boolean paste; + [Optional] + attribute boolean addition; }; [Entity=Class] interface On { - [Throws] On text(String txt, optional MatchPattern pattern); [Throws] On id(String id); [Throws] + On id(String id, MatchPattern pattern); + [Throws] On type(String tp); [Throws] + On type(String tp, MatchPattern pattern); + [Throws] On clickable(optional boolean b); [Throws] On longClickable(optional boolean b); @@ -235,18 +221,16 @@ interface On { [Throws] On inWindow(String bundleName); [Throws] - On description(String val, optional MatchPattern pattern); + On belongingDisplay(number displayId); [Throws] - On id(String id, MatchPattern pattern); - [Throws] - On type(String tp, MatchPattern pattern); + On description(String val, optional MatchPattern pattern); [Throws] On hint(String val, optional MatchPattern pattern); - + [Throws] + On originalText(String text, optional MatchPattern pattern); }; [Entity=Class] interface Component { - [Throws] async void click(); [Throws] @@ -256,6 +240,8 @@ interface Component { [Throws] async String getId(); [Throws] + async number getDisplayId(); + [Throws] async String getText(); [Throws] async String getType(); @@ -278,16 +264,20 @@ interface Component { [Throws] async void inputText(String text); [Throws] + async void inputText(String text, InputTextMode mode); + [Throws] async void clearText(); [Throws] async void scrollToTop(optional number speed); [Throws] async void scrollToBottom(optional number speed); [Throws] - async Component scrollSearch(On on); - [Throws] async Rect getBounds(); [Throws] + async Component scrollSearch(On on, optional boolean vertical, optional number offset); + [Throws] + async (Component or undefined) scrollSearch(On on, optional boolean vertical, optional number offset); + [Throws] async Point getBoundsCenter(); [Throws] async void dragTo(Component target); @@ -300,12 +290,10 @@ interface Component { [Throws] async String getHint(); [Throws] - async Component scrollSearch(On on, optional boolean vertical, optional number offset); - + async String getOriginalText(); }; [Entity=Class] interface Driver { - [Throws] static Driver create(); [Throws] @@ -313,19 +301,31 @@ interface Driver { [Throws] async Component findComponent(On on); [Throws] + async (Component or undefined) findComponent(On on); + [Throws] async UiWindow findWindow(WindowFilter filter); [Throws] + async (UiWindow or undefined) findWindow(WindowFilter filter); + [Throws] async Component waitForComponent(On on, number time); [Throws] + async (Component or undefined) waitForComponent(On on, number time); + [Throws] async sequence findComponents(On on); [Throws] + async (sequence or undefined) findComponents(On on); + [Throws] async void assertComponentExist(On on); [Throws] async void pressBack(); [Throws] + async void pressBack(number displayId); + [Throws] async void triggerKey(number keyCode); [Throws] - async void triggerCombineKeys(number key0, number key1, optional number key2); + async void triggerKey(number keyCode, number displayId); + [Throws] + async void triggerCombineKeys(number key0, number key1, optional number key2, optional number displayId); [Throws] async void click(number x, number y); [Throws] @@ -337,36 +337,56 @@ interface Driver { [Throws] async void drag(number startx, number starty, number endx, number endy, optional number speed); [Throws] + async void clickAt(Point point); + [Throws] + async void doubleClickAt(Point point); + [Throws] + async void longClickAt(Point point, optional number duration); + [Throws] + async void swipeBetween(Point from, Point to, optional number speed); + [Throws] + async void dragBetween(Point from, Point to, optional number speed, optional number duration); + [Throws] async boolean screenCap(String savePath); [Throws] + async boolean screenCap(String savePath, number displayId); + [Throws] async void setDisplayRotation(DisplayRotation rotation); [Throws] async DisplayRotation getDisplayRotation(); [Throws] + async DisplayRotation getDisplayRotation(number displayId); + [Throws] async void setDisplayRotationEnabled(boolean enabled); [Throws] async Point getDisplaySize(); [Throws] + async Point getDisplaySize(number displayId); + [Throws] async Point getDisplayDensity(); [Throws] + async Point getDisplayDensity(number displayId); + [Throws] async void wakeUpDisplay(); [Throws] async void pressHome(); [Throws] + async void pressHome(number displayId); + [Throws] async boolean waitForIdle(number idleTime, number timeout); [Throws] async void fling(Point from, Point to, number stepLen, number speed); [Throws] - async boolean injectMultiPointerAction(PointerMatrix pointers, optional number speed); - [Throws] async void fling(UiDirection direction, number speed); [Throws] + async void fling(UiDirection direction, number speed, number displayId); + [Throws] + async boolean injectMultiPointerAction(PointerMatrix pointers, optional number speed); + [Throws] async void mouseClick(Point p, MouseButton btnId, optional number key1, optional number key2); [Throws] async void mouseMoveTo(Point p); [Throws] - async void mouseScroll(Point p, boolean down, number d, optional number key1, optional number key2); - [Throws] async void mouseScroll(Point p, boolean down, number d, optional number key1, optional number key2, optional number speed); [Throws] async boolean screenCapture(String savePath, optional Rect rect); @@ -375,14 +395,16 @@ interface Driver { [Throws] async void mouseDoubleClick(Point p, MouseButton btnId, optional number key1, optional number key2); [Throws] - async void mouseLongClick(Point p, MouseButton btnId, optional number key1, optional number key2); + async void mouseLongClick(Point p, MouseButton btnId, optional number key1, optional number key2, optional number duration); [Throws] async void mouseMoveWithTrack(Point from, Point to, optional number speed); [Throws] - async void mouseDrag(Point from, Point to, optional number speed); + async void mouseDrag(Point from, Point to, optional number speed, optional number duration); [Throws] async void inputText(Point p, String text); [Throws] + async void inputText(Point p, String text, InputTextMode mode); + [Throws] async void touchPadMultiFingerSwipe(number fingers, UiDirection direction, optional TouchPadSwipeOptions options); [Throws] async void penClick(Point point); @@ -394,11 +416,11 @@ interface Driver { async void penSwipe(Point startPoint, Point endPoint, optional number speed, optional number pressure); [Throws] async void injectPenPointerAction(PointerMatrix pointers, optional number speed, optional number pressure); - + [Throws] + async void crownRotate(number d, optional number speed); }; [Entity=Class] interface UiWindow { - [Throws] async String getBundleName(); [Throws] @@ -429,14 +451,13 @@ interface UiWindow { async void close(); [Throws] async boolean isActive(); - + [Throws] + async number getDisplayId(); }; [Entity=Class] interface PointerMatrix { - [Throws] static PointerMatrix create(number fingers, number steps); [Throws] void setPoint(number finger, number step, Point point); - }; \ No newline at end of file diff --git a/idl/@ohos.WallpaperExtensionAbility.idl b/idl/@ohos.WallpaperExtensionAbility.idl index 14fb31a..8348203 100644 --- a/idl/@ohos.WallpaperExtensionAbility.idl +++ b/idl/@ohos.WallpaperExtensionAbility.idl @@ -1,9 +1,7 @@ -package ohos; -[Entity=Class] +package ohos.WallpaperExtensionAbility; +[Entity=Class, DefaultExport] interface WallpaperExtensionAbility { - void onCreate(Object want); void onWallpaperChange(number wallpaperType); void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.WorkSchedulerExtensionAbility.idl b/idl/@ohos.WorkSchedulerExtensionAbility.idl index 0a53546..6d52663 100644 --- a/idl/@ohos.WorkSchedulerExtensionAbility.idl +++ b/idl/@ohos.WorkSchedulerExtensionAbility.idl @@ -1,12 +1,10 @@ -package ohos; -import ohos.resourceschedule.workScheduler as workScheduler; -import application.WorkSchedulerExtensionContext as _WorkSchedulerExtensionContext; +package ohos.WorkSchedulerExtensionAbility; +import ohos.resourceschedule.workScheduler.default as workScheduler; +import application.WorkSchedulerExtensionContext.default as _WorkSchedulerExtensionContext; typedef _WorkSchedulerExtensionContext WorkSchedulerExtensionContext; -[Entity=Class] +[Entity=Class, DefaultExport] interface WorkSchedulerExtensionAbility { - attribute WorkSchedulerExtensionContext context; void onWorkStart(workScheduler.WorkInfo work); void onWorkStop(workScheduler.WorkInfo work); - }; \ No newline at end of file diff --git a/idl/@ohos.ability.ability.idl b/idl/@ohos.ability.ability.idl index f1fc10b..318cfd9 100644 --- a/idl/@ohos.ability.ability.idl +++ b/idl/@ohos.ability.ability.idl @@ -1,13 +1,13 @@ -package ohos.ability; +package ohos.ability.ability; import ability.dataAbilityHelper.DataAbilityHelper as _DataAbilityHelper; import ability.dataAbilityHelper.PacMap as _PacMap; -import ability.DataAbilityOperation as _DataAbilityOperation; -import ability.DataAbilityResult as _DataAbilityResult; -import ability.AbilityResult as _AbilityResult; -import ability.ConnectOptions as _ConnectOptions; -import ability.StartAbilityParameter as _StartAbilityParameter; +import ability.dataAbilityOperation.DataAbilityOperation as _DataAbilityOperation; +import ability.dataAbilityResult.DataAbilityResult as _DataAbilityResult; +import ability.abilityResult.AbilityResult as _AbilityResult; +import ability.connectOptions.ConnectOptions as _ConnectOptions; +import ability.startAbilityParameter.StartAbilityParameter as _StartAbilityParameter; +[DefaultExport] namespace ability { - typedef _DataAbilityHelper DataAbilityHelper; typedef _PacMap PacMap; typedef _DataAbilityOperation DataAbilityOperation; @@ -15,5 +15,4 @@ namespace ability { typedef _AbilityResult AbilityResult; typedef _ConnectOptions ConnectOptions; typedef _StartAbilityParameter StartAbilityParameter; - }; \ No newline at end of file diff --git a/idl/@ohos.ability.dataUriUtils.idl b/idl/@ohos.ability.dataUriUtils.idl index 53f1dd4..d665750 100644 --- a/idl/@ohos.ability.dataUriUtils.idl +++ b/idl/@ohos.ability.dataUriUtils.idl @@ -1,18 +1,12 @@ -package ohos.ability; +package ohos.ability.dataUriUtils; +[DefaultExport] namespace dataUriUtils { - - [GlobalScope] - interface GlobalScope_dataUriUtils_ohos_ability_dataUriUtils { - - [Deprecated] - static number getId(String uri); - [Deprecated] - static String attachId(String uri, number id); - [Deprecated] - static String deleteId(String uri); - [Deprecated] - static String updateId(String uri, number id); - - }; - + [Deprecated] + number getId(String uri); + [Deprecated] + String attachId(String uri, number id); + [Deprecated] + String deleteId(String uri); + [Deprecated] + String updateId(String uri, number id); }; \ No newline at end of file diff --git a/idl/@ohos.ability.errorCode.idl b/idl/@ohos.ability.errorCode.idl index f35ce7a..daf4beb 100644 --- a/idl/@ohos.ability.errorCode.idl +++ b/idl/@ohos.ability.errorCode.idl @@ -1,9 +1,7 @@ -package ohos.ability; +package ohos.ability.errorCode; dictionary ErrorCode { - number PERMISSION_DENY = -3; number ABILITY_NOT_FOUND = -2; number INVALID_PARAMETER = -1; number NO_ERROR = 0; - }; \ No newline at end of file diff --git a/idl/@ohos.ability.featureAbility.idl b/idl/@ohos.ability.featureAbility.idl index a671045..21294d9 100644 --- a/idl/@ohos.ability.featureAbility.idl +++ b/idl/@ohos.ability.featureAbility.idl @@ -1,87 +1,73 @@ -package ohos.ability; +package ohos.ability.featureAbility; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import ability.StartAbilityParameter as StartAbilityParameter; -import ability.AbilityResult as AbilityResult; -import app.AppVersionInfo as _AppVersionInfo; -import app.Context as _Context; +import ohos.app.ability.Want.default as Want; +import ability.startAbilityParameter.StartAbilityParameter as StartAbilityParameter; +import ability.abilityResult.AbilityResult as AbilityResult; +import app.appVersionInfo.AppVersionInfo as _AppVersionInfo; +import app.context.Context as _Context; import ability.dataAbilityHelper.DataAbilityHelper as DataAbilityHelper; -import ability.ConnectOptions as ConnectOptions; -import app.ProcessInfo as _ProcessInfo; -import ohos.window as window; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import app.processInfo.ProcessInfo as _ProcessInfo; +import ohos.window.default as window; +[DefaultExport] namespace featureAbility { - [Async, Synthetic] callback AsyncCallback_Want_Void = void (Want result); + void getWant(AsyncCallback_Want_Void callback_); + async Want getWant(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + void startAbility(StartAbilityParameter parameter, AsyncCallback_Number_Void callback_); + async number startAbility(StartAbilityParameter parameter); + Context getContext(); [Async, Synthetic] callback AsyncCallback_AbilityResult_Void = void (AbilityResult result); + void startAbilityForResult(StartAbilityParameter parameter, AsyncCallback_AbilityResult_Void callback_); + async AbilityResult startAbilityForResult(StartAbilityParameter parameter); [Async, Synthetic] callback AsyncCallback_Void = void (); + void terminateSelfWithResult(AbilityResult parameter, AsyncCallback_Void callback_); + async void terminateSelfWithResult(AbilityResult parameter); + void terminateSelf(AsyncCallback_Void callback_); + async void terminateSelf(); + DataAbilityHelper acquireDataAbilityHelper(String uri); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + void hasWindowFocus(AsyncCallback_Boolean_Void callback_); + async boolean hasWindowFocus(); + number connectAbility(Want request, ConnectOptions options); + void disconnectAbility(number connection, AsyncCallback_Void callback_); + async void disconnectAbility(number connection); [Async, Synthetic] - callback AsyncCallback_window_Window_Void = void (window.Window result); + callback AsyncCallback_Window_Window_Void = void (window.Window result); + void getWindow(AsyncCallback_Window_Window_Void callback_); + async window.Window getWindow(); dictionary AbilityWindowConfiguration { - number WINDOW_MODE_UNDEFINED = 0; number WINDOW_MODE_FULLSCREEN = 1; number WINDOW_MODE_SPLIT_PRIMARY = 100; number WINDOW_MODE_SPLIT_SECONDARY = 101; number WINDOW_MODE_FLOATING = 102; - }; dictionary AbilityStartSetting { - String BOUNDS_KEY = "abilityBounds"; String WINDOW_MODE_KEY = "windowMode"; String DISPLAY_ID_KEY = "displayId"; - }; dictionary ErrorCode { - number NO_ERROR = 0; number INVALID_PARAMETER = -1; number ABILITY_NOT_FOUND = -2; number PERMISSION_DENY = -3; - }; dictionary DataAbilityOperationType { - number TYPE_INSERT = 1; number TYPE_UPDATE = 2; number TYPE_DELETE = 3; number TYPE_ASSERT = 4; - }; typedef _Context Context; typedef _AppVersionInfo AppVersionInfo; typedef _ProcessInfo ProcessInfo; - [GlobalScope] - interface GlobalScope_featureAbility_ohos_ability_featureAbility { - - static void getWant(AsyncCallback_Want_Void callback_); - static async Want getWant(); - static void startAbility(StartAbilityParameter parameter, AsyncCallback_Number_Void callback_); - static async number startAbility(StartAbilityParameter parameter); - static Context getContext(); - static void startAbilityForResult(StartAbilityParameter parameter, AsyncCallback_AbilityResult_Void callback_); - static async AbilityResult startAbilityForResult(StartAbilityParameter parameter); - static void terminateSelfWithResult(AbilityResult parameter, AsyncCallback_Void callback_); - static async void terminateSelfWithResult(AbilityResult parameter); - static void terminateSelf(AsyncCallback_Void callback_); - static async void terminateSelf(); - static DataAbilityHelper acquireDataAbilityHelper(String uri); - static void hasWindowFocus(AsyncCallback_Boolean_Void callback_); - static async boolean hasWindowFocus(); - static number connectAbility(Want request, ConnectOptions options); - static void disconnectAbility(number connection, AsyncCallback_Void callback_); - static async void disconnectAbility(number connection); - static void getWindow(AsyncCallback_window_Window_Void callback_); - static async window.Window getWindow(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.ability.particleAbility.idl b/idl/@ohos.ability.particleAbility.idl index 2779c88..3f29307 100644 --- a/idl/@ohos.ability.particleAbility.idl +++ b/idl/@ohos.ability.particleAbility.idl @@ -1,39 +1,31 @@ -package ohos.ability; +package ohos.ability.particleAbility; import ohos.base.AsyncCallback as AsyncCallback; -import ability.StartAbilityParameter as StartAbilityParameter; +import ability.startAbilityParameter.StartAbilityParameter as StartAbilityParameter; import ability.dataAbilityHelper.DataAbilityHelper as DataAbilityHelper; import notification.notificationRequest.NotificationRequest as NotificationRequest; -import ability.ConnectOptions as ConnectOptions; -import ohos.app.ability.Want as Want; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace particleAbility { - [Async, Synthetic] callback AsyncCallback_Void = void (); + void startAbility(StartAbilityParameter parameter, AsyncCallback_Void callback_); + async void startAbility(StartAbilityParameter parameter); + void terminateSelf(AsyncCallback_Void callback_); + async void terminateSelf(); + DataAbilityHelper acquireDataAbilityHelper(String uri); + [Deprecated] + void startBackgroundRunning(number id, NotificationRequest request, AsyncCallback_Void callback_); + [Deprecated] + async void startBackgroundRunning(number id, NotificationRequest request); + [Deprecated] + void cancelBackgroundRunning(AsyncCallback_Void callback_); + [Deprecated] + async void cancelBackgroundRunning(); + number connectAbility(Want request, ConnectOptions options); + void disconnectAbility(number connection, AsyncCallback_Void callback_); + async void disconnectAbility(number connection); dictionary ErrorCode { - number INVALID_PARAMETER = -1; - }; - [GlobalScope] - interface GlobalScope_particleAbility_ohos_ability_particleAbility { - - static void startAbility(StartAbilityParameter parameter, AsyncCallback_Void callback_); - static async void startAbility(StartAbilityParameter parameter); - static void terminateSelf(AsyncCallback_Void callback_); - static async void terminateSelf(); - static DataAbilityHelper acquireDataAbilityHelper(String uri); - [Deprecated] - static void startBackgroundRunning(number id, NotificationRequest request, AsyncCallback_Void callback_); - [Deprecated] - static async void startBackgroundRunning(number id, NotificationRequest request); - [Deprecated] - static void cancelBackgroundRunning(AsyncCallback_Void callback_); - [Deprecated] - static async void cancelBackgroundRunning(); - static number connectAbility(Want request, ConnectOptions options); - static void disconnectAbility(number connection, AsyncCallback_Void callback_); - static async void disconnectAbility(number connection); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.ability.screenLockFileManager.idl b/idl/@ohos.ability.screenLockFileManager.idl index ce26e8b..218d19f 100644 --- a/idl/@ohos.ability.screenLockFileManager.idl +++ b/idl/@ohos.ability.screenLockFileManager.idl @@ -1,47 +1,33 @@ -package ohos.ability; +package ohos.ability.screenLockFileManager; +[DefaultExport] namespace screenLockFileManager { - dictionary DataType { - number MEDIA_DATA = 1; number ALL_DATA = 4294967295; - }; dictionary AccessStatus { - number ACCESS_DENIED = -1; number ACCESS_GRANTED = 0; - }; dictionary ReleaseStatus { - number RELEASE_DENIED = -1; number RELEASE_GRANTED = 0; - }; dictionary KeyStatus { - number KEY_NOT_EXIST = -2; number KEY_RELEASED = -1; number KEY_EXIST = 0; - }; - [GlobalScope] - interface GlobalScope_screenLockFileManager_ohos_ability_screenLockFileManager { - - [Throws] - static AccessStatus acquireAccess(); - [Throws] - static AccessStatus acquireAccess(DataType dataType); - [Throws] - static ReleaseStatus releaseAccess(); - [Throws] - static ReleaseStatus releaseAccess(DataType dataType); - [Throws] - static KeyStatus queryAppKeyState(); - [Throws] - static KeyStatus queryAppKeyState(DataType dataType); - - }; - + [Throws] + AccessStatus acquireAccess(); + [Throws] + AccessStatus acquireAccess(DataType dataType); + [Throws] + ReleaseStatus releaseAccess(); + [Throws] + ReleaseStatus releaseAccess(DataType dataType); + [Throws] + KeyStatus queryAppKeyState(); + [Throws] + KeyStatus queryAppKeyState(DataType dataType); }; \ No newline at end of file diff --git a/idl/@ohos.ability.wantConstant.idl b/idl/@ohos.ability.wantConstant.idl index 4a1aead..de0913f 100644 --- a/idl/@ohos.ability.wantConstant.idl +++ b/idl/@ohos.ability.wantConstant.idl @@ -1,9 +1,8 @@ -package ohos.ability; +package ohos.ability.wantConstant; +[DefaultExport] namespace wantConstant { - [Deprecated] dictionary Action { - [Deprecated] String ACTION_HOME = "ohos.want.action.home"; [Deprecated] @@ -56,11 +55,9 @@ namespace wantConstant { String PARAMS_STREAM = "ability.params.stream"; [Deprecated] String ACTION_APP_ACCOUNT_OAUTH = "ohos.account.appAccount.action.oauth"; - }; [Deprecated] dictionary Entity { - [Deprecated] String ENTITY_DEFAULT = "entity.system.default"; [Deprecated] @@ -71,11 +68,9 @@ namespace wantConstant { String ENTITY_BROWSABLE = "entity.system.browsable"; [Deprecated] String ENTITY_VIDEO = "entity.system.video"; - }; [Deprecated] dictionary Flags { - [Deprecated] number FLAG_AUTH_READ_URI_PERMISSION = 1; [Deprecated] @@ -108,7 +103,5 @@ namespace wantConstant { number FLAG_ABILITY_NEW_MISSION = 268435456; [Deprecated] number FLAG_ABILITY_MISSION_TOP = 536870912; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.abilityAccessCtrl.idl b/idl/@ohos.abilityAccessCtrl.idl index a75147b..9748aa8 100644 --- a/idl/@ohos.abilityAccessCtrl.idl +++ b/idl/@ohos.abilityAccessCtrl.idl @@ -1,11 +1,12 @@ -package ohos; +package ohos.abilityAccessCtrl; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import Permissions as Permissions; -import application._Context as _Context; -import security._PermissionRequestResult as _PermissionRequestResult; +import permissions.Permissions as Permissions; +import application.Context.default as _Context; +import security.PermissionRequestResult.default as _PermissionRequestResult; +[DefaultExport] namespace abilityAccessCtrl { - + AtManager createAtManager(); [Async, Synthetic] callback AsyncCallback_PermissionRequestResult_Void = void (PermissionRequestResult result); [Async, Synthetic] @@ -14,16 +15,15 @@ namespace abilityAccessCtrl { callback Callback_PermissionStateChangeInfo_Void = void (PermissionStateChangeInfo parameter); [Entity=Interface] interface AtManager { - - async GrantStatus verifyAccessToken(number tokenID, Permissions permissionName); + async GrantStatus verifyAccessToken(i32 tokenID, Permissions permissionName); [Deprecated] async GrantStatus verifyAccessToken(number tokenID, String permissionName); [Throws] - GrantStatus verifyAccessTokenSync(number tokenID, Permissions permissionName); + GrantStatus verifyAccessTokenSync(i32 tokenID, Permissions permissionName); [Throws] - async GrantStatus checkAccessToken(number tokenID, Permissions permissionName); + async GrantStatus checkAccessToken(i32 tokenID, Permissions permissionName); [Throws] - GrantStatus checkAccessTokenSync(number tokenID, Permissions permissionName); + GrantStatus checkAccessTokenSync(i32 tokenID, Permissions permissionName); [Throws] void requestPermissionsFromUser(Context context, sequence permissionList, AsyncCallback_PermissionRequestResult_Void requestCallback); [Throws] @@ -60,57 +60,39 @@ namespace abilityAccessCtrl { async boolean requestGlobalSwitch(Context context, SwitchType type); [Throws] async void requestPermissionOnApplicationSetting(number tokenID); - + [Throws] + PermissionStatus getSelfPermissionStatus(Permissions permissionName); }; dictionary GrantStatus { - number PERMISSION_DENIED = -1; number PERMISSION_GRANTED = 0; - }; dictionary PermissionStateChangeType { - number PERMISSION_REVOKED_OPER = 0; number PERMISSION_GRANTED_OPER = 1; - }; dictionary PermissionRequestToggleStatus { - number CLOSED = 0; number OPEN = 1; - }; [Entity=Interface] interface PermissionStateChangeInfo { - attribute PermissionStateChangeType change; attribute number tokenID; attribute Permissions permissionName; - }; dictionary PermissionStatus { - number DENIED = -1; number GRANTED = 0; number NOT_DETERMINED = 1; number INVALID = 2; number RESTRICTED = 3; - }; dictionary SwitchType { - number CAMERA = 0; number MICROPHONE = 1; number LOCATION = 2; - - }; - [GlobalScope] - interface GlobalScope_abilityAccessCtrl_ohos_abilityAccessCtrl { - - static AtManager createAtManager(); - }; - }; typedef _PermissionRequestResult PermissionRequestResult; typedef _Context Context; \ No newline at end of file diff --git a/idl/@ohos.accessibility.GesturePath.idl b/idl/@ohos.accessibility.GesturePath.idl index 2f594db..72eb3b4 100644 --- a/idl/@ohos.accessibility.GesturePath.idl +++ b/idl/@ohos.accessibility.GesturePath.idl @@ -1,10 +1,9 @@ -package ohos.accessibility; -import ohos.accessibility.GesturePoint as GesturePoint; +package ohos.accessibility.GesturePath; +import ohos.accessibility.GesturePoint.GesturePoint as GesturePoint; [Entity=Class] interface GesturePath { - + [Deprecated] constructor(number durationTime); attribute sequence points; attribute number durationTime; - }; \ No newline at end of file diff --git a/idl/@ohos.accessibility.GesturePoint.idl b/idl/@ohos.accessibility.GesturePoint.idl index f0528f0..204ffd3 100644 --- a/idl/@ohos.accessibility.GesturePoint.idl +++ b/idl/@ohos.accessibility.GesturePoint.idl @@ -1,9 +1,8 @@ -package ohos.accessibility; +package ohos.accessibility.GesturePoint; [Entity=Class] interface GesturePoint { - + [Deprecated] constructor(number positionX, number positionY); attribute number positionX; attribute number positionY; - }; \ No newline at end of file diff --git a/idl/@ohos.accessibility.config.idl b/idl/@ohos.accessibility.config.idl index 93e0033..47b7598 100644 --- a/idl/@ohos.accessibility.config.idl +++ b/idl/@ohos.accessibility.config.idl @@ -1,20 +1,37 @@ -package ohos.accessibility; -import ohos.accessibility as accessibility; +package ohos.accessibility.config; +import ohos.accessibility.default as accessibility; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace config { - + [Throws] + async void enableAbility(String name, sequence capability); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enableAbility(String name, sequence capability, AsyncCallback_Void callback_); + [Throws] + async void disableAbility(String name); + [Throws] + void disableAbility(String name, AsyncCallback_Void callback_); [Synthetic] callback Callback_Void = void (); + [Throws, DtsName="on", DtsTag="'enabledAccessibilityExtensionListChange'"] + void onEnabledAccessibilityExtensionListChange(Callback_Void callback_); + [Throws, DtsName="on", DtsTag="'installedAccessibilityListChange'"] + void onInstalledAccessibilityListChange(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'enabledAccessibilityExtensionListChange'"] + void offEnabledAccessibilityExtensionListChange(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'installedAccessibilityListChange'"] + void offInstalledAccessibilityListChange(optional Callback_Void callback_); + [Throws] + void setMagnificationState(boolean state); [Async, Synthetic] - callback AsyncCallback_T_Void = void (any result); + callback AsyncCallback_T_Void = void (T result); [Synthetic] - callback Callback_T_Void = void (any parameter); + callback Callback_T_Void = void (T parameter); [Entity=Interface, TypeParameters="T"] interface Config { - [Throws] async void set(T value); [Throws] @@ -27,31 +44,8 @@ namespace config { void on(Callback_T_Void callback_); [Throws] void off(optional Callback_T_Void callback_); - }; typedef String DaltonizationColorFilter; typedef String ClickResponseTime; typedef String RepeatClickInterval; - [GlobalScope] - interface GlobalScope_config_ohos_accessibility_config { - - [Throws] - static async void enableAbility(String name, sequence capability); - [Throws] - static void enableAbility(String name, sequence capability, AsyncCallback_Void callback_); - [Throws] - static async void disableAbility(String name); - [Throws] - static void disableAbility(String name, AsyncCallback_Void callback_); - [Throws, DtsName="on", DtsTag="'enabledAccessibilityExtensionListChange'"] - static void onEnabledAccessibilityExtensionListChange(Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'installedAccessibilityListChange'"] - static void onInstalledAccessibilityListChange(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'enabledAccessibilityExtensionListChange'"] - static void offEnabledAccessibilityExtensionListChange(optional Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'installedAccessibilityListChange'"] - static void offInstalledAccessibilityListChange(optional Callback_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.accessibility.idl b/idl/@ohos.accessibility.idl index 1f8f278..d55af5d 100644 --- a/idl/@ohos.accessibility.idl +++ b/idl/@ohos.accessibility.idl @@ -1,9 +1,103 @@ -package ohos; +package ohos.accessibility; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import Resource as Resource; +import resource.Resource as Resource; +dictionary AccessibilityAction { + number ACCESSIBILITY_FOCUS = 0; + number CLEAR_ACCESSIBILITY_FOCUS = 1; + number FOCUS = 2; + number CLEAR_FOCUS = 3; + number CLICK = 4; + number LONG_CLICK = 5; + number CUT = 6; + number COPY = 7; + number PASTE = 8; + number SELECT = 9; + number SET_TEXT = 10; + number SCROLL_FORWARD = 11; + number SCROLL_BACKWARD = 12; + number SET_SELECTION = 13; + number SET_CURSOR_POSITION = 14; + number HOME = 15; + number BACK = 16; + number RECENT_TASK = 17; + number NOTIFICATION_CENTER = 18; + number CONTROL_CENTER = 19; + number SPAN_CLICK = 20; +}; +dictionary AccessibilityEventType { + number TYPE_ACCESSIBILITY_FOCUS = 0; + number TYPE_ACCESSIBILITY_FOCUS_CLEAR = 1; + number TYPE_CLICK = 2; + number TYPE_LONG_CLICK = 3; + number TYPE_SELECT = 4; + number TYPE_HOVER_ENTER = 5; + number TYPE_HOVER_EXIT = 6; + number TYPE_FOCUS = 7; + number TYPE_TEXT_UPDATE = 8; + number TYPE_TEXT_SELECTION_UPDATE = 9; + number TYPE_SCROLL = 10; + number TYPE_REQUEST_FOCUS_FOR_ACCESSIBILITY = 11; + number TYPE_ANNOUNCE_FOR_ACCESSIBILITY = 12; + number TYPE_REQUEST_FOCUS_FOR_ACCESSIBILITY_NOT_INTERRUPT = 13; + number TYPE_ANNOUNCE_FOR_ACCESSIBILITY_NOT_INTERRUPT = 14; + number TYPE_ELEMENT_INFO_CHANGE = 15; + number TYPE_SCROLLING = 16; + number TYPE_WINDOW_ADD = 17; + number TYPE_WINDOW_REMOVE = 18; + number TYPE_WINDOW_BOUNDS = 19; + number TYPE_WINDOW_ACTIVE = 20; + number TYPE_WINDOW_FOCUS = 21; + number TYPE_WINDOW_PROPERTY = 22; + number TYPE_WINDOW_LAYER = 23; + number TYPE_TOUCH_BEGIN = 24; + number TYPE_TOUCH_END = 25; + number TYPE_PAGE_CONTENT_UPDATE = 26; + number TYPE_PAGE_STATE_UPDATE = 27; + number TYPE_PAGE_OPEN = 28; + number TYPE_PAGE_CLOSE = 29; + number TYPE_SWIPE_LEFT = 30; + number TYPE_SWIPE_LEFT_THEN_RIGHT = 31; + number TYPE_SWIPE_LEFT_THEN_UP = 32; + number TYPE_SWIPE_LEFT_THEN_DOWN = 33; + number TYPE_SWIPE_RIGHT = 34; + number TYPE_SWIPE_RIGHT_THEN_LEFT = 35; + number TYPE_SWIPE_RIGHT_THEN_UP = 36; + number TYPE_SWIPE_RIGHT_THEN_DOWN = 37; + number TYPE_SWIPE_UP = 38; + number TYPE_SWIPE_UP_THEN_LEFT = 39; + number TYPE_SWIPE_UP_THEN_RIGHT = 40; + number TYPE_SWIPE_UP_THEN_DOWN = 41; + number TYPE_SWIPE_DOWN = 42; + number TYPE_SWIPE_DOWN_THEN_LEFT = 43; + number TYPE_SWIPE_DOWN_THEN_RIGHT = 44; + number TYPE_SWIPE_DOWN_THEN_UP = 45; + number TYPE_TWO_FINGER_SINGLE_TAP = 46; + number TYPE_TWO_FINGER_DOUBLE_TAP = 47; + number TYPE_TWO_FINGER_DOUBLE_TAP_AND_HOLD = 48; + number TYPE_TWO_FINGER_TRIPLE_TAP = 49; + number TYPE_TWO_FINGER_TRIPLE_TAP_AND_HOLD = 50; + number TYPE_THREE_FINGER_SINGLE_TAP = 51; + number TYPE_THREE_FINGER_DOUBLE_TAP = 52; + number TYPE_THREE_FINGER_DOUBLE_TAP_AND_HOLD = 53; + number TYPE_THREE_FINGER_TRIPLE_TAP = 54; + number TYPE_THREE_FINGER_TRIPLE_TAP_AND_HOLD = 55; + number TYPE_FOUR_FINGER_SINGLE_TAP = 56; + number TYPE_FOUR_FINGER_DOUBLE_TAP = 57; + number TYPE_FOUR_FINGER_DOUBLE_TAP_AND_HOLD = 58; + number TYPE_FOUR_FINGER_TRIPLE_TAP = 59; + number TYPE_FOUR_FINGER_TRIPLE_TAP_AND_HOLD = 60; + number TYPE_THREE_FINGER_SWIPE_UP = 61; + number TYPE_THREE_FINGER_SWIPE_DOWN = 62; + number TYPE_THREE_FINGER_SWIPE_LEFT = 63; + number TYPE_THREE_FINGER_SWIPE_RIGHT = 64; + number TYPE_FOUR_FINGER_SWIPE_UP = 65; + number TYPE_FOUR_FINGER_SWIPE_DOWN = 66; + number TYPE_FOUR_FINGER_SWIPE_LEFT = 67; + number TYPE_FOUR_FINGER_SWIPE_RIGHT = 68; +}; +[DefaultExport] namespace accessibility { - typedef String AbilityType; typedef String Action; typedef String EventType; @@ -13,17 +107,65 @@ namespace accessibility { typedef String TextMoveUnit; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isOpenAccessibility(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isOpenAccessibility(); + boolean isOpenAccessibilitySync(); + [Deprecated] + void isOpenTouchGuide(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isOpenTouchGuide(); + boolean isOpenTouchGuideSync(); + boolean isScreenReaderOpenSync(); [Async, Synthetic] callback AsyncCallback_Array_AccessibilityAbilityInfo_Void = void (sequence result); + [Deprecated] + void getAbilityLists(AbilityType abilityType, AbilityState stateType, AsyncCallback_Array_AccessibilityAbilityInfo_Void callback_); + [Deprecated] + async sequence getAbilityLists(AbilityType abilityType, AbilityState stateType); + [Throws] + async sequence getAccessibilityExtensionList(AbilityType abilityType, AbilityState stateType); + [Throws] + void getAccessibilityExtensionList(AbilityType abilityType, AbilityState stateType, AsyncCallback_Array_AccessibilityAbilityInfo_Void callback_); + sequence getAccessibilityExtensionListSync(AbilityType abilityType, AbilityState stateType); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void sendEvent(EventInfo event, AsyncCallback_Void callback_); + [Deprecated] + async void sendEvent(EventInfo event); + [Throws] + void sendAccessibilityEvent(EventInfo event, AsyncCallback_Void callback_); + [Throws] + async void sendAccessibilityEvent(EventInfo event); + String getTouchModeSync(); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="on", DtsTag="'accessibilityStateChange'"] + void onAccessibilityStateChange(Callback_Boolean_Void callback_); + [Throws, DtsName="on", DtsTag="'touchGuideStateChange'"] + void onTouchGuideStateChange(Callback_Boolean_Void callback_); + [Throws, DtsName="on", DtsTag="'screenReaderStateChange'"] + void onScreenReaderStateChange(Callback_Boolean_Void callback_); + [Synthetic] + callback Callback_String_Void = void (String parameter); + [Throws, DtsName="on", DtsTag="'touchModeChange'"] + void onTouchModeChange(Callback_String_Void callback_); + [Throws, DtsName="off", DtsTag="'accessibilityStateChange'"] + void offAccessibilityStateChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'touchGuideStateChange'"] + void offTouchGuideStateChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'screenReaderStateChange'"] + void offScreenReaderStateChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'touchModeChange'"] + void offTouchModeChange(optional Callback_String_Void callback_); + [Deprecated] + CaptionsManager getCaptionsManager(); [Synthetic] callback Callback_CaptionsStyle_Void = void (CaptionsStyle parameter); [Entity=Interface] interface CaptionsManager { - attribute boolean enabled; attribute CaptionsStyle style; [Deprecated, Throws, DtsName="on", DtsTag="'enableChange'"] @@ -34,24 +176,20 @@ namespace accessibility { void offEnableChange(optional Callback_Boolean_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'styleChange'"] void offStyleChange(optional Callback_CaptionsStyle_Void callback_); - }; typedef String CaptionsFontEdgeType; typedef String CaptionsFontFamily; [Entity=Interface] interface CaptionsStyle { - attribute CaptionsFontFamily fontFamily; attribute number fontScale; attribute (number or String) fontColor; attribute CaptionsFontEdgeType fontEdgeType; attribute (number or String) backgroundColor; attribute (number or String) windowColor; - }; [Entity=Interface] interface AccessibilityAbilityInfo { - readonly attribute String id; readonly attribute String name; readonly attribute String bundleName; @@ -62,11 +200,9 @@ namespace accessibility { readonly attribute sequence eventTypes; readonly attribute boolean needHide; readonly attribute String label; - }; [Entity=Class] interface EventInfo { - constructor(undefined jsonObject); constructor(EventType type, String bundleName, Action triggerAction); attribute EventType type; @@ -102,54 +238,5 @@ namespace accessibility { attribute Resource textResourceAnnouncedForAccessibility; [Optional] attribute String customId; - - }; - [GlobalScope] - interface GlobalScope_accessibility_ohos_accessibility { - - [Deprecated] - static void isOpenAccessibility(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isOpenAccessibility(); - static boolean isOpenAccessibilitySync(); - [Deprecated] - static void isOpenTouchGuide(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isOpenTouchGuide(); - static boolean isOpenTouchGuideSync(); - static boolean isScreenReaderOpenSync(); - [Deprecated] - static void getAbilityLists(AbilityType abilityType, AbilityState stateType, AsyncCallback_Array_AccessibilityAbilityInfo_Void callback_); - [Deprecated] - static async sequence getAbilityLists(AbilityType abilityType, AbilityState stateType); - [Throws] - static async sequence getAccessibilityExtensionList(AbilityType abilityType, AbilityState stateType); - [Throws] - static void getAccessibilityExtensionList(AbilityType abilityType, AbilityState stateType, AsyncCallback_Array_AccessibilityAbilityInfo_Void callback_); - static sequence getAccessibilityExtensionListSync(AbilityType abilityType, AbilityState stateType); - [Deprecated] - static void sendEvent(EventInfo event, AsyncCallback_Void callback_); - [Deprecated] - static async void sendEvent(EventInfo event); - [Throws] - static void sendAccessibilityEvent(EventInfo event, AsyncCallback_Void callback_); - [Throws] - static async void sendAccessibilityEvent(EventInfo event); - [Throws, DtsName="on", DtsTag="'accessibilityStateChange'"] - static void onAccessibilityStateChange(Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'touchGuideStateChange'"] - static void onTouchGuideStateChange(Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'screenReaderStateChange'"] - static void onScreenReaderStateChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'accessibilityStateChange'"] - static void offAccessibilityStateChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'touchGuideStateChange'"] - static void offTouchGuideStateChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'screenReaderStateChange'"] - static void offScreenReaderStateChange(optional Callback_Boolean_Void callback_); - [Deprecated] - static CaptionsManager getCaptionsManager(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.account.appAccount.idl b/idl/@ohos.account.appAccount.idl index fcf15f5..3a9e7d2 100644 --- a/idl/@ohos.account.appAccount.idl +++ b/idl/@ohos.account.appAccount.idl @@ -1,18 +1,17 @@ -package ohos.account; +package ohos.account.appAccount; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import ohos.rpc as rpc; +import ohos.app.ability.Want.default as Want; +import ohos.rpc.default as rpc; +[DefaultExport] namespace appAccount { - + AppAccountManager createAppAccountManager(); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); @@ -36,7 +35,6 @@ namespace appAccount { callback AsyncCallback_AuthenticatorInfo_Void = void (AuthenticatorInfo result); [Entity=Interface] interface AppAccountManager { - [Deprecated] void addAccount(String name, AsyncCallback_Void callback_); [Deprecated] @@ -259,101 +257,79 @@ namespace appAccount { void setAuthenticatorProperties(String owner, AuthCallback callback_); [Throws] void setAuthenticatorProperties(String owner, SetPropertiesOptions options, AuthCallback callback_); - }; [Entity=Interface] interface AppAccountInfo { - attribute String owner; attribute String name; - }; [Entity=Interface, Deprecated] interface OAuthTokenInfo { - [Deprecated] attribute String authType; [Deprecated] attribute String token; - }; [Entity=Interface] interface AuthTokenInfo { - attribute String authType; attribute String token; [Optional] attribute AppAccountInfo account; - }; [Entity=Interface] interface AuthenticatorInfo { - attribute String owner; attribute number iconId; attribute number labelId; - }; [Entity=Interface] interface AuthResult { - [Optional] attribute AppAccountInfo account; [Optional] attribute AuthTokenInfo tokenInfo; - }; [Entity=Interface] interface CreateAccountOptions { - [Optional] attribute record customData; - }; [Entity=Interface] interface CreateAccountImplicitlyOptions { - [Optional] attribute sequence requiredLabels; [Optional] attribute String authType; [Optional] attribute record parameters; - }; [Entity=Interface] interface SelectAccountsOptions { - [Optional] attribute sequence allowedAccounts; [Optional] attribute sequence allowedOwners; [Optional] attribute sequence requiredLabels; - }; [Entity=Interface] interface VerifyCredentialOptions { - [Optional] attribute String credentialType; [Optional] attribute String credential; [Optional] attribute record parameters; - }; [Entity=Interface] interface SetPropertiesOptions { - [Optional] attribute record properties; [Optional] attribute record parameters; - }; dictionary Constants { - [Deprecated] String ACTION_ADD_ACCOUNT_IMPLICITLY = "addAccountImplicitly"; [Deprecated] @@ -373,11 +349,9 @@ namespace appAccount { String KEY_CALLER_BUNDLE_NAME = "callerBundleName"; String KEY_REQUIRED_LABELS = "requiredLabels"; String KEY_BOOLEAN_RESULT = "booleanResult"; - }; [Deprecated] dictionary ResultCode { - [Deprecated] number SUCCESS = 0; [Deprecated] @@ -416,7 +390,6 @@ namespace appAccount { number ERROR_OAUTH_UNSUPPORT_AUTH_TYPE = 10017; [Deprecated] number ERROR_PERMISSION_DENIED = 10018; - }; [Synthetic] callback Callback_Number_Literal_Empty_Void = void (number code, Literal_Empty result); @@ -424,29 +397,24 @@ namespace appAccount { callback Callback_Want_Void = void (Want request); [Entity=Interface, Deprecated] interface AuthenticatorCallback { - [Deprecated] attribute Callback_Number_Literal_Empty_Void onResult; [Deprecated] attribute Callback_Want_Void onRequestRedirected; - }; [Synthetic] - callback Callback_Number_AuthResult_Void = void (number code, optional AuthResult result); + callback Callback_Number_Opt_AuthResult_Void = void (number code, optional AuthResult result); [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface AuthCallback { - - attribute Callback_Number_AuthResult_Void onResult; + attribute Callback_Number_Opt_AuthResult_Void onResult; attribute Callback_Want_Void onRequestRedirected; [Optional] attribute Callback_Void onRequestContinued; - }; [Entity=Class] interface Authenticator { - [Deprecated] void addAccountImplicitly(String authType, String callerBundleName, Literal_Empty options, AuthenticatorCallback callback_); void createAccountImplicitly(CreateAccountImplicitlyOptions options, AuthCallback callback_); @@ -458,13 +426,5 @@ namespace appAccount { void checkAccountLabels(String name, sequence labels, AuthCallback callback_); void checkAccountRemovable(String name, AuthCallback callback_); rpc.RemoteObject getRemoteObject(); - }; - [GlobalScope] - interface GlobalScope_appAccount_ohos_account_appAccount { - - static AppAccountManager createAppAccountManager(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.account.distributedAccount.idl b/idl/@ohos.account.distributedAccount.idl index bf4677e..a7414f3 100644 --- a/idl/@ohos.account.distributedAccount.idl +++ b/idl/@ohos.account.distributedAccount.idl @@ -1,14 +1,14 @@ -package ohos.account; +package ohos.account.distributedAccount; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace distributedAccount { - + DistributedAccountAbility getDistributedAccountAbility(); [Async, Synthetic] callback AsyncCallback_DistributedInfo_Void = void (DistributedInfo result); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface DistributedAccountAbility { - [Deprecated] void queryOsAccountDistributedInfo(AsyncCallback_DistributedInfo_Void callback_); [Deprecated] @@ -33,17 +33,13 @@ namespace distributedAccount { void setOsAccountDistributedInfoByLocalId(number localId, DistributedInfo distributedInfo, AsyncCallback_Void callback_); [Throws] async void setOsAccountDistributedInfoByLocalId(number localId, DistributedInfo distributedInfo); - }; dictionary DistributedAccountStatus { - number NOT_LOGGED_IN = 0; number LOGGED_IN = 1; - }; [Entity=Interface] interface DistributedInfo { - attribute String name; attribute String id; attribute String event; @@ -55,13 +51,5 @@ namespace distributedAccount { readonly attribute DistributedAccountStatus status; [Optional] attribute Object scalableData; - }; - [GlobalScope] - interface GlobalScope_distributedAccount_ohos_account_distributedAccount { - - static DistributedAccountAbility getDistributedAccountAbility(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.account.osAccount.idl b/idl/@ohos.account.osAccount.idl index 71a63a7..8cfd33c 100644 --- a/idl/@ohos.account.osAccount.idl +++ b/idl/@ohos.account.osAccount.idl @@ -1,9 +1,10 @@ -package ohos.account; -import ohos.account.distributedAccount as distributedAccount; +package ohos.account.osAccount; +import ohos.account.distributedAccount.default as distributedAccount; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace osAccount { - + AccountManager getAccountManager(); [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] @@ -30,7 +31,6 @@ namespace osAccount { callback AsyncCallback_Array_ConstraintSourceTypeInfo_Void = void (sequence result); [Entity=Interface] interface AccountManager { - [Throws] void activateOsAccount(number localId, AsyncCallback_Void callback_); [Throws] @@ -239,14 +239,14 @@ namespace osAccount { async number getSerialNumberForOsAccountLocalId(number localId); [Throws] void on(String type, String name, Callback_Number_Void callback_); - [Throws] - void off(String type, String name, optional Callback_Number_Void callback_); [Throws, DtsName="on", DtsTag="'switching'"] void onSwitching(Callback_OsAccountSwitchEventData_Void callback_); - [Throws, DtsName="off", DtsTag="'switching'"] - void offSwitching(optional Callback_OsAccountSwitchEventData_Void callback_); [Throws, DtsName="on", DtsTag="'switched'"] void onSwitched(Callback_OsAccountSwitchEventData_Void callback_); + [Throws] + void off(String type, String name, optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'switching'"] + void offSwitching(optional Callback_OsAccountSwitchEventData_Void callback_); [Throws, DtsName="off", DtsTag="'switched'"] void offSwitched(optional Callback_OsAccountSwitchEventData_Void callback_); [Throws] @@ -263,11 +263,11 @@ namespace osAccount { void getOsAccountConstraintSourceTypes(number localId, String constraint, AsyncCallback_Array_ConstraintSourceTypeInfo_Void callback_); [Throws] async sequence getOsAccountConstraintSourceTypes(number localId, String constraint); - + [Throws] + async void bindDomainAccount(number localId, DomainAccountInfo domainAccountInfo); }; [Entity=Interface] interface OsAccountInfo { - attribute number localId; attribute String localName; [Optional] @@ -289,29 +289,25 @@ namespace osAccount { attribute boolean isCreateCompleted; attribute distributedAccount.DistributedInfo distributedInfo; attribute DomainAccountInfo domainInfo; - }; [Entity=Interface] interface OsAccountSwitchEventData { - attribute number fromAccountId; attribute number toAccountId; - }; [Entity=Interface] interface CreateOsAccountOptions { - attribute String shortName; - + [Optional] + attribute sequence disallowedPreinstalledBundles; + [Optional] + attribute sequence allowedPreinstalledBundles; }; [Entity=Interface] interface CreateOsAccountForDomainOptions: CreateOsAccountOptions { - - }; [Entity=Interface] interface DomainAccountInfo { - attribute String domain; attribute String accountName; [Optional] @@ -320,21 +316,17 @@ namespace osAccount { attribute boolean isAuthenticated; [Optional] attribute String serverConfigId; - }; dictionary OsAccountType { - number ADMIN = 0; number NORMAL = 1; number GUEST = 2; number PRIVATE = 1024; - }; [Async, Synthetic] callback AsyncCallback_ExecutorProperty_Void = void (ExecutorProperty result); [Entity=Class] interface UserAuth { - constructor(); [Throws] number getVersion(); @@ -360,58 +352,45 @@ namespace osAccount { buffer authUser(number userId, buffer challenge, AuthType authType, AuthTrustLevel authTrustLevel, IUserAuthCallback callback_); [Throws] void cancelAuth(buffer contextID); - }; [Entity=Class] interface PINAuth { - constructor(); [Throws] void registerInputer(IInputer inputer); [Throws] void unregisterInputer(); - }; [Entity=Class] interface InputerManager { - [Throws] static void registerInputer(AuthType authType, IInputer inputer); [Throws] static void unregisterInputer(AuthType authType); - }; [Entity=Interface] interface AuthStatusInfo { - attribute number remainTimes; attribute number freezingTime; - }; [Entity=Interface] interface GetDomainAccessTokenOptions { - attribute DomainAccountInfo domainAccountInfo; attribute buffer domainAccountToken; attribute record businessParams; attribute number callerUid; - }; [Entity=Interface] interface GetDomainAccountInfoOptions { - attribute String accountName; [Optional] attribute String domain; [Optional] attribute String serverConfigId; - }; [Entity=Interface] interface GetDomainAccountInfoPluginOptions: GetDomainAccountInfoOptions { - attribute number callerUid; - }; [Async, Synthetic] callback AsyncCallback_DomainAccountInfo_Void = void (DomainAccountInfo result); @@ -421,7 +400,6 @@ namespace osAccount { callback AsyncCallback_Buffer_Void = void (buffer result); [Entity=Interface] interface DomainPlugin { - void auth(DomainAccountInfo domainAccountInfo, buffer credential, IUserAuthCallback callback_); void authWithPopup(DomainAccountInfo domainAccountInfo, IUserAuthCallback callback_); void authWithToken(DomainAccountInfo domainAccountInfo, buffer token, IUserAuthCallback callback_); @@ -431,11 +409,9 @@ namespace osAccount { void unbindAccount(DomainAccountInfo domainAccountInfo, AsyncCallback_Void callback_); void isAccountTokenValid(DomainAccountInfo domainAccountInfo, buffer token, AsyncCallback_Boolean_Void callback_); void getAccessToken(GetDomainAccessTokenOptions options, AsyncCallback_Buffer_Void callback_); - }; [Entity=Class] interface DomainAccountManager { - [Throws] static void registerPlugin(DomainPlugin plugin); [Throws] @@ -466,32 +442,32 @@ namespace osAccount { static async buffer getAccessToken(record businessParams); [Throws] static async boolean isAuthenticationExpired(DomainAccountInfo domainAccountInfo); - }; [Entity=Interface] interface DomainServerConfig { - attribute record parameters; attribute String id; attribute String domain; - }; [Entity=Class] interface DomainServerConfigManager { - [Throws] static async DomainServerConfig addServerConfig(record parameters); [Throws] static async void removeServerConfig(String configId); [Throws] + static async DomainServerConfig updateServerConfig(String configId, record parameters); + [Throws] + static async DomainServerConfig getServerConfig(String configId); + [Throws] + static async sequence getAllServerConfigs(); + [Throws] static async DomainServerConfig getAccountServerConfig(DomainAccountInfo domainAccountInfo); - }; [Async, Synthetic] callback AsyncCallback_Array_EnrolledCredInfo_Void = void (sequence result); [Entity=Class] interface UserIdentityManager { - constructor(); [Throws] void openSession(AsyncCallback_Buffer_Void callback_); @@ -519,68 +495,54 @@ namespace osAccount { async sequence getAuthInfo(optional GetAuthInfoOptions options); [Throws] async buffer getEnrolledId(AuthType authType, optional number accountId); - }; [Entity=Interface] interface GetAuthInfoOptions { - [Optional] attribute AuthType authType; [Optional] attribute number accountId; - }; dictionary AuthIntent { - number UNLOCK = 1; number SILENT_AUTH = 2; number QUESTION_AUTH = 3; - + number ABANDONED_PIN_AUTH = 4; }; [Entity=Interface] interface RemoteAuthOptions { - [Optional] attribute String verifierNetworkId; [Optional] attribute String collectorNetworkId; [Optional] attribute number collectorTokenId; - }; [Entity=Interface] interface AuthOptions { - [Optional] attribute number accountId; [Optional] attribute AuthIntent authIntent; [Optional] attribute RemoteAuthOptions remoteAuthOptions; - }; [Synthetic] callback Callback_AuthSubType_Buffer_Void = void (AuthSubType authSubType, buffer data); [Entity=Interface] interface IInputData { - attribute Callback_AuthSubType_Buffer_Void onSetData; - }; [Entity=Interface] interface GetInputDataOptions { - [Optional] attribute buffer challenge; - }; [Synthetic] callback Callback_AuthSubType_IInputData_GetInputDataOptions_Void = void (AuthSubType authSubType, IInputData callback_, GetInputDataOptions options); [Entity=Interface] interface IInputer { - attribute Callback_AuthSubType_IInputData_GetInputDataOptions_Void onGetData; - }; [Synthetic] callback Callback_Number_AuthResult_Void = void (number result, AuthResult extraInfo); @@ -588,42 +550,33 @@ namespace osAccount { callback Callback_Number_Number_Buffer_Void = void (number module, number acquire, buffer extraInfo); [Entity=Interface] interface IUserAuthCallback { - attribute Callback_Number_AuthResult_Void onResult; [Optional] attribute Callback_Number_Number_Buffer_Void onAcquireInfo; - }; [Synthetic] callback Callback_Number_RequestResult_Void = void (number result, RequestResult extraInfo); [Entity=Interface] interface IIdmCallback { - attribute Callback_Number_RequestResult_Void onResult; [Optional] attribute Callback_Number_Number_Buffer_Void onAcquireInfo; - }; [Entity=Interface] interface GetPropertyRequest { - attribute AuthType authType; attribute sequence keys; [Optional] attribute number accountId; - }; [Entity=Interface] interface SetPropertyRequest { - attribute AuthType authType; attribute SetPropertyType key; attribute buffer setInfo; - }; [Entity=Interface] interface ExecutorProperty { - attribute number result; attribute AuthSubType authSubType; [Optional] @@ -636,11 +589,11 @@ namespace osAccount { attribute String enrollmentProgress; [Optional] attribute String sensorInfo; - + [Optional] + attribute number credentialLength; }; [Entity=Interface] interface AuthResult { - [Optional] attribute buffer token; [Optional] @@ -655,61 +608,52 @@ namespace osAccount { attribute number accountId; [Optional] attribute number pinValidityPeriod; - }; [Entity=Interface] interface CredentialInfo { - attribute AuthType credType; attribute AuthSubType credSubType; attribute buffer token; [Optional] attribute number accountId; - }; [Entity=Interface] interface RequestResult { - [Optional] attribute buffer credentialId; - }; [Entity=Interface] interface EnrolledCredInfo { - attribute buffer credentialId; attribute AuthType authType; attribute AuthSubType authSubType; attribute buffer templateId; - + [Optional] + attribute boolean isAbandoned; + [Optional] + attribute number validityPeriod; }; dictionary GetPropertyType { - number AUTH_SUB_TYPE = 1; number REMAIN_TIMES = 2; number FREEZING_TIME = 3; number ENROLLMENT_PROGRESS = 4; number SENSOR_INFO = 5; number NEXT_PHASE_FREEZING_TIME = 6; - + number CREDENTIAL_LENGTH = 7; }; dictionary SetPropertyType { - number INIT_ALGORITHM = 1; - }; dictionary AuthType { - number PIN = 1; number FACE = 2; number FINGERPRINT = 4; number RECOVERY_KEY = 8; number PRIVATE_PIN = 16; number DOMAIN = 1024; - }; dictionary AuthSubType { - number PIN_SIX = 10000; number PIN_NUMBER = 10001; number PIN_MIXED = 10002; @@ -722,23 +666,17 @@ namespace osAccount { number FINGERPRINT_OPTICAL = 30001; number FINGERPRINT_ULTRASONIC = 30002; number DOMAIN_MIXED = 10240001; - }; dictionary AuthTrustLevel { - number ATL1 = 10000; number ATL2 = 20000; number ATL3 = 30000; number ATL4 = 40000; - }; dictionary Module { - number FACE_AUTH = 1; - }; dictionary ResultCode { - number SUCCESS = 0; number FAIL = 1; number GENERAL_ERROR = 2; @@ -750,10 +688,8 @@ namespace osAccount { number INVALID_PARAMETERS = 8; number LOCKED = 9; number NOT_ENROLLED = 10; - }; dictionary FaceTipsCode { - number FACE_AUTH_TIP_TOO_BRIGHT = 1; number FACE_AUTH_TIP_TOO_DARK = 2; number FACE_AUTH_TIP_TOO_CLOSE = 3; @@ -765,10 +701,8 @@ namespace osAccount { number FACE_AUTH_TIP_TOO_MUCH_MOTION = 9; number FACE_AUTH_TIP_POOR_GAZE = 10; number FACE_AUTH_TIP_NOT_DETECTED = 11; - }; dictionary FingerprintTips { - number FINGERPRINT_TIP_GOOD = 0; number FINGERPRINT_TIP_IMAGER_DIRTY = 1; number FINGERPRINT_TIP_INSUFFICIENT = 2; @@ -777,28 +711,16 @@ namespace osAccount { number FINGERPRINT_TIP_TOO_SLOW = 5; number FINGERPRINT_TIP_FINGER_DOWN = 6; number FINGERPRINT_TIP_FINGER_UP = 7; - }; dictionary ConstraintSourceType { - number CONSTRAINT_NOT_EXIST = 0; number CONSTRAINT_TYPE_BASE = 1; number CONSTRAINT_TYPE_DEVICE_OWNER = 2; number CONSTRAINT_TYPE_PROFILE_OWNER = 3; - }; [Entity=Interface] interface ConstraintSourceTypeInfo { - attribute number localId; attribute ConstraintSourceType type; - - }; - [GlobalScope] - interface GlobalScope_osAccount_ohos_account_osAccount { - - static AccountManager getAccountManager(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.advertising.AdsServiceExtensionAbility.idl b/idl/@ohos.advertising.AdsServiceExtensionAbility.idl index 75139df..c90ec83 100644 --- a/idl/@ohos.advertising.AdsServiceExtensionAbility.idl +++ b/idl/@ohos.advertising.AdsServiceExtensionAbility.idl @@ -1,16 +1,12 @@ -package ohos.advertising; -import ohos.advertising as advertising; -[Entity=Class] +package ohos.advertising.AdsServiceExtensionAbility; +import ohos.advertising.default as advertising; +[Entity=Class, DefaultExport] interface AdsServiceExtensionAbility { - - undefined onLoadAd(advertising.AdRequestParams adParam, advertising.AdOptions adOptions, RespCallback respCallback); - undefined onLoadAdWithMultiSlots(sequence adParams, advertising.AdOptions adOptions, RespCallback respCallback); - + void onLoadAd(advertising.AdRequestParams adParam, advertising.AdOptions adOptions, RespCallback respCallback); + void onLoadAdWithMultiSlots(sequence adParams, advertising.AdOptions adOptions, RespCallback respCallback); }; [Entity=Interface] interface RespCallback { - [CallSignature] void invoke(record> respData); - }; \ No newline at end of file diff --git a/idl/@ohos.advertising.idl b/idl/@ohos.advertising.idl index b6f5b57..f9072a7 100644 --- a/idl/@ohos.advertising.idl +++ b/idl/@ohos.advertising.idl @@ -1,13 +1,12 @@ -package ohos; -import ohos.web.web_webview as web_webview; -import ohos.app.ability.common as common; -import advertising.Advertisement as _Advertisement; +package ohos.advertising; +import ohos.web.webview.default as web_webview; +import ohos.app.ability.common.default as common; +import advertising.advertisement.Advertisement as _Advertisement; +[DefaultExport] namespace advertising { - typedef _Advertisement Advertisement; [Entity=Interface] interface AdRequestParams { - attribute String adId; [Optional] attribute number adType; @@ -19,22 +18,18 @@ namespace advertising { attribute number adHeight; [Optional] attribute String adSearchKeyword; - }; [Entity=Interface] interface AdOptions { - [Optional] attribute number tagForChildProtection; [Optional] attribute String adContentClassification; [Optional] attribute number nonPersonalizedAd; - }; [Entity=Interface] interface AdDisplayOptions { - [Optional] attribute String customData; [Optional] @@ -45,50 +40,39 @@ namespace advertising { attribute boolean mute; [Optional] attribute number audioFocusType; - }; [Entity=Interface] interface AdInteractionListener { - - undefined onStatusChanged(String status, Advertisement ad, String data); - + void onStatusChanged(String status, Advertisement ad, String data); }; [Entity=Interface] interface AdLoadListener { - void onAdLoadFailure(number errorCode, String errorMsg); void onAdLoadSuccess(sequence ads); - }; [Entity=Interface] interface MultiSlotsAdLoadListener { - void onAdLoadFailure(number errorCode, String errorMsg); void onAdLoadSuccess(record> adsMap); - }; + [Throws] + void showAd(Advertisement ad, AdDisplayOptions options, optional common.UIAbilityContext context); [Entity=Class] interface AdLoader { - constructor(common.Context context); [Throws] void loadAd(AdRequestParams adParam, AdOptions adOptions, AdLoadListener listener); [Throws] void loadAdWithMultiSlots(sequence adParams, AdOptions adOptions, MultiSlotsAdLoadListener listener); - }; - [GlobalScope] - interface GlobalScope_advertising_ohos_advertising { - - [Throws] - static void showAd(Advertisement ad, AdDisplayOptions options, optional common.UIAbilityContext context); - [Throws] - static async String getAdRequestBody(sequence adParams, AdOptions adOptions); - [Throws] - static void parseAdResponse(String adResponse, MultiSlotsAdLoadListener listener, common.UIAbilityContext context); - [Throws] - static void registerWebAdInterface(web_webview.WebviewController controller, common.UIAbilityContext context); - - }; - + [Throws] + async String getAdRequestBody(sequence adParams, AdOptions adOptions); + [Throws] + void parseAdResponse(String adResponse, MultiSlotsAdLoadListener listener, common.UIAbilityContext context); + [Throws] + void registerWebAdInterface(web_webview.WebviewController controller, common.UIAbilityContext context); + [Throws] + void registerWebAdInterface(web_webview.WebviewController controller, common.UIAbilityContext context, boolean needRefresh); + [Throws] + void deleteWebAdInterface(web_webview.WebviewController controller, boolean needRefresh); }; \ No newline at end of file diff --git a/idl/@ohos.ai.intelligentVoice.idl b/idl/@ohos.ai.intelligentVoice.idl index 7f5547c..04fe099 100644 --- a/idl/@ohos.ai.intelligentVoice.idl +++ b/idl/@ohos.ai.intelligentVoice.idl @@ -1,24 +1,23 @@ -package ohos.ai; +package ohos.ai.intelligentVoice; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace intelligentVoice { - + [Throws] + IntelligentVoiceManager getIntelligentVoiceManager(); [Synthetic] callback Callback_ServiceChangeType_Void = void (ServiceChangeType parameter); [Entity=Interface] interface IntelligentVoiceManager { - [Throws] sequence getCapabilityInfo(); [Throws, DtsName="on", DtsTag="'serviceChange'"] void onServiceChange(Callback_ServiceChangeType_Void callback_); [Throws, DtsName="off", DtsTag="'serviceChange'"] void offServiceChange(optional Callback_ServiceChangeType_Void callback_); - }; [Entity=Interface] interface WakeupManager { - [Throws] async void setParameter(String key, String value); [Throws] @@ -31,56 +30,40 @@ namespace intelligentVoice { async EnrollResult enrollWithWakeupFilesForResult(sequence wakeupFiles, String wakeupInfo); [Throws] async void clearUserData(); - }; dictionary UploadFileType { - number ENROLL_FILE = 0; number WAKEUP_FILE = 1; - }; [Entity=Interface] interface UploadFile { - attribute UploadFileType type; attribute String filesDescription; attribute sequence filesContent; - }; [Entity=Interface] interface WakeupSourceFile { - attribute String filePath; attribute buffer fileContent; - }; dictionary ServiceChangeType { - number SERVICE_UNAVAILABLE = 0; - }; dictionary IntelligentVoiceEngineType { - number ENROLL_ENGINE_TYPE = 0; number WAKEUP_ENGINE_TYPE = 1; number UPDATE_ENGINE_TYPE = 2; - }; [Entity=Interface] interface EnrollIntelligentVoiceEngineDescriptor { - attribute String wakeupPhrase; - }; [Entity=Interface] interface WakeupIntelligentVoiceEngineDescriptor { - attribute boolean needReconfirm; attribute String wakeupPhrase; - }; dictionary EvaluationResultCode { - number UNKNOWN = 0; number PASS = 1; number WORD_EMPTY = 2; @@ -95,49 +78,47 @@ namespace intelligentVoice { number SENSITIVE_WORD = 11; number NO_INITIAL_CONSONANT = 12; number REPEATED_PHONEME = 13; - }; [Entity=Interface] interface EvaluationResult { - attribute number score; attribute EvaluationResultCode resultCode; - }; + [Throws] + WakeupManager getWakeupManager(); [Async, Synthetic] callback AsyncCallback_EnrollIntelligentVoiceEngine_Void = void (EnrollIntelligentVoiceEngine result); + [Throws] + void createEnrollIntelligentVoiceEngine(EnrollIntelligentVoiceEngineDescriptor descriptor, AsyncCallback_EnrollIntelligentVoiceEngine_Void callback_); + [Throws] + async EnrollIntelligentVoiceEngine createEnrollIntelligentVoiceEngine(EnrollIntelligentVoiceEngineDescriptor descriptor); [Async, Synthetic] callback AsyncCallback_WakeupIntelligentVoiceEngine_Void = void (WakeupIntelligentVoiceEngine result); + [Throws] + void createWakeupIntelligentVoiceEngine(WakeupIntelligentVoiceEngineDescriptor descriptor, AsyncCallback_WakeupIntelligentVoiceEngine_Void callback_); + [Throws] + async WakeupIntelligentVoiceEngine createWakeupIntelligentVoiceEngine(WakeupIntelligentVoiceEngineDescriptor descriptor); [Entity=Interface] interface EnrollEngineConfig { - attribute String language; attribute String region; - }; dictionary SensibilityType { - number LOW_SENSIBILITY = 1; number MIDDLE_SENSIBILITY = 2; number HIGH_SENSIBILITY = 3; - }; [Entity=Interface] interface WakeupHapInfo { - attribute String bundleName; attribute String abilityName; - }; dictionary WakeupIntelligentVoiceEventType { - number INTELLIGENT_VOICE_EVENT_WAKEUP_NONE = 0; number INTELLIGENT_VOICE_EVENT_RECOGNIZE_COMPLETE = 1; number INTELLIGENT_VOICE_EVENT_HEADSET_RECOGNIZE_COMPLETE = 2; - }; dictionary IntelligentVoiceErrorCode { - number INTELLIGENT_VOICE_NO_MEMORY = 22700101; number INTELLIGENT_VOICE_INVALID_PARAM = 22700102; number INTELLIGENT_VOICE_INIT_FAILED = 22700103; @@ -145,10 +126,8 @@ namespace intelligentVoice { number INTELLIGENT_VOICE_START_CAPTURER_FAILED = 22700105; number INTELLIGENT_VOICE_READ_FAILED = 22700106; number INTELLIGENT_VOICE_SYSTEM_ERROR = 22700107; - }; dictionary EnrollResult { - number SUCCESS = 0; number VPR_TRAIN_FAILED = -1; number WAKEUP_PHRASE_NOT_MATCH = -2; @@ -157,30 +136,23 @@ namespace intelligentVoice { number INTERVAL_LARGE = -5; number DIFFERENT_PERSON = -6; number UNKNOWN_ERROR = -100; - }; dictionary CapturerChannel { - number CAPTURER_CHANNEL_1 = 1; number CAPTURER_CHANNEL_2 = 2; number CAPTURER_CHANNEL_3 = 4; number CAPTURER_CHANNEL_4 = 8; - }; [Entity=Interface] interface EnrollCallbackInfo { - attribute EnrollResult result; attribute String context; - }; [Entity=Interface] interface WakeupIntelligentVoiceEngineCallbackInfo { - attribute WakeupIntelligentVoiceEventType eventId; attribute boolean isSuccess; attribute String context; - }; [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); @@ -192,7 +164,6 @@ namespace intelligentVoice { callback AsyncCallback_String_Void = void (String result); [Entity=Interface] interface EnrollIntelligentVoiceEngine { - [Throws] void getSupportedRegions(AsyncCallback_Array_String_Void callback_); [Throws] @@ -235,13 +206,11 @@ namespace intelligentVoice { void release(AsyncCallback_Void callback_); [Throws] async void release(); - }; [Synthetic] callback Callback_WakeupIntelligentVoiceEngineCallbackInfo_Void = void (WakeupIntelligentVoiceEngineCallbackInfo parameter); [Entity=Interface] interface WakeupIntelligentVoiceEngine { - [Throws] void getSupportedRegions(AsyncCallback_Array_String_Void callback_); [Throws] @@ -278,24 +247,5 @@ namespace intelligentVoice { void onWakeupIntelligentVoiceEvent(Callback_WakeupIntelligentVoiceEngineCallbackInfo_Void callback_); [Throws, DtsName="off", DtsTag="'wakeupIntelligentVoiceEvent'"] void offWakeupIntelligentVoiceEvent(optional Callback_WakeupIntelligentVoiceEngineCallbackInfo_Void callback_); - }; - [GlobalScope] - interface GlobalScope_intelligentVoice_ohos_ai_intelligentVoice { - - [Throws] - static IntelligentVoiceManager getIntelligentVoiceManager(); - [Throws] - static WakeupManager getWakeupManager(); - [Throws] - static void createEnrollIntelligentVoiceEngine(EnrollIntelligentVoiceEngineDescriptor descriptor, AsyncCallback_EnrollIntelligentVoiceEngine_Void callback_); - [Throws] - static async EnrollIntelligentVoiceEngine createEnrollIntelligentVoiceEngine(EnrollIntelligentVoiceEngineDescriptor descriptor); - [Throws] - static void createWakeupIntelligentVoiceEngine(WakeupIntelligentVoiceEngineDescriptor descriptor, AsyncCallback_WakeupIntelligentVoiceEngine_Void callback_); - [Throws] - static async WakeupIntelligentVoiceEngine createWakeupIntelligentVoiceEngine(WakeupIntelligentVoiceEngineDescriptor descriptor); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.ai.mindSporeLite.idl b/idl/@ohos.ai.mindSporeLite.idl index dccf110..8da7601 100644 --- a/idl/@ohos.ai.mindSporeLite.idl +++ b/idl/@ohos.ai.mindSporeLite.idl @@ -1,14 +1,25 @@ -package ohos.ai; +package ohos.ai.mindSporeLite; import ohos.base.Callback as Callback; +[DefaultExport] namespace mindSporeLite { - + async Model loadModelFromFile(String model, optional Context context); [Synthetic] callback Callback_Model_Void = void (Model parameter); + void loadModelFromFile(String model, Callback_Model_Void callback_); + void loadModelFromFile(String model, Context context, Callback_Model_Void callback_); + async Model loadModelFromBuffer(buffer model, optional Context context); + void loadModelFromBuffer(buffer model, Callback_Model_Void callback_); + void loadModelFromBuffer(buffer model, Context context, Callback_Model_Void callback_); + async Model loadModelFromFd(number model, optional Context context); + void loadModelFromFd(number model, Callback_Model_Void callback_); + void loadModelFromFd(number model, Context context, Callback_Model_Void callback_); + async Model loadTrainModelFromFile(String model, optional TrainCfg trainCfg, optional Context context); + async Model loadTrainModelFromBuffer(buffer model, optional TrainCfg trainCfg, optional Context context); + async Model loadTrainModelFromFd(number model, optional TrainCfg trainCfg, optional Context context); [Synthetic] callback Callback_Array_MSTensor_Void = void (sequence parameter); [Entity=Interface] interface Model { - [Optional] attribute number learningRate; [Optional] @@ -23,46 +34,36 @@ namespace mindSporeLite { boolean setupVirtualBatch(number virtualBatchMultiplier, number lr, number momentum); boolean exportModel(String modelFile, optional QuantizationType quantizationType, optional boolean exportInferenceOnly, optional sequence outputTensorName); boolean exportWeightsCollaborateWithMicro(String weightFile, optional boolean isInference, optional boolean enableFp16, optional sequence changeableWeightsName); - }; dictionary QuantizationType { - number NO_QUANT = 0; number WEIGHT_QUANT = 1; number FULL_QUANT = 2; - }; dictionary OptimizationLevel { - number O0 = 0; number O2 = 2; number O3 = 3; number AUTO = 4; - }; [Entity=Interface] interface TrainCfg { - [Optional] attribute sequence lossName; [Optional] attribute OptimizationLevel optimizationLevel; - }; [Entity=Interface] interface Context { - [Optional] attribute sequence target; [Optional] attribute CpuDevice cpu; [Optional] attribute NNRTDevice nnrt; - }; [Entity=Interface] interface CpuDevice { - [Optional] attribute number threadNum; [Optional] @@ -71,51 +72,40 @@ namespace mindSporeLite { attribute sequence threadAffinityCoreList; [Optional] attribute String precisionMode; - }; dictionary PerformanceMode { - number PERFORMANCE_NONE = 0; number PERFORMANCE_LOW = 1; number PERFORMANCE_MEDIUM = 2; number PERFORMANCE_HIGH = 3; number PERFORMANCE_EXTREME = 4; - }; dictionary Priority { - number PRIORITY_NONE = 0; number PRIORITY_LOW = 1; number PRIORITY_MEDIUM = 2; number PRIORITY_HIGH = 3; - }; [Entity=Interface] interface Extension { - attribute String name; attribute buffer value; - }; dictionary NNRTDeviceType { - number NNRTDEVICE_OTHERS = 0; number NNRTDEVICE_CPU = 1; number NNRTDEVICE_GPU = 2; number NNRTDEVICE_ACCELERATOR = 3; - }; [Entity=Interface] interface NNRTDeviceDescription { - bigint deviceID(); NNRTDeviceType deviceType(); String deviceName(); - }; + sequence getAllNNRTDeviceDescriptions(); [Entity=Interface] interface NNRTDevice { - [Optional] attribute bigint deviceID; [Optional] @@ -124,18 +114,14 @@ namespace mindSporeLite { attribute Priority priority; [Optional] attribute sequence extensions; - }; dictionary ThreadAffinityMode { - number NO_AFFINITIES = 0; number BIG_CORES_FIRST = 1; number LITTLE_CORES_FIRST = 2; - }; [Entity=Interface] interface MSTensor { - attribute String name; attribute sequence shape; attribute number elementNum; @@ -144,10 +130,8 @@ namespace mindSporeLite { attribute Format format; buffer getData(); void setData(buffer inputArray); - }; dictionary DataType { - number TYPE_UNKNOWN = 0; number NUMBER_TYPE_INT8 = 32; number NUMBER_TYPE_INT16 = 33; @@ -160,10 +144,8 @@ namespace mindSporeLite { number NUMBER_TYPE_FLOAT16 = 42; number NUMBER_TYPE_FLOAT32 = 43; number NUMBER_TYPE_FLOAT64 = 44; - }; dictionary Format { - number DEFAULT_FORMAT = -1; number NCHW = 0; number NHWC = 1; @@ -171,25 +153,5 @@ namespace mindSporeLite { number HWKC = 3; number HWCK = 4; number KCHW = 5; - - }; - [GlobalScope] - interface GlobalScope_mindSporeLite_ohos_ai_mindSporeLite { - - static async Model loadModelFromFile(String model, optional Context context); - static void loadModelFromFile(String model, Callback_Model_Void callback_); - static void loadModelFromFile(String model, Context context, Callback_Model_Void callback_); - static async Model loadModelFromBuffer(buffer model, optional Context context); - static void loadModelFromBuffer(buffer model, Callback_Model_Void callback_); - static void loadModelFromBuffer(buffer model, Context context, Callback_Model_Void callback_); - static async Model loadModelFromFd(number model, optional Context context); - static void loadModelFromFd(number model, Callback_Model_Void callback_); - static void loadModelFromFd(number model, Context context, Callback_Model_Void callback_); - static async Model loadTrainModelFromFile(String model, optional TrainCfg trainCfg, optional Context context); - static async Model loadTrainModelFromBuffer(buffer model, optional TrainCfg trainCfg, optional Context context); - static async Model loadTrainModelFromFd(number model, optional TrainCfg trainCfg, optional Context context); - static sequence getAllNNRTDeviceDescriptions(); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.animation.windowAnimationManager.idl b/idl/@ohos.animation.windowAnimationManager.idl index d90cd85..004d1e3 100644 --- a/idl/@ohos.animation.windowAnimationManager.idl +++ b/idl/@ohos.animation.windowAnimationManager.idl @@ -1,37 +1,33 @@ -package ohos.animation; +package ohos.animation.windowAnimationManager; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace windowAnimationManager { - + void setController(WindowAnimationController controller); [Async, Synthetic] callback AsyncCallback_WindowAnimationFinishedCallback_Void = void (WindowAnimationFinishedCallback result); + void minimizeWindowWithAnimation(WindowAnimationTarget windowTarget, AsyncCallback_WindowAnimationFinishedCallback_Void callback_); + async WindowAnimationFinishedCallback minimizeWindowWithAnimation(WindowAnimationTarget windowTarget); [Entity=Interface] interface RRect { - attribute number left; attribute number top; attribute number width; attribute number height; attribute number radius; - }; [Entity=Interface] interface WindowAnimationTarget { - readonly attribute String bundleName; readonly attribute String abilityName; readonly attribute RRect windowBounds; readonly attribute number missionId; - }; [Entity=Interface] interface WindowAnimationFinishedCallback { - void onAnimationFinish(); - }; [Entity=Interface] interface WindowAnimationController { - void onStartAppFromLauncher(WindowAnimationTarget startingWindowTarget, WindowAnimationFinishedCallback finishCallback); void onStartAppFromRecent(WindowAnimationTarget startingWindowTarget, WindowAnimationFinishedCallback finishCallback); void onStartAppFromOther(WindowAnimationTarget startingWindowTarget, WindowAnimationFinishedCallback finishCallback); @@ -40,15 +36,5 @@ namespace windowAnimationManager { void onCloseWindow(WindowAnimationTarget closingWindowTarget, WindowAnimationFinishedCallback finishCallback); void onScreenUnlock(WindowAnimationFinishedCallback finishCallback); void onWindowAnimationTargetsUpdate(WindowAnimationTarget fullScreenWindowTarget, sequence floatingWindowTargets); - }; - [GlobalScope] - interface GlobalScope_windowAnimationManager_ohos_animation_windowAnimationManager { - - static void setController(WindowAnimationController controller); - static void minimizeWindowWithAnimation(WindowAnimationTarget windowTarget, AsyncCallback_WindowAnimationFinishedCallback_Void callback_); - static async WindowAnimationFinishedCallback minimizeWindowWithAnimation(WindowAnimationTarget windowTarget); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.animator.idl b/idl/@ohos.animator.idl index 3fa5622..dbac044 100644 --- a/idl/@ohos.animator.idl +++ b/idl/@ohos.animator.idl @@ -1,7 +1,9 @@ package ohos.animator; +import arkui.component.enums.FillMode as FillMode; +import arkui.component.enums.PlayMode as PlayMode; +import arkui.component.common.ExpectedFrameRateRange as ExpectedFrameRateRange; [Entity=Interface] interface AnimatorOptions { - attribute number duration; attribute String easing; attribute number delay; @@ -10,11 +12,9 @@ interface AnimatorOptions { attribute number iterations; attribute number begin; attribute number end; - }; [Entity=Class] interface SimpleAnimatorOptions { - constructor(number begin, number end); SimpleAnimatorOptions duration(number duration); SimpleAnimatorOptions easing(String curve); @@ -22,7 +22,6 @@ interface SimpleAnimatorOptions { SimpleAnimatorOptions fill(FillMode fillMode); SimpleAnimatorOptions direction(PlayMode direction); SimpleAnimatorOptions iterations(number iterations); - }; [Synthetic] callback Callback_Number_Void = void (number progress); @@ -30,7 +29,6 @@ callback Callback_Number_Void = void (number progress); callback Callback_Void = void (); [Entity=Interface] interface AnimatorResult { - [Deprecated] attribute Callback_Number_Void onframe; attribute Callback_Number_Void onFrame; @@ -46,8 +44,6 @@ interface AnimatorResult { [Deprecated] void update(AnimatorOptions options); [Throws] - void reset(AnimatorOptions options); - [Throws] void reset((AnimatorOptions or SimpleAnimatorOptions) options); void play(); void finish(); @@ -55,16 +51,11 @@ interface AnimatorResult { void cancel(); void reverse(); void setExpectedFrameRateRange(ExpectedFrameRateRange rateRange); - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Animator { - [Deprecated] static AnimatorResult createAnimator(AnimatorOptions options); [Throws] - static AnimatorResult create(AnimatorOptions options); - [Throws] static AnimatorResult create((AnimatorOptions or SimpleAnimatorOptions) options); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.Ability.idl b/idl/@ohos.app.ability.Ability.idl index f330b16..3a42ded 100644 --- a/idl/@ohos.app.ability.Ability.idl +++ b/idl/@ohos.app.ability.Ability.idl @@ -1,10 +1,8 @@ -package ohos.app.ability; -import ohos.app.ability.AbilityConstant as AbilityConstant; -import ohos.app.ability.Configuration as Configuration; -[Entity=Class] +package ohos.app.ability.Ability; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import ohos.app.ability.Configuration.Configuration as Configuration; +[Entity=Class, DefaultExport] interface Ability { - void onConfigurationUpdate(Configuration newConfig); void onMemoryLevel(AbilityConstant.MemoryLevel level); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.AbilityConstant.idl b/idl/@ohos.app.ability.AbilityConstant.idl index 0604981..aa26d52 100644 --- a/idl/@ohos.app.ability.AbilityConstant.idl +++ b/idl/@ohos.app.ability.AbilityConstant.idl @@ -1,9 +1,10 @@ -package ohos.app.ability; +package ohos.app.ability.AbilityConstant; +import ohos.app.ability.appManager.default as appManager; +[DefaultExport] namespace AbilityConstant { - + const String REASON_MESSAGE_DESKTOP_SHORTCUT = "ReasonMessage_DesktopShortcut"; [Entity=Interface] interface LaunchParam { - attribute LaunchReason launchReason; [Optional] attribute String launchReasonMessage; @@ -11,11 +12,9 @@ namespace AbilityConstant { attribute String lastExitMessage; [Optional] attribute LastExitDetailInfo lastExitDetailInfo; - }; [Entity=Interface] interface LastExitDetailInfo { - attribute number pid; attribute String processName; attribute number uid; @@ -24,10 +23,10 @@ namespace AbilityConstant { attribute number rss; attribute number pss; attribute number timestamp; - + [Optional] + attribute appManager.ProcessState processState; }; dictionary LaunchReason { - number UNKNOWN = 0; number START_ABILITY = 1; number CALL = 2; @@ -37,10 +36,9 @@ namespace AbilityConstant { number AUTO_STARTUP = 8; number INSIGHT_INTENT = 9; number PREPARE_CONTINUATION = 10; - + number PRELOAD = 11; }; dictionary LastExitReason { - number UNKNOWN = 0; [Deprecated] number ABILITY_NOT_RESPONDING = 1; @@ -53,64 +51,46 @@ namespace AbilityConstant { number UPGRADE = 8; number USER_REQUEST = 9; number SIGNAL = 10; - }; dictionary OnContinueResult { - number AGREE = 0; number REJECT = 1; number MISMATCH = 2; - }; dictionary MemoryLevel { - number MEMORY_LEVEL_MODERATE = 0; number MEMORY_LEVEL_LOW = 1; number MEMORY_LEVEL_CRITICAL = 2; - }; dictionary WindowMode { - number WINDOW_MODE_UNDEFINED = 0; number WINDOW_MODE_FULLSCREEN = 1; number WINDOW_MODE_SPLIT_PRIMARY = 100; number WINDOW_MODE_SPLIT_SECONDARY = 101; number WINDOW_MODE_FLOATING = 102; - }; dictionary OnSaveResult { - number ALL_AGREE = 0; number CONTINUATION_REJECT = 1; number CONTINUATION_MISMATCH = 2; number RECOVERY_AGREE = 3; number RECOVERY_REJECT = 4; number ALL_REJECT = 5; - }; dictionary StateType { - number CONTINUATION = 0; number APP_RECOVERY = 1; - }; dictionary ContinueState { - number ACTIVE = 0; number INACTIVE = 1; - }; dictionary CollaborateResult { - number ACCEPT = 0; number REJECT = 1; - }; dictionary PrepareTermination { - number TERMINATE_IMMEDIATELY = 0; number CANCEL = 1; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.AbilityLifecycleCallback.idl b/idl/@ohos.app.ability.AbilityLifecycleCallback.idl index d59684f..9bcf051 100644 --- a/idl/@ohos.app.ability.AbilityLifecycleCallback.idl +++ b/idl/@ohos.app.ability.AbilityLifecycleCallback.idl @@ -1,10 +1,9 @@ -package ohos.app.ability; -import ohos.app.ability.UIAbility as UIAbility; -import ohos.data.dataAbility as dataAbility; -import ohos.window as window; -[Entity=Class] +package ohos.app.ability.AbilityLifecycleCallback; +import ohos.app.ability.UIAbility.default as UIAbility; +import ohos.data.dataAbility.default as dataAbility; +import ohos.window.default as window; +[Entity=Class, DefaultExport] interface AbilityLifecycleCallback { - void onAbilityCreate(UIAbility ability); [Optional] void onAbilityWillCreate(UIAbility ability); @@ -40,5 +39,4 @@ interface AbilityLifecycleCallback { void onAbilityWillSaveState(UIAbility ability); [Optional] void onAbilitySaveState(UIAbility ability); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.AbilityStage.idl b/idl/@ohos.app.ability.AbilityStage.idl index d2d37f9..b216ac6 100644 --- a/idl/@ohos.app.ability.AbilityStage.idl +++ b/idl/@ohos.app.ability.AbilityStage.idl @@ -1,19 +1,19 @@ -package ohos.app.ability; -import ohos.app.ability.AbilityConstant as AbilityConstant; -import application.AbilityStageContext as AbilityStageContext; -import ohos.app.ability.Want as Want; -import ohos.app.ability.Configuration as Configuration; -[Entity=Class] +package ohos.app.ability.AbilityStage; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import application.AbilityStageContext.default as AbilityStageContext; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.Configuration.Configuration as Configuration; +[Entity=Class, DefaultExport] interface AbilityStage { - attribute AbilityStageContext context; void onCreate(); String onAcceptWant(Want want); + async String onAcceptWantAsync(Want want); String onNewProcessRequest(Want want); + async String onNewProcessRequestAsync(Want want); void onConfigurationUpdate(Configuration newConfig); void onMemoryLevel(AbilityConstant.MemoryLevel level); void onDestroy(); AbilityConstant.PrepareTermination onPrepareTermination(); async AbilityConstant.PrepareTermination onPrepareTerminationAsync(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ActionExtensionAbility.idl b/idl/@ohos.app.ability.ActionExtensionAbility.idl index 0b2fe3a..4dee002 100644 --- a/idl/@ohos.app.ability.ActionExtensionAbility.idl +++ b/idl/@ohos.app.ability.ActionExtensionAbility.idl @@ -1,7 +1,5 @@ -package ohos.app.ability; -import ohos.app.ability.UIExtensionAbility as UIExtensionAbility; -[Entity=Class] -interface ActionExtensionAbility: UIExtensionAbility { - - +package ohos.app.ability.ActionExtensionAbility; +import ohos.app.ability.UIExtensionAbility.default as UIExtensionAbility; +[Entity=Class, DefaultExport] +interface ActionExtensionAbility: [Extends] UIExtensionAbility { }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.AppServiceExtensionAbility.idl b/idl/@ohos.app.ability.AppServiceExtensionAbility.idl new file mode 100644 index 0000000..0707617 --- /dev/null +++ b/idl/@ohos.app.ability.AppServiceExtensionAbility.idl @@ -0,0 +1,14 @@ +package ohos.app.ability.AppServiceExtensionAbility; +import ohos.rpc.default as rpc; +import application.AppServiceExtensionContext.default as AppServiceExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.ExtensionAbility.default as ExtensionAbility; +[Entity=Class, DefaultExport] +interface AppServiceExtensionAbility: [Extends] ExtensionAbility { + attribute AppServiceExtensionContext context; + void onCreate(Want want); + void onDestroy(); + void onRequest(Want want, number startId); + rpc.RemoteObject onConnect(Want want); + void onDisconnect(Want want); +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ApplicationStateChangeCallback.idl b/idl/@ohos.app.ability.ApplicationStateChangeCallback.idl index 781afb2..f942791 100644 --- a/idl/@ohos.app.ability.ApplicationStateChangeCallback.idl +++ b/idl/@ohos.app.ability.ApplicationStateChangeCallback.idl @@ -1,8 +1,6 @@ -package ohos.app.ability; -[Entity=Class] +package ohos.app.ability.ApplicationStateChangeCallback; +[Entity=Class, DefaultExport] interface ApplicationStateChangeCallback { - void onApplicationForeground(); void onApplicationBackground(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.AtomicServiceOptions.idl b/idl/@ohos.app.ability.AtomicServiceOptions.idl index 345b99d..6c2b237 100644 --- a/idl/@ohos.app.ability.AtomicServiceOptions.idl +++ b/idl/@ohos.app.ability.AtomicServiceOptions.idl @@ -1,11 +1,12 @@ -package ohos.app.ability; -import ohos.app.ability.StartOptions as StartOptions; -[Entity=Class] -interface AtomicServiceOptions: StartOptions { - +package ohos.app.ability.AtomicServiceOptions; +import ohos.app.ability.CompletionHandlerForAtomicService.default as CompletionHandlerForAtomicService; +import ohos.app.ability.StartOptions.default as StartOptions; +[Entity=Class, DefaultExport] +interface AtomicServiceOptions: [Extends] StartOptions { [Optional] attribute number flags; [Optional] attribute record parameters; - + [Optional] + attribute CompletionHandlerForAtomicService completionHandlerForAtomicService; }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.AutoFillExtensionAbility.idl b/idl/@ohos.app.ability.AutoFillExtensionAbility.idl index df9d1e0..ede26d7 100644 --- a/idl/@ohos.app.ability.AutoFillExtensionAbility.idl +++ b/idl/@ohos.app.ability.AutoFillExtensionAbility.idl @@ -1,15 +1,14 @@ -package ohos.app.ability; -import ohos.app.ability.ExtensionAbility as ExtensionAbility; -import ohos.app.ability.UIExtensionContentSession as UIExtensionContentSession; -import application.AutoFillExtensionContext as AutoFillExtensionContext; +package ohos.app.ability.AutoFillExtensionAbility; +import ohos.app.ability.ExtensionAbility.default as ExtensionAbility; +import ohos.app.ability.UIExtensionContentSession.default as UIExtensionContentSession; +import application.AutoFillExtensionContext.default as AutoFillExtensionContext; import application.AutoFillRequest.FillRequest as FillRequest; import application.AutoFillRequest.SaveRequest as SaveRequest; import application.AutoFillRequest.UpdateRequest as UpdateRequest; import application.AutoFillRequest.FillRequestCallback as FillRequestCallback; import application.AutoFillRequest.SaveRequestCallback as SaveRequestCallback; -[Entity=Class] -interface AutoFillExtensionAbility: ExtensionAbility { - +[Entity=Class, DefaultExport] +interface AutoFillExtensionAbility: [Extends] ExtensionAbility { attribute AutoFillExtensionContext context; void onCreate(); void onFillRequest(UIExtensionContentSession session, FillRequest request, FillRequestCallback callback_); @@ -19,5 +18,4 @@ interface AutoFillExtensionAbility: ExtensionAbility { void onForeground(); void onBackground(); async void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ChildProcess.idl b/idl/@ohos.app.ability.ChildProcess.idl index e87332e..ce72a90 100644 --- a/idl/@ohos.app.ability.ChildProcess.idl +++ b/idl/@ohos.app.ability.ChildProcess.idl @@ -1,8 +1,6 @@ -package ohos.app.ability; -import ohos.app.ability.ChildProcessArgs as ChildProcessArgs; -[Entity=Class] +package ohos.app.ability.ChildProcess; +import ohos.app.ability.ChildProcessArgs.ChildProcessArgs as ChildProcessArgs; +[Entity=Class, DefaultExport] interface ChildProcess { - void onStart(optional ChildProcessArgs args); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ChildProcessArgs.idl b/idl/@ohos.app.ability.ChildProcessArgs.idl index b04013b..ede8e69 100644 --- a/idl/@ohos.app.ability.ChildProcessArgs.idl +++ b/idl/@ohos.app.ability.ChildProcessArgs.idl @@ -1,10 +1,8 @@ -package ohos.app.ability; +package ohos.app.ability.ChildProcessArgs; [Entity=Interface] interface ChildProcessArgs { - [Optional] attribute String entryParams; [Optional] attribute record fds; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ChildProcessOptions.idl b/idl/@ohos.app.ability.ChildProcessOptions.idl index bdd5829..1363e63 100644 --- a/idl/@ohos.app.ability.ChildProcessOptions.idl +++ b/idl/@ohos.app.ability.ChildProcessOptions.idl @@ -1,8 +1,6 @@ -package ohos.app.ability; +package ohos.app.ability.ChildProcessOptions; [Entity=Interface] interface ChildProcessOptions { - [Optional] attribute boolean isolationMode; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.CompletionHandler.idl b/idl/@ohos.app.ability.CompletionHandler.idl new file mode 100644 index 0000000..f21f31d --- /dev/null +++ b/idl/@ohos.app.ability.CompletionHandler.idl @@ -0,0 +1,7 @@ +package ohos.app.ability.CompletionHandler; +import bundleManager.ElementName.ElementName as ElementName; +[Entity=Class, DefaultExport] +interface CompletionHandler { + void onRequestSuccess(ElementName elementName, String message); + void onRequestFailure(ElementName elementName, String message); +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.CompletionHandlerForAtomicService.idl b/idl/@ohos.app.ability.CompletionHandlerForAtomicService.idl new file mode 100644 index 0000000..dd9fabe --- /dev/null +++ b/idl/@ohos.app.ability.CompletionHandlerForAtomicService.idl @@ -0,0 +1,11 @@ +package ohos.app.ability.CompletionHandlerForAtomicService; +dictionary FailureCode { + number FAILURE_CODE_SYSTEM_MALFUNCTION = 0; + number FAILURE_CODE_USER_CANCEL = 1; + number FAILURE_CODE_USER_REFUSE = 2; +}; +[Entity=Class, DefaultExport] +interface CompletionHandlerForAtomicService { + void onAtomicServiceRequestSuccess(String appId); + void onAtomicServiceRequestFailure(String appId, FailureCode failureCode, String failureMessage); +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.Configuration.idl b/idl/@ohos.app.ability.Configuration.idl index 3bd5201..23a22cc 100644 --- a/idl/@ohos.app.ability.Configuration.idl +++ b/idl/@ohos.app.ability.Configuration.idl @@ -1,8 +1,7 @@ -package ohos.app.ability; -import ohos.app.ability.ConfigurationConstant as ConfigurationConstant; +package ohos.app.ability.Configuration; +import ohos.app.ability.ConfigurationConstant.default as ConfigurationConstant; [Entity=Interface] interface Configuration { - [Optional] attribute String language; [Optional] @@ -25,5 +24,6 @@ interface Configuration { attribute String mcc; [Optional] attribute String mnc; - + [Optional] + attribute Intl.Locale locale; }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ConfigurationConstant.idl b/idl/@ohos.app.ability.ConfigurationConstant.idl index 7dcf2b3..6d1e364 100644 --- a/idl/@ohos.app.ability.ConfigurationConstant.idl +++ b/idl/@ohos.app.ability.ConfigurationConstant.idl @@ -1,22 +1,17 @@ -package ohos.app.ability; +package ohos.app.ability.ConfigurationConstant; +[DefaultExport] namespace ConfigurationConstant { - dictionary ColorMode { - number COLOR_MODE_NOT_SET = -1; number COLOR_MODE_DARK = 0; number COLOR_MODE_LIGHT = 1; - }; dictionary Direction { - number DIRECTION_NOT_SET = -1; number DIRECTION_VERTICAL = 0; number DIRECTION_HORIZONTAL = 1; - }; dictionary ScreenDensity { - number SCREEN_DENSITY_NOT_SET = 0; number SCREEN_DENSITY_SDPI = 120; number SCREEN_DENSITY_MDPI = 160; @@ -24,7 +19,5 @@ namespace ConfigurationConstant { number SCREEN_DENSITY_XLDPI = 320; number SCREEN_DENSITY_XXLDPI = 480; number SCREEN_DENSITY_XXXLDPI = 640; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.DriverExtensionAbility.idl b/idl/@ohos.app.ability.DriverExtensionAbility.idl index 38b13ce..e4986a3 100644 --- a/idl/@ohos.app.ability.DriverExtensionAbility.idl +++ b/idl/@ohos.app.ability.DriverExtensionAbility.idl @@ -1,16 +1,14 @@ -package ohos.app.ability; -import ohos.rpc as rpc; -import ohos.app.ability.Want as Want; -import application._DriverExtensionContext as _DriverExtensionContext; +package ohos.app.ability.DriverExtensionAbility; +import ohos.rpc.default as rpc; +import ohos.app.ability.Want.default as Want; +import application.DriverExtensionContext.default as _DriverExtensionContext; typedef _DriverExtensionContext DriverExtensionContext; -[Entity=Class] +[Entity=Class, DefaultExport] interface DriverExtensionAbility { - attribute DriverExtensionContext context; void onInit(Want want); void onRelease(); async rpc.RemoteObject onConnect(Want want); async void onDisconnect(Want want); sequence onDump(sequence params); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.EmbeddableUIAbility.idl b/idl/@ohos.app.ability.EmbeddableUIAbility.idl index 722bbed..102113a 100644 --- a/idl/@ohos.app.ability.EmbeddableUIAbility.idl +++ b/idl/@ohos.app.ability.EmbeddableUIAbility.idl @@ -1,9 +1,7 @@ -package ohos.app.ability; -import ohos.app.ability.UIAbility as UIAbility; -import application.EmbeddableUIAbilityContext as EmbeddableUIAbilityContext; -[Entity=Class] -interface EmbeddableUIAbility: UIAbility { - +package ohos.app.ability.EmbeddableUIAbility; +import ohos.app.ability.UIAbility.default as UIAbility; +import application.EmbeddableUIAbilityContext.default as EmbeddableUIAbilityContext; +[Entity=Class, DefaultExport] +interface EmbeddableUIAbility: [Extends] UIAbility { attribute EmbeddableUIAbilityContext context; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.EmbeddedUIExtensionAbility.idl b/idl/@ohos.app.ability.EmbeddedUIExtensionAbility.idl index f56fa19..ad69e0c 100644 --- a/idl/@ohos.app.ability.EmbeddedUIExtensionAbility.idl +++ b/idl/@ohos.app.ability.EmbeddedUIExtensionAbility.idl @@ -1,7 +1,5 @@ -package ohos.app.ability; -import ohos.app.ability.UIExtensionAbility as UIExtensionAbility; -[Entity=Class] -interface EmbeddedUIExtensionAbility: UIExtensionAbility { - - +package ohos.app.ability.EmbeddedUIExtensionAbility; +import ohos.app.ability.UIExtensionAbility.default as UIExtensionAbility; +[Entity=Class, DefaultExport] +interface EmbeddedUIExtensionAbility: [Extends] UIExtensionAbility { }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.EnvironmentCallback.idl b/idl/@ohos.app.ability.EnvironmentCallback.idl index f99102e..81cb404 100644 --- a/idl/@ohos.app.ability.EnvironmentCallback.idl +++ b/idl/@ohos.app.ability.EnvironmentCallback.idl @@ -1,10 +1,8 @@ -package ohos.app.ability; -import ohos.app.ability.AbilityConstant as AbilityConstant; -import ohos.app.ability.Configuration as Configuration; -[Entity=Class] +package ohos.app.ability.EnvironmentCallback; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import ohos.app.ability.Configuration.Configuration as Configuration; +[Entity=Class, DefaultExport] interface EnvironmentCallback { - void onConfigurationUpdated(Configuration config); void onMemoryLevel(AbilityConstant.MemoryLevel level); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ExtensionAbility.idl b/idl/@ohos.app.ability.ExtensionAbility.idl index 6e65835..c8df92d 100644 --- a/idl/@ohos.app.ability.ExtensionAbility.idl +++ b/idl/@ohos.app.ability.ExtensionAbility.idl @@ -1,7 +1,5 @@ -package ohos.app.ability; -import ohos.app.ability.Ability as Ability; -[Entity=Class] -interface ExtensionAbility: Ability { - - +package ohos.app.ability.ExtensionAbility; +import ohos.app.ability.Ability.default as Ability; +[Entity=Class, DefaultExport] +interface ExtensionAbility: [Extends] Ability { }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.FenceExtensionAbility.idl b/idl/@ohos.app.ability.FenceExtensionAbility.idl index d8e5045..989c9a1 100644 --- a/idl/@ohos.app.ability.FenceExtensionAbility.idl +++ b/idl/@ohos.app.ability.FenceExtensionAbility.idl @@ -1,11 +1,9 @@ -package ohos.app.ability; -import ohos.app.ability.FenceExtensionContext as FenceExtensionContext; -import ohos.geoLocationManager as geoLocationManager; -[Entity=Class] +package ohos.app.ability.FenceExtensionAbility; +import ohos.app.ability.FenceExtensionContext.default as FenceExtensionContext; +import ohos.geoLocationManager.default as geoLocationManager; +[Entity=Class, DefaultExport] interface FenceExtensionAbility { - attribute FenceExtensionContext context; void onFenceStatusChange(geoLocationManager.GeofenceTransition transition, record additions); void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.FenceExtensionContext.idl b/idl/@ohos.app.ability.FenceExtensionContext.idl index f9eb559..8f7eef2 100644 --- a/idl/@ohos.app.ability.FenceExtensionContext.idl +++ b/idl/@ohos.app.ability.FenceExtensionContext.idl @@ -1,10 +1,8 @@ -package ohos.app.ability; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; -[Entity=Class] -interface FenceExtensionContext: ExtensionContext { - +package ohos.app.ability.FenceExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] +interface FenceExtensionContext: [Extends] ExtensionContext { [Throws] async void startAbility(Want want); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.InsightIntentContext.idl b/idl/@ohos.app.ability.InsightIntentContext.idl index c6dd535..5f80c31 100644 --- a/idl/@ohos.app.ability.InsightIntentContext.idl +++ b/idl/@ohos.app.ability.InsightIntentContext.idl @@ -1,14 +1,12 @@ -package ohos.app.ability; +package ohos.app.ability.InsightIntentContext; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; [Async, Synthetic] callback AsyncCallback_Void = void (); -[Entity=Class] +[Entity=Class, DefaultExport] interface InsightIntentContext { - [Throws] void startAbility(Want want, AsyncCallback_Void callback_); [Throws] async void startAbility(Want want); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.InsightIntentDecorator.idl b/idl/@ohos.app.ability.InsightIntentDecorator.idl new file mode 100644 index 0000000..c3a1cf9 --- /dev/null +++ b/idl/@ohos.app.ability.InsightIntentDecorator.idl @@ -0,0 +1,69 @@ +package ohos.app.ability.InsightIntentDecorator; +import ohos.app.ability.insightIntent.default as insightIntent; +[Entity=Interface] +interface IntentDecoratorInfo { + attribute String intentName; + attribute String domain; + attribute String intentVersion; + attribute String displayName; + [Optional] + attribute String displayDescription; + [Optional] + attribute String schema; + [Optional] + attribute ResourceStr icon; + [Optional] + attribute String llmDescription; + [Optional] + attribute sequence keywords; + [Optional] + attribute record parameters; + [Optional] + attribute record result; +}; +[Entity=Interface] +interface LinkIntentDecoratorInfo: IntentDecoratorInfo { + attribute String uri; + [Optional] + attribute sequence paramMappings; +}; +dictionary LinkParamCategory { + String LINK = "link"; + String WANT = "want"; +}; +[Entity=Interface] +interface LinkIntentParamMapping { + attribute String paramName; + [Optional] + attribute String paramMappingName; + [Optional] + attribute LinkParamCategory paramCategory; +}; +[Entity=Interface] +interface PageIntentDecoratorInfo: IntentDecoratorInfo { + [Optional] + attribute String uiAbility; + attribute String pagePath; + [Optional] + attribute String navigationId; + [Optional] + attribute String navDestinationName; +}; +[Entity=Interface] +interface FunctionIntentDecoratorInfo: IntentDecoratorInfo { +}; +[Entity=Interface] +interface EntryIntentDecoratorInfo: IntentDecoratorInfo { + attribute String abilityName; + attribute sequence executeMode; +}; +[Entity=Interface] +interface FormIntentDecoratorInfo: IntentDecoratorInfo { + attribute String formName; +}; +[Entity=Interface] +interface IntentEntityDecoratorInfo { + attribute String entityCategory; + [Optional] + attribute record parameters; +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.InsightIntentEntryExecutor.idl b/idl/@ohos.app.ability.InsightIntentEntryExecutor.idl new file mode 100644 index 0000000..4f3a6fd --- /dev/null +++ b/idl/@ohos.app.ability.InsightIntentEntryExecutor.idl @@ -0,0 +1,15 @@ +package ohos.app.ability.InsightIntentEntryExecutor; +import ohos.window.default as window; +import ohos.app.ability.insightIntent.default as insightIntent; +import ohos.app.ability.InsightIntentContext.default as InsightIntentContext; +import ohos.app.ability.UIExtensionContentSession.default as UIExtensionContentSession; +[Entity=Class, DefaultExport, TypeParameters="T"] +interface InsightIntentEntryExecutor { + attribute insightIntent.ExecuteMode executeMode; + attribute InsightIntentContext context; + [Optional] + attribute window.WindowStage windowStage; + [Optional] + attribute UIExtensionContentSession uiExtensionSession; + async insightIntent.IntentResult onExecute(); +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.InsightIntentExecutor.idl b/idl/@ohos.app.ability.InsightIntentExecutor.idl index bb7deac..1a07d89 100644 --- a/idl/@ohos.app.ability.InsightIntentExecutor.idl +++ b/idl/@ohos.app.ability.InsightIntentExecutor.idl @@ -1,15 +1,13 @@ -package ohos.app.ability; -import ohos.window as window; -import ohos.app.ability.insightIntent as insightIntent; -import ohos.app.ability.InsightIntentContext as InsightIntentContext; -import ohos.app.ability.UIExtensionContentSession as UIExtensionContentSession; -[Entity=Class] +package ohos.app.ability.InsightIntentExecutor; +import ohos.window.default as window; +import ohos.app.ability.insightIntent.default as insightIntent; +import ohos.app.ability.InsightIntentContext.default as InsightIntentContext; +import ohos.app.ability.UIExtensionContentSession.default as UIExtensionContentSession; +[Entity=Class, DefaultExport] interface InsightIntentExecutor { - attribute InsightIntentContext context; async insightIntent.ExecuteResult onExecuteInUIAbilityForegroundMode(String name, record param, window.WindowStage pageLoader); async insightIntent.ExecuteResult onExecuteInUIAbilityBackgroundMode(String name, record param); async insightIntent.ExecuteResult onExecuteInUIExtensionAbility(String name, record param, UIExtensionContentSession pageLoader); async insightIntent.ExecuteResult onExecuteInServiceExtensionAbility(String name, record param); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.MediaControlExtensionAbility.idl b/idl/@ohos.app.ability.MediaControlExtensionAbility.idl index e780fb9..3100421 100644 --- a/idl/@ohos.app.ability.MediaControlExtensionAbility.idl +++ b/idl/@ohos.app.ability.MediaControlExtensionAbility.idl @@ -1,7 +1,5 @@ -package ohos.app.ability; -import ohos.app.ability.UIExtensionAbility as UIExtensionAbility; -[Entity=Class] -interface MediaControlExtensionAbility: UIExtensionAbility { - - +package ohos.app.ability.MediaControlExtensionAbility; +import ohos.app.ability.UIExtensionAbility.default as UIExtensionAbility; +[Entity=Class, DefaultExport] +interface MediaControlExtensionAbility: [Extends] UIExtensionAbility { }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.OpenLinkOptions.idl b/idl/@ohos.app.ability.OpenLinkOptions.idl index 95f3b9e..84a6786 100644 --- a/idl/@ohos.app.ability.OpenLinkOptions.idl +++ b/idl/@ohos.app.ability.OpenLinkOptions.idl @@ -1,10 +1,8 @@ -package ohos.app.ability; -[Entity=Interface] +package ohos.app.ability.OpenLinkOptions; +[Entity=Interface, DefaultExport] interface OpenLinkOptions { - [Optional] attribute boolean appLinkingOnly; [Optional] attribute record parameters; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.PhotoEditorExtensionAbility.idl b/idl/@ohos.app.ability.PhotoEditorExtensionAbility.idl index 36113f6..6ead07e 100644 --- a/idl/@ohos.app.ability.PhotoEditorExtensionAbility.idl +++ b/idl/@ohos.app.ability.PhotoEditorExtensionAbility.idl @@ -1,16 +1,14 @@ -package ohos.app.ability; -import ohos.app.ability.ExtensionAbility as ExtensionAbility; -import application.PhotoEditorExtensionContext as PhotoEditorExtensionContext; -import ohos.app.ability.UIExtensionContentSession as UIExtensionContentSession; -import ohos.app.ability.Want as Want; -[Entity=Class] -interface PhotoEditorExtensionAbility: ExtensionAbility { - +package ohos.app.ability.PhotoEditorExtensionAbility; +import ohos.app.ability.ExtensionAbility.default as ExtensionAbility; +import application.PhotoEditorExtensionContext.default as PhotoEditorExtensionContext; +import ohos.app.ability.UIExtensionContentSession.default as UIExtensionContentSession; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] +interface PhotoEditorExtensionAbility: [Extends] ExtensionAbility { attribute PhotoEditorExtensionContext context; void onCreate(); void onForeground(); void onBackground(); async void onDestroy(); void onStartContentEditing(String uri, Want want, UIExtensionContentSession session); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.PrintExtensionAbility.idl b/idl/@ohos.app.ability.PrintExtensionAbility.idl index b0ecabf..bebec1a 100644 --- a/idl/@ohos.app.ability.PrintExtensionAbility.idl +++ b/idl/@ohos.app.ability.PrintExtensionAbility.idl @@ -1,9 +1,8 @@ -package ohos.app.ability; -import ohos.application.Want as Want; -import ohos.print as print; -[Entity=Class] +package ohos.app.ability.PrintExtensionAbility; +import ohos.application.Want.default as Want; +import ohos.print.default as print; +[Entity=Class, DefaultExport] interface PrintExtensionAbility { - void onCreate(Want want); void onStartDiscoverPrinter(); void onStopDiscoverPrinter(); @@ -18,5 +17,4 @@ interface PrintExtensionAbility { [Throws] String onRequestPreview(print.PrintJob jobInfo); void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ServiceExtensionAbility.idl b/idl/@ohos.app.ability.ServiceExtensionAbility.idl index 17c2275..942b39f 100644 --- a/idl/@ohos.app.ability.ServiceExtensionAbility.idl +++ b/idl/@ohos.app.ability.ServiceExtensionAbility.idl @@ -1,19 +1,19 @@ -package ohos.app.ability; -import ohos.rpc as rpc; -import application.ServiceExtensionContext as ServiceExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.app.ability.Configuration as Configuration; -[Entity=Class] +package ohos.app.ability.ServiceExtensionAbility; +import ohos.rpc.default as rpc; +import application.ServiceExtensionContext.default as ServiceExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.Configuration.Configuration as Configuration; +[Entity=Class, DefaultExport] interface ServiceExtensionAbility { - attribute ServiceExtensionContext context; void onCreate(Want want); void onDestroy(); void onRequest(Want want, number startId); async rpc.RemoteObject onConnect(Want want); async void onDisconnect(Want want); + void onDisconnect(Want want); + async void onDisconnectAsync(Want want); void onReconnect(Want want); void onConfigurationUpdate(Configuration newConfig); sequence onDump(sequence params); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.ShareExtensionAbility.idl b/idl/@ohos.app.ability.ShareExtensionAbility.idl index 594f386..31d341e 100644 --- a/idl/@ohos.app.ability.ShareExtensionAbility.idl +++ b/idl/@ohos.app.ability.ShareExtensionAbility.idl @@ -1,7 +1,5 @@ -package ohos.app.ability; -import ohos.app.ability.UIExtensionAbility as UIExtensionAbility; -[Entity=Class] -interface ShareExtensionAbility: UIExtensionAbility { - - +package ohos.app.ability.ShareExtensionAbility; +import ohos.app.ability.UIExtensionAbility.default as UIExtensionAbility; +[Entity=Class, DefaultExport] +interface ShareExtensionAbility: [Extends] UIExtensionAbility { }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.StartOptions.idl b/idl/@ohos.app.ability.StartOptions.idl index 3d11e3a..423242f 100644 --- a/idl/@ohos.app.ability.StartOptions.idl +++ b/idl/@ohos.app.ability.StartOptions.idl @@ -1,10 +1,11 @@ -package ohos.app.ability; -import ohos.app.ability.contextConstant as contextConstant; -import ohos.multimedia.image as image; -import ohos.bundle.bundleManager as bundleManager; -[Entity=Class] +package ohos.app.ability.StartOptions; +import ohos.app.ability.contextConstant.default as contextConstant; +import ohos.multimedia.image.default as image; +import ohos.bundle.bundleManager.default as bundleManager; +import ohos.app.ability.CompletionHandler.default as CompletionHandler; +import ohos.window.default as window; +[Entity=Class, DefaultExport] interface StartOptions { - [Optional] attribute number windowMode; [Optional] @@ -39,5 +40,10 @@ interface StartOptions { attribute number maxWindowWidth; [Optional] attribute number maxWindowHeight; - + [Optional] + attribute CompletionHandler completionHandler; + [Optional] + attribute boolean hideStartWindow; + [Optional] + attribute window.WindowCreateParams windowCreateParams; }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.UIAbility.idl b/idl/@ohos.app.ability.UIAbility.idl index dd31962..a0248eb 100644 --- a/idl/@ohos.app.ability.UIAbility.idl +++ b/idl/@ohos.app.ability.UIAbility.idl @@ -1,34 +1,28 @@ -package ohos.app.ability; -import ohos.app.ability.Ability as Ability; -import ohos.app.ability.AbilityConstant as AbilityConstant; -import application.UIAbilityContext as UIAbilityContext; -import ohos.rpc as rpc; -import ohos.app.ability.Want as Want; -import ohos.window as window; +package ohos.app.ability.UIAbility; +import ohos.app.ability.Ability.default as Ability; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import ohos.app.ability.Want.default as Want; +import ohos.window.default as window; +import application.UIAbilityContext.default as UIAbilityContext; +import ohos.rpc.default as rpc; [Entity=Interface] interface OnReleaseCallback { - [CallSignature] void invoke(String msg); - }; +callback OnReleaseCallback = void (String msg); [Entity=Interface] interface OnRemoteStateChangeCallback { - [CallSignature] void invoke(String msg); - }; [Entity=Interface] interface CalleeCallback { - [CallSignature] rpc.Parcelable invoke(rpc.MessageSequence indata); - }; [Entity=Interface] interface Caller { - [Throws] async void call(String method, rpc.Parcelable data); [Throws] @@ -36,8 +30,6 @@ interface Caller { [Throws] void release(); [Throws] - void onRelease(OnReleaseCallback callback_); - [Throws] void onRemoteStateChange(OnRemoteStateChangeCallback callback_); [Throws, DtsName="on", DtsTag="'release'"] void onRelease(OnReleaseCallback callback_); @@ -45,20 +37,16 @@ interface Caller { void offRelease(OnReleaseCallback callback_); [Throws, DtsName="off", DtsTag="'release'"] void offRelease(); - }; [Entity=Interface] interface Callee { - [Throws] void on(String method, CalleeCallback callback_); [Throws] void off(String method); - }; -[Entity=Class] -interface UIAbility: Ability { - +[Entity=Class, DefaultExport] +interface UIAbility: [Extends] Ability { attribute UIAbilityContext context; attribute Want launchWant; attribute Want lastRequestWant; @@ -69,16 +57,22 @@ interface UIAbility: Ability { void onWindowStageDestroy(); void onWindowStageRestore(window.WindowStage windowStage); async void onDestroy(); + void onDestroy(); + async void onDestroyAsync(); void onForeground(); + void onWillForeground(); + void onDidForeground(); void onBackground(); + void onWillBackground(); + void onDidBackground(); async AbilityConstant.OnContinueResult onContinue(record wantParam); void onNewWant(Want want, AbilityConstant.LaunchParam launchParam); sequence onDump(sequence params); AbilityConstant.OnSaveResult onSaveState(AbilityConstant.StateType reason, record wantParam); + async AbilityConstant.OnSaveResult onSaveStateAsync(AbilityConstant.StateType stateType, record wantParam); void onShare(record wantParam); boolean onPrepareToTerminate(); async boolean onPrepareToTerminateAsync(); boolean onBackPressed(); AbilityConstant.CollaborateResult onCollaborate(record wantParam); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.UIExtensionAbility.idl b/idl/@ohos.app.ability.UIExtensionAbility.idl index 3bbf4f9..09d4f95 100644 --- a/idl/@ohos.app.ability.UIExtensionAbility.idl +++ b/idl/@ohos.app.ability.UIExtensionAbility.idl @@ -1,12 +1,11 @@ -package ohos.app.ability; -import ohos.app.ability.AbilityConstant as AbilityConstant; -import ohos.app.ability.ExtensionAbility as ExtensionAbility; -import ohos.app.ability.UIExtensionContentSession as UIExtensionContentSession; -import application.UIExtensionContext as UIExtensionContext; -import ohos.app.ability.Want as Want; -[Entity=Class] -interface UIExtensionAbility: ExtensionAbility { - +package ohos.app.ability.UIExtensionAbility; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.ExtensionAbility.default as ExtensionAbility; +import ohos.app.ability.UIExtensionContentSession.default as UIExtensionContentSession; +import application.UIExtensionContext.default as UIExtensionContext; +[Entity=Class, DefaultExport] +interface UIExtensionAbility: [Extends] ExtensionAbility { attribute UIExtensionContext context; void onCreate(AbilityConstant.LaunchParam launchParam); void onSessionCreate(Want want, UIExtensionContentSession session); @@ -14,5 +13,6 @@ interface UIExtensionAbility: ExtensionAbility { void onForeground(); void onBackground(); async void onDestroy(); - + void onDestroy(); + async void onDestroyAsync(); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.UIExtensionContentSession.idl b/idl/@ohos.app.ability.UIExtensionContentSession.idl index c38293b..bdce4cd 100644 --- a/idl/@ohos.app.ability.UIExtensionContentSession.idl +++ b/idl/@ohos.app.ability.UIExtensionContentSession.idl @@ -1,11 +1,13 @@ -package ohos.app.ability; -import ability.AbilityResult as AbilityResult; -import application.AbilityStartCallback as AbilityStartCallback; +package ohos.app.ability.UIExtensionContentSession; +import application.AbilityStartCallback.default as AbilityStartCallback; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; +import ohos.arkui.uiExtension.default as uiExtension; +import ability.abilityResult.AbilityResult as AbilityResult; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; -import ohos.uiExtensionHost as uiExtensionHost; -import ohos.arkui.uiExtension as uiExtension; +import ohos.uiExtensionHost.default as uiExtensionHost; +import ability.abilityResult.AbilityResult as AbilityResult; +import ohos.arkui.stateManagement.LocalStorage as LocalStorage; [Synthetic] callback Callback_Map_String_Object_Void = void (record data); [Synthetic] @@ -14,9 +16,8 @@ callback Callback_Map_String_Object_Map_String_Object = record ( callback AsyncCallback_Void = void (); [Async, Synthetic] callback AsyncCallback_AbilityResult_Void = void (AbilityResult result); -[Entity=Class] +[Entity=Class, DefaultExport] interface UIExtensionContentSession { - [Throws] void sendData(record data); [Throws] @@ -66,5 +67,4 @@ interface UIExtensionContentSession { uiExtensionHost.UIExtensionHostWindowProxy getUIExtensionHostWindowProxy(); [Throws] uiExtension.WindowProxy getUIExtensionWindowProxy(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.UIServiceExtensionAbility.idl b/idl/@ohos.app.ability.UIServiceExtensionAbility.idl index 58601c0..4c54aaa 100644 --- a/idl/@ohos.app.ability.UIServiceExtensionAbility.idl +++ b/idl/@ohos.app.ability.UIServiceExtensionAbility.idl @@ -1,12 +1,11 @@ -package ohos.app.ability; -import ohos.app.ability.ExtensionAbility as ExtensionAbility; -import ohos.app.ability.Want as Want; -import application.UIServiceExtensionContext as UIServiceExtensionContext; -import application.UIServiceHostProxy as UIServiceHostProxy; -import ohos.window as window; -[Entity=Class] -interface UIServiceExtensionAbility: ExtensionAbility { - +package ohos.app.ability.UIServiceExtensionAbility; +import ohos.app.ability.ExtensionAbility.default as ExtensionAbility; +import ohos.app.ability.Want.default as Want; +import application.UIServiceExtensionContext.default as UIServiceExtensionContext; +import application.UIServiceHostProxy.default as UIServiceHostProxy; +import ohos.window.default as window; +[Entity=Class, DefaultExport] +interface UIServiceExtensionAbility: [Extends] ExtensionAbility { attribute UIServiceExtensionContext context; void onCreate(Want want); void onRequest(Want want, number startId); @@ -16,5 +15,4 @@ interface UIServiceExtensionAbility: ExtensionAbility { void onWindowDidCreate(window.Window window); void onData(UIServiceHostProxy proxy, record data); void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.UserAuthExtensionAbility.idl b/idl/@ohos.app.ability.UserAuthExtensionAbility.idl index f338eac..c833768 100644 --- a/idl/@ohos.app.ability.UserAuthExtensionAbility.idl +++ b/idl/@ohos.app.ability.UserAuthExtensionAbility.idl @@ -1,7 +1,5 @@ -package ohos.app.ability; -import ohos.app.ability.UIExtensionAbility as UIExtensionAbility; -[Entity=Class] -interface UserAuthExtensionAbility: UIExtensionAbility { - - +package ohos.app.ability.UserAuthExtensionAbility; +import ohos.app.ability.UIExtensionAbility.default as UIExtensionAbility; +[Entity=Class, DefaultExport] +interface UserAuthExtensionAbility: [Extends] UIExtensionAbility { }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.VpnExtensionAbility.idl b/idl/@ohos.app.ability.VpnExtensionAbility.idl index fd149d4..0a4b1c2 100644 --- a/idl/@ohos.app.ability.VpnExtensionAbility.idl +++ b/idl/@ohos.app.ability.VpnExtensionAbility.idl @@ -1,11 +1,9 @@ -package ohos.app.ability; -import application.VpnExtensionContext as VpnExtensionContext; -import ohos.app.ability.Want as Want; -[Entity=Class] +package ohos.app.ability.VpnExtensionAbility; +import application.VpnExtensionContext.default as VpnExtensionContext; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] interface VpnExtensionAbility { - attribute VpnExtensionContext context; void onCreate(Want want); void onDestroy(); - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.Want.idl b/idl/@ohos.app.ability.Want.idl index eb59440..716854b 100644 --- a/idl/@ohos.app.ability.Want.idl +++ b/idl/@ohos.app.ability.Want.idl @@ -1,7 +1,6 @@ -package ohos.app.ability; -[Entity=Class] +package ohos.app.ability.Want; +[Entity=Class, DefaultExport] interface Want { - [Optional] attribute String bundleName; [Optional] @@ -24,5 +23,4 @@ interface Want { attribute String moduleName; [Optional] readonly attribute record fds; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.abilityDelegatorRegistry.idl b/idl/@ohos.app.ability.abilityDelegatorRegistry.idl index 0dfab6c..589e678 100644 --- a/idl/@ohos.app.ability.abilityDelegatorRegistry.idl +++ b/idl/@ohos.app.ability.abilityDelegatorRegistry.idl @@ -1,31 +1,23 @@ -package ohos.app.ability; -import application.AbilityDelegator as _AbilityDelegator; +package ohos.app.ability.abilityDelegatorRegistry; +import application.AbilityDelegator.AbilityDelegator as _AbilityDelegator; import application.abilityDelegatorArgs.AbilityDelegatorArgs as _AbilityDelegatorArgs; -import application.AbilityMonitor as _AbilityMonitor; -import application.AbilityStageMonitor as _AbilityStageMonitor; +import application.AbilityMonitor.AbilityMonitor as _AbilityMonitor; +import application.AbilityStageMonitor.AbilityStageMonitor as _AbilityStageMonitor; import application.shellCmdResult.ShellCmdResult as _ShellCmdResult; +[DefaultExport] namespace abilityDelegatorRegistry { - + AbilityDelegator getAbilityDelegator(); + AbilityDelegatorArgs getArguments(); dictionary AbilityLifecycleState { - number UNINITIALIZED = 0; number CREATE = 1; number FOREGROUND = 2; number BACKGROUND = 3; number DESTROY = 4; - }; typedef _AbilityDelegator AbilityDelegator; typedef _AbilityDelegatorArgs AbilityDelegatorArgs; typedef _AbilityMonitor AbilityMonitor; typedef _ShellCmdResult ShellCmdResult; typedef _AbilityStageMonitor AbilityStageMonitor; - [GlobalScope] - interface GlobalScope_abilityDelegatorRegistry_ohos_app_ability_abilityDelegatorRegistry { - - static AbilityDelegator getAbilityDelegator(); - static AbilityDelegatorArgs getArguments(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.abilityManager.idl b/idl/@ohos.app.ability.abilityManager.idl index 73110c3..bd3076a 100644 --- a/idl/@ohos.app.ability.abilityManager.idl +++ b/idl/@ohos.app.ability.abilityManager.idl @@ -1,99 +1,91 @@ -package ohos.app.ability; -import ability.AbilityResult as AbilityResult; +package ohos.app.ability.abilityManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Configuration as Configuration; -import application.Context as Context; -import application.AbilityRunningInfo as _AbilityRunningInfo; -import application.ExtensionRunningInfo as _ExtensionRunningInfo; -import bundleManager.ElementName as ElementName; -import application as _AbilityForegroundStateObserver; -import application as _AbilityStateData; +import bundleManager.ElementName.ElementName as ElementName; +import ability.abilityResult.AbilityResult as AbilityResult; +import ohos.app.ability.Configuration.Configuration as Configuration; +import application.Context.default as Context; +import application.AbilityRunningInfo.AbilityRunningInfo as _AbilityRunningInfo; +import application.ExtensionRunningInfo.ExtensionRunningInfo as _ExtensionRunningInfo; +import application.AbilityForegroundStateObserver as _AbilityForegroundStateObserver; +import application.AbilityStateData as _AbilityStateData; +import application.AbilityStateData.default as _AbilityStateData; +[DefaultExport] namespace abilityManager { - dictionary AbilityState { - number INITIAL = 0; number FOCUS = 2; number FOREGROUND = 9; number BACKGROUND = 10; number FOREGROUNDING = 11; number BACKGROUNDING = 12; - }; dictionary UserStatus { - number ASSERT_TERMINATE = 0; number ASSERT_CONTINUE = 1; number ASSERT_RETRY = 2; - }; [Entity=Interface] interface AtomicServiceStartupRule { - attribute boolean isOpenAllowed; attribute boolean isEmbeddedAllowed; - }; + [Throws, DtsName="on", DtsTag="'abilityForegroundState'"] + void onAbilityForegroundState(AbilityForegroundStateObserver observer); + [Throws, DtsName="off", DtsTag="'abilityForegroundState'"] + void offAbilityForegroundState(optional AbilityForegroundStateObserver observer); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void updateConfiguration(Configuration config, AsyncCallback_Void callback_); + [Throws] + async void updateConfiguration(Configuration config); + [Throws] + async sequence getAbilityRunningInfos(); [Async, Synthetic] callback AsyncCallback_Array_AbilityRunningInfo_Void = void (sequence result); + [Throws] + void getAbilityRunningInfos(AsyncCallback_Array_AbilityRunningInfo_Void callback_); + [Throws] + async sequence getExtensionRunningInfos(number upperLimit); [Async, Synthetic] callback AsyncCallback_Array_ExtensionRunningInfo_Void = void (sequence result); + [Throws] + void getExtensionRunningInfos(number upperLimit, AsyncCallback_Array_ExtensionRunningInfo_Void callback_); + [Throws] + async ElementName getTopAbility(); [Async, Synthetic] callback AsyncCallback_ElementName_Void = void (ElementName result); + [Throws] + void getTopAbility(AsyncCallback_ElementName_Void callback_); [Async, Synthetic] callback AsyncCallback_Map_String_Object_Void = void (record result); + [Throws] + void acquireShareData(number missionId, AsyncCallback_Map_String_Object_Void callback_); + [Throws] + async record acquireShareData(number missionId); + [Throws] + void notifySaveAsResult(AbilityResult parameter, number requestCode, AsyncCallback_Void callback_); + [Throws] + async void notifySaveAsResult(AbilityResult parameter, number requestCode); [Async, Synthetic] callback AsyncCallback_Array_AbilityStateData_Void = void (sequence result); + [Throws] + void getForegroundUIAbilities(AsyncCallback_Array_AbilityStateData_Void callback_); + [Throws] + async sequence getForegroundUIAbilities(); + [Throws] + async boolean isEmbeddedOpenAllowed(Context context, String appId); + [Throws] + async void notifyDebugAssertResult(String sessionId, UserStatus status); + [Throws] + async void setResidentProcessEnabled(String bundleName, boolean enable); + [Throws] + async AtomicServiceStartupRule queryAtomicServiceStartupRule(Context context, String appId); + [Throws] + void restartSelfAtomicService(Context context); typedef _AbilityRunningInfo AbilityRunningInfo; typedef _AbilityStateData.default AbilityStateData; + typedef _AbilityStateData AbilityStateData; typedef _ExtensionRunningInfo ExtensionRunningInfo; typedef _AbilityForegroundStateObserver.default AbilityForegroundStateObserver; - [GlobalScope] - interface GlobalScope_abilityManager_ohos_app_ability_abilityManager { - - [Throws, DtsName="on", DtsTag="'abilityForegroundState'"] - static void onAbilityForegroundState(AbilityForegroundStateObserver observer); - [Throws, DtsName="off", DtsTag="'abilityForegroundState'"] - static void offAbilityForegroundState(optional AbilityForegroundStateObserver observer); - [Throws] - static void updateConfiguration(Configuration config, AsyncCallback_Void callback_); - [Throws] - static async void updateConfiguration(Configuration config); - [Throws] - static async sequence getAbilityRunningInfos(); - [Throws] - static void getAbilityRunningInfos(AsyncCallback_Array_AbilityRunningInfo_Void callback_); - [Throws] - static async sequence getExtensionRunningInfos(number upperLimit); - [Throws] - static void getExtensionRunningInfos(number upperLimit, AsyncCallback_Array_ExtensionRunningInfo_Void callback_); - [Throws] - static async ElementName getTopAbility(); - [Throws] - static void getTopAbility(AsyncCallback_ElementName_Void callback_); - [Throws] - static void acquireShareData(number missionId, AsyncCallback_Map_String_Object_Void callback_); - [Throws] - static async record acquireShareData(number missionId); - [Throws] - static void notifySaveAsResult(AbilityResult parameter, number requestCode, AsyncCallback_Void callback_); - [Throws] - static async void notifySaveAsResult(AbilityResult parameter, number requestCode); - [Throws] - static void getForegroundUIAbilities(AsyncCallback_Array_AbilityStateData_Void callback_); - [Throws] - static async sequence getForegroundUIAbilities(); - [Throws] - static async boolean isEmbeddedOpenAllowed(Context context, String appId); - [Throws] - static async void notifyDebugAssertResult(String sessionId, UserStatus status); - [Throws] - static async void setResidentProcessEnabled(String bundleName, boolean enable); - [Throws] - static async AtomicServiceStartupRule queryAtomicServiceStartupRule(Context context, String appId); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.appManager.idl b/idl/@ohos.app.ability.appManager.idl index 42ac857..139858a 100644 --- a/idl/@ohos.app.ability.appManager.idl +++ b/idl/@ohos.app.ability.appManager.idl @@ -1,73 +1,164 @@ -package ohos.app.ability; +package ohos.app.ability.appManager; import ohos.base.AsyncCallback as AsyncCallback; -import application as _ApplicationStateObserver; -import application as _AppForegroundStateObserver; -import application as _AbilityStateData; -import application as _AppStateData; -import application as _ProcessData; -import application.ProcessInformation as _ProcessInformation; -import application as _AbilityFirstFrameStateObserver; -import application as _AbilityFirstFrameStateData; -import ohos.bundle.bundleManager as bundleManager; -import application.RunningMultiAppInfo as _RunningMultiAppInfo; +import application.ProcessInformation.ProcessInformation as _ProcessInformation; +import ohos.bundle.bundleManager.default as bundleManager; +import application.RunningMultiAppInfo.RunningMultiAppInfo as _RunningMultiAppInfo; +import application.ApplicationStateObserver as _ApplicationStateObserver; +import application.AppForegroundStateObserver as _AppForegroundStateObserver; +import application.AbilityStateData as _AbilityStateData; +import application.AppStateData as _AppStateData; +import application.ProcessData as _ProcessData; +import application.AbilityFirstFrameStateObserver as _AbilityFirstFrameStateObserver; +import application.AbilityFirstFrameStateData as _AbilityFirstFrameStateData; +import application.AbilityStateData.default as _AbilityStateData; +import application.AppStateData.default as _AppStateData; +[DefaultExport] namespace appManager { - dictionary ApplicationState { - number STATE_CREATE = 0; number STATE_FOREGROUND = 1; number STATE_ACTIVE = 2; number STATE_BACKGROUND = 3; number STATE_DESTROY = 4; - }; dictionary ProcessState { - number STATE_CREATE = 0; number STATE_FOREGROUND = 1; number STATE_ACTIVE = 2; number STATE_BACKGROUND = 3; number STATE_DESTROY = 4; - }; dictionary PreloadMode { - number PRESS_DOWN = 0; - }; dictionary KeepAliveAppType { - number ALL = 0; number THIRD_PARTY = 1; number SYSTEM = 2; - }; dictionary KeepAliveSetter { - number SYSTEM = 0; number USER = 1; - }; [Entity=Interface] interface KeepAliveBundleInfo { - attribute String bundleName; attribute KeepAliveAppType type; attribute KeepAliveSetter setter; - + [Optional] + attribute number setterUserId; + [Optional] + attribute boolean allowUserToCancel; }; + [Throws, DtsName="on", DtsTag="'applicationState'"] + number onApplicationState(ApplicationStateObserver observer); + [Throws, DtsName="on", DtsTag="'applicationState'"] + number onApplicationState(ApplicationStateObserver observer, sequence bundleNameList); + [Throws, DtsName="on", DtsTag="'appForegroundState'"] + void onAppForegroundState(AppForegroundStateObserver observer); + [Throws, DtsName="on", DtsTag="'abilityFirstFrameState'"] + void onAbilityFirstFrameState(AbilityFirstFrameStateObserver observer, optional String bundleName); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws, DtsName="off", DtsTag="'applicationState'"] + void offApplicationState(number observerId, AsyncCallback_Void callback_); + [Throws, DtsName="off", DtsTag="'applicationState'"] + async void offApplicationState(number observerId); + [Throws, DtsName="off", DtsTag="'appForegroundState'"] + void offAppForegroundState(optional AppForegroundStateObserver observer); + [Throws, DtsName="off", DtsTag="'abilityFirstFrameState'"] + void offAbilityFirstFrameState(optional AbilityFirstFrameStateObserver observer); [Async, Synthetic] callback AsyncCallback_Array_AppStateData_Void = void (sequence result); + [Throws] + void getForegroundApplications(AsyncCallback_Array_AppStateData_Void callback_); + [Throws] + async sequence getForegroundApplications(); + [Throws] + async void killProcessWithAccount(String bundleName, number accountId); + [Throws] + async void killProcessWithAccount(String bundleName, number accountId, boolean clearPageStack, optional number appIndex); + [Throws] + void killProcessWithAccount(String bundleName, number accountId, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isRunningInStabilityTest(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isRunningInStabilityTest(); + [Throws] + async void killProcessesByBundleName(String bundleName); + [Throws] + async void killProcessesByBundleName(String bundleName, boolean clearPageStack, optional number appIndex); + [Throws] + void killProcessesByBundleName(String bundleName, AsyncCallback_Void callback_); + [Throws] + async void clearUpApplicationData(String bundleName); + [Throws] + void clearUpApplicationData(String bundleName, AsyncCallback_Void callback_); + [Throws] + async boolean isRamConstrainedDevice(); + [Throws] + void isRamConstrainedDevice(AsyncCallback_Boolean_Void callback_); + [Throws] + async number getAppMemorySize(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getAppMemorySize(AsyncCallback_Number_Void callback_); + [Throws] + async sequence getRunningProcessInformation(); + [Throws] + async sequence getRunningProcessInformationByBundleType(bundleManager.BundleType bundleType); [Async, Synthetic] callback AsyncCallback_Array_ProcessInformation_Void = void (sequence result); + [Throws] + void getRunningProcessInformation(AsyncCallback_Array_ProcessInformation_Void callback_); + [Throws] + async boolean isSharedBundleRunning(String bundleName, number versionCode); + [Throws] + void isSharedBundleRunning(String bundleName, number versionCode, AsyncCallback_Boolean_Void callback_); + [Throws] + async number getProcessMemoryByPid(number pid); + [Throws] + void getProcessMemoryByPid(number pid, AsyncCallback_Number_Void callback_); + [Throws] + void getRunningProcessInfoByBundleName(String bundleName, AsyncCallback_Array_ProcessInformation_Void callback_); + [Throws] + void getRunningProcessInfoByBundleName(String bundleName, number userId, AsyncCallback_Array_ProcessInformation_Void callback_); + [Throws] + async sequence getRunningProcessInfoByBundleName(String bundleName); + [Throws] + async sequence getRunningProcessInfoByBundleName(String bundleName, number userId); + [Throws] + async boolean isApplicationRunning(String bundleName); + [Throws] + void isApplicationRunning(String bundleName, AsyncCallback_Boolean_Void callback_); + [Throws] + async void preloadApplication(String bundleName, number userId, PreloadMode mode, optional number appIndex); + [Throws] + async RunningMultiAppInfo getRunningMultiAppInfo(String bundleName); + [Throws] + async boolean isAppRunning(String bundleName, optional number appCloneIndex); + [Throws] + async void clearUpAppData(String bundleName, optional number appCloneIndex); + [Throws] + async void terminateMission(number missionId); + [Throws] + async sequence getSupportedProcessCachePids(String bundleName); + [Throws] + async void setKeepAliveForBundle(String bundleName, number userId, boolean enable); + [Throws] + async sequence getKeepAliveBundles(KeepAliveAppType type, optional number userId); + [Throws] + async void setKeepAliveForAppServiceExtension(String bundleName, boolean enabled); + [Throws] + async sequence getKeepAliveAppServiceExtensions(); + [Throws] + async void killProcessesInBatch(sequence pids); typedef _AbilityStateData.default AbilityStateData; typedef _AppStateData.default AppStateData; + typedef _AppStateData AppStateData; typedef _ApplicationStateObserver.default ApplicationStateObserver; typedef _AppForegroundStateObserver.default AppForegroundStateObserver; typedef _ProcessInformation ProcessInformation; @@ -75,102 +166,4 @@ namespace appManager { typedef _AbilityFirstFrameStateObserver.default AbilityFirstFrameStateObserver; typedef _AbilityFirstFrameStateData.default AbilityFirstFrameStateData; typedef _RunningMultiAppInfo RunningMultiAppInfo; - [GlobalScope] - interface GlobalScope_appManager_ohos_app_ability_appManager { - - [Throws, DtsName="on", DtsTag="'applicationState'"] - static number onApplicationState(ApplicationStateObserver observer); - [Throws, DtsName="on", DtsTag="'applicationState'"] - static number onApplicationState(ApplicationStateObserver observer, sequence bundleNameList); - [Throws, DtsName="on", DtsTag="'appForegroundState'"] - static void onAppForegroundState(AppForegroundStateObserver observer); - [Throws, DtsName="on", DtsTag="'abilityFirstFrameState'"] - static void onAbilityFirstFrameState(AbilityFirstFrameStateObserver observer, optional String bundleName); - [Throws, DtsName="off", DtsTag="'applicationState'"] - static void offApplicationState(number observerId, AsyncCallback_Void callback_); - [Throws, DtsName="off", DtsTag="'applicationState'"] - static async void offApplicationState(number observerId); - [Throws, DtsName="off", DtsTag="'appForegroundState'"] - static void offAppForegroundState(optional AppForegroundStateObserver observer); - [Throws, DtsName="off", DtsTag="'abilityFirstFrameState'"] - static void offAbilityFirstFrameState(optional AbilityFirstFrameStateObserver observer); - [Throws] - static void getForegroundApplications(AsyncCallback_Array_AppStateData_Void callback_); - [Throws] - static async sequence getForegroundApplications(); - [Throws] - static async void killProcessWithAccount(String bundleName, number accountId); - [Throws] - static async void killProcessWithAccount(String bundleName, number accountId, boolean clearPageStack, optional number appIndex); - [Throws] - static void killProcessWithAccount(String bundleName, number accountId, AsyncCallback_Void callback_); - [Throws] - static void isRunningInStabilityTest(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isRunningInStabilityTest(); - [Throws] - static async void killProcessesByBundleName(String bundleName); - [Throws] - static async void killProcessesByBundleName(String bundleName, boolean clearPageStack, optional number appIndex); - [Throws] - static undefined killProcessesByBundleName(String bundleName, AsyncCallback_Void callback_); - [Throws] - static async void clearUpApplicationData(String bundleName); - [Throws] - static undefined clearUpApplicationData(String bundleName, AsyncCallback_Void callback_); - [Throws] - static async boolean isRamConstrainedDevice(); - [Throws] - static void isRamConstrainedDevice(AsyncCallback_Boolean_Void callback_); - [Throws] - static async number getAppMemorySize(); - [Throws] - static void getAppMemorySize(AsyncCallback_Number_Void callback_); - [Throws] - static async sequence getRunningProcessInformation(); - [Throws] - static async sequence getRunningProcessInformationByBundleType(bundleManager.BundleType bundleType); - [Throws] - static void getRunningProcessInformation(AsyncCallback_Array_ProcessInformation_Void callback_); - [Throws] - static async boolean isSharedBundleRunning(String bundleName, number versionCode); - [Throws] - static void isSharedBundleRunning(String bundleName, number versionCode, AsyncCallback_Boolean_Void callback_); - [Throws] - static async number getProcessMemoryByPid(number pid); - [Throws] - static void getProcessMemoryByPid(number pid, AsyncCallback_Number_Void callback_); - [Throws] - static void getRunningProcessInfoByBundleName(String bundleName, AsyncCallback_Array_ProcessInformation_Void callback_); - [Throws] - static void getRunningProcessInfoByBundleName(String bundleName, number userId, AsyncCallback_Array_ProcessInformation_Void callback_); - [Throws] - static async sequence getRunningProcessInfoByBundleName(String bundleName); - [Throws] - static async sequence getRunningProcessInfoByBundleName(String bundleName, number userId); - [Throws] - static async boolean isApplicationRunning(String bundleName); - [Throws] - static void isApplicationRunning(String bundleName, AsyncCallback_Boolean_Void callback_); - [Throws] - static async void preloadApplication(String bundleName, number userId, PreloadMode mode, optional number appIndex); - [Throws] - static async RunningMultiAppInfo getRunningMultiAppInfo(String bundleName); - [Throws] - static async boolean isAppRunning(String bundleName, optional number appCloneIndex); - [Throws] - static async void clearUpAppData(String bundleName, optional number appCloneIndex); - [Throws] - static async void terminateMission(number missionId); - [Throws] - static async sequence getSupportedProcessCachePids(String bundleName); - [Throws] - static async void setKeepAliveForBundle(String bundleName, number userId, boolean enable); - [Throws] - static async sequence getKeepAliveBundles(KeepAliveAppType type, optional number userId); - [Throws] - static async void killProcessesInBatch(sequence pids); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.appRecovery.idl b/idl/@ohos.app.ability.appRecovery.idl index 2f0ddc0..f93d28c 100644 --- a/idl/@ohos.app.ability.appRecovery.idl +++ b/idl/@ohos.app.ability.appRecovery.idl @@ -1,37 +1,25 @@ -package ohos.app.ability; -import application.UIAbilityContext as UIAbilityContext; -import ohos.app.ability.Want as Want; +package ohos.app.ability.appRecovery; +import application.UIAbilityContext.default as UIAbilityContext; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace appRecovery { - dictionary RestartFlag { - number ALWAYS_RESTART = 0; number RESTART_WHEN_JS_CRASH = 1; number RESTART_WHEN_APP_FREEZE = 2; number NO_RESTART = 65535; - }; dictionary SaveOccasionFlag { - number SAVE_WHEN_ERROR = 1; number SAVE_WHEN_BACKGROUND = 2; - }; dictionary SaveModeFlag { - number SAVE_WITH_FILE = 1; number SAVE_WITH_SHARED_MEMORY = 2; - }; - [GlobalScope] - interface GlobalScope_appRecovery_ohos_app_ability_appRecovery { - - static void enableAppRecovery(optional RestartFlag restart, optional SaveOccasionFlag saveOccasion, optional SaveModeFlag saveMode); - static void restartApp(); - static void setRestartWant(Want want); - static boolean saveAppState(); - static boolean saveAppState(optional UIAbilityContext context); - - }; - + void enableAppRecovery(optional RestartFlag restart, optional SaveOccasionFlag saveOccasion, optional SaveModeFlag saveMode); + void restartApp(); + void setRestartWant(Want want); + boolean saveAppState(); + boolean saveAppState(optional UIAbilityContext context); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.application.idl b/idl/@ohos.app.ability.application.idl index 0727596..f78c21a 100644 --- a/idl/@ohos.app.ability.application.idl +++ b/idl/@ohos.app.ability.application.idl @@ -1,20 +1,21 @@ -package ohos.app.ability; -import application.ApplicationContext as ApplicationContext; -import application.Context as Context; +package ohos.app.ability.application; +import application.ApplicationContext.default as ApplicationContext; +import application.Context.default as Context; +[DefaultExport] namespace application { - - [GlobalScope] - interface GlobalScope_application_ohos_app_ability_application { - - [Throws] - static async Context createModuleContext(Context context, String moduleName); - [Throws] - static async Context createModuleContext(Context context, String bundleName, String moduleName); - [Throws] - static async Context createBundleContext(Context context, String bundleName); - [Throws] - static ApplicationContext getApplicationContext(); - - }; - + [Throws] + async Context createModuleContext(Context context, String moduleName); + [Throws] + async Context createModuleContext(Context context, String bundleName, String moduleName); + async Context createPluginModuleContext(Context context, String pluginBundleName, String pluginModuleName); + [Throws] + async Context createPluginModuleContextForHostBundle(Context context, String pluginBundleName, String pluginModuleName, String hostBundleName); + [Throws] + async Context createBundleContext(Context context, String bundleName); + [Throws] + ApplicationContext getApplicationContext(); + [Throws] + async void promoteCurrentToCandidateMasterProcess(boolean insertToHead); + [Throws] + async void demoteCurrentFromCandidateMasterProcess(); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.autoFillManager.idl b/idl/@ohos.app.ability.autoFillManager.idl index 6c66647..96f49f3 100644 --- a/idl/@ohos.app.ability.autoFillManager.idl +++ b/idl/@ohos.app.ability.autoFillManager.idl @@ -1,22 +1,22 @@ -package ohos.app.ability; -import ohos.arkui.UIContext as UIContext; -import application as _ViewData; -import application as _PageNodeInfo; -import application.AutoFillType as AutoFillType; +package ohos.app.ability.autoFillManager; +import ohos.arkui.UIContext.UIContext as UIContext; +import application.ViewData as _ViewData; +import application.PageNodeInfo as _PageNodeInfo; +import application.AutoFillType.AutoFillType as AutoFillType; import application.AutoFillRequest as _AutoFillRequest; -import application as _CustomData; -import application as _AutoFillRect; -import application as _AutoFillPopupConfig; -import application.PopupPlacement as PopupPlacement; +import application.CustomData as _CustomData; +import application.AutoFillRect as _AutoFillRect; +import application.AutoFillPopupConfig as _AutoFillPopupConfig; +import application.AutoFillPopupConfig.PopupPlacement as PopupPlacement; +[DefaultExport] namespace autoFillManager { - [Entity=Interface] interface AutoSaveCallback { - void onSuccess(); void onFailure(); - }; + [Throws] + void requestAutoSave(UIContext context, optional AutoSaveCallback callback_); typedef _ViewData.default ViewData; typedef _PageNodeInfo.default PageNodeInfo; typedef _AutoFillRequest.FillRequest FillRequest; @@ -29,12 +29,4 @@ namespace autoFillManager { typedef _AutoFillRect.default AutoFillRect; typedef _AutoFillPopupConfig.default AutoFillPopupConfig; typedef _AutoFillPopupConfig.PopupSize PopupSize; - [GlobalScope] - interface GlobalScope_autoFillManager_ohos_app_ability_autoFillManager { - - [Throws] - static void requestAutoSave(UIContext context, optional AutoSaveCallback callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.autoStartupManager.idl b/idl/@ohos.app.ability.autoStartupManager.idl index 9043ca2..28e7c65 100644 --- a/idl/@ohos.app.ability.autoStartupManager.idl +++ b/idl/@ohos.app.ability.autoStartupManager.idl @@ -1,33 +1,27 @@ -package ohos.app.ability; -import application.AutoStartupCallback as AutoStartupCallback; -import application.AutoStartupInfo as AutoStartupInfo; +package ohos.app.ability.autoStartupManager; +import application.AutoStartupCallback.AutoStartupCallback as AutoStartupCallback; +import application.AutoStartupInfo.AutoStartupInfo as AutoStartupInfo; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace autoStartupManager { - + [Throws, DtsName="on", DtsTag="'systemAutoStartup'"] + void onSystemAutoStartup(AutoStartupCallback callback_); + [Throws, DtsName="off", DtsTag="'systemAutoStartup'"] + void offSystemAutoStartup(optional AutoStartupCallback callback_); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setApplicationAutoStartup(AutoStartupInfo info, AsyncCallback_Void callback_); + [Throws] + async void setApplicationAutoStartup(AutoStartupInfo info); + [Throws] + void cancelApplicationAutoStartup(AutoStartupInfo info, AsyncCallback_Void callback_); + [Throws] + async void cancelApplicationAutoStartup(AutoStartupInfo info); [Async, Synthetic] callback AsyncCallback_Array_AutoStartupInfo_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_autoStartupManager_ohos_app_ability_autoStartupManager { - - [Throws, DtsName="on", DtsTag="'systemAutoStartup'"] - static void onSystemAutoStartup(AutoStartupCallback callback_); - [Throws, DtsName="off", DtsTag="'systemAutoStartup'"] - static void offSystemAutoStartup(optional AutoStartupCallback callback_); - [Throws] - static void setApplicationAutoStartup(AutoStartupInfo info, AsyncCallback_Void callback_); - [Throws] - static async void setApplicationAutoStartup(AutoStartupInfo info); - [Throws] - static void cancelApplicationAutoStartup(AutoStartupInfo info, AsyncCallback_Void callback_); - [Throws] - static async void cancelApplicationAutoStartup(AutoStartupInfo info); - [Throws] - static void queryAllAutoStartupApplications(AsyncCallback_Array_AutoStartupInfo_Void callback_); - [Throws] - static async sequence queryAllAutoStartupApplications(); - - }; - + [Throws] + void queryAllAutoStartupApplications(AsyncCallback_Array_AutoStartupInfo_Void callback_); + [Throws] + async sequence queryAllAutoStartupApplications(); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.childProcessManager.idl b/idl/@ohos.app.ability.childProcessManager.idl index cd79a60..1e421a0 100644 --- a/idl/@ohos.app.ability.childProcessManager.idl +++ b/idl/@ohos.app.ability.childProcessManager.idl @@ -1,29 +1,21 @@ -package ohos.app.ability; +package ohos.app.ability.childProcessManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.ChildProcessArgs as ChildProcessArgs; -import ohos.app.ability.ChildProcessOptions as ChildProcessOptions; +import ohos.app.ability.ChildProcessArgs.ChildProcessArgs as ChildProcessArgs; +import ohos.app.ability.ChildProcessOptions.ChildProcessOptions as ChildProcessOptions; +[DefaultExport] namespace childProcessManager { - dictionary StartMode { - number SELF_FORK = 0; number APP_SPAWN_FORK = 1; - }; + [Throws] + async number startChildProcess(String srcEntry, StartMode startMode); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); - [GlobalScope] - interface GlobalScope_childProcessManager_ohos_app_ability_childProcessManager { - - [Throws] - static async number startChildProcess(String srcEntry, StartMode startMode); - [Throws] - static void startChildProcess(String srcEntry, StartMode startMode, AsyncCallback_Number_Void callback_); - [Throws] - static async number startArkChildProcess(String srcEntry, ChildProcessArgs args, optional ChildProcessOptions options); - [Throws] - static async number startNativeChildProcess(String entryPoint, ChildProcessArgs args, optional ChildProcessOptions options); - - }; - + [Throws] + void startChildProcess(String srcEntry, StartMode startMode, AsyncCallback_Number_Void callback_); + [Throws] + async number startArkChildProcess(String srcEntry, ChildProcessArgs args, optional ChildProcessOptions options); + [Throws] + async number startNativeChildProcess(String entryPoint, ChildProcessArgs args, optional ChildProcessOptions options); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.common.idl b/idl/@ohos.app.ability.common.idl index 2c53d6c..748d210 100644 --- a/idl/@ohos.app.ability.common.idl +++ b/idl/@ohos.app.ability.common.idl @@ -1,43 +1,58 @@ -package ohos.app.ability; -import application as _UIAbilityContext; -import application as _UIExtensionContext; -import application as _AutoFillExtensionContext; -import application as _AbilityStageContext; -import application as _ApplicationContext; -import application as _BaseContext; -import application as _Context; -import application as _ExtensionContext; -import application as _FormExtensionContext; -import application as _ServiceExtensionContext; -import application as _EventHub; +package ohos.app.ability.common; +import application.UIAbilityContext as _UIAbilityContext; +import application.UIExtensionContext as _UIExtensionContext; +import application.AutoFillExtensionContext as _AutoFillExtensionContext; +import application.AbilityStageContext as _AbilityStageContext; +import application.ApplicationContext as _ApplicationContext; +import application.BaseContext as _BaseContext; +import application.Context as _Context; +import application.ExtensionContext as _ExtensionContext; +import application.FormExtensionContext as _FormExtensionContext; +import application.ServiceExtensionContext as _ServiceExtensionContext; +import application.EventHub as _EventHub; import ability.dataAbilityHelper.PacMap as _PacMap; -import ability.AbilityResult as _AbilityResult; -import application._AbilityStartCallback as _AbilityStartCallback; -import ability.ConnectOptions as _ConnectOptions; -import application as _VpnExtensionContext; -import application.AutoStartupCallback as _AutoStartupCallback; -import application.AutoStartupInfo as _AutoStartupInfo; -import application as _EmbeddableUIAbilityContext; -import application as _PhotoEditorExtensionContext; -import application as _UIServiceExtensionContext; -import application as _UIServiceProxy; -import application as _UIServiceHostProxy; -import application as _UIServiceExtensionConnectCallback; +import application.AbilityStartCallback.default as _AbilityStartCallback; +import ability.connectOptions.ConnectOptions as _ConnectOptions; +import application.VpnExtensionContext as _VpnExtensionContext; +import application.AutoStartupCallback.AutoStartupCallback as _AutoStartupCallback; +import application.AutoStartupInfo.AutoStartupInfo as _AutoStartupInfo; +import application.EmbeddableUIAbilityContext as _EmbeddableUIAbilityContext; +import application.PhotoEditorExtensionContext as _PhotoEditorExtensionContext; +import application.UIServiceExtensionContext as _UIServiceExtensionContext; +import application.UIServiceProxy as _UIServiceProxy; +import application.UIServiceHostProxy as _UIServiceHostProxy; +import application.UIServiceExtensionConnectCallback as _UIServiceExtensionConnectCallback; +import application.AppServiceExtensionContext as _AppServiceExtensionContext; +import ability.abilityResult.AbilityResult as _AbilityResult; +import application.UIAbilityContext.default as _UIAbilityContext; +import application.UIExtensionContext.default as _UIExtensionContext; +import application.AbilityStageContext.default as _AbilityStageContext; +import application.ApplicationContext.default as _ApplicationContext; +import application.Context.default as _Context; +import application.ExtensionContext.default as _ExtensionContext; +import application.ServiceExtensionContext.default as _ServiceExtensionContext; +[DefaultExport] namespace common { - typedef _UIAbilityContext.default UIAbilityContext; + typedef _UIAbilityContext UIAbilityContext; typedef _AbilityStageContext.default AbilityStageContext; + typedef _AbilityStageContext AbilityStageContext; typedef _ApplicationContext.default ApplicationContext; + typedef _ApplicationContext ApplicationContext; typedef _BaseContext.default BaseContext; typedef _Context.default Context; + typedef _Context Context; typedef _ExtensionContext.default ExtensionContext; + typedef _ExtensionContext ExtensionContext; typedef _FormExtensionContext.default FormExtensionContext; typedef _ServiceExtensionContext.default ServiceExtensionContext; + typedef _ServiceExtensionContext ServiceExtensionContext; typedef _EventHub.default EventHub; typedef _PacMap PacMap; typedef _AbilityResult AbilityResult; typedef _ConnectOptions ConnectOptions; typedef _UIExtensionContext.default UIExtensionContext; + typedef _UIExtensionContext UIExtensionContext; typedef _AutoFillExtensionContext.default AutoFillExtensionContext; typedef _AbilityStartCallback AbilityStartCallback; typedef _AutoStartupInfo AutoStartupInfo; @@ -49,5 +64,5 @@ namespace common { typedef _UIServiceProxy.default UIServiceProxy; typedef _UIServiceHostProxy.default UIServiceHostProxy; typedef _UIServiceExtensionConnectCallback.default UIServiceExtensionConnectCallback; - + typedef _AppServiceExtensionContext.default AppServiceExtensionContext; }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.contextConstant.idl b/idl/@ohos.app.ability.contextConstant.idl index 32c1a11..e89d924 100644 --- a/idl/@ohos.app.ability.contextConstant.idl +++ b/idl/@ohos.app.ability.contextConstant.idl @@ -1,27 +1,25 @@ -package ohos.app.ability; +package ohos.app.ability.contextConstant; +[DefaultExport] namespace contextConstant { - dictionary AreaMode { - number EL1 = 0; number EL2 = 1; number EL3 = 2; number EL4 = 3; number EL5 = 4; - }; dictionary ProcessMode { - number NEW_PROCESS_ATTACH_TO_PARENT = 1; number NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM = 2; number ATTACH_TO_STATUS_BAR_ITEM = 3; - }; dictionary StartupVisibility { - number STARTUP_HIDE = 0; number STARTUP_SHOW = 1; - }; - + dictionary Scenarios { + number SCENARIO_MOVE_MISSION_TO_FRONT = 1; + number SCENARIO_SHOW_ABILITY = 2; + number SCENARIO_BACK_TO_CALLER_ABILITY_WITH_RESULT = 4; + }; }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.continueManager.idl b/idl/@ohos.app.ability.continueManager.idl new file mode 100644 index 0000000..7c44f23 --- /dev/null +++ b/idl/@ohos.app.ability.continueManager.idl @@ -0,0 +1,21 @@ +package ohos.app.ability.continueManager; +import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] +namespace continueManager { + [Async, Synthetic] + callback AsyncCallback_ContinueResultInfo_Void = void (ContinueResultInfo result); + [Throws, DtsName="on", DtsTag="'prepareContinue'"] + void onPrepareContinue(Context context, AsyncCallback_ContinueResultInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'prepareContinue'"] + void offPrepareContinue(Context context, optional AsyncCallback_ContinueResultInfo_Void callback_); + [Entity=Interface] + interface ContinueResultInfo { + attribute ContinueStateCode resultState; + [Optional] + attribute String resultInfo; + }; + dictionary ContinueStateCode { + number SUCCESS = 0; + number SYSTEM_ERROR = 1; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.dataUriUtils.idl b/idl/@ohos.app.ability.dataUriUtils.idl index 06abc64..13dd347 100644 --- a/idl/@ohos.app.ability.dataUriUtils.idl +++ b/idl/@ohos.app.ability.dataUriUtils.idl @@ -1,18 +1,12 @@ -package ohos.app.ability; +package ohos.app.ability.dataUriUtils; +[DefaultExport] namespace dataUriUtils { - - [GlobalScope] - interface GlobalScope_dataUriUtils_ohos_app_ability_dataUriUtils { - - [Throws] - static number getId(String uri); - [Throws] - static String attachId(String uri, number id); - [Throws] - static String deleteId(String uri); - [Throws] - static String updateId(String uri, number id); - - }; - + [Throws] + number getId(String uri); + [Throws] + String attachId(String uri, number id); + [Throws] + String deleteId(String uri); + [Throws] + String updateId(String uri, number id); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.dialogRequest.idl b/idl/@ohos.app.ability.dialogRequest.idl index 9d84991..4a3221a 100644 --- a/idl/@ohos.app.ability.dialogRequest.idl +++ b/idl/@ohos.app.ability.dialogRequest.idl @@ -1,52 +1,36 @@ -package ohos.app.ability; -import ohos.app.ability.Want as Want; +package ohos.app.ability.dialogRequest; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace dialogRequest { - [Entity=Interface] interface WindowRect { - attribute number left; attribute number top; attribute number width; attribute number height; - }; [Entity=Interface] interface RequestInfo { - [Optional] attribute WindowRect windowRect; - }; dictionary ResultCode { - number RESULT_OK = 0; number RESULT_CANCEL = 1; - }; [Entity=Interface] interface RequestResult { - attribute ResultCode result; [Optional] attribute Want want; - }; [Entity=Interface] interface RequestCallback { - [Throws] void setRequestResult(RequestResult result); - }; - [GlobalScope] - interface GlobalScope_dialogRequest_ohos_app_ability_dialogRequest { - - [Throws] - static RequestInfo getRequestInfo(Want want); - [Throws] - static RequestCallback getRequestCallback(Want want); - - }; - + [Throws] + RequestInfo getRequestInfo(Want want); + [Throws] + RequestCallback getRequestCallback(Want want); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.dialogSession.idl b/idl/@ohos.app.ability.dialogSession.idl index 1fa2285..c72195f 100644 --- a/idl/@ohos.app.ability.dialogSession.idl +++ b/idl/@ohos.app.ability.dialogSession.idl @@ -1,12 +1,11 @@ -package ohos.app.ability; +package ohos.app.ability.dialogSession; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import bundleManager.MultiAppMode as MultiAppMode; +import ohos.app.ability.Want.default as Want; +import bundleManager.ApplicationInfo.MultiAppMode as MultiAppMode; +[DefaultExport] namespace dialogSession { - [Entity=Interface] interface DialogAbilityInfo { - attribute String bundleName; attribute String moduleName; attribute String abilityName; @@ -17,29 +16,20 @@ namespace dialogSession { attribute boolean visible; attribute number appIndex; attribute MultiAppMode multiAppMode; - }; [Entity=Interface] interface DialogSessionInfo { - attribute DialogAbilityInfo callerAbilityInfo; attribute sequence targetAbilityInfos; [Optional] attribute record parameters; - }; + [Throws] + DialogSessionInfo getDialogSessionInfo(String dialogSessionId); + [Throws] + async void sendDialogResult(String dialogSessionId, Want targetWant, boolean isAllowed); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_dialogSession_ohos_app_ability_dialogSession { - - [Throws] - static DialogSessionInfo getDialogSessionInfo(String dialogSessionId); - [Throws] - static async void sendDialogResult(String dialogSessionId, Want targetWant, boolean isAllowed); - [Throws] - static void sendDialogResult(String dialogSessionId, Want targetWant, boolean isAllowed, AsyncCallback_Void callback_); - - }; - + [Throws] + void sendDialogResult(String dialogSessionId, Want targetWant, boolean isAllowed, AsyncCallback_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.errorManager.idl b/idl/@ohos.app.ability.errorManager.idl index eef1cd4..0ddb4f6 100644 --- a/idl/@ohos.app.ability.errorManager.idl +++ b/idl/@ohos.app.ability.errorManager.idl @@ -1,61 +1,51 @@ -package ohos.app.ability; +package ohos.app.ability.errorManager; import ohos.base.AsyncCallback as AsyncCallback; -import application as _ErrorObserver; -import application.LoopObserver as _LoopObserver; +import application.ErrorObserver as _ErrorObserver; +import application.LoopObserver.LoopObserver as _LoopObserver; +[DefaultExport] namespace errorManager { - + [Throws, DtsName="on", DtsTag="'error'"] + number onError(ErrorObserver observer); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(number observerId, AsyncCallback_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + async void offError(number observerId); + [Throws, DtsName="on", DtsTag="'globalErrorOccurred'"] + void onGlobalErrorOccurred(GlobalObserver observer); + [Throws, DtsName="on", DtsTag="'globalUnhandledRejectionDetected'"] + void onGlobalUnhandledRejectionDetected(GlobalObserver observer); + [Throws, DtsName="off", DtsTag="'globalErrorOccurred'"] + void offGlobalErrorOccurred(optional GlobalObserver observer); + [Throws, DtsName="off", DtsTag="'globalUnhandledRejectionDetected'"] + void offGlobalUnhandledRejectionDetected(optional GlobalObserver observer); callback GlobalObserver = void (GlobalError reason); [Entity=Interface] interface GlobalError: Error { - attribute String instanceName; attribute InstanceType instanceType; - }; dictionary InstanceType { - number MAIN = 0; number WORKER = 1; number TASKPOOL = 2; number CUSTOM = 3; - }; + [Throws, DtsName="on", DtsTag="'loopObserver'"] + void onLoopObserver(number timeout, LoopObserver observer); + [Throws, DtsName="off", DtsTag="'loopObserver'"] + void offLoopObserver(optional LoopObserver observer); + [Throws, DtsName="on", DtsTag="'unhandledRejection'"] + void onUnhandledRejection(UnhandledRejectionObserver observer); + [Throws, DtsName="off", DtsTag="'unhandledRejection'"] + void offUnhandledRejection(optional UnhandledRejectionObserver observer); + [Throws, DtsName="on", DtsTag="'freeze'"] + void onFreeze(FreezeObserver observer); + [Throws, DtsName="off", DtsTag="'freeze'"] + void offFreeze(optional FreezeObserver observer); typedef _ErrorObserver.default ErrorObserver; typedef _LoopObserver LoopObserver; callback UnhandledRejectionObserver = void (any reason, Promise promise); callback FreezeObserver = void (); - [GlobalScope] - interface GlobalScope_errorManager_ohos_app_ability_errorManager { - - [Throws, DtsName="on", DtsTag="'error'"] - static number onError(ErrorObserver observer); - [Throws, DtsName="off", DtsTag="'error'"] - static void offError(number observerId, AsyncCallback_Void callback_); - [Throws, DtsName="off", DtsTag="'error'"] - static async void offError(number observerId); - [Throws, DtsName="on", DtsTag="'globalErrorOccurred'"] - static void onGlobalErrorOccurred(GlobalObserver observer); - [Throws, DtsName="on", DtsTag="'globalUnhandledRejectionDetected'"] - static void onGlobalUnhandledRejectionDetected(GlobalObserver observer); - [Throws, DtsName="off", DtsTag="'globalErrorOccurred'"] - static void offGlobalErrorOccurred(optional GlobalObserver observer); - [Throws, DtsName="off", DtsTag="'globalUnhandledRejectionDetected'"] - static void offGlobalUnhandledRejectionDetected(optional GlobalObserver observer); - [Throws, DtsName="on", DtsTag="'loopObserver'"] - static void onLoopObserver(number timeout, LoopObserver observer); - [Throws, DtsName="off", DtsTag="'loopObserver'"] - static void offLoopObserver(optional LoopObserver observer); - [Throws, DtsName="on", DtsTag="'unhandledRejection'"] - static void onUnhandledRejection(UnhandledRejectionObserver observer); - [Throws, DtsName="off", DtsTag="'unhandledRejection'"] - static void offUnhandledRejection(optional UnhandledRejectionObserver observer); - [Throws, DtsName="on", DtsTag="'freeze'"] - static void onFreeze(FreezeObserver observer); - [Throws, DtsName="off", DtsTag="'freeze'"] - static void offFreeze(optional FreezeObserver observer); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.insightIntent.idl b/idl/@ohos.app.ability.insightIntent.idl index 8380451..18c749d 100644 --- a/idl/@ohos.app.ability.insightIntent.idl +++ b/idl/@ohos.app.ability.insightIntent.idl @@ -1,19 +1,16 @@ -package ohos.app.ability; -import ohos.app.ability.Want as Want; -import ohos.app.ability.wantConstant as wantConstant; +package ohos.app.ability.insightIntent; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.wantConstant.default as wantConstant; +[DefaultExport] namespace insightIntent { - dictionary ExecuteMode { - number UI_ABILITY_FOREGROUND = 0; number UI_ABILITY_BACKGROUND = 1; number UI_EXTENSION_ABILITY = 2; number SERVICE_EXTENSION_ABILITY = 3; - }; [Entity=Interface] interface ExecuteResult { - attribute number code; [Optional] attribute record result; @@ -21,7 +18,15 @@ namespace insightIntent { attribute sequence uris; [Optional] attribute number flags; - }; - + [Entity=Interface] + interface IntentEntity { + attribute String entityId; + }; + [Entity=Interface, TypeParameters="T"] + interface IntentResult { + attribute number code; + [Optional] + attribute T result; + }; }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.insightIntentDriver.idl b/idl/@ohos.app.ability.insightIntentDriver.idl index 27a910a..e124c0f 100644 --- a/idl/@ohos.app.ability.insightIntentDriver.idl +++ b/idl/@ohos.app.ability.insightIntentDriver.idl @@ -1,13 +1,12 @@ -package ohos.app.ability; -import ohos.app.ability.Want as Want; -import ohos.app.ability.wantConstant as wantConstant; +package ohos.app.ability.insightIntentDriver; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.wantConstant.default as wantConstant; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.insightIntent as insightIntent; +import ohos.app.ability.insightIntent.default as insightIntent; +[DefaultExport] namespace insightIntentDriver { - [Entity=Interface] interface ExecuteParam { - attribute String bundleName; attribute String moduleName; attribute String abilityName; @@ -20,18 +19,80 @@ namespace insightIntentDriver { attribute sequence uris; [Optional] attribute number flags; - }; [Async, Synthetic] - callback AsyncCallback_insightIntent_ExecuteResult_Void = void (insightIntent.ExecuteResult result); - [GlobalScope] - interface GlobalScope_insightIntentDriver_ohos_app_ability_insightIntentDriver { - - [Throws] - static void execute(ExecuteParam param, AsyncCallback_insightIntent_ExecuteResult_Void callback_); - [Throws] - static async insightIntent.ExecuteResult execute(ExecuteParam param); - - }; - + callback AsyncCallback_InsightIntent_ExecuteResult_Void = void (insightIntent.ExecuteResult result); + [Throws] + void execute(ExecuteParam param, AsyncCallback_InsightIntent_ExecuteResult_Void callback_); + [Throws] + async insightIntent.ExecuteResult execute(ExecuteParam param); + dictionary InsightIntentType { + String LINK = "@InsightIntentLink"; + String PAGE = "@InsightIntentPage"; + String ENTRY = "@InsightIntentEntry"; + String FUNCTION = "@InsightIntentFunctionMethod"; + String FORM = "@InsightIntentForm"; + }; + [Entity=Interface] + interface InsightIntentInfo { + readonly attribute String bundleName; + readonly attribute String moduleName; + readonly attribute String intentName; + readonly attribute String domain; + readonly attribute String intentVersion; + readonly attribute String displayName; + readonly attribute String displayDescription; + readonly attribute String schema; + readonly attribute String icon; + readonly attribute String llmDescription; + readonly attribute sequence keywords; + readonly attribute InsightIntentType intentType; + readonly attribute (LinkIntentInfo or PageIntentInfo or FunctionIntentInfo or FormIntentInfo or EntryIntentInfo) subIntentInfo; + readonly attribute record parameters; + readonly attribute record result; + readonly attribute sequence entities; + }; + [Entity=Interface] + interface LinkIntentInfo { + readonly attribute String uri; + }; + [Entity=Interface] + interface PageIntentInfo { + readonly attribute String uiAbility; + readonly attribute String pagePath; + readonly attribute String navigationId; + readonly attribute String navDestinationName; + }; + [Entity=Interface] + interface FunctionIntentInfo { + }; + [Entity=Interface] + interface FormIntentInfo { + readonly attribute String abilityName; + readonly attribute String formName; + }; + [Entity=Interface] + interface EntryIntentInfo { + readonly attribute String abilityName; + readonly attribute sequence executeMode; + }; + dictionary GetInsightIntentFlag { + number GET_FULL_INSIGHT_INTENT = 1; + number GET_SUMMARY_INSIGHT_INTENT = 2; + number GET_ENTITY_INFO = 4; + }; + [Entity=Interface] + interface EntityInfo { + readonly attribute String className; + readonly attribute String entityId; + readonly attribute String entityCategory; + readonly attribute record parameters; + readonly attribute String parentClassName; + }; + [Throws] + async sequence getAllInsightIntentInfo(number intentFlags); + [Throws] + async sequence getInsightIntentInfoByBundleName(String bundleName, number intentFlags); + [Throws] + async InsightIntentInfo getInsightIntentInfoByIntentName(String bundleName, String moduleName, String intentName, number intentFlags); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.kioskManager.idl b/idl/@ohos.app.ability.kioskManager.idl new file mode 100644 index 0000000..32c2020 --- /dev/null +++ b/idl/@ohos.app.ability.kioskManager.idl @@ -0,0 +1,13 @@ +package ohos.app.ability.kioskManager; +import application.UIAbilityContext.default as UIAbilityContext; +import application.KioskStatus.KioskStatus as _KioskStatus; +[DefaultExport] +namespace kioskManager { + [Throws] + async void enterKioskMode(UIAbilityContext context); + [Throws] + async void exitKioskMode(UIAbilityContext context); + [Throws] + async KioskStatus getKioskStatus(); + typedef _KioskStatus KioskStatus; +}; \ No newline at end of file diff --git a/idl/@ohos.app.ability.missionManager.idl b/idl/@ohos.app.ability.missionManager.idl index 46f5356..44c1f51 100644 --- a/idl/@ohos.app.ability.missionManager.idl +++ b/idl/@ohos.app.ability.missionManager.idl @@ -1,82 +1,76 @@ -package ohos.app.ability; +package ohos.app.ability.missionManager; import ohos.base.AsyncCallback as AsyncCallback; -import application.MissionInfo as _MissionInfo; -import application.MissionListener as _MissionListener; -import application.MissionSnapshot as _MissionSnapshot; -import ohos.app.ability.StartOptions as StartOptions; +import application.MissionInfo.MissionInfo as _MissionInfo; +import application.MissionListener.MissionListener as _MissionListener; +import application.MissionSnapshot.MissionSnapshot as _MissionSnapshot; +import ohos.app.ability.StartOptions.default as StartOptions; +[DefaultExport] namespace missionManager { - + [Throws, DtsName="on", DtsTag="'mission'"] + number onMission(MissionListener listener); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws, DtsName="off", DtsTag="'mission'"] + void offMission(number listenerId, AsyncCallback_Void callback_); + [Throws, DtsName="off", DtsTag="'mission'"] + async void offMission(number listenerId); [Async, Synthetic] callback AsyncCallback_MissionInfo_Void = void (MissionInfo result); + [Throws] + void getMissionInfo(String deviceId, number missionId, AsyncCallback_MissionInfo_Void callback_); + [Throws] + async MissionInfo getMissionInfo(String deviceId, number missionId); [Async, Synthetic] callback AsyncCallback_Array_MissionInfo_Void = void (sequence result); + [Throws] + void getMissionInfos(String deviceId, number numMax, AsyncCallback_Array_MissionInfo_Void callback_); + [Throws] + async sequence getMissionInfos(String deviceId, number numMax); [Async, Synthetic] callback AsyncCallback_MissionSnapshot_Void = void (MissionSnapshot result); + [Throws] + void getMissionSnapShot(String deviceId, number missionId, AsyncCallback_MissionSnapshot_Void callback_); + [Throws] + async MissionSnapshot getMissionSnapShot(String deviceId, number missionId); + [Throws] + void getLowResolutionMissionSnapShot(String deviceId, number missionId, AsyncCallback_MissionSnapshot_Void callback_); + [Throws] + async MissionSnapshot getLowResolutionMissionSnapShot(String deviceId, number missionId); + [Throws] + void lockMission(number missionId, AsyncCallback_Void callback_); + [Throws] + async void lockMission(number missionId); + [Throws] + void unlockMission(number missionId, AsyncCallback_Void callback_); + [Throws] + async void unlockMission(number missionId); + [Throws] + void clearMission(number missionId, AsyncCallback_Void callback_); + [Throws] + async void clearMission(number missionId); + [Throws] + void clearAllMissions(AsyncCallback_Void callback_); + [Throws] + async void clearAllMissions(); + [Throws] + void moveMissionToFront(number missionId, AsyncCallback_Void callback_); + [Throws] + void moveMissionToFront(number missionId, StartOptions options, AsyncCallback_Void callback_); + [Throws] + async void moveMissionToFront(number missionId, optional StartOptions options); + [Throws] + void moveMissionsToForeground(sequence missionIds, AsyncCallback_Void callback_); + [Throws] + void moveMissionsToForeground(sequence missionIds, number topMission, AsyncCallback_Void callback_); + [Throws] + async void moveMissionsToForeground(sequence missionIds, optional number topMission); [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); + [Throws] + void moveMissionsToBackground(sequence missionIds, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence moveMissionsToBackground(sequence missionIds); typedef _MissionInfo MissionInfo; typedef _MissionListener MissionListener; typedef _MissionSnapshot MissionSnapshot; - [GlobalScope] - interface GlobalScope_missionManager_ohos_app_ability_missionManager { - - [Throws, DtsName="on", DtsTag="'mission'"] - static number onMission(MissionListener listener); - [Throws, DtsName="off", DtsTag="'mission'"] - static void offMission(number listenerId, AsyncCallback_Void callback_); - [Throws, DtsName="off", DtsTag="'mission'"] - static async void offMission(number listenerId); - [Throws] - static void getMissionInfo(String deviceId, number missionId, AsyncCallback_MissionInfo_Void callback_); - [Throws] - static async MissionInfo getMissionInfo(String deviceId, number missionId); - [Throws] - static void getMissionInfos(String deviceId, number numMax, AsyncCallback_Array_MissionInfo_Void callback_); - [Throws] - static async sequence getMissionInfos(String deviceId, number numMax); - [Throws] - static void getMissionSnapShot(String deviceId, number missionId, AsyncCallback_MissionSnapshot_Void callback_); - [Throws] - static async MissionSnapshot getMissionSnapShot(String deviceId, number missionId); - [Throws] - static void getLowResolutionMissionSnapShot(String deviceId, number missionId, AsyncCallback_MissionSnapshot_Void callback_); - [Throws] - static async MissionSnapshot getLowResolutionMissionSnapShot(String deviceId, number missionId); - [Throws] - static void lockMission(number missionId, AsyncCallback_Void callback_); - [Throws] - static async void lockMission(number missionId); - [Throws] - static void unlockMission(number missionId, AsyncCallback_Void callback_); - [Throws] - static async void unlockMission(number missionId); - [Throws] - static void clearMission(number missionId, AsyncCallback_Void callback_); - [Throws] - static async void clearMission(number missionId); - [Throws] - static void clearAllMissions(AsyncCallback_Void callback_); - [Throws] - static async void clearAllMissions(); - [Throws] - static void moveMissionToFront(number missionId, AsyncCallback_Void callback_); - [Throws] - static void moveMissionToFront(number missionId, StartOptions options, AsyncCallback_Void callback_); - [Throws] - static async void moveMissionToFront(number missionId, optional StartOptions options); - [Throws] - static void moveMissionsToForeground(sequence missionIds, AsyncCallback_Void callback_); - [Throws] - static void moveMissionsToForeground(sequence missionIds, number topMission, AsyncCallback_Void callback_); - [Throws] - static async void moveMissionsToForeground(sequence missionIds, optional number topMission); - [Throws] - static void moveMissionsToBackground(sequence missionIds, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence moveMissionsToBackground(sequence missionIds); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.quickFixManager.idl b/idl/@ohos.app.ability.quickFixManager.idl index 7284382..4fbef4a 100644 --- a/idl/@ohos.app.ability.quickFixManager.idl +++ b/idl/@ohos.app.ability.quickFixManager.idl @@ -1,46 +1,36 @@ -package ohos.app.ability; +package ohos.app.ability.quickFixManager; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace quickFixManager { - [Entity=Interface] interface HapModuleQuickFixInfo { - readonly attribute String moduleName; readonly attribute String originHapHash; readonly attribute String quickFixFilePath; - }; [Entity=Interface] interface ApplicationQuickFixInfo { - readonly attribute String bundleName; readonly attribute number bundleVersionCode; readonly attribute String bundleVersionName; readonly attribute number quickFixVersionCode; readonly attribute String quickFixVersionName; readonly attribute sequence hapModuleQuickFixInfo; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void applyQuickFix(sequence hapModuleQuickFixFiles, AsyncCallback_Void callback_); + [Throws] + async void applyQuickFix(sequence hapModuleQuickFixFiles); + [Throws] + void revokeQuickFix(String bundleName, AsyncCallback_Void callback_); + [Throws] + async void revokeQuickFix(String bundleName); [Async, Synthetic] callback AsyncCallback_ApplicationQuickFixInfo_Void = void (ApplicationQuickFixInfo result); - [GlobalScope] - interface GlobalScope_quickFixManager_ohos_app_ability_quickFixManager { - - [Throws] - static void applyQuickFix(sequence hapModuleQuickFixFiles, AsyncCallback_Void callback_); - [Throws] - static async void applyQuickFix(sequence hapModuleQuickFixFiles); - [Throws] - static void revokeQuickFix(String bundleName, AsyncCallback_Void callback_); - [Throws] - static async void revokeQuickFix(String bundleName); - [Throws] - static void getApplicationQuickFixInfo(String bundleName, AsyncCallback_ApplicationQuickFixInfo_Void callback_); - [Throws] - static async ApplicationQuickFixInfo getApplicationQuickFixInfo(String bundleName); - - }; - + [Throws] + void getApplicationQuickFixInfo(String bundleName, AsyncCallback_ApplicationQuickFixInfo_Void callback_); + [Throws] + async ApplicationQuickFixInfo getApplicationQuickFixInfo(String bundleName); }; \ No newline at end of file diff --git a/idl/@ohos.app.ability.wantAgent.idl b/idl/@ohos.app.ability.wantAgent.idl index a12afff..5caf446 100644 --- a/idl/@ohos.app.ability.wantAgent.idl +++ b/idl/@ohos.app.ability.wantAgent.idl @@ -1,27 +1,66 @@ -package ohos.app.ability; +package ohos.app.ability.wantAgent; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import wantAgent.WantAgentInfo as _WantAgentInfo; -import wantAgent.TriggerInfo as _TriggerInfo; +import ohos.app.ability.Want.default as Want; +import wantAgent.wantAgentInfo.WantAgentInfo as _WantAgentInfo; +import wantAgent.triggerInfo.TriggerInfo as _TriggerInfo; +import application.Context.default as Context; +import wantAgent.wantAgentInfo.LocalWantAgentInfo as _LocalWantAgentInfo; +[DefaultExport] namespace wantAgent { - [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getBundleName(WantAgent agent, AsyncCallback_String_Void callback_); + [Throws] + async String getBundleName(WantAgent agent); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getUid(WantAgent agent, AsyncCallback_Number_Void callback_); + [Throws] + async number getUid(WantAgent agent); [Async, Synthetic] callback AsyncCallback_Want_Void = void (Want result); + [Throws] + void getWant(WantAgent agent, AsyncCallback_Want_Void callback_); + [Throws] + async Want getWant(WantAgent agent); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void cancel(WantAgent agent, AsyncCallback_Void callback_); + [Throws] + async void cancel(WantAgent agent); [Async, Synthetic] callback AsyncCallback_CompleteData_Void = void (CompleteData result); + [Throws] + void trigger(WantAgent agent, TriggerInfo triggerInfo, optional AsyncCallback_CompleteData_Void callback_); + [Throws] + async CompleteData triggerAsync(WantAgent agent, TriggerInfo triggerInfo, Context context); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void equal(WantAgent agent, WantAgent otherAgent, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean equal(WantAgent agent, WantAgent otherAgent); [Async, Synthetic] callback AsyncCallback_WantAgent_Void = void (WantAgent result); + [Throws] + void getWantAgent(WantAgentInfo info, AsyncCallback_WantAgent_Void callback_); + [Throws] + async WantAgent getWantAgent(WantAgentInfo info); + [Throws] + void getOperationType(WantAgent agent, AsyncCallback_Number_Void callback_); + [Throws] + async number getOperationType(WantAgent agent); + [Throws] + void setWantAgentMultithreading(boolean isMultithreadingSupported); + [Throws] + WantAgent createLocalWantAgent(LocalWantAgentInfo info); + [Throws] + boolean isLocalWantAgent(WantAgent agent); dictionary WantAgentFlags { - number ONE_TIME_FLAG = 0; number NO_BUILD_FLAG = 1; number CANCEL_PRESENT_FLAG = 2; @@ -32,68 +71,26 @@ namespace wantAgent { number REPLACE_URI = 7; number REPLACE_ENTITIES = 8; number REPLACE_BUNDLE = 9; - }; dictionary OperationType { - number UNKNOWN_TYPE = 0; number START_ABILITY = 1; number START_ABILITIES = 2; number START_SERVICE = 3; number SEND_COMMON_EVENT = 4; number START_SERVICE_EXTENSION = 6; - }; [Entity=Interface] interface CompleteData { - attribute WantAgent info; attribute Want want; attribute number finalCode; attribute String finalData; [Optional] attribute record extraInfo; - }; typedef _TriggerInfo TriggerInfo; typedef _WantAgentInfo WantAgentInfo; - [GlobalScope] - interface GlobalScope_wantAgent_ohos_app_ability_wantAgent { - - [Throws] - static void getBundleName(WantAgent agent, AsyncCallback_String_Void callback_); - [Throws] - static async String getBundleName(WantAgent agent); - [Throws] - static void getUid(WantAgent agent, AsyncCallback_Number_Void callback_); - [Throws] - static async number getUid(WantAgent agent); - [Throws] - static void getWant(WantAgent agent, AsyncCallback_Want_Void callback_); - [Throws] - static async Want getWant(WantAgent agent); - [Throws] - static void cancel(WantAgent agent, AsyncCallback_Void callback_); - [Throws] - static async void cancel(WantAgent agent); - [Throws] - static void trigger(WantAgent agent, TriggerInfo triggerInfo, optional AsyncCallback_CompleteData_Void callback_); - [Throws] - static void equal(WantAgent agent, WantAgent otherAgent, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean equal(WantAgent agent, WantAgent otherAgent); - [Throws] - static void getWantAgent(WantAgentInfo info, AsyncCallback_WantAgent_Void callback_); - [Throws] - static async WantAgent getWantAgent(WantAgentInfo info); - [Throws] - static void getOperationType(WantAgent agent, AsyncCallback_Number_Void callback_); - [Throws] - static async number getOperationType(WantAgent agent); - [Throws] - static void setWantAgentMultithreading(boolean isMultithreadingSupported); - - }; - + typedef _LocalWantAgentInfo LocalWantAgentInfo; }; typedef Object WantAgent; \ No newline at end of file diff --git a/idl/@ohos.app.ability.wantConstant.idl b/idl/@ohos.app.ability.wantConstant.idl index 216ce2f..cdd7d31 100644 --- a/idl/@ohos.app.ability.wantConstant.idl +++ b/idl/@ohos.app.ability.wantConstant.idl @@ -1,8 +1,7 @@ -package ohos.app.ability; +package ohos.app.ability.wantConstant; +[DefaultExport] namespace wantConstant { - dictionary Params { - String DLP_PARAMS_SANDBOX = "ohos.dlp.params.sandbox"; String DLP_PARAMS_BUNDLE_NAME = "ohos.dlp.params.bundleName"; String DLP_PARAMS_MODULE_NAME = "ohos.dlp.params.moduleName"; @@ -30,23 +29,21 @@ namespace wantConstant { String CREATE_APP_INSTANCE_KEY = "ohos.extra.param.key.createAppInstance"; String CALLER_APP_CLONE_INDEX = "ohos.param.callerAppCloneIndex"; String LAUNCH_REASON_MESSAGE = "ohos.params.launchReasonMessage"; - + String DESTINATION_PLUGIN_ABILITY = "ohos.params.pluginAbility"; + String APP_LAUNCH_TRUSTLIST = "ohos.params.appLaunchTrustList"; + String ABILITY_UNIFIED_DATA_KEY = "ohos.param.ability.udKey"; + String ATOMIC_SERVICE_SHARE_ROUTER = "ohos.params.atomicservice.shareRouter"; }; dictionary Flags { - number FLAG_AUTH_READ_URI_PERMISSION = 1; number FLAG_AUTH_WRITE_URI_PERMISSION = 2; number FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 64; number FLAG_INSTALL_ON_DEMAND = 2048; number FLAG_ABILITY_ON_COLLABORATE = 8192; number FLAG_START_WITHOUT_TIPS = 1073741824; - }; dictionary ShowMode { - number WINDOW = 0; number EMBEDDED_FULL = 1; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.appstartup.StartupConfig.idl b/idl/@ohos.app.appstartup.StartupConfig.idl index fb6d1e2..c3060b7 100644 --- a/idl/@ohos.app.appstartup.StartupConfig.idl +++ b/idl/@ohos.app.appstartup.StartupConfig.idl @@ -1,11 +1,9 @@ -package ohos.app.appstartup; -import ohos.app.appstartup.StartupListener as StartupListener; -[Entity=Interface] +package ohos.app.appstartup.StartupConfig; +import ohos.app.appstartup.StartupListener.default as StartupListener; +[Entity=Interface, DefaultExport] interface StartupConfig { - [Optional] attribute number timeoutMs; [Optional] attribute StartupListener startupListener; - }; \ No newline at end of file diff --git a/idl/@ohos.app.appstartup.StartupConfigEntry.idl b/idl/@ohos.app.appstartup.StartupConfigEntry.idl index b2a7845..dee9902 100644 --- a/idl/@ohos.app.appstartup.StartupConfigEntry.idl +++ b/idl/@ohos.app.appstartup.StartupConfigEntry.idl @@ -1,9 +1,9 @@ -package ohos.app.appstartup; -import ohos.app.appstartup.StartupConfig as StartupConfig; -[Entity=Class] +package ohos.app.appstartup.StartupConfigEntry; +import ohos.app.appstartup.StartupConfig.default as StartupConfig; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] interface StartupConfigEntry { - [Optional] StartupConfig onConfig(); - + String onRequestCustomMatchRule(Want want); }; \ No newline at end of file diff --git a/idl/@ohos.app.appstartup.StartupListener.idl b/idl/@ohos.app.appstartup.StartupListener.idl index 4a013ed..31716e7 100644 --- a/idl/@ohos.app.appstartup.StartupListener.idl +++ b/idl/@ohos.app.appstartup.StartupListener.idl @@ -1,9 +1,7 @@ -package ohos.app.appstartup; +package ohos.app.appstartup.StartupListener; import ohos.base.BusinessError as BusinessError; -[Entity=Class] +[Entity=Class, DefaultExport] interface StartupListener { - [Optional] - void onCompleted([TypeArguments="void"] BusinessError error); - + void onCompleted(BusinessError error); }; \ No newline at end of file diff --git a/idl/@ohos.app.appstartup.startupManager.idl b/idl/@ohos.app.appstartup.startupManager.idl index 5752089..d4cb72b 100644 --- a/idl/@ohos.app.appstartup.startupManager.idl +++ b/idl/@ohos.app.appstartup.startupManager.idl @@ -1,20 +1,17 @@ -package ohos.app.appstartup; -import ohos.app.appstartup.StartupConfig as StartupConfig; +package ohos.app.appstartup.startupManager; +import ohos.app.appstartup.StartupConfig.default as StartupConfig; +import ohos.app.ability.common.default as common; +[DefaultExport] namespace startupManager { - - [GlobalScope] - interface GlobalScope_startupManager_ohos_app_appstartup_startupManager { - - [Throws] - static async void run(sequence startupTasks, optional StartupConfig config); - static void removeAllStartupTaskResults(); - [Throws] - static Object getStartupTaskResult(String startupTask); - [Throws] - static boolean isStartupTaskInitialized(String startupTask); - [Throws] - static void removeStartupTaskResult(String startupTask); - - }; - + [Throws] + async void run(sequence startupTasks, optional StartupConfig config); + [Throws] + async void run(sequence startupTasks, common.AbilityStageContext context, StartupConfig config); + void removeAllStartupTaskResults(); + [Throws] + Object getStartupTaskResult(String startupTask); + [Throws] + boolean isStartupTaskInitialized(String startupTask); + [Throws] + void removeStartupTaskResult(String startupTask); }; \ No newline at end of file diff --git a/idl/@ohos.app.businessAbilityRouter.idl b/idl/@ohos.app.businessAbilityRouter.idl index 4864003..d2a668d 100644 --- a/idl/@ohos.app.businessAbilityRouter.idl +++ b/idl/@ohos.app.businessAbilityRouter.idl @@ -1,35 +1,25 @@ -package ohos.app; +package ohos.app.businessAbilityRouter; import ohos.base.AsyncCallback as AsyncCallback; -import application as _BusinessAbilityInfo; +import application.BusinessAbilityInfo as _BusinessAbilityInfo; +[DefaultExport] namespace businessAbilityRouter { - dictionary BusinessType { - number SHARE = 0; number UNSPECIFIED = 255; - }; [Entity=Interface] interface BusinessAbilityFilter { - attribute BusinessType businessType; [Optional] attribute String mimeType; [Optional] attribute String uri; - }; [Async, Synthetic] callback AsyncCallback_Array_BusinessAbilityInfo_Void = void (sequence result); + [Throws] + void queryBusinessAbilityInfo(BusinessAbilityFilter filter, AsyncCallback_Array_BusinessAbilityInfo_Void callback_); + [Throws] + async sequence queryBusinessAbilityInfo(BusinessAbilityFilter filter); typedef _BusinessAbilityInfo.BusinessAbilityInfo BusinessAbilityInfo; - [GlobalScope] - interface GlobalScope_businessAbilityRouter_ohos_app_businessAbilityRouter { - - [Throws] - static void queryBusinessAbilityInfo(BusinessAbilityFilter filter, AsyncCallback_Array_BusinessAbilityInfo_Void callback_); - [Throws] - static async sequence queryBusinessAbilityInfo(BusinessAbilityFilter filter); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.form.FormEditExtensionAbility.idl b/idl/@ohos.app.form.FormEditExtensionAbility.idl new file mode 100644 index 0000000..35c4296 --- /dev/null +++ b/idl/@ohos.app.form.FormEditExtensionAbility.idl @@ -0,0 +1,7 @@ +package ohos.app.form.FormEditExtensionAbility; +import ohos.app.ability.UIExtensionAbility.default as UIExtensionAbility; +import application.FormEditExtensionContext.default as FormEditExtensionContext; +[Entity=Class, DefaultExport] +interface FormEditExtensionAbility: [Extends] UIExtensionAbility { + attribute FormEditExtensionContext context; +}; \ No newline at end of file diff --git a/idl/@ohos.app.form.FormExtensionAbility.idl b/idl/@ohos.app.form.FormExtensionAbility.idl index 20daf97..054ef8a 100644 --- a/idl/@ohos.app.form.FormExtensionAbility.idl +++ b/idl/@ohos.app.form.FormExtensionAbility.idl @@ -1,13 +1,15 @@ -package ohos.app.form; -import ohos.app.form.formBindingData as formBindingData; -import ohos.app.form.formInfo as formInfo; -import application.FormExtensionContext as FormExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.app.ability.Configuration as Configuration; -[Entity=Class] +package ohos.app.form.FormExtensionAbility; +import ohos.app.form.formBindingData.default as formBindingData; +import ohos.app.form.formInfo.default as formInfo; +import application.FormExtensionContext.default as FormExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.Configuration.Configuration as Configuration; +callback OnStopFn = void (); +[Entity=Class, DefaultExport] interface FormExtensionAbility { - attribute FormExtensionContext context; + [Optional] + attribute OnStopFn onStop; formBindingData.FormBindingData onAddForm(Want want); void onCastToNormalForm(String formId); void onUpdateForm(String formId, optional record wantParams); @@ -23,5 +25,6 @@ interface FormExtensionAbility { record onAcquireFormData(String formId); [Optional] void onStop(); - + void onFormLocationChanged(String formId, formInfo.FormLocation newFormLocation); + void onSizeChanged(String formId, formInfo.FormDimension newDimension, formInfo.Rect newRect); }; \ No newline at end of file diff --git a/idl/@ohos.app.form.LiveFormExtensionAbility.idl b/idl/@ohos.app.form.LiveFormExtensionAbility.idl new file mode 100644 index 0000000..1c21b28 --- /dev/null +++ b/idl/@ohos.app.form.LiveFormExtensionAbility.idl @@ -0,0 +1,17 @@ +package ohos.app.form.LiveFormExtensionAbility; +import ohos.app.ability.ExtensionAbility.default as ExtensionAbility; +import application.LiveFormExtensionContext.default as LiveFormExtensionContext; +import ohos.app.ability.UIExtensionContentSession.default as UIExtensionContentSession; +import ohos.app.form.formInfo.default as formInfo; +[Entity=Interface] +interface LiveFormInfo { + attribute String formId; + attribute formInfo.Rect rect; + attribute number borderRadius; +}; +[Entity=Class, DefaultExport] +interface LiveFormExtensionAbility: [Extends] ExtensionAbility { + attribute LiveFormExtensionContext context; + void onLiveFormCreate(LiveFormInfo liveFormInfo, UIExtensionContentSession session); + void onLiveFormDestroy(LiveFormInfo liveFormInfo); +}; \ No newline at end of file diff --git a/idl/@ohos.app.form.formAgent.idl b/idl/@ohos.app.form.formAgent.idl index a92099c..a33b0ee 100644 --- a/idl/@ohos.app.form.formAgent.idl +++ b/idl/@ohos.app.form.formAgent.idl @@ -1,18 +1,12 @@ -package ohos.app.form; +package ohos.app.form.formAgent; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace formAgent { - [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_formAgent_ohos_app_form_formAgent { - - [Throws] - static void requestPublishForm(Want want, AsyncCallback_String_Void callback_); - [Throws] - static async String requestPublishForm(Want want); - - }; - + [Throws] + void requestPublishForm(Want want, AsyncCallback_String_Void callback_); + [Throws] + async String requestPublishForm(Want want); }; \ No newline at end of file diff --git a/idl/@ohos.app.form.formBindingData.idl b/idl/@ohos.app.form.formBindingData.idl index aebfb70..0d73da8 100644 --- a/idl/@ohos.app.form.formBindingData.idl +++ b/idl/@ohos.app.form.formBindingData.idl @@ -1,29 +1,18 @@ -package ohos.app.form; -import ohos.base.BusinessError as BusinessError; +package ohos.app.form.formBindingData; +[DefaultExport] namespace formBindingData { - + [Throws] + FormBindingData createFormBindingData(optional (Object or String) obj); [Entity=Interface] interface FormBindingData { - attribute Object data; [Optional] attribute sequence proxies; - }; [Entity=Interface] interface ProxyData { - attribute String key; [Optional] attribute String subscriberId; - }; - [GlobalScope] - interface GlobalScope_formBindingData_ohos_app_form_formBindingData { - - [Throws] - static FormBindingData createFormBindingData(optional (Object or String) obj); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.app.form.formHost.idl b/idl/@ohos.app.form.formHost.idl index b7ac1eb..855aa3b 100644 --- a/idl/@ohos.app.form.formHost.idl +++ b/idl/@ohos.app.form.formHost.idl @@ -1,136 +1,152 @@ -package ohos.app.form; +package ohos.app.form.formHost; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import ohos.app.form.formInfo as formInfo; +import ohos.app.ability.Want.default as Want; +import ohos.app.form.formInfo.default as formInfo; +[DefaultExport] namespace formHost { - + [Throws] + async formInfo.RunningFormInfo addForm(Want want); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void deleteForm(String formId, AsyncCallback_Void callback_); + [Throws] + async void deleteForm(String formId); + [Throws] + void releaseForm(String formId, AsyncCallback_Void callback_); + [Throws] + void releaseForm(String formId, boolean isReleaseCache, AsyncCallback_Void callback_); + [Throws] + async void releaseForm(String formId, optional boolean isReleaseCache); + [Throws] + void requestForm(String formId, AsyncCallback_Void callback_); + [Throws] + async void requestForm(String formId); + [Throws] + async void requestFormWithParams(String formId, optional record wantParams); + [Throws] + void castToNormalForm(String formId, AsyncCallback_Void callback_); + [Throws] + async void castToNormalForm(String formId); + [Throws] + void notifyVisibleForms(sequence formIds, AsyncCallback_Void callback_); + [Throws] + async void notifyVisibleForms(sequence formIds); + [Throws] + void notifyInvisibleForms(sequence formIds, AsyncCallback_Void callback_); + [Throws] + async void notifyInvisibleForms(sequence formIds); + [Throws] + void enableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); + [Throws] + async void enableFormsUpdate(sequence formIds); + [Throws] + void disableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); + [Throws] + async void disableFormsUpdate(sequence formIds); + [Throws] + void isSystemReady(AsyncCallback_Void callback_); + [Throws] + async void isSystemReady(); [Async, Synthetic] - callback AsyncCallback_Array_formInfo_FormInfo_Void = void (sequence result); + callback AsyncCallback_Array_FormInfo_FormInfo_Void = void (sequence result); + [Throws] + void getAllFormsInfo(AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Throws] + async sequence getAllFormsInfo(); + [Throws] + void getFormsInfo(String bundleName, AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Throws] + void getFormsInfo(String bundleName, String moduleName, AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Throws] + async sequence getFormsInfo(String bundleName, optional String moduleName); + [Throws] + async sequence getFormsInfo(formInfo.FormInfoFilter filter); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void deleteInvalidForms(sequence formIds, AsyncCallback_Number_Void callback_); + [Throws] + async number deleteInvalidForms(sequence formIds); [Async, Synthetic] - callback AsyncCallback_formInfo_FormStateInfo_Void = void (formInfo.FormStateInfo result); + callback AsyncCallback_FormInfo_FormStateInfo_Void = void (formInfo.FormStateInfo result); + [Throws] + void acquireFormState(Want want, AsyncCallback_FormInfo_FormStateInfo_Void callback_); + [Throws] + async formInfo.FormStateInfo acquireFormState(Want want); [Synthetic] callback Callback_String_Void = void (String parameter); + [Throws, DtsName="on", DtsTag="'formUninstall'"] + void onFormUninstall(Callback_String_Void callback_); + [Throws, DtsName="off", DtsTag="'formUninstall'"] + void offFormUninstall(optional Callback_String_Void callback_); + [Synthetic] + callback Callback_FormInfo_OverflowRequest_Void = void (formInfo.OverflowRequest parameter); + [Throws, DtsName="on", DtsTag="'formOverflow'"] + void onFormOverflow(Callback_FormInfo_OverflowRequest_Void callback_); + [Throws, DtsName="off", DtsTag="'formOverflow'"] + void offFormOverflow(optional Callback_FormInfo_OverflowRequest_Void callback_); + [Synthetic] + callback Callback_FormInfo_ChangeSceneAnimationStateRequest_Void = void (formInfo.ChangeSceneAnimationStateRequest parameter); + [Throws, DtsName="on", DtsTag="'changeSceneAnimationState'"] + void onChangeSceneAnimationState(Callback_FormInfo_ChangeSceneAnimationStateRequest_Void callback_); + [Throws, DtsName="off", DtsTag="'changeSceneAnimationState'"] + void offChangeSceneAnimationState(optional Callback_FormInfo_ChangeSceneAnimationStateRequest_Void callback_); + [Throws, DtsName="on", DtsTag="'getFormRect'"] + void onGetFormRect(formInfo.GetFormRectInfoCallback callback_); + [Throws, DtsName="off", DtsTag="'getFormRect'"] + void offGetFormRect(optional formInfo.GetFormRectInfoCallback callback_); + [Throws] + void notifyFormsVisible(sequence formIds, boolean isVisible, AsyncCallback_Void callback_); + [Throws] + async void notifyFormsVisible(sequence formIds, boolean isVisible); + [Throws] + void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate, AsyncCallback_Void callback_); + [Throws] + async void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate); + [Throws] + void shareForm(String formId, String deviceId, AsyncCallback_Void callback_); + [Throws] + async void shareForm(String formId, String deviceId); + [Throws] + void notifyFormsPrivacyProtected(sequence formIds, boolean isProtected, AsyncCallback_Void callback_); + [Throws] + async void notifyFormsPrivacyProtected(sequence formIds, boolean isProtected); [Async, Synthetic] callback AsyncCallback_Map_String_Object_Void = void (record result); + [Throws] + void acquireFormData(String formId, AsyncCallback_Map_String_Object_Void callback_); + [Throws] + async record acquireFormData(String formId); [Synthetic] callback Callback_Want_Void = void (Want parameter); - [GlobalScope] - interface GlobalScope_formHost_ohos_app_form_formHost { - - [Throws] - static async formInfo.RunningFormInfo addForm(Want want); - [Throws] - static void deleteForm(String formId, AsyncCallback_Void callback_); - [Throws] - static async void deleteForm(String formId); - [Throws] - static void releaseForm(String formId, AsyncCallback_Void callback_); - [Throws] - static void releaseForm(String formId, boolean isReleaseCache, AsyncCallback_Void callback_); - [Throws] - static async void releaseForm(String formId, optional boolean isReleaseCache); - [Throws] - static void requestForm(String formId, AsyncCallback_Void callback_); - [Throws] - static async void requestForm(String formId); - [Throws] - static async void requestFormWithParams(String formId, optional record wantParams); - [Throws] - static void castToNormalForm(String formId, AsyncCallback_Void callback_); - [Throws] - static async void castToNormalForm(String formId); - [Throws] - static void notifyVisibleForms(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static async void notifyVisibleForms(sequence formIds); - [Throws] - static void notifyInvisibleForms(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static async void notifyInvisibleForms(sequence formIds); - [Throws] - static void enableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static async void enableFormsUpdate(sequence formIds); - [Throws] - static void disableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static async void disableFormsUpdate(sequence formIds); - [Throws] - static void isSystemReady(AsyncCallback_Void callback_); - [Throws] - static async void isSystemReady(); - [Throws] - static void getAllFormsInfo(AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Throws] - static async sequence getAllFormsInfo(); - [Throws] - static void getFormsInfo(String bundleName, AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Throws] - static void getFormsInfo(String bundleName, String moduleName, AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Throws] - static async sequence getFormsInfo(String bundleName, optional String moduleName); - [Throws] - static async sequence getFormsInfo(formInfo.FormInfoFilter filter); - [Throws] - static void deleteInvalidForms(sequence formIds, AsyncCallback_Number_Void callback_); - [Throws] - static async number deleteInvalidForms(sequence formIds); - [Throws] - static void acquireFormState(Want want, AsyncCallback_formInfo_FormStateInfo_Void callback_); - [Throws] - static async formInfo.FormStateInfo acquireFormState(Want want); - [Throws, DtsName="on", DtsTag="'formUninstall'"] - static void onFormUninstall(Callback_String_Void callback_); - [Throws, DtsName="off", DtsTag="'formUninstall'"] - static void offFormUninstall(optional Callback_String_Void callback_); - [Throws] - static void notifyFormsVisible(sequence formIds, boolean isVisible, AsyncCallback_Void callback_); - [Throws] - static async void notifyFormsVisible(sequence formIds, boolean isVisible); - [Throws] - static void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate, AsyncCallback_Void callback_); - [Throws] - static async void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate); - [Throws] - static void shareForm(String formId, String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void shareForm(String formId, String deviceId); - [Throws] - static void notifyFormsPrivacyProtected(sequence formIds, boolean isProtected, AsyncCallback_Void callback_); - [Throws] - static async void notifyFormsPrivacyProtected(sequence formIds, boolean isProtected); - [Throws] - static void acquireFormData(String formId, AsyncCallback_Map_String_Object_Void callback_); - [Throws] - static async record acquireFormData(String formId); - [Throws] - static void setRouterProxy(sequence formIds, Callback_Want_Void proxy, AsyncCallback_Void callback_); - [Throws] - static async void setRouterProxy(sequence formIds, Callback_Want_Void proxy); - [Throws] - static void clearRouterProxy(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static async void clearRouterProxy(sequence formIds); - [Throws] - static void setPublishFormResult(String formId, formInfo.PublishFormResult result); - [Throws] - static async void setFormsRecyclable(sequence formIds); - [Throws] - static void setFormsRecyclable(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static async void recycleForms(sequence formIds); - [Throws] - static async void recoverForms(sequence formIds); - [Throws] - static void recoverForms(sequence formIds, AsyncCallback_Void callback_); - [Throws] - static void updateFormLocation(String formId, formInfo.FormLocation location); - - }; - + [Throws] + void setRouterProxy(sequence formIds, Callback_Want_Void proxy, AsyncCallback_Void callback_); + [Throws] + async void setRouterProxy(sequence formIds, Callback_Want_Void proxy); + [Throws] + void clearRouterProxy(sequence formIds, AsyncCallback_Void callback_); + [Throws] + async void clearRouterProxy(sequence formIds); + [Throws] + void setPublishFormResult(String formId, formInfo.PublishFormResult result); + [Throws] + async void setFormsRecyclable(sequence formIds); + [Throws] + void setFormsRecyclable(sequence formIds, AsyncCallback_Void callback_); + [Throws] + async void recycleForms(sequence formIds); + [Throws] + async void recoverForms(sequence formIds); + [Throws] + void recoverForms(sequence formIds, AsyncCallback_Void callback_); + [Throws] + void updateFormLocation(String formId, formInfo.FormLocation location); + [Throws, DtsName="on", DtsTag="'getLiveFormStatus'"] + void onGetLiveFormStatus(formInfo.GetLiveFormStatusCallback callback_); + [Throws, DtsName="off", DtsTag="'getLiveFormStatus'"] + void offGetLiveFormStatus(optional formInfo.GetLiveFormStatusCallback callback_); + [Throws] + void updateFormSize(String formId, formInfo.FormDimension newDimension, formInfo.Rect newRect); }; \ No newline at end of file diff --git a/idl/@ohos.app.form.formInfo.idl b/idl/@ohos.app.form.formInfo.idl index 70faa65..c06f98d 100644 --- a/idl/@ohos.app.form.formInfo.idl +++ b/idl/@ohos.app.form.formInfo.idl @@ -1,10 +1,9 @@ -package ohos.app.form; -import ohos.app.ability.Want as Want; +package ohos.app.form.formInfo; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace formInfo { - [Entity=Interface] interface FormInfo { - attribute String bundleName; attribute String moduleName; attribute String abilityName; @@ -15,9 +14,8 @@ namespace formInfo { attribute number descriptionId; attribute FormType type; attribute String jsComponentName; + [Deprecated] attribute ColorMode colorMode; - [Optional] - readonly attribute RenderingMode renderingMode; attribute boolean isDefault; attribute boolean updateEnabled; attribute boolean formVisibleNotify; @@ -34,45 +32,47 @@ namespace formInfo { readonly attribute sequence previewImages; [Optional] readonly attribute boolean enableBlurBackground; - + [Optional] + readonly attribute RenderingMode renderingMode; + [Optional] + readonly attribute FunInteractionParams funInteractionParams; + [Optional] + readonly attribute SceneAnimationParams sceneAnimationParams; + [Optional] + readonly attribute boolean resizable; + [Optional] + readonly attribute String groupId; + }; + dictionary RenderingMode { + number AUTO_COLOR = 0; + number FULL_COLOR = 1; + number SINGLE_COLOR = 2; }; dictionary FormType { - number JS = 1; [OriginalEnumMemberName=eTS] number E_TS = 2; - }; + [Deprecated] dictionary ColorMode { - + [Deprecated] number MODE_AUTO = -1; + [Deprecated] number MODE_DARK = 0; + [Deprecated] number MODE_LIGHT = 1; - - }; - dictionary RenderingMode { - - number AUTO_COLOR = 0; - number FULL_COLOR = 1; - number SINGLE_COLOR = 2; - }; [Entity=Interface] interface FormStateInfo { - attribute FormState formState; attribute Want want; - }; dictionary FormState { - number UNKNOWN = -1; number DEFAULT = 0; number READY = 1; - }; dictionary FormParam { - String IDENTITY_KEY = "ohos.extra.param.key.form_identity"; String DIMENSION_KEY = "ohos.extra.param.key.form_dimension"; String NAME_KEY = "ohos.extra.param.key.form_name"; @@ -91,11 +91,10 @@ namespace formInfo { String HOST_BG_INVERSE_COLOR_KEY = "ohos.extra.param.key.host_bg_inverse_color"; String FORM_PERMISSION_NAME_KEY = "ohos.extra.param.key.permission_name"; String FORM_PERMISSION_GRANTED_KEY = "ohos.extra.param.key.permission_granted"; - + String ORIGINAL_FORM_KEY = "ohos.extra.param.key.original_form_id"; }; [Entity=Interface] interface FormInfoFilter { - [Optional] attribute String bundleName; [Optional] @@ -104,10 +103,8 @@ namespace formInfo { attribute sequence supportedDimensions; [Optional] attribute sequence supportedShapes; - }; dictionary FormDimension { - [OriginalEnumMemberName=Dimension_1_2] number DIMENSION_1_2 = 1; [OriginalEnumMemberName=Dimension_2_2] @@ -116,51 +113,40 @@ namespace formInfo { number DIMENSION_2_4 = 3; [OriginalEnumMemberName=Dimension_4_4] number DIMENSION_4_4 = 4; - [OriginalEnumMemberName=Dimension_2_1] + [Deprecated, OriginalEnumMemberName=Dimension_2_1] number DIMENSION_2_1 = 5; number DIMENSION_1_1 = 6; number DIMENSION_6_4 = 7; number DIMENSION_2_3 = 8; number DIMENSION_3_3 = 9; - }; dictionary FormShape { - number RECT = 1; number CIRCLE = 2; - }; dictionary VisibilityType { - number UNKNOWN = 0; number FORM_VISIBLE = 1; number FORM_INVISIBLE = 2; - }; dictionary LaunchReason { - number FORM_DEFAULT = 1; number FORM_SHARE = 2; - + number FORM_SIZE_CHANGE = 3; }; [Entity=Interface] interface PublishFormResult { - attribute PublishFormErrorCode code; attribute String message; - }; dictionary PublishFormErrorCode { - number SUCCESS = 0; number NO_SPACE = 1; number PARAM_ERROR = 2; number INTERNAL_ERROR = 3; - }; [Entity=Interface] interface FormProviderFilter { - attribute String bundleName; [Optional] attribute String formName; @@ -170,11 +156,9 @@ namespace formInfo { attribute String abilityName; [Optional] attribute boolean isUnusedIncluded; - }; [Entity=Interface] interface RunningFormInfo { - readonly attribute String formId; readonly attribute String bundleName; readonly attribute String hostBundleName; @@ -188,16 +172,12 @@ namespace formInfo { readonly attribute String formDescription; [Optional] readonly attribute record extraData; - }; dictionary FormUsageState { - number USED = 0; number UNUSED = 1; - }; dictionary FormLocation { - number OTHER = -1; number DESKTOP = 0; number FORM_CENTER = 1; @@ -207,7 +187,56 @@ namespace formInfo { number FORM_MANAGER_NEGATIVE_SCREEN = 5; number SCREEN_LOCK = 6; number AI_SUGGESTION = 7; - }; - + [Entity=Interface] + interface OverflowInfo { + attribute Rect area; + attribute number duration; + [Optional] + attribute boolean useDefaultAnimation; + }; + [Entity=Interface] + interface OverflowRequest { + attribute String formId; + attribute boolean isOverflow; + [Optional] + attribute OverflowInfo overflowInfo; + }; + [Entity=Interface] + interface ChangeSceneAnimationStateRequest { + attribute String formId; + attribute number state; + }; + [Entity=Interface] + interface Rect { + attribute number left; + attribute number top; + attribute number width; + attribute number height; + }; + [Entity=Interface] + interface FunInteractionParams { + [Optional] + attribute String abilityName; + attribute String targetBundleName; + attribute String subBundleName; + [Optional] + attribute number keepStateDuration; + }; + [Entity=Interface] + interface SceneAnimationParams { + attribute String abilityName; + [Optional] + attribute String disabledDesktopBehaviors; + }; + [Entity=Interface] + interface GetFormRectInfoCallback { + [CallSignature] + async formInfo.Rect invoke(String formId); + }; + [Entity=Interface] + interface GetLiveFormStatusCallback { + [CallSignature] + record invoke(); + }; }; \ No newline at end of file diff --git a/idl/@ohos.app.form.formObserver.idl b/idl/@ohos.app.form.formObserver.idl index 8883822..52bf9cf 100644 --- a/idl/@ohos.app.form.formObserver.idl +++ b/idl/@ohos.app.form.formObserver.idl @@ -1,83 +1,77 @@ -package ohos.app.form; +package ohos.app.form.formObserver; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.form.formInfo as formInfo; +import ohos.app.form.formInfo.default as formInfo; +[DefaultExport] namespace formObserver { - [Synthetic] - callback Callback_formInfo_RunningFormInfo_Void = void (formInfo.RunningFormInfo parameter); + callback Callback_FormInfo_RunningFormInfo_Void = void (formInfo.RunningFormInfo parameter); + [Throws, DtsName="on", DtsTag="'formAdd'"] + void onFormAdd(Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'formAdd'"] + void onFormAdd(String hostBundleName, Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'formAdd'"] + void offFormAdd(optional String hostBundleName, optional Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'formRemove'"] + void onFormRemove(Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'formRemove'"] + void onFormRemove(String hostBundleName, Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'formRemove'"] + void offFormRemove(optional String hostBundleName, optional Callback_FormInfo_RunningFormInfo_Void observerCallback); [Synthetic] - callback Callback_Array_formInfo_RunningFormInfo_Void = void (sequence parameter); + callback Callback_Array_FormInfo_RunningFormInfo_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'notifyVisible'"] + void onNotifyVisible(Callback_Array_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'notifyVisible'"] + void onNotifyVisible(String hostBundleName, Callback_Array_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'notifyInvisible'"] + void onNotifyInvisible(Callback_Array_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'notifyInvisible'"] + void onNotifyInvisible(String hostBundleName, Callback_Array_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'notifyVisible'"] + void offNotifyVisible(optional String hostBundleName, optional Callback_Array_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'notifyInvisible'"] + void offNotifyInvisible(optional String hostBundleName, optional Callback_Array_FormInfo_RunningFormInfo_Void observerCallback); [Async, Synthetic] - callback AsyncCallback_Array_formInfo_RunningFormInfo_Void = void (sequence result); + callback AsyncCallback_Array_FormInfo_RunningFormInfo_Void = void (sequence result); + [Throws] + void getRunningFormInfos(AsyncCallback_Array_FormInfo_RunningFormInfo_Void callback_, optional String hostBundleName); + [Throws] + void getRunningFormInfos(AsyncCallback_Array_FormInfo_RunningFormInfo_Void callback_, boolean isUnusedIncluded, optional String hostBundleName); + [Throws] + async sequence getRunningFormInfos(optional String hostBundleName); + [Throws] + async sequence getRunningFormInfos(boolean isUnusedIncluded, optional String hostBundleName); + [Throws] + async sequence getRunningFormInfosByFilter(formInfo.FormProviderFilter formProviderFilter); + [Throws] + void getRunningFormInfosByFilter(formInfo.FormProviderFilter formProviderFilter, AsyncCallback_Array_FormInfo_RunningFormInfo_Void callback_); + [Throws] + async formInfo.RunningFormInfo getRunningFormInfoById(String formId); + [Throws] + async formInfo.RunningFormInfo getRunningFormInfoById(String formId, boolean isUnusedIncluded); [Async, Synthetic] - callback AsyncCallback_formInfo_RunningFormInfo_Void = void (formInfo.RunningFormInfo result); - [GlobalScope] - interface GlobalScope_formObserver_ohos_app_form_formObserver { - - [Throws, DtsName="on", DtsTag="'formAdd'"] - static void onFormAdd(Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'formAdd'"] - static void onFormAdd(String hostBundleName, Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'formAdd'"] - static void offFormAdd(optional String hostBundleName, optional Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'formRemove'"] - static void onFormRemove(Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'formRemove'"] - static void onFormRemove(String hostBundleName, Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'formRemove'"] - static void offFormRemove(optional String hostBundleName, optional Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'notifyVisible'"] - static void onNotifyVisible(Callback_Array_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'notifyVisible'"] - static void onNotifyVisible(String hostBundleName, Callback_Array_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'notifyInvisible'"] - static void onNotifyInvisible(Callback_Array_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'notifyInvisible'"] - static void onNotifyInvisible(String hostBundleName, Callback_Array_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'notifyVisible'"] - static void offNotifyVisible(optional String hostBundleName, optional Callback_Array_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'notifyInvisible'"] - static void offNotifyInvisible(optional String hostBundleName, optional Callback_Array_formInfo_RunningFormInfo_Void observerCallback); - [Throws] - static void getRunningFormInfos(AsyncCallback_Array_formInfo_RunningFormInfo_Void callback_, optional String hostBundleName); - [Throws] - static void getRunningFormInfos(AsyncCallback_Array_formInfo_RunningFormInfo_Void callback_, boolean isUnusedIncluded, optional String hostBundleName); - [Throws] - static async sequence getRunningFormInfos(optional String hostBundleName); - [Throws] - static async sequence getRunningFormInfos(boolean isUnusedIncluded, optional String hostBundleName); - [Throws] - static async sequence getRunningFormInfosByFilter(formInfo.FormProviderFilter formProviderFilter); - [Throws] - static void getRunningFormInfosByFilter(formInfo.FormProviderFilter formProviderFilter, AsyncCallback_Array_formInfo_RunningFormInfo_Void callback_); - [Throws] - static async formInfo.RunningFormInfo getRunningFormInfoById(String formId); - [Throws] - static async formInfo.RunningFormInfo getRunningFormInfoById(String formId, boolean isUnusedIncluded); - [Throws] - static void getRunningFormInfoById(String formId, AsyncCallback_formInfo_RunningFormInfo_Void callback_); - [Throws] - static void getRunningFormInfoById(String formId, boolean isUnusedIncluded, AsyncCallback_formInfo_RunningFormInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'router'"] - static void onRouter(Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'router'"] - static void onRouter(String hostBundleName, Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'router'"] - static void offRouter(optional String hostBundleName, optional Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'message'"] - static void onMessage(Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'message'"] - static void onMessage(String hostBundleName, Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'message'"] - static void offMessage(optional String hostBundleName, optional Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'call'"] - static void onCall(Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="on", DtsTag="'call'"] - static void onCall(String hostBundleName, Callback_formInfo_RunningFormInfo_Void observerCallback); - [Throws, DtsName="off", DtsTag="'call'"] - static void offCall(optional String hostBundleName, optional Callback_formInfo_RunningFormInfo_Void observerCallback); - - }; - + callback AsyncCallback_FormInfo_RunningFormInfo_Void = void (formInfo.RunningFormInfo result); + [Throws] + void getRunningFormInfoById(String formId, AsyncCallback_FormInfo_RunningFormInfo_Void callback_); + [Throws] + void getRunningFormInfoById(String formId, boolean isUnusedIncluded, AsyncCallback_FormInfo_RunningFormInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'router'"] + void onRouter(Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'router'"] + void onRouter(String hostBundleName, Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'router'"] + void offRouter(optional String hostBundleName, optional Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'message'"] + void onMessage(Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'message'"] + void onMessage(String hostBundleName, Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'message'"] + void offMessage(optional String hostBundleName, optional Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'call'"] + void onCall(Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="on", DtsTag="'call'"] + void onCall(String hostBundleName, Callback_FormInfo_RunningFormInfo_Void observerCallback); + [Throws, DtsName="off", DtsTag="'call'"] + void offCall(optional String hostBundleName, optional Callback_FormInfo_RunningFormInfo_Void observerCallback); }; \ No newline at end of file diff --git a/idl/@ohos.app.form.formProvider.idl b/idl/@ohos.app.form.formProvider.idl index 2c508ad..031145c 100644 --- a/idl/@ohos.app.form.formProvider.idl +++ b/idl/@ohos.app.form.formProvider.idl @@ -1,46 +1,64 @@ -package ohos.app.form; +package ohos.app.form.formProvider; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.form.formBindingData as formBindingData; -import ohos.app.form.formInfo as formInfo; -import ohos.app.ability.Want as Want; +import ohos.app.form.formBindingData.default as formBindingData; +import ohos.app.form.formInfo.default as formInfo; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace formProvider { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setFormNextRefreshTime(String formId, number minute, AsyncCallback_Void callback_); + [Throws] + async void setFormNextRefreshTime(String formId, number minute); + [Throws] + void updateForm(String formId, formBindingData.FormBindingData formBindingData, AsyncCallback_Void callback_); + [Throws] + async void updateForm(String formId, formBindingData.FormBindingData formBindingData); [Async, Synthetic] - callback AsyncCallback_Array_formInfo_FormInfo_Void = void (sequence result); + callback AsyncCallback_Array_FormInfo_FormInfo_Void = void (sequence result); + [Throws] + void getFormsInfo(formInfo.FormInfoFilter filter, AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Throws] + void getFormsInfo(AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Throws] + async sequence getFormsInfo(optional formInfo.FormInfoFilter filter); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void requestPublishForm(Want want, formBindingData.FormBindingData formBindingData, AsyncCallback_String_Void callback_); + [Throws] + void requestPublishForm(Want want, AsyncCallback_String_Void callback_); + [Throws] + async String requestPublishForm(Want want, optional formBindingData.FormBindingData formBindingData); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); - [GlobalScope] - interface GlobalScope_formProvider_ohos_app_form_formProvider { - - [Throws] - static void setFormNextRefreshTime(String formId, number minute, AsyncCallback_Void callback_); - [Throws] - static async void setFormNextRefreshTime(String formId, number minute); - [Throws] - static void updateForm(String formId, formBindingData.FormBindingData formBindingData, AsyncCallback_Void callback_); - [Throws] - static async void updateForm(String formId, formBindingData.FormBindingData formBindingData); - [Throws] - static void getFormsInfo(formInfo.FormInfoFilter filter, AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Throws] - static void getFormsInfo(AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Throws] - static async sequence getFormsInfo(optional formInfo.FormInfoFilter filter); - [Throws] - static void requestPublishForm(Want want, formBindingData.FormBindingData formBindingData, AsyncCallback_String_Void callback_); - [Throws] - static void requestPublishForm(Want want, AsyncCallback_String_Void callback_); - [Throws] - static async String requestPublishForm(Want want, optional formBindingData.FormBindingData formBindingData); - [Throws] - static void isRequestPublishFormSupported(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isRequestPublishFormSupported(); - - }; - + [Throws] + void isRequestPublishFormSupported(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isRequestPublishFormSupported(); + [Deprecated, Throws] + async formInfo.FormInfo getPublishedFormInfoById(String formId); + [Deprecated, Throws] + async sequence getPublishedFormInfos(); + [Throws] + async formInfo.RunningFormInfo getPublishedRunningFormInfoById(String formId); + [Throws] + async sequence getPublishedRunningFormInfos(); + [Throws] + void openFormManager(Want want); + [Throws] + void openFormManagerCrossBundle(Want want); + [Throws] + void openFormEditAbility(String abilityName, String formId, optional boolean isMainPage); + [Throws] + async void activateSceneAnimation(String formId); + [Throws] + async void deactivateSceneAnimation(String formId); + [Throws] + async void requestOverflow(String formId, formInfo.OverflowInfo overflowInfo); + [Throws] + async void cancelOverflow(String formId); + [Throws] + async formInfo.Rect getFormRect(String formId); }; \ No newline at end of file diff --git a/idl/@ohos.application.AccessibilityExtensionAbility.idl b/idl/@ohos.application.AccessibilityExtensionAbility.idl index 81d2444..9ec3e13 100644 --- a/idl/@ohos.application.AccessibilityExtensionAbility.idl +++ b/idl/@ohos.application.AccessibilityExtensionAbility.idl @@ -1,13 +1,14 @@ -package ohos.application; -import ohos.accessibility as accessibility; +package ohos.application.AccessibilityExtensionAbility; +import ohos.accessibility.default as accessibility; import ohos.multimodalInput.keyEvent.KeyEvent as KeyEvent; -import application.AccessibilityElement as _AccessibilityElement; -import application.ElementAttributeValues as _ElementAttributeValues; -import application.FocusDirection as _FocusDirection; -import application.FocusType as _FocusType; -import application.WindowType as _WindowType; -import application.Rect as _Rect; -import application as _AccessibilityExtensionContext; +import application.AccessibilityExtensionContext.AccessibilityElement as _AccessibilityElement; +import application.AccessibilityExtensionContext.ElementAttributeValues as _ElementAttributeValues; +import application.AccessibilityExtensionContext.FocusDirection as _FocusDirection; +import application.AccessibilityExtensionContext.FocusType as _FocusType; +import application.AccessibilityExtensionContext.WindowType as _WindowType; +import application.AccessibilityExtensionContext.Rect as _Rect; +import application.AccessibilityExtensionContext as _AccessibilityExtensionContext; +import ohos.accessibility.AccessibilityEventType as AccessibilityEventType; typedef _AccessibilityElement AccessibilityElement; typedef _ElementAttributeValues ElementAttributeValues; typedef _FocusDirection FocusDirection; @@ -16,9 +17,8 @@ typedef _FocusType FocusType; typedef _WindowType WindowType; typedef _Rect Rect; typedef _AccessibilityExtensionContext.default AccessibilityExtensionContext; -[Entity=Class] +[Entity=Class, DefaultExport] interface AccessibilityExtensionAbility { - attribute AccessibilityExtensionContext context; [Deprecated] void onConnect(); @@ -28,11 +28,27 @@ interface AccessibilityExtensionAbility { void onAccessibilityEvent(AccessibilityEvent event); [Deprecated] boolean onKeyEvent(KeyEvent keyEvent); - + [Throws] + void onAccessibilityConnect(); + [Throws] + void onAccessibilityDisconnect(); + [Throws] + void onAccessibilityEventInfo(AccessibilityEventInfo event); + [Throws] + boolean onAccessibilityKeyEvent(KeyEvent keyEvent); +}; +[Entity=Interface] +interface AccessibilityEventInfo { + attribute AccessibilityEventType eventType; + [Optional] + attribute AccessibilityElement target; + [Optional] + attribute number timestamp; + [Optional] + attribute String extraInfo; }; [Entity=Interface] interface AccessibilityEvent { - attribute (accessibility.EventType or accessibility.WindowUpdateType or TouchGuideType or GestureType or PageUpdateType) eventType; [Optional] attribute AccessibilityElement target; @@ -42,7 +58,8 @@ interface AccessibilityEvent { attribute number elementId; [Optional] attribute String textAnnouncedForAccessibility; - + [Optional] + attribute String extraInfo; }; typedef String GestureType; typedef String PageUpdateType; diff --git a/idl/@ohos.application.BackupExtensionAbility.idl b/idl/@ohos.application.BackupExtensionAbility.idl index 7325cc7..50388eb 100644 --- a/idl/@ohos.application.BackupExtensionAbility.idl +++ b/idl/@ohos.application.BackupExtensionAbility.idl @@ -1,15 +1,12 @@ -package ohos.application; -import ohos.file.BackupExtensionContext as BackupExtensionContext; +package ohos.application.BackupExtensionAbility; +import ohos.file.BackupExtensionContext.default as BackupExtensionContext; [Entity=Interface] interface BundleVersion { - attribute number code; attribute String name; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface BackupExtensionAbility { - attribute BackupExtensionContext context; void onBackup(); async String onBackupEx(String backupInfo); @@ -17,5 +14,7 @@ interface BackupExtensionAbility { async String onRestoreEx(BundleVersion bundleVersion, String restoreInfo); String getBackupInfo(); String onProcess(); - + async void onRelease(number scenario); + async String getBackupCompatibilityInfo(String extInfo); + async String getRestoreCompatibilityInfo(String extInfo); }; \ No newline at end of file diff --git a/idl/@ohos.application.Configuration.idl b/idl/@ohos.application.Configuration.idl index 2fcf0d6..2c7e7fc 100644 --- a/idl/@ohos.application.Configuration.idl +++ b/idl/@ohos.application.Configuration.idl @@ -1,11 +1,9 @@ -package ohos.application; -import ohos.application.ConfigurationConstant as ConfigurationConstant; +package ohos.application.Configuration; +import ohos.application.ConfigurationConstant.default as ConfigurationConstant; [Entity=Interface, Deprecated] interface Configuration { - [Optional, Deprecated] attribute String language; [Optional, Deprecated] attribute ConfigurationConstant.ColorMode colorMode; - }; \ No newline at end of file diff --git a/idl/@ohos.application.ConfigurationConstant.idl b/idl/@ohos.application.ConfigurationConstant.idl index 993940d..8afb504 100644 --- a/idl/@ohos.application.ConfigurationConstant.idl +++ b/idl/@ohos.application.ConfigurationConstant.idl @@ -1,16 +1,13 @@ -package ohos.application; +package ohos.application.ConfigurationConstant; +[DefaultExport] namespace ConfigurationConstant { - [Deprecated] dictionary ColorMode { - [Deprecated] number COLOR_MODE_NOT_SET = -1; [Deprecated] number COLOR_MODE_DARK = 0; [Deprecated] number COLOR_MODE_LIGHT = 1; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.application.DataShareExtensionAbility.idl b/idl/@ohos.application.DataShareExtensionAbility.idl index 141af02..0197c1c 100644 --- a/idl/@ohos.application.DataShareExtensionAbility.idl +++ b/idl/@ohos.application.DataShareExtensionAbility.idl @@ -1,10 +1,10 @@ -package ohos.application; +package ohos.application.DataShareExtensionAbility; import ohos.base.AsyncCallback as AsyncCallback; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.data.dataSharePredicates as dataSharePredicates; -import ohos.data.ValuesBucket as ValuesBucket; -import ohos.data.dataShare as dataShare; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.data.dataSharePredicates.default as dataSharePredicates; +import ohos.data.ValuesBucket.ValuesBucket as ValuesBucket; +import ohos.data.dataShare.default as dataShare; typedef dataShare.UpdateOperation UpdateOperation; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -16,9 +16,8 @@ callback AsyncCallback_Map_String_Array_Number_Void = void (record wantParam); +}; \ No newline at end of file diff --git a/idl/@ohos.application.DistributedExtensionContext.idl b/idl/@ohos.application.DistributedExtensionContext.idl new file mode 100644 index 0000000..50a0cde --- /dev/null +++ b/idl/@ohos.application.DistributedExtensionContext.idl @@ -0,0 +1,5 @@ +package ohos.application.DistributedExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +[Entity=Class, DefaultExport] +interface DistributedExtensionContext: [Extends] ExtensionContext { +}; \ No newline at end of file diff --git a/idl/@ohos.application.StaticSubscriberExtensionAbility.idl b/idl/@ohos.application.StaticSubscriberExtensionAbility.idl index db81e80..aa1667a 100644 --- a/idl/@ohos.application.StaticSubscriberExtensionAbility.idl +++ b/idl/@ohos.application.StaticSubscriberExtensionAbility.idl @@ -1,10 +1,8 @@ -package ohos.application; -import commonEvent.CommonEventData as CommonEventData; -import ohos.application.StaticSubscriberExtensionContext as StaticSubscriberExtensionContext; -[Entity=Class] +package ohos.application.StaticSubscriberExtensionAbility; +import commonEvent.commonEventData.CommonEventData as CommonEventData; +import ohos.application.StaticSubscriberExtensionContext.default as StaticSubscriberExtensionContext; +[Entity=Class, DefaultExport] interface StaticSubscriberExtensionAbility { - attribute StaticSubscriberExtensionContext context; void onReceiveEvent(CommonEventData event); - }; \ No newline at end of file diff --git a/idl/@ohos.application.StaticSubscriberExtensionContext.idl b/idl/@ohos.application.StaticSubscriberExtensionContext.idl index b4bafcb..03953bb 100644 --- a/idl/@ohos.application.StaticSubscriberExtensionContext.idl +++ b/idl/@ohos.application.StaticSubscriberExtensionContext.idl @@ -1,15 +1,13 @@ -package ohos.application; +package ohos.application.StaticSubscriberExtensionContext; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import application.ExtensionContext as ExtensionContext; +import ohos.app.ability.Want.default as Want; +import application.ExtensionContext.default as ExtensionContext; [Async, Synthetic] callback AsyncCallback_Void = void (); -[Entity=Class] -interface StaticSubscriberExtensionContext: ExtensionContext { - +[Entity=Class, DefaultExport] +interface StaticSubscriberExtensionContext: [Extends] ExtensionContext { [Throws] void startAbility(Want want, AsyncCallback_Void callback_); [Throws] async void startAbility(Want want); - }; \ No newline at end of file diff --git a/idl/@ohos.application.Want.idl b/idl/@ohos.application.Want.idl index dc381a1..c610242 100644 --- a/idl/@ohos.application.Want.idl +++ b/idl/@ohos.application.Want.idl @@ -1,14 +1,11 @@ -package ohos.application; +package ohos.application.Want; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Want { - [Optional, Deprecated] attribute String deviceId; [Optional, Deprecated] @@ -27,5 +24,4 @@ interface Want { attribute Literal_Empty parameters; [Optional, Deprecated] attribute sequence entities; - }; \ No newline at end of file diff --git a/idl/@ohos.application.WindowExtensionAbility.idl b/idl/@ohos.application.WindowExtensionAbility.idl index b625bea..440ca1c 100644 --- a/idl/@ohos.application.WindowExtensionAbility.idl +++ b/idl/@ohos.application.WindowExtensionAbility.idl @@ -1,15 +1,13 @@ -package ohos.application; -import ohos.rpc as rpc; -import application._WindowExtensionContext as _WindowExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.window as window; -[Entity=Class] +package ohos.application.WindowExtensionAbility; +import ohos.rpc.default as rpc; +import application.WindowExtensionContext.default as _WindowExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.window.default as window; +[Entity=Class, DefaultExport] interface WindowExtensionAbility { - attribute WindowExtensionContext context; void onConnect(Want want); void onDisconnect(Want want); void onWindowReady(window.Window window); - }; typedef _WindowExtensionContext WindowExtensionContext; \ No newline at end of file diff --git a/idl/@ohos.application.abilityDelegatorRegistry.idl b/idl/@ohos.application.abilityDelegatorRegistry.idl index 427f3e0..0943468 100644 --- a/idl/@ohos.application.abilityDelegatorRegistry.idl +++ b/idl/@ohos.application.abilityDelegatorRegistry.idl @@ -1,13 +1,16 @@ -package ohos.application; -import application.AbilityDelegator as AbilityDelegator; +package ohos.application.abilityDelegatorRegistry; +import application.AbilityDelegator.AbilityDelegator as AbilityDelegator; import application.abilityDelegatorArgs.AbilityDelegatorArgs as AbilityDelegatorArgs; -import application.AbilityMonitor as AbilityMonitor; +import application.AbilityMonitor.AbilityMonitor as AbilityMonitor; import application.shellCmdResult.ShellCmdResult as ShellCmdResult; +[DefaultExport] namespace abilityDelegatorRegistry { - + [Deprecated] + AbilityDelegator getAbilityDelegator(); + [Deprecated] + AbilityDelegatorArgs getArguments(); [Deprecated] dictionary AbilityLifecycleState { - [Deprecated] number UNINITIALIZED = 0; [Deprecated] @@ -18,16 +21,5 @@ namespace abilityDelegatorRegistry { number BACKGROUND = 3; [Deprecated] number DESTROY = 4; - - }; - [GlobalScope] - interface GlobalScope_abilityDelegatorRegistry_ohos_application_abilityDelegatorRegistry { - - [Deprecated] - static AbilityDelegator getAbilityDelegator(); - [Deprecated] - static AbilityDelegatorArgs getArguments(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.application.abilityManager.idl b/idl/@ohos.application.abilityManager.idl index 1693628..0981f0b 100644 --- a/idl/@ohos.application.abilityManager.idl +++ b/idl/@ohos.application.abilityManager.idl @@ -1,14 +1,13 @@ -package ohos.application; +package ohos.application.abilityManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.application.Configuration as Configuration; -import application.AbilityRunningInfo as AbilityRunningInfo; -import application.ExtensionRunningInfo as ExtensionRunningInfo; -import bundle.ElementName as ElementName; +import ohos.application.Configuration.Configuration as Configuration; +import application.AbilityRunningInfo.AbilityRunningInfo as AbilityRunningInfo; +import application.ExtensionRunningInfo.ExtensionRunningInfo as ExtensionRunningInfo; +import bundle.elementName.ElementName as ElementName; +[DefaultExport] namespace abilityManager { - [Deprecated] dictionary AbilityState { - [Deprecated] number INITIAL = 0; [Deprecated] @@ -19,24 +18,17 @@ namespace abilityManager { number FOREGROUNDING = 11; [Deprecated] number BACKGROUNDING = 12; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void updateConfiguration(Configuration config, AsyncCallback_Void callback_); + [Deprecated] + async void updateConfiguration(Configuration config); + [Deprecated] + async sequence getAbilityRunningInfos(); [Async, Synthetic] callback AsyncCallback_Array_AbilityRunningInfo_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_abilityManager_ohos_application_abilityManager { - - [Deprecated] - static void updateConfiguration(Configuration config, AsyncCallback_Void callback_); - [Deprecated] - static async void updateConfiguration(Configuration config); - [Deprecated] - static async sequence getAbilityRunningInfos(); - [Deprecated] - static void getAbilityRunningInfos(AsyncCallback_Array_AbilityRunningInfo_Void callback_); - - }; - + [Deprecated] + void getAbilityRunningInfos(AsyncCallback_Array_AbilityRunningInfo_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.application.appManager.idl b/idl/@ohos.application.appManager.idl index 5d12799..5ff4fa1 100644 --- a/idl/@ohos.application.appManager.idl +++ b/idl/@ohos.application.appManager.idl @@ -1,63 +1,57 @@ -package ohos.application; +package ohos.application.appManager; import ohos.base.AsyncCallback as AsyncCallback; -import application.ApplicationStateObserver as ApplicationStateObserver; -import application.AbilityStateData as AbilityStateData; -import application.AppStateData as AppStateData; -import application.ProcessRunningInfo as ProcessRunningInfo; +import application.ApplicationStateObserver.default as ApplicationStateObserver; +import application.AbilityStateData.default as AbilityStateData; +import application.AppStateData.default as AppStateData; +import application.ProcessRunningInfo.ProcessRunningInfo as ProcessRunningInfo; +[DefaultExport] namespace appManager { - + [Deprecated] + number registerApplicationStateObserver(ApplicationStateObserver observer); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void unregisterApplicationStateObserver(number observerId, AsyncCallback_Void callback_); + [Deprecated] + async void unregisterApplicationStateObserver(number observerId); [Async, Synthetic] callback AsyncCallback_Array_AppStateData_Void = void (sequence result); + [Deprecated] + void getForegroundApplications(AsyncCallback_Array_AppStateData_Void callback_); + [Deprecated] + async sequence getForegroundApplications(); + [Deprecated] + async void killProcessWithAccount(String bundleName, number accountId); + [Deprecated] + void killProcessWithAccount(String bundleName, number accountId, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isRunningInStabilityTest(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isRunningInStabilityTest(); + [Deprecated] + async sequence getProcessRunningInfos(); [Async, Synthetic] callback AsyncCallback_Array_ProcessRunningInfo_Void = void (sequence result); + [Deprecated] + void getProcessRunningInfos(AsyncCallback_Array_ProcessRunningInfo_Void callback_); + [Deprecated] + async void killProcessesByBundleName(String bundleName); + [Deprecated] + void killProcessesByBundleName(String bundleName, AsyncCallback_Void callback_); + [Deprecated] + async void clearUpApplicationData(String bundleName); + [Deprecated] + void clearUpApplicationData(String bundleName, AsyncCallback_Void callback_); + [Deprecated] + async boolean isRamConstrainedDevice(); + [Deprecated] + void isRamConstrainedDevice(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async number getAppMemorySize(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); - [GlobalScope] - interface GlobalScope_appManager_ohos_application_appManager { - - [Deprecated] - static number registerApplicationStateObserver(ApplicationStateObserver observer); - [Deprecated] - static void unregisterApplicationStateObserver(number observerId, AsyncCallback_Void callback_); - [Deprecated] - static async void unregisterApplicationStateObserver(number observerId); - [Deprecated] - static void getForegroundApplications(AsyncCallback_Array_AppStateData_Void callback_); - [Deprecated] - static async sequence getForegroundApplications(); - [Deprecated] - static async void killProcessWithAccount(String bundleName, number accountId); - [Deprecated] - static void killProcessWithAccount(String bundleName, number accountId, AsyncCallback_Void callback_); - [Deprecated] - static void isRunningInStabilityTest(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isRunningInStabilityTest(); - [Deprecated] - static async sequence getProcessRunningInfos(); - [Deprecated] - static void getProcessRunningInfos(AsyncCallback_Array_ProcessRunningInfo_Void callback_); - [Deprecated] - static async void killProcessesByBundleName(String bundleName); - [Deprecated] - static undefined killProcessesByBundleName(String bundleName, AsyncCallback_Void callback_); - [Deprecated] - static async void clearUpApplicationData(String bundleName); - [Deprecated] - static undefined clearUpApplicationData(String bundleName, AsyncCallback_Void callback_); - [Deprecated] - static async boolean isRamConstrainedDevice(); - [Deprecated] - static void isRamConstrainedDevice(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async number getAppMemorySize(); - [Deprecated] - static void getAppMemorySize(AsyncCallback_Number_Void callback_); - - }; - + [Deprecated] + void getAppMemorySize(AsyncCallback_Number_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.application.formBindingData.idl b/idl/@ohos.application.formBindingData.idl index 453375d..e5878dd 100644 --- a/idl/@ohos.application.formBindingData.idl +++ b/idl/@ohos.application.formBindingData.idl @@ -1,19 +1,11 @@ -package ohos.application; +package ohos.application.formBindingData; +[DefaultExport] namespace formBindingData { - + [Deprecated] + FormBindingData createFormBindingData(optional (Object or String) obj); [Entity=Interface, Deprecated] interface FormBindingData { - [Deprecated] attribute Object data; - }; - [GlobalScope] - interface GlobalScope_formBindingData_ohos_application_formBindingData { - - [Deprecated] - static FormBindingData createFormBindingData(optional (Object or String) obj); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.application.formError.idl b/idl/@ohos.application.formError.idl index 04c05e1..06ffaf6 100644 --- a/idl/@ohos.application.formError.idl +++ b/idl/@ohos.application.formError.idl @@ -1,8 +1,7 @@ -package ohos.application; +package ohos.application.formError; +[DefaultExport] namespace formError { - dictionary FormError { - number ERR_COMMON = 1; number ERR_PERMISSION_DENY = 2; number ERR_GET_INFO_FAILED = 4; @@ -26,7 +25,5 @@ namespace formError { number ERR_FORM_DUPLICATE_ADDED = 31; number ERR_IN_RECOVERY = 36; number ERR_DISTRIBUTED_SCHEDULE_FAILED = 37; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.application.formHost.idl b/idl/@ohos.application.formHost.idl index f8579ba..283415f 100644 --- a/idl/@ohos.application.formHost.idl +++ b/idl/@ohos.application.formHost.idl @@ -1,92 +1,86 @@ -package ohos.application; +package ohos.application.formHost; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import ohos.app.form.formInfo as formInfo; +import ohos.app.ability.Want.default as Want; +import ohos.app.form.formInfo.default as formInfo; +[DefaultExport] namespace formHost { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void deleteForm(String formId, AsyncCallback_Void callback_); + [Deprecated] + async void deleteForm(String formId); + [Deprecated] + void releaseForm(String formId, AsyncCallback_Void callback_); + [Deprecated] + void releaseForm(String formId, boolean isReleaseCache, AsyncCallback_Void callback_); + [Deprecated] + async void releaseForm(String formId, optional boolean isReleaseCache); + [Deprecated] + void requestForm(String formId, AsyncCallback_Void callback_); + [Deprecated] + async void requestForm(String formId); + [Deprecated] + void castTempForm(String formId, AsyncCallback_Void callback_); + [Deprecated] + async void castTempForm(String formId); + [Deprecated] + void notifyVisibleForms(sequence formIds, AsyncCallback_Void callback_); + [Deprecated] + async void notifyVisibleForms(sequence formIds); + [Deprecated] + void notifyInvisibleForms(sequence formIds, AsyncCallback_Void callback_); + [Deprecated] + async void notifyInvisibleForms(sequence formIds); + [Deprecated] + void enableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); + [Deprecated] + async void enableFormsUpdate(sequence formIds); + [Deprecated] + void disableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); + [Deprecated] + async void disableFormsUpdate(sequence formIds); + [Deprecated] + void isSystemReady(AsyncCallback_Void callback_); + [Deprecated] + async void isSystemReady(); [Async, Synthetic] - callback AsyncCallback_Array_formInfo_FormInfo_Void = void (sequence result); + callback AsyncCallback_Array_FormInfo_FormInfo_Void = void (sequence result); + [Deprecated] + void getAllFormsInfo(AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Deprecated] + async sequence getAllFormsInfo(); + [Deprecated] + void getFormsInfo(String bundleName, AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Deprecated] + void getFormsInfo(String bundleName, String moduleName, AsyncCallback_Array_FormInfo_FormInfo_Void callback_); + [Deprecated] + async sequence getFormsInfo(String bundleName, optional String moduleName); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void deleteInvalidForms(sequence formIds, AsyncCallback_Number_Void callback_); + [Deprecated] + async number deleteInvalidForms(sequence formIds); [Async, Synthetic] - callback AsyncCallback_formInfo_FormStateInfo_Void = void (formInfo.FormStateInfo result); + callback AsyncCallback_FormInfo_FormStateInfo_Void = void (formInfo.FormStateInfo result); + [Deprecated] + void acquireFormState(Want want, AsyncCallback_FormInfo_FormStateInfo_Void callback_); + [Deprecated] + async formInfo.FormStateInfo acquireFormState(Want want); [Synthetic] callback Callback_String_Void = void (String parameter); - [GlobalScope] - interface GlobalScope_formHost_ohos_application_formHost { - - [Deprecated] - static void deleteForm(String formId, AsyncCallback_Void callback_); - [Deprecated] - static async void deleteForm(String formId); - [Deprecated] - static void releaseForm(String formId, AsyncCallback_Void callback_); - [Deprecated] - static void releaseForm(String formId, boolean isReleaseCache, AsyncCallback_Void callback_); - [Deprecated] - static async void releaseForm(String formId, optional boolean isReleaseCache); - [Deprecated] - static void requestForm(String formId, AsyncCallback_Void callback_); - [Deprecated] - static async void requestForm(String formId); - [Deprecated] - static void castTempForm(String formId, AsyncCallback_Void callback_); - [Deprecated] - static async void castTempForm(String formId); - [Deprecated] - static void notifyVisibleForms(sequence formIds, AsyncCallback_Void callback_); - [Deprecated] - static async void notifyVisibleForms(sequence formIds); - [Deprecated] - static void notifyInvisibleForms(sequence formIds, AsyncCallback_Void callback_); - [Deprecated] - static async void notifyInvisibleForms(sequence formIds); - [Deprecated] - static void enableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); - [Deprecated] - static async void enableFormsUpdate(sequence formIds); - [Deprecated] - static void disableFormsUpdate(sequence formIds, AsyncCallback_Void callback_); - [Deprecated] - static async void disableFormsUpdate(sequence formIds); - [Deprecated] - static void isSystemReady(AsyncCallback_Void callback_); - [Deprecated] - static async void isSystemReady(); - [Deprecated] - static void getAllFormsInfo(AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Deprecated] - static async sequence getAllFormsInfo(); - [Deprecated] - static void getFormsInfo(String bundleName, AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Deprecated] - static void getFormsInfo(String bundleName, String moduleName, AsyncCallback_Array_formInfo_FormInfo_Void callback_); - [Deprecated] - static async sequence getFormsInfo(String bundleName, optional String moduleName); - [Deprecated] - static void deleteInvalidForms(sequence formIds, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number deleteInvalidForms(sequence formIds); - [Deprecated] - static void acquireFormState(Want want, AsyncCallback_formInfo_FormStateInfo_Void callback_); - [Deprecated] - static async formInfo.FormStateInfo acquireFormState(Want want); - [Deprecated, DtsName="on", DtsTag="'formUninstall'"] - static void onFormUninstall(Callback_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'formUninstall'"] - static void offFormUninstall(optional Callback_String_Void callback_); - [Deprecated] - static void notifyFormsVisible(sequence formIds, boolean isVisible, AsyncCallback_Void callback_); - [Deprecated] - static async void notifyFormsVisible(sequence formIds, boolean isVisible); - [Deprecated] - static void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate, AsyncCallback_Void callback_); - [Deprecated] - static async void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate); - - }; - + [Deprecated, DtsName="on", DtsTag="'formUninstall'"] + void onFormUninstall(Callback_String_Void callback_); + [Deprecated, DtsName="off", DtsTag="'formUninstall'"] + void offFormUninstall(optional Callback_String_Void callback_); + [Deprecated] + void notifyFormsVisible(sequence formIds, boolean isVisible, AsyncCallback_Void callback_); + [Deprecated] + async void notifyFormsVisible(sequence formIds, boolean isVisible); + [Deprecated] + void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate, AsyncCallback_Void callback_); + [Deprecated] + async void notifyFormsEnableUpdate(sequence formIds, boolean isEnableUpdate); }; \ No newline at end of file diff --git a/idl/@ohos.application.formInfo.idl b/idl/@ohos.application.formInfo.idl index 18c4411..9083b34 100644 --- a/idl/@ohos.application.formInfo.idl +++ b/idl/@ohos.application.formInfo.idl @@ -1,23 +1,18 @@ -package ohos.application; -import ohos.app.ability.Want as Want; +package ohos.application.formInfo; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace formInfo { - [Entity=NamedTuple, Synthetic] interface Tuple_String { - attribute String value; - }; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] Tuple_String indexSignature(String key); - }; [Entity=Interface, Deprecated] interface FormInfo { - [Deprecated] attribute String bundleName; [Deprecated] @@ -54,49 +49,39 @@ namespace formInfo { attribute sequence supportDimensions; [Deprecated] attribute Literal_Empty customizeData; - }; [Deprecated] dictionary FormType { - [Deprecated] number JS = 1; - }; [Deprecated] dictionary ColorMode { - [Deprecated] number MODE_AUTO = -1; [Deprecated] number MODE_DARK = 0; [Deprecated] number MODE_LIGHT = 1; - }; [Entity=Interface, Deprecated] interface FormStateInfo { - [Deprecated] attribute FormState formState; [Deprecated] attribute Want want; - }; [Deprecated] dictionary FormState { - [Deprecated] number UNKNOWN = -1; [Deprecated] number DEFAULT = 0; [Deprecated] number READY = 1; - }; [Deprecated] dictionary FormParam { - [Deprecated] String IDENTITY_KEY = "ohos.extra.param.key.form_identity"; [Deprecated] @@ -111,7 +96,5 @@ namespace formInfo { String HEIGHT_KEY = "ohos.extra.param.key.form_height"; [Deprecated] String TEMPORARY_KEY = "ohos.extra.param.key.form_temporary"; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.application.formProvider.idl b/idl/@ohos.application.formProvider.idl index bb37f3d..46e0c3c 100644 --- a/idl/@ohos.application.formProvider.idl +++ b/idl/@ohos.application.formProvider.idl @@ -1,24 +1,18 @@ -package ohos.application; +package ohos.application.formProvider; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.application.formBindingData as formBindingData; -import ohos.app.form.formInfo as formInfo; -import ohos.app.ability.Want as Want; +import ohos.application.formBindingData.default as formBindingData; +import ohos.app.form.formInfo.default as formInfo; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace formProvider { - [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_formProvider_ohos_application_formProvider { - - [Deprecated] - static void setFormNextRefreshTime(String formId, number minute, AsyncCallback_Void callback_); - [Deprecated] - static async void setFormNextRefreshTime(String formId, number minute); - [Deprecated] - static void updateForm(String formId, formBindingData.FormBindingData formBindingData, AsyncCallback_Void callback_); - [Deprecated] - static async void updateForm(String formId, formBindingData.FormBindingData formBindingData); - - }; - + [Deprecated] + void setFormNextRefreshTime(String formId, number minute, AsyncCallback_Void callback_); + [Deprecated] + async void setFormNextRefreshTime(String formId, number minute); + [Deprecated] + void updateForm(String formId, formBindingData.FormBindingData formBindingData, AsyncCallback_Void callback_); + [Deprecated] + async void updateForm(String formId, formBindingData.FormBindingData formBindingData); }; \ No newline at end of file diff --git a/idl/@ohos.application.missionManager.idl b/idl/@ohos.application.missionManager.idl index 5e89271..0e92702 100644 --- a/idl/@ohos.application.missionManager.idl +++ b/idl/@ohos.application.missionManager.idl @@ -1,63 +1,57 @@ -package ohos.application; +package ohos.application.missionManager; import ohos.base.AsyncCallback as AsyncCallback; -import application.MissionInfo as MissionInfo; -import application.MissionListener as MissionListener; -import application.MissionSnapshot as MissionSnapshot; -import ohos.app.ability.StartOptions as StartOptions; +import application.MissionInfo.MissionInfo as MissionInfo; +import application.MissionListener.MissionListener as MissionListener; +import application.MissionSnapshot.MissionSnapshot as MissionSnapshot; +import ohos.app.ability.StartOptions.default as StartOptions; +[DefaultExport] namespace missionManager { - + [Deprecated] + number registerMissionListener(MissionListener listener); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void unregisterMissionListener(number listenerId, AsyncCallback_Void callback_); + [Deprecated] + async void unregisterMissionListener(number listenerId); [Async, Synthetic] callback AsyncCallback_MissionInfo_Void = void (MissionInfo result); + [Deprecated] + void getMissionInfo(String deviceId, number missionId, AsyncCallback_MissionInfo_Void callback_); + [Deprecated] + async MissionInfo getMissionInfo(String deviceId, number missionId); [Async, Synthetic] callback AsyncCallback_Array_MissionInfo_Void = void (sequence result); + [Deprecated] + void getMissionInfos(String deviceId, number numMax, AsyncCallback_Array_MissionInfo_Void callback_); + [Deprecated] + async sequence getMissionInfos(String deviceId, number numMax); [Async, Synthetic] callback AsyncCallback_MissionSnapshot_Void = void (MissionSnapshot result); - [GlobalScope] - interface GlobalScope_missionManager_ohos_application_missionManager { - - [Deprecated] - static number registerMissionListener(MissionListener listener); - [Deprecated] - static void unregisterMissionListener(number listenerId, AsyncCallback_Void callback_); - [Deprecated] - static async void unregisterMissionListener(number listenerId); - [Deprecated] - static void getMissionInfo(String deviceId, number missionId, AsyncCallback_MissionInfo_Void callback_); - [Deprecated] - static async MissionInfo getMissionInfo(String deviceId, number missionId); - [Deprecated] - static void getMissionInfos(String deviceId, number numMax, AsyncCallback_Array_MissionInfo_Void callback_); - [Deprecated] - static async sequence getMissionInfos(String deviceId, number numMax); - [Deprecated] - static void getMissionSnapShot(String deviceId, number missionId, AsyncCallback_MissionSnapshot_Void callback_); - [Deprecated] - static async MissionSnapshot getMissionSnapShot(String deviceId, number missionId); - [Deprecated] - static void lockMission(number missionId, AsyncCallback_Void callback_); - [Deprecated] - static async void lockMission(number missionId); - [Deprecated] - static void unlockMission(number missionId, AsyncCallback_Void callback_); - [Deprecated] - static async void unlockMission(number missionId); - [Deprecated] - static void clearMission(number missionId, AsyncCallback_Void callback_); - [Deprecated] - static async void clearMission(number missionId); - [Deprecated] - static void clearAllMissions(AsyncCallback_Void callback_); - [Deprecated] - static async void clearAllMissions(); - [Deprecated] - static void moveMissionToFront(number missionId, AsyncCallback_Void callback_); - [Deprecated] - static void moveMissionToFront(number missionId, StartOptions options, AsyncCallback_Void callback_); - [Deprecated] - static async void moveMissionToFront(number missionId, optional StartOptions options); - - }; - + [Deprecated] + void getMissionSnapShot(String deviceId, number missionId, AsyncCallback_MissionSnapshot_Void callback_); + [Deprecated] + async MissionSnapshot getMissionSnapShot(String deviceId, number missionId); + [Deprecated] + void lockMission(number missionId, AsyncCallback_Void callback_); + [Deprecated] + async void lockMission(number missionId); + [Deprecated] + void unlockMission(number missionId, AsyncCallback_Void callback_); + [Deprecated] + async void unlockMission(number missionId); + [Deprecated] + void clearMission(number missionId, AsyncCallback_Void callback_); + [Deprecated] + async void clearMission(number missionId); + [Deprecated] + void clearAllMissions(AsyncCallback_Void callback_); + [Deprecated] + async void clearAllMissions(); + [Deprecated] + void moveMissionToFront(number missionId, AsyncCallback_Void callback_); + [Deprecated] + void moveMissionToFront(number missionId, StartOptions options, AsyncCallback_Void callback_); + [Deprecated] + async void moveMissionToFront(number missionId, optional StartOptions options); }; \ No newline at end of file diff --git a/idl/@ohos.application.testRunner.idl b/idl/@ohos.application.testRunner.idl index e5b911e..c811469 100644 --- a/idl/@ohos.application.testRunner.idl +++ b/idl/@ohos.application.testRunner.idl @@ -1,8 +1,6 @@ package ohos.application.testRunner; -[Entity=Interface] +[Entity=Interface, DefaultExport] interface TestRunner { - void onPrepare(); void onRun(); - }; \ No newline at end of file diff --git a/idl/@ohos.application.uriPermissionManager.idl b/idl/@ohos.application.uriPermissionManager.idl index ac4e32f..e18bea4 100644 --- a/idl/@ohos.application.uriPermissionManager.idl +++ b/idl/@ohos.application.uriPermissionManager.idl @@ -1,26 +1,24 @@ -package ohos.application; +package ohos.application.uriPermissionManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.wantConstant as wantConstant; +import ohos.app.ability.wantConstant.default as wantConstant; +[DefaultExport] namespace uriPermissionManager { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); - [GlobalScope] - interface GlobalScope_uriPermissionManager_ohos_application_uriPermissionManager { - - [Throws] - static void grantUriPermission(String uri, wantConstant.Flags flag, String targetBundleName, AsyncCallback_Number_Void callback_); - [Throws] - static async number grantUriPermission(String uri, wantConstant.Flags flag, String targetBundleName); - [Throws] - static async void grantUriPermission(String uri, wantConstant.Flags flag, String targetBundleName, number appCloneIndex); - [Throws] - static void revokeUriPermission(String uri, String targetBundleName, AsyncCallback_Number_Void callback_); - [Throws] - static async number revokeUriPermission(String uri, String targetBundleName); - [Throws] - static async void revokeUriPermission(String uri, String targetBundleName, number appCloneIndex); - - }; - + [Throws] + void grantUriPermission(String uri, wantConstant.Flags flag, String targetBundleName, AsyncCallback_Number_Void callback_); + [Throws] + async number grantUriPermission(String uri, wantConstant.Flags flag, String targetBundleName); + [Throws] + async void grantUriPermission(String uri, wantConstant.Flags flag, String targetBundleName, number appCloneIndex); + [Throws] + void revokeUriPermission(String uri, String targetBundleName, AsyncCallback_Number_Void callback_); + [Throws] + async number revokeUriPermission(String uri, String targetBundleName); + [Throws] + async void revokeUriPermission(String uri, String targetBundleName, number appCloneIndex); + [Throws] + async void grantUriPermissionByKey(String key, wantConstant.Flags flag, number targetTokenId); + [Throws] + async void grantUriPermissionByKeyAsCaller(String key, wantConstant.Flags flag, number callerTokenId, number targetTokenId); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.ArcAlphabetIndexer.idl b/idl/@ohos.arkui.ArcAlphabetIndexer.idl new file mode 100644 index 0000000..9276e2d --- /dev/null +++ b/idl/@ohos.arkui.ArcAlphabetIndexer.idl @@ -0,0 +1,29 @@ +package ohos.arkui.ArcAlphabetIndexer; +[Entity=Interface] +interface ArcAlphabetIndexerInitInfo { + attribute sequence arrayValue; + attribute number selected; +}; +callback OnSelectCallback = void (number index); +[Entity=Interface] +interface ArcAlphabetIndexerInterface { + [CallSignature] + ArcAlphabetIndexerAttribute invoke(ArcAlphabetIndexerInitInfo info); +}; +[Entity=Class] +interface ArcAlphabetIndexerAttribute: [Extends, TypeArguments="ArcAlphabetIndexerAttribute"] CommonMethod { + ArcAlphabetIndexerAttribute color((ColorMetrics or undefined) color); + ArcAlphabetIndexerAttribute selectedColor((ColorMetrics or undefined) color); + ArcAlphabetIndexerAttribute popupColor((ColorMetrics or undefined) color); + ArcAlphabetIndexerAttribute selectedBackgroundColor((ColorMetrics or undefined) color); + ArcAlphabetIndexerAttribute popupBackground((ColorMetrics or undefined) color); + ArcAlphabetIndexerAttribute usePopup((boolean or undefined) enabled); + ArcAlphabetIndexerAttribute selectedFont((Font or undefined) font); + ArcAlphabetIndexerAttribute popupFont((Font or undefined) font); + ArcAlphabetIndexerAttribute font((Font or undefined) font); + ArcAlphabetIndexerAttribute itemSize((LengthMetrics or undefined) size); + ArcAlphabetIndexerAttribute selected((number or undefined) index); + ArcAlphabetIndexerAttribute autoCollapse((boolean or undefined) enable); + ArcAlphabetIndexerAttribute onSelect((OnSelectCallback or undefined) handler); + ArcAlphabetIndexerAttribute popupBackgroundBlurStyle((BlurStyle or undefined) style); +}; \ No newline at end of file diff --git a/idl/@ohos.arkui.ArcList.idl b/idl/@ohos.arkui.ArcList.idl new file mode 100644 index 0000000..e9904bb --- /dev/null +++ b/idl/@ohos.arkui.ArcList.idl @@ -0,0 +1,48 @@ +package ohos.arkui.ArcList; +callback ArcScrollIndexHandler = void (number start, number end, number center); +[Entity=Interface] +interface ArkListOptions { + [Optional] + attribute number initialIndex; + [Optional] + attribute Scroller scroller; + [Optional] + attribute ComponentContent header; +}; +[Entity=Interface] +interface ArcListInterface { + [CallSignature] + ArcListAttribute invoke(optional ArkListOptions options); +}; +[Entity=Interface] +interface ArcListItemInterface { + [CallSignature] + ArcListItemAttribute invoke(); +}; +[Entity=Class] +interface ArcListAttribute: [Extends, TypeArguments="ArcListAttribute"] CommonMethod { + ArcListAttribute digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); + ArcListAttribute space((LengthMetrics or undefined) space); + ArcListAttribute scrollBar((BarState or undefined) status); + ArcListAttribute scrollBarColor((ColorMetrics or undefined) color); + ArcListAttribute scrollBarWidth((LengthMetrics or undefined) width); + ArcListAttribute cachedCount((number or undefined) count); + ArcListAttribute chainAnimation((boolean or undefined) enable); + ArcListAttribute childrenMainSize((ChildrenMainSize or undefined) size); + ArcListAttribute enableScrollInteraction((boolean or undefined) enable); + ArcListAttribute fadingEdge((boolean or undefined) enable); + ArcListAttribute friction((number or undefined) friction); + ArcListAttribute flingSpeedLimit((number or undefined) speed); + ArcListAttribute onScrollIndex((ArcScrollIndexHandler or undefined) handler); + ArcListAttribute onReachStart((VoidCallback or undefined) handler); + ArcListAttribute onReachEnd((VoidCallback or undefined) handler); + ArcListAttribute onScrollStart((VoidCallback or undefined) handler); + ArcListAttribute onScrollStop((VoidCallback or undefined) handler); + ArcListAttribute onWillScroll((OnWillScrollCallback or undefined) handler); + ArcListAttribute onDidScroll((OnScrollCallback or undefined) handler); +}; +[Entity=Class] +interface ArcListItemAttribute: [Extends, TypeArguments="ArcListItemAttribute"] CommonMethod { + ArcListItemAttribute autoScale((boolean or undefined) enable); + ArcListItemAttribute swipeAction((SwipeActionOptions or undefined) options); +}; \ No newline at end of file diff --git a/idl/@ohos.arkui.ArcScrollBar.idl b/idl/@ohos.arkui.ArcScrollBar.idl new file mode 100644 index 0000000..e92fc21 --- /dev/null +++ b/idl/@ohos.arkui.ArcScrollBar.idl @@ -0,0 +1,15 @@ +package ohos.arkui.ArcScrollBar; +[Entity=Interface] +interface ArcScrollBarOptions { + attribute Scroller scroller; + [Optional] + attribute BarState state; +}; +[Entity=Interface] +interface ArcScrollBarInterface { + [CallSignature] + ArcScrollBarAttribute invoke(ArcScrollBarOptions options); +}; +[Entity=Class] +interface ArcScrollBarAttribute: [Extends, TypeArguments="ArcScrollBarAttribute"] CommonMethod { +}; \ No newline at end of file diff --git a/idl/@ohos.arkui.ArcSwiper.idl b/idl/@ohos.arkui.ArcSwiper.idl new file mode 100644 index 0000000..3c7bddf --- /dev/null +++ b/idl/@ohos.arkui.ArcSwiper.idl @@ -0,0 +1,64 @@ +package ohos.arkui.ArcSwiper; +callback FinishAnimationHandler = void (); +[Entity=Class] +interface ArcSwiperController { + constructor(); + void showNext(); + void showPrevious(); + void finishAnimation(optional FinishAnimationHandler handler); +}; +dictionary ArcDirection { + number THREE_CLOCK_DIRECTION = 0; + number SIX_CLOCK_DIRECTION = 1; + number NINE_CLOCK_DIRECTION = 2; +}; +[Entity=Class] +interface ArcDotIndicator { + constructor(); + ArcDotIndicator arcDirection((ArcDirection or undefined) direction); + ArcDotIndicator itemColor((ResourceColor or undefined) color); + ArcDotIndicator selectedItemColor((ResourceColor or undefined) color); + ArcDotIndicator backgroundColor((ResourceColor or undefined) color); + ArcDotIndicator maskColor((LinearGradient or undefined) color); +}; +[Entity=Interface] +interface ArcSwiperInterface { + [CallSignature] + ArcSwiperAttribute invoke(optional ArcSwiperController controller); +}; +callback IndexChangedHandler = void (number index); +callback AnimationStartHandler = void (number index, number targetIndex, SwiperAnimationEvent event); +callback AnimationEndHandler = void (number index, SwiperAnimationEvent event); +callback GestureSwipeHandler = void (number index, SwiperAnimationEvent event); +[Synthetic] +callback Callback_SwiperContentTransitionProxy_Void = void (SwiperContentTransitionProxy parameter); +[Entity=Interface] +interface SwiperContentAnimatedTransition { + [Optional] + attribute number timeout; + attribute Callback_SwiperContentTransitionProxy_Void transition; +}; +[Entity=Interface] +interface SwiperContentTransitionProxy { + attribute number selectedIndex; + attribute number index; + attribute number position; + attribute number mainAxisLength; + void finishTransition(); +}; +[Entity=Class] +interface ArcSwiperAttribute: [Extends, TypeArguments="ArcSwiperAttribute"] CommonMethod { + ArcSwiperAttribute index((number or undefined) index); + ArcSwiperAttribute indicator(((ArcDotIndicator or boolean) or undefined) style); + ArcSwiperAttribute duration((number or undefined) duration); + ArcSwiperAttribute vertical((boolean or undefined) isVertical); + ArcSwiperAttribute disableSwipe((boolean or undefined) disabled); + ArcSwiperAttribute digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); + ArcSwiperAttribute onChange((IndexChangedHandler or undefined) handler); + ArcSwiperAttribute onAnimationStart((AnimationStartHandler or undefined) handler); + ArcSwiperAttribute onAnimationEnd((AnimationEndHandler or undefined) handler); + ArcSwiperAttribute onGestureSwipe((GestureSwipeHandler or undefined) handler); + ArcSwiperAttribute effectMode((EdgeEffect or undefined) edgeEffect); + ArcSwiperAttribute customContentTransition((SwiperContentAnimatedTransition or undefined) transition); + ArcSwiperAttribute disableTransitionAnimation((boolean or undefined) disabled); +}; \ No newline at end of file diff --git a/idl/@ohos.arkui.Prefetcher.idl b/idl/@ohos.arkui.Prefetcher.idl index fd96824..7990613 100644 --- a/idl/@ohos.arkui.Prefetcher.idl +++ b/idl/@ohos.arkui.Prefetcher.idl @@ -1,24 +1,18 @@ package ohos.arkui.Prefetcher; [Entity=Interface] interface IDataSourcePrefetching: IDataSource { - async void prefetch(number index); [Optional] async void cancel(number index); - }; [Entity=Interface] interface IPrefetcher { - void setDataSource(IDataSourcePrefetching dataSource); void visibleAreaChanged(number minVisible, number maxVisible); - }; [Entity=Class] -interface BasicPrefetcher { - +interface BasicPrefetcher: IPrefetcher { constructor(optional IDataSourcePrefetching dataSource); void setDataSource(IDataSourcePrefetching dataSource); void visibleAreaChanged(number minVisible, number maxVisible); - }; \ No newline at end of file diff --git a/idl/@ohos.arkui.StateManagement.idl b/idl/@ohos.arkui.StateManagement.idl index 71bbeb3..013929a 100644 --- a/idl/@ohos.arkui.StateManagement.idl +++ b/idl/@ohos.arkui.StateManagement.idl @@ -1,15 +1,13 @@ package ohos.arkui.StateManagement; +import ohos.app.ability.contextConstant.default as contextConstant; [TypeParameters="T"] callback StorageDefaultCreator = T (); [Entity=Interface, TypeParameters="T"] interface TypeConstructorWithArgs { - constructor(any... args); - }; -[Entity=Class, TypeParameters="T extends object"] +[Entity=Class, TypeParameters="T"] interface ConnectOptions { - attribute [TypeArguments="T"] TypeConstructorWithArgs type; [Optional] attribute String key; @@ -17,43 +15,65 @@ interface ConnectOptions { attribute [TypeArguments="T"] StorageDefaultCreator defaultCreator; [Optional] attribute contextConstant.AreaMode areaMode; - }; [Entity=Class] interface AppStorageV2 { - - [TypeParameters="T extends object"] + [TypeParameters="T"] static (T or undefined) connect([TypeArguments="T"] TypeConstructorWithArgs type, optional (String or [TypeArguments="T"] StorageDefaultCreator) keyOrDefaultCreator, optional [TypeArguments="T"] StorageDefaultCreator defaultCreator); [TypeParameters="T"] static void remove((String or [TypeArguments="T"] TypeConstructorWithArgs) keyOrType); static sequence keys(); - }; callback PersistenceErrorCallback = void (String key, String reason, String message); [Entity=Class] -interface PersistenceV2: AppStorageV2 { - - [TypeParameters="T extends object"] +interface PersistenceV2: [Extends] AppStorageV2 { + [TypeParameters="T"] static (T or undefined) globalConnect([TypeArguments="T"] ConnectOptions type); [TypeParameters="T"] static void save((String or [TypeArguments="T"] TypeConstructorWithArgs) keyOrType); static void notifyOnError((PersistenceErrorCallback or undefined) callback_); - }; [Entity=Interface, TypeParameters="T"] interface TypeConstructor { - constructor(); - }; [TypeParameters="T"] callback TypeDecorator = PropertyDecorator ([TypeArguments="T"] TypeConstructor type); [Entity=Class] interface UIUtils { - - [TypeParameters="T extends object"] + [TypeParameters="T"] static T getTarget(T source); - [TypeParameters="T extends object"] + [TypeParameters="T"] static T makeObserved(T source); - + [TypeParameters="T"] + static T makeV1Observed(T source); + [TypeParameters="T"] + static T enableV2Compatibility(T source); + [Throws] + static void addMonitor(Object target, (String or sequence) path, MonitorCallback monitorCallback, optional MonitorOptions options); + [Throws] + static void clearMonitor(Object target, (String or sequence) path, optional MonitorCallback monitorCallback); + [TypeParameters="T"] + static ([TypeArguments="T"] Binding) makeBinding([TypeArguments="T"] GetterCallback getter); + [TypeParameters="T"] + static ([TypeArguments="T"] MutableBinding) makeBinding([TypeArguments="T"] GetterCallback getter, [TypeArguments="T"] SetterCallback setter); +}; +callback MonitorCallback = void (IMonitor monitorValue); +[Entity=Interface] +interface MonitorOptions { + [Optional] + attribute boolean isSynchronous; +}; +[TypeParameters="T"] +callback GetterCallback = T (); +[TypeParameters="T"] +callback SetterCallback = void (T newValue); +[Entity=Class, TypeParameters="T"] +interface Binding { + [Accessor=Getter] + readonly attribute T value; +}; +[Entity=Class, TypeParameters="T"] +interface MutableBinding { + attribute T value; }; \ No newline at end of file diff --git a/idl/@ohos.arkui.UIContext.idl b/idl/@ohos.arkui.UIContext.idl index d420a34..dffcff5 100644 --- a/idl/@ohos.arkui.UIContext.idl +++ b/idl/@ohos.arkui.UIContext.idl @@ -1,50 +1,85 @@ -package ohos.arkui; -import ohos.font as font; -import ohos.mediaQuery as mediaQuery; -import ohos.arkui.inspector as inspector; -import ohos.arkui.observer.observer as observer; -import ohos.LevelOrder as LevelOrder; -import ohos.router as router; -import ohos.arkui.componentUtils as componentUtils; -import ohos.arkui.node.ComponentContent as ComponentContent; -import ohos.arkui.node.FrameNode as FrameNode; -import ohos.arkui.node.Frame as Frame; +package ohos.arkui.UIContext; +import ohos.font.default as font; +import ohos.mediaquery.default as mediaQuery; +import ohos.arkui.inspector.default as inspector; +import ohos.promptAction.default as promptAction; +import ohos.promptAction.LevelOrder as LevelOrder; +import ohos.router.default as router; +import ohos.arkui.componentUtils.default as componentUtils; +import arkui.ComponentContent.ComponentContent as ComponentContent; +import arkui.FrameNode.FrameNode as FrameNode; +import arkui.Graphics.Frame as Frame; import ohos.animator.AnimatorOptions as AnimatorOptions; import ohos.animator.AnimatorResult as AnimatorResult; +import ohos.arkui.observer.default as observer; import ohos.animator.SimpleAnimatorOptions as SimpleAnimatorOptions; import ohos.base.Callback as Callback; import ohos.base.AsyncCallback as AsyncCallback; import ohos.measure.MeasureOptions as MeasureOptions; -import ohos.arkui.componentSnapshot as componentSnapshot; -import ohos.arkui.dragController as dragController; -import ohos.multimedia.image as image; -import ohos.app.ability.common as common; -import ohos.multimodalInput.pointer as pointer; +import ohos.arkui.componentSnapshot.default as componentSnapshot; +import ohos.arkui.dragController.default as dragController; +import ohos.multimedia.image.default as image; +import ohos.app.ability.common.default as common; +import ohos.multimodalInput.pointer.default as pointer; +import arkui.ComponentContent.ComponentContent as ComponentContent; +import arkui.FrameNode.FrameNode as FrameNode; +import arkui.Graphics.Frame as Frame; +import ohos.arkui.observer.default as observer; +import ohos.animator.AnimatorOptions as AnimatorOptions; +import ohos.animator.AnimatorResult as AnimatorResult; +import arkui.component.common.ClickEvent as ClickEvent; +import arkui.component.common.ExpectedFrameRateRange as ExpectedFrameRateRange; +import arkui.component.common.DragItemInfo as DragItemInfo; +import arkui.component.common.AnimateParam as AnimateParam; +import arkui.component.common.KeyframeAnimateParam as KeyframeAnimateParam; +import arkui.component.common.KeyframeState as KeyframeState; +import arkui.component.common.SheetOptions as SheetOptions; +import arkui.component.common.PopupCommonOptions as PopupCommonOptions; +import arkui.component.common.MenuOptions as MenuOptions; +import arkui.component.common.KeyEvent as KeyEvent; +import arkui.component.common.Optional as Optional; +import arkui.component.builder.CustomBuilder as CustomBuilder; +import arkui.component.gesture.GestureEvent as GestureEvent; +import arkui.component.gesture.GestureRecognizer as GestureRecognizer; +import arkui.component.units.ResourceStr as ResourceStr; +import arkui.component.units.SizeOptions as SizeOptions; +import arkui.component.units.VoidCallback as VoidCallback; +import arkui.component.enums.Nullable as Nullable; +import arkui.component.enums.Color as Color; +import arkui.component.enums.FontStyle as FontStyle; +import arkui.component.enums.WidthBreakpoint as WidthBreakpoint; +import arkui.component.enums.HeightBreakpoint as HeightBreakpoint; +import arkui.component.enums.PixelRoundMode as PixelRoundMode; +import TimePickerDialogOptions as TimePickerDialogOptions; +import AlertDialogParamWithConfirm as AlertDialogParamWithConfirm; +import AlertDialogParamWithButtons as AlertDialogParamWithButtons; +import AlertDialogParamWithOptions as AlertDialogParamWithOptions; +import ActionSheetOptions as ActionSheetOptions; +import TextPickerDialogOptions as TextPickerDialogOptions; +import arkui.stateManagement.storages.localStorage.LocalStorage as LocalStorage; +import DatePickerDialogOptions as DatePickerDialogOptions; +import TabsController as TabsController; +import arkui.component.scroll.Scroller as Scroller; +import KeyProcessingMode as KeyProcessingMode; +import arkui.component.textCommon.TextMenuOptions as TextMenuOptions; [Entity=Class] interface Font { - void registerFont(font.FontOptions options); sequence getSystemFontList(); font.FontInfo getFontByName(String fontName); - }; [Entity=Class] interface MediaQuery { - mediaQuery.MediaQueryListener matchMediaSync(String condition); - }; [Entity=Class] interface UIInspector { - inspector.ComponentObserver createComponentObserver(String id); - }; [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Class] interface Router { - [Throws] void pushUrl(router.RouterOptions options, AsyncCallback_Void callback_); [Throws] @@ -88,24 +123,20 @@ interface Router { void replaceNamedRoute(router.NamedRouterOptions options, router.RouterMode mode, AsyncCallback_Void callback_); [Throws] async void replaceNamedRoute(router.NamedRouterOptions options, router.RouterMode mode); - }; callback CustomBuilderWithId = void (number id); [Entity=Interface] interface TargetInfo { - attribute (String or number) id; [Optional] attribute number componentId; - }; [Async, Synthetic] -callback AsyncCallback_promptAction_ShowDialogSuccessResponse_Void = void (promptAction.ShowDialogSuccessResponse result); +callback AsyncCallback_PromptAction_ShowDialogSuccessResponse_Void = void (promptAction.ShowDialogSuccessResponse result); [Async, Synthetic] -callback AsyncCallback_promptAction_ActionMenuSuccessResponse_Void = void (promptAction.ActionMenuSuccessResponse result); +callback AsyncCallback_PromptAction_ActionMenuSuccessResponse_Void = void (promptAction.ActionMenuSuccessResponse result); [Entity=Class] interface PromptAction { - [Throws] void showToast(promptAction.ShowToastOptions options); [Throws] @@ -113,162 +144,186 @@ interface PromptAction { [Throws] void closeToast(number toastId); [Throws] - void showDialog(promptAction.ShowDialogOptions options, AsyncCallback_promptAction_ShowDialogSuccessResponse_Void callback_); + void showDialog(promptAction.ShowDialogOptions options, AsyncCallback_PromptAction_ShowDialogSuccessResponse_Void callback_); [Throws] async promptAction.ShowDialogSuccessResponse showDialog(promptAction.ShowDialogOptions options); [Deprecated, Throws] void showActionMenu(promptAction.ActionMenuOptions options, promptAction.ActionMenuSuccessResponse callback_); [Throws] - void showActionMenu(promptAction.ActionMenuOptions options, AsyncCallback_promptAction_ActionMenuSuccessResponse_Void callback_); + void showActionMenu(promptAction.ActionMenuOptions options, AsyncCallback_PromptAction_ActionMenuSuccessResponse_Void callback_); [Throws] async promptAction.ActionMenuSuccessResponse showActionMenu(promptAction.ActionMenuOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void openCustomDialog([TypeArguments="T"] ComponentContent dialogContent, optional promptAction.BaseDialogOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws] + async number openCustomDialog(promptAction.CustomDialogOptions options); + [Throws, TypeParameters="T"] async void openCustomDialogWithController([TypeArguments="T"] ComponentContent dialogContent, promptAction.DialogController controller, optional promptAction.BaseDialogOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void updateCustomDialog([TypeArguments="T"] ComponentContent dialogContent, promptAction.BaseDialogOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void closeCustomDialog([TypeArguments="T"] ComponentContent dialogContent); [Throws] - async number openCustomDialog(promptAction.CustomDialogOptions options); + void closeCustomDialog(number dialogId); [Throws] async number presentCustomDialog((CustomBuilder or CustomBuilderWithId) builder, optional promptAction.DialogController controller, optional promptAction.DialogOptions options); - [Throws] - void closeCustomDialog(number dialogId); LevelOrder getTopOrder(); LevelOrder getBottomOrder(); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void openPopup([TypeArguments="T"] ComponentContent content, TargetInfo target, optional PopupCommonOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void updatePopup([TypeArguments="T"] ComponentContent content, PopupCommonOptions options, optional boolean partialUpdate); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void closePopup([TypeArguments="T"] ComponentContent content); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void openMenu([TypeArguments="T"] ComponentContent content, TargetInfo target, optional MenuOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void updateMenu([TypeArguments="T"] ComponentContent content, MenuOptions options, optional boolean partialUpdate); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void closeMenu([TypeArguments="T"] ComponentContent content); - }; callback ClickEventListenerCallback = void (ClickEvent event, optional FrameNode node); +callback PanListenerCallback = void (GestureEvent event, GestureRecognizer current, optional FrameNode node); callback GestureEventListenerCallback = void (GestureEvent event, optional FrameNode node); +typedef (String or number) NodeIdentity; +callback NodeRenderStateChangeCallback = void (NodeRenderState state, optional FrameNode node); +callback GestureListenerCallback = void (GestureTriggerInfo info); [Entity=Interface] interface PageInfo { - [Optional] attribute observer.RouterPageInfo routerPageInfo; [Optional] attribute observer.NavDestinationInfo navDestinationInfo; - }; [Entity=Interface] interface OverlayManagerOptions { - [Optional] attribute boolean renderRootOverlay; - + [Optional] + attribute boolean enableBackPressedEvent; }; [Entity=Literal, Synthetic] interface Literal_ResourceStr_navigationId { - attribute ResourceStr navigationId; - }; [Synthetic] -callback Callback_observer_NavDestinationInfo_Void = void (observer.NavDestinationInfo parameter); +callback Callback_Observer_NavDestinationInfo_Void = void (observer.NavDestinationInfo parameter); [Synthetic] -callback Callback_observer_ScrollEventInfo_Void = void (observer.ScrollEventInfo parameter); +callback Callback_Observer_ScrollEventInfo_Void = void (observer.ScrollEventInfo parameter); [Synthetic] -callback Callback_observer_RouterPageInfo_Void = void (observer.RouterPageInfo parameter); +callback Callback_Observer_RouterPageInfo_Void = void (observer.RouterPageInfo parameter); [Synthetic] -callback Callback_observer_DensityInfo_Void = void (observer.DensityInfo parameter); +callback Callback_Observer_DensityInfo_Void = void (observer.DensityInfo parameter); [Synthetic] callback Callback_Void = void (); [Synthetic] -callback Callback_observer_NavDestinationSwitchInfo_Void = void (observer.NavDestinationSwitchInfo parameter); +callback Callback_Observer_NavDestinationSwitchInfo_Void = void (observer.NavDestinationSwitchInfo parameter); [Synthetic] -callback Callback_observer_TabContentInfo_Void = void (observer.TabContentInfo parameter); +callback Callback_Observer_TabContentInfo_Void = void (observer.TabContentInfo parameter); [Entity=Class] interface UIObserver { - [DtsName="on", DtsTag="'navDestinationUpdate'"] - void onNavDestinationUpdate(Literal_ResourceStr_navigationId options, Callback_observer_NavDestinationInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationUpdate'"] - void offNavDestinationUpdate(Literal_ResourceStr_navigationId options, optional Callback_observer_NavDestinationInfo_Void callback_); + void onNavDestinationUpdate(Literal_ResourceStr_navigationId options, Callback_Observer_NavDestinationInfo_Void callback_); [DtsName="on", DtsTag="'navDestinationUpdate'"] - void onNavDestinationUpdate(Callback_observer_NavDestinationInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationUpdate'"] - void offNavDestinationUpdate(optional Callback_observer_NavDestinationInfo_Void callback_); + void onNavDestinationUpdate(observer.NavDestinationSwitchObserverOptions options, Callback_Observer_NavDestinationInfo_Void callback_); + [DtsName="on", DtsTag="'navDestinationUpdate'"] + void onNavDestinationUpdate(Callback_Observer_NavDestinationInfo_Void callback_); + [DtsName="on", DtsTag="'navDestinationUpdateByUniqueId'"] + void onNavDestinationUpdateByUniqueId(number navigationUniqueId, Callback_Observer_NavDestinationInfo_Void callback_); [DtsName="on", DtsTag="'scrollEvent'"] - void onScrollEvent(observer.ObserverOptions options, Callback_observer_ScrollEventInfo_Void callback_); - [DtsName="off", DtsTag="'scrollEvent'"] - void offScrollEvent(observer.ObserverOptions options, optional Callback_observer_ScrollEventInfo_Void callback_); + void onScrollEvent(observer.ObserverOptions options, Callback_Observer_ScrollEventInfo_Void callback_); [DtsName="on", DtsTag="'scrollEvent'"] - void onScrollEvent(Callback_observer_ScrollEventInfo_Void callback_); - [DtsName="off", DtsTag="'scrollEvent'"] - void offScrollEvent(optional Callback_observer_ScrollEventInfo_Void callback_); + void onScrollEvent(Callback_Observer_ScrollEventInfo_Void callback_); [DtsName="on", DtsTag="'routerPageUpdate'"] - void onRouterPageUpdate(Callback_observer_RouterPageInfo_Void callback_); - [DtsName="off", DtsTag="'routerPageUpdate'"] - void offRouterPageUpdate(optional Callback_observer_RouterPageInfo_Void callback_); + void onRouterPageUpdate(Callback_Observer_RouterPageInfo_Void callback_); [DtsName="on", DtsTag="'densityUpdate'"] - void onDensityUpdate(Callback_observer_DensityInfo_Void callback_); - [DtsName="off", DtsTag="'densityUpdate'"] - void offDensityUpdate(optional Callback_observer_DensityInfo_Void callback_); + void onDensityUpdate(Callback_Observer_DensityInfo_Void callback_); [DtsName="on", DtsTag="'willDraw'"] void onWillDraw(Callback_Void callback_); - [DtsName="off", DtsTag="'willDraw'"] - void offWillDraw(optional Callback_Void callback_); [DtsName="on", DtsTag="'didLayout'"] void onDidLayout(Callback_Void callback_); - [DtsName="off", DtsTag="'didLayout'"] - void offDidLayout(optional Callback_Void callback_); [DtsName="on", DtsTag="'navDestinationSwitch'"] - void onNavDestinationSwitch(Callback_observer_NavDestinationSwitchInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationSwitch'"] - void offNavDestinationSwitch(optional Callback_observer_NavDestinationSwitchInfo_Void callback_); + void onNavDestinationSwitch(Callback_Observer_NavDestinationSwitchInfo_Void callback_); [DtsName="on", DtsTag="'navDestinationSwitch'"] - void onNavDestinationSwitch(observer.NavDestinationSwitchObserverOptions observerOptions, Callback_observer_NavDestinationSwitchInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationSwitch'"] - void offNavDestinationSwitch(observer.NavDestinationSwitchObserverOptions observerOptions, optional Callback_observer_NavDestinationSwitchInfo_Void callback_); + void onNavDestinationSwitch(observer.NavDestinationSwitchObserverOptions observerOptions, Callback_Observer_NavDestinationSwitchInfo_Void callback_); [DtsName="on", DtsTag="'willClick'"] void onWillClick(ClickEventListenerCallback callback_); - [DtsName="off", DtsTag="'willClick'"] - void offWillClick(optional ClickEventListenerCallback callback_); [DtsName="on", DtsTag="'didClick'"] void onDidClick(ClickEventListenerCallback callback_); - [DtsName="off", DtsTag="'didClick'"] - void offDidClick(optional ClickEventListenerCallback callback_); [DtsName="on", DtsTag="'willClick'"] void onWillClick(GestureEventListenerCallback callback_); - [DtsName="off", DtsTag="'willClick'"] - void offWillClick(optional GestureEventListenerCallback callback_); [DtsName="on", DtsTag="'didClick'"] void onDidClick(GestureEventListenerCallback callback_); + [DtsName="on", DtsTag="'beforePanStart'"] + void onBeforePanStart(PanListenerCallback callback_); + [DtsName="on", DtsTag="'beforePanEnd'"] + void onBeforePanEnd(PanListenerCallback callback_); + [DtsName="on", DtsTag="'afterPanStart'"] + void onAfterPanStart(PanListenerCallback callback_); + [DtsName="on", DtsTag="'afterPanEnd'"] + void onAfterPanEnd(PanListenerCallback callback_); + [DtsName="on", DtsTag="'tabContentUpdate'"] + void onTabContentUpdate(observer.ObserverOptions options, Callback_Observer_TabContentInfo_Void callback_); + [DtsName="on", DtsTag="'tabContentUpdate'"] + void onTabContentUpdate(Callback_Observer_TabContentInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'nodeRenderState'"] + void onNodeRenderState(NodeIdentity nodeIdentity, NodeRenderStateChangeCallback callback_); + [DtsName="off", DtsTag="'navDestinationUpdate'"] + void offNavDestinationUpdate(Literal_ResourceStr_navigationId options, optional Callback_Observer_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationUpdate'"] + void offNavDestinationUpdate(observer.NavDestinationSwitchObserverOptions options, optional Callback_Observer_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationUpdate'"] + void offNavDestinationUpdate(optional Callback_Observer_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationUpdateByUniqueId'"] + void offNavDestinationUpdateByUniqueId(number navigationUniqueId, optional Callback_Observer_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'scrollEvent'"] + void offScrollEvent(observer.ObserverOptions options, optional Callback_Observer_ScrollEventInfo_Void callback_); + [DtsName="off", DtsTag="'scrollEvent'"] + void offScrollEvent(optional Callback_Observer_ScrollEventInfo_Void callback_); + [DtsName="off", DtsTag="'routerPageUpdate'"] + void offRouterPageUpdate(optional Callback_Observer_RouterPageInfo_Void callback_); + [DtsName="off", DtsTag="'densityUpdate'"] + void offDensityUpdate(optional Callback_Observer_DensityInfo_Void callback_); + [DtsName="off", DtsTag="'willDraw'"] + void offWillDraw(optional Callback_Void callback_); + [DtsName="off", DtsTag="'didLayout'"] + void offDidLayout(optional Callback_Void callback_); + [DtsName="off", DtsTag="'navDestinationSwitch'"] + void offNavDestinationSwitch(optional Callback_Observer_NavDestinationSwitchInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationSwitch'"] + void offNavDestinationSwitch(observer.NavDestinationSwitchObserverOptions observerOptions, optional Callback_Observer_NavDestinationSwitchInfo_Void callback_); + [DtsName="off", DtsTag="'willClick'"] + void offWillClick(optional ClickEventListenerCallback callback_); + [DtsName="off", DtsTag="'didClick'"] + void offDidClick(optional ClickEventListenerCallback callback_); + [DtsName="off", DtsTag="'willClick'"] + void offWillClick(optional GestureEventListenerCallback callback_); [DtsName="off", DtsTag="'didClick'"] void offDidClick(optional GestureEventListenerCallback callback_); - [DtsName="on", DtsTag="'tabContentUpdate'"] - void onTabContentUpdate(observer.ObserverOptions options, Callback_observer_TabContentInfo_Void callback_); + [DtsName="off", DtsTag="'beforePanStart'"] + void offBeforePanStart(optional PanListenerCallback callback_); + [DtsName="off", DtsTag="'beforePanEnd'"] + void offBeforePanEnd(optional PanListenerCallback callback_); + [DtsName="off", DtsTag="'afterPanStart'"] + void offAfterPanStart(optional PanListenerCallback callback_); + [DtsName="off", DtsTag="'afterPanEnd'"] + void offAfterPanEnd(optional PanListenerCallback callback_); [DtsName="off", DtsTag="'tabContentUpdate'"] - void offTabContentUpdate(observer.ObserverOptions options, optional Callback_observer_TabContentInfo_Void callback_); - [DtsName="on", DtsTag="'tabContentUpdate'"] - void onTabContentUpdate(Callback_observer_TabContentInfo_Void callback_); + void offTabContentUpdate(observer.ObserverOptions options, optional Callback_Observer_TabContentInfo_Void callback_); [DtsName="off", DtsTag="'tabContentUpdate'"] - void offTabContentUpdate(optional Callback_observer_TabContentInfo_Void callback_); - + void offTabContentUpdate(optional Callback_Observer_TabContentInfo_Void callback_); + [DtsName="off", DtsTag="'nodeRenderState'"] + void offNodeRenderState(NodeIdentity nodeIdentity, optional NodeRenderStateChangeCallback callback_); + void addGlobalGestureListener(GestureListenerType type, GestureObserverConfigs option, GestureListenerCallback callback_); + void removeGlobalGestureListener(GestureListenerType type, optional GestureListenerCallback callback_); }; [Entity=Class] interface ComponentUtils { - [Throws] componentUtils.ComponentInfo getRectangleById(String id); - }; [Entity=Class] interface OverlayManager { - void addComponentContent(ComponentContent content, optional number index); void addComponentContentWithOrder(ComponentContent content, optional LevelOrder levelOrder); void removeComponentContent(ComponentContent content); @@ -276,45 +331,47 @@ interface OverlayManager { void hideComponentContent(ComponentContent content); void showAllComponentContents(); void hideAllComponentContents(); - }; [Entity=Interface] interface AtomicServiceBar { - void setVisible(boolean visible); void setBackgroundColor([TypeArguments="(Color or number or String)"] Nullable color); void setTitleContent(String content); void setTitleFontStyle(FontStyle font); void setIconColor([TypeArguments="(Color or number or String)"] Nullable color); Frame getBarRect(); - +}; +[Entity=Interface] +interface GestureTriggerInfo { + attribute GestureEvent event; + attribute GestureRecognizer current; + attribute GestureActionPhase currentPhase; + [Optional] + attribute FrameNode node; +}; +[Entity=Interface] +interface GestureObserverConfigs { + attribute sequence actionPhases; }; [Entity=Class] interface DynamicSyncScene { - void setFrameRateRange(ExpectedFrameRateRange range); ExpectedFrameRateRange getFrameRateRange(); - }; [Entity=Class] -interface SwiperDynamicSyncScene: DynamicSyncScene { - +interface SwiperDynamicSyncScene: [Extends] DynamicSyncScene { readonly attribute SwiperDynamicSyncSceneType type; - }; [Entity=Class] -interface MarqueeDynamicSyncScene: DynamicSyncScene { - +interface MarqueeDynamicSyncScene: [Extends] DynamicSyncScene { readonly attribute MarqueeDynamicSyncSceneType type; - }; [Async, Synthetic] -callback AsyncCallback_dragController_DragEventParam_Void = void (dragController.DragEventParam result); +callback AsyncCallback_DragController_DragEventParam_Void = void (dragController.DragEventParam result); [Entity=Class] interface DragController { - [Throws] - void executeDrag((CustomBuilder or DragItemInfo) custom, dragController.DragInfo dragInfo, AsyncCallback_dragController_DragEventParam_Void callback_); + void executeDrag((CustomBuilder or DragItemInfo) custom, dragController.DragInfo dragInfo, AsyncCallback_DragController_DragEventParam_Void callback_); [Throws] async dragController.DragEventParam executeDrag((CustomBuilder or DragItemInfo) custom, dragController.DragInfo dragInfo); [Throws] @@ -324,59 +381,50 @@ interface DragController { void notifyDragStartRequest(dragController.DragStartRequestStatus requestStatus); [Throws] void cancelDataLoading(String key); - + void enableDropDisallowedBadge(boolean enabled); }; [Entity=Class] interface MeasureUtils { - number measureText(MeasureOptions options); SizeOptions measureTextSize(MeasureOptions options); - + sequence getParagraphs(StyledString styledString, optional TextLayoutOptions options); }; [Entity=Class] interface FocusController { - void clearFocus(); [Throws] void requestFocus(String key); void activate(boolean isActive, optional boolean autoInactive); + boolean isActive(); void setAutoFocusTransfer(boolean isAutoFocusTransfer); void setKeyProcessingMode(KeyProcessingMode mode); - }; typedef pointer.PointerStyle PointerStyle; [Entity=Class] interface CursorController { - void restoreDefault(); void setCursor(PointerStyle value); - }; [Entity=Class] interface ContextMenuController { - void close(); - }; [Entity=Class] interface FrameCallback { - void onFrame(number frameTimeInNano); void onIdle(number timeLeftInNano); - }; typedef common.Context Context; [Async, Synthetic] -callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); +callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); [Entity=Class] interface ComponentSnapshot { - [Throws] - void get(String id, AsyncCallback_image_PixelMap_Void callback_, optional componentSnapshot.SnapshotOptions options); + void get(String id, AsyncCallback_Image_PixelMap_Void callback_, optional componentSnapshot.SnapshotOptions options); [Throws] async image.PixelMap get(String id, optional componentSnapshot.SnapshotOptions options); [Throws] - void createFromBuilder(CustomBuilder builder, AsyncCallback_image_PixelMap_Void callback_, optional number delay, optional boolean checkImageStatus, optional componentSnapshot.SnapshotOptions options); + void createFromBuilder(CustomBuilder builder, AsyncCallback_Image_PixelMap_Void callback_, optional number delay, optional boolean checkImageStatus, optional componentSnapshot.SnapshotOptions options); [Throws] async image.PixelMap createFromBuilder(CustomBuilder builder, optional number delay, optional boolean checkImageStatus, optional componentSnapshot.SnapshotOptions options); [Throws] @@ -385,13 +433,14 @@ interface ComponentSnapshot { async image.PixelMap getWithUniqueId(number uniqueId, optional componentSnapshot.SnapshotOptions options); [Throws] image.PixelMap getSyncWithUniqueId(number uniqueId, optional componentSnapshot.SnapshotOptions options); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async image.PixelMap createFromComponent([TypeArguments="T"] ComponentContent content, optional number delay, optional boolean checkImageStatus, optional componentSnapshot.SnapshotOptions options); - + [Throws] + async image.PixelMap getWithRange(NodeIdentity start, NodeIdentity end, boolean isStartRect, optional componentSnapshot.SnapshotOptions options); }; [Entity=Class] interface UIContext { - + boolean isAvailable(); Font getFont(); MediaQuery getMediaQuery(); UIInspector getUIInspector(); @@ -407,18 +456,18 @@ interface UIContext { boolean setOverlayManagerOptions(OverlayManagerOptions options); OverlayManagerOptions getOverlayManagerOptions(); [Throws] - AnimatorResult createAnimator(AnimatorOptions options); - [Throws] AnimatorResult createAnimator((AnimatorOptions or SimpleAnimatorOptions) options); void animateTo(AnimateParam value, Callback_Void event); void showAlertDialog((AlertDialogParamWithConfirm or AlertDialogParamWithButtons or AlertDialogParamWithOptions) options); void showActionSheet(ActionSheetOptions value); void showDatePickerDialog(DatePickerDialogOptions options); void showTimePickerDialog(TimePickerDialogOptions options); - void showTextPickerDialog(TextPickerDialogOptions options); + void showTextPickerDialog((TextPickerDialogOptions or TextPickerDialogOptionsExt) style); void runScopedTask(Callback_Void callback_); void setKeyboardAvoidMode(KeyboardAvoidMode value); KeyboardAvoidMode getKeyboardAvoidMode(); + void setPixelRoundMode(PixelRoundMode mode); + PixelRoundMode getPixelRoundMode(); boolean dispatchKeyEvent((number or String) node, KeyEvent event); ([TypeArguments="AtomicServiceBar"] Nullable) getAtomicServiceBar(); DragController getDragController(); @@ -446,11 +495,11 @@ interface UIContext { (String or undefined) getWindowName(); WidthBreakpoint getWindowWidthBreakpoint(); HeightBreakpoint getWindowHeightBreakpoint(); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void openBindSheet([TypeArguments="T"] ComponentContent bindSheetContent, optional SheetOptions sheetOptions, optional number targetId); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void updateBindSheet([TypeArguments="T"] ComponentContent bindSheetContent, SheetOptions sheetOptions, optional boolean partialUpdate); - [Throws, TypeParameters="T extends Object"] + [Throws, TypeParameters="T"] async void closeBindSheet([TypeArguments="T"] ComponentContent bindSheetContent); void postFrameCallback(FrameCallback frameCallback); void postDelayedFrameCallback(FrameCallback frameCallback, number delayTime); @@ -469,31 +518,45 @@ interface UIContext { [Throws] void freezeUINode(number uniqueId, boolean isFrozen); TextMenuController getTextMenuController(); - + [Throws] + void setKeyboardAppearanceConfig(number uniqueId, KeyboardAppearanceConfig config); + [Throws] + static (UIContext or undefined) createUIContextWithoutWindow((common.UIAbilityContext or common.ExtensionContext) context); + static void destroyUIContextWithoutWindow(); }; dictionary KeyboardAvoidMode { - number OFFSET = 0; number RESIZE = 1; number OFFSET_WITH_CARET = 2; number RESIZE_WITH_CARET = 3; number NONE = 4; - }; dictionary SwiperDynamicSyncSceneType { - number GESTURE = 0; number ANIMATION = 1; - }; dictionary MarqueeDynamicSyncSceneType { - number ANIMATION = 1; - }; [Entity=Class] interface TextMenuController { - void setMenuOptions(TextMenuOptions options); - + static void disableSystemServiceMenuItems(boolean disable); + static void disableMenuItems(sequence items); +}; +dictionary NodeRenderState { + number ABOUT_TO_RENDER_IN = 0; + number ABOUT_TO_RENDER_OUT = 1; +}; +dictionary GestureActionPhase { + number WILL_START = 0; + number WILL_END = 1; +}; +dictionary GestureListenerType { + number TAP = 0; + number LONG_PRESS = 1; + number PAN = 2; + number PINCH = 3; + number SWIPE = 4; + number ROTATION = 5; }; \ No newline at end of file diff --git a/idl/@ohos.arkui.componentSnapshot.idl b/idl/@ohos.arkui.componentSnapshot.idl index cd248e8..31697ab 100644 --- a/idl/@ohos.arkui.componentSnapshot.idl +++ b/idl/@ohos.arkui.componentSnapshot.idl @@ -1,54 +1,43 @@ -package ohos.arkui; +package ohos.arkui.componentSnapshot; +import arkui.component.builder.CustomBuilder as CustomBuilder; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimedia.image as image; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace componentSnapshot { - [Entity=Interface] interface SnapshotRegion { - attribute number left; attribute number right; attribute number top; attribute number bottom; - }; [Entity=Interface] interface LocalizedSnapshotRegion { - attribute number start; attribute number end; attribute number top; attribute number bottom; - }; typedef (SnapshotRegion or LocalizedSnapshotRegion) SnapshotRegionType; [Entity=Interface] interface SnapshotOptions { - [Optional] attribute number scale; [Optional] attribute boolean waitUntilRenderFinished; [Optional] attribute SnapshotRegionType region; - }; [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); - [GlobalScope] - interface GlobalScope_componentSnapshot_ohos_arkui_componentSnapshot { - - [Throws] - static void get(String id, AsyncCallback_image_PixelMap_Void callback_, optional SnapshotOptions options); - [Throws] - static async image.PixelMap get(String id, optional SnapshotOptions options); - [Throws] - static void createFromBuilder(CustomBuilder builder, AsyncCallback_image_PixelMap_Void callback_, optional number delay, optional boolean checkImageStatus, optional SnapshotOptions options); - [Throws] - static async image.PixelMap createFromBuilder(CustomBuilder builder, optional number delay, optional boolean checkImageStatus, optional SnapshotOptions options); - [Throws] - static image.PixelMap getSync(String id, optional SnapshotOptions options); - - }; - + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); + [Deprecated, Throws] + void get(String id, AsyncCallback_Image_PixelMap_Void callback_, optional SnapshotOptions options); + [Deprecated, Throws] + async image.PixelMap get(String id, optional SnapshotOptions options); + [Deprecated, Throws] + void createFromBuilder(CustomBuilder builder, AsyncCallback_Image_PixelMap_Void callback_, optional number delay, optional boolean checkImageStatus, optional SnapshotOptions options); + [Deprecated, Throws] + async image.PixelMap createFromBuilder(CustomBuilder builder, optional number delay, optional boolean checkImageStatus, optional SnapshotOptions options); + [Throws] + image.PixelMap getSync(String id, optional SnapshotOptions options); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.componentUtils.idl b/idl/@ohos.arkui.componentUtils.idl index ededa91..fbaaef6 100644 --- a/idl/@ohos.arkui.componentUtils.idl +++ b/idl/@ohos.arkui.componentUtils.idl @@ -1,9 +1,8 @@ -package ohos.arkui; +package ohos.arkui.componentUtils; +[DefaultExport] namespace componentUtils { - [Entity=Interface] interface ComponentInfo { - attribute Size size; attribute Offset localOffset; attribute Offset windowOffset; @@ -12,54 +11,42 @@ namespace componentUtils { attribute ScaleResult scale; attribute RotateResult rotate; attribute Matrix4Result transform; - }; [Entity=Interface] interface Size { - attribute number width; attribute number height; - }; [Entity=Interface] interface Offset { - attribute number x; attribute number y; - }; [Entity=Interface] interface TranslateResult { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface ScaleResult { - attribute number x; attribute number y; attribute number z; attribute number centerX; attribute number centerY; - }; [Entity=Interface] interface RotateResult { - attribute number x; attribute number y; attribute number z; attribute number centerX; attribute number centerY; attribute number angle; - }; [Entity=Tuple] interface Matrix4Result { - attribute number value0; attribute number value1; attribute number value2; @@ -76,14 +63,7 @@ namespace componentUtils { attribute number value13; attribute number value14; attribute number value15; - }; - [GlobalScope] - interface GlobalScope_componentUtils_ohos_arkui_componentUtils { - - [Throws] - static ComponentInfo getRectangleById(String id); - - }; - + [Deprecated, Throws] + ComponentInfo getRectangleById(String id); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.dragController.idl b/idl/@ohos.arkui.dragController.idl index f112b3f..7ab0f7d 100644 --- a/idl/@ohos.arkui.dragController.idl +++ b/idl/@ohos.arkui.dragController.idl @@ -1,41 +1,42 @@ -package ohos.arkui; +package ohos.arkui.dragController; +import arkui.component.common.DragEvent as DragEvent; +import arkui.component.common.DragPreviewOptions as DragPreviewOptions; +import arkui.component.common.DragItemInfo as DragItemInfo; +import arkui.component.common.ICurve as ICurve; +import arkui.component.builder.CustomBuilder as CustomBuilder; +import arkui.component.units.TouchPoint as TouchPoint; +import arkui.component.units.ResourceColor as ResourceColor; +import arkui.component.enums.Curve as Curve; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; import ohos.base.Callback as Callback; -import ohos.data.unifiedDataChannel as unifiedDataChannel; +import ohos.data.unifiedDataChannel.default as unifiedDataChannel; +[DefaultExport] namespace dragController { - dictionary DragStatus { - number STARTED = 0; number ENDED = 1; - }; [Entity=Interface] interface DragAndDropInfo { - attribute DragStatus status; attribute DragEvent event; [Optional] attribute String extraParams; - }; [Synthetic] callback Callback_DragAndDropInfo_Void = void (DragAndDropInfo parameter); [Entity=Interface] interface DragAction { - [Throws] async void startDrag(); [DtsName="on", DtsTag="'statusChange'"] void onStatusChange(Callback_DragAndDropInfo_Void callback_); [DtsName="off", DtsTag="'statusChange'"] void offStatusChange(optional Callback_DragAndDropInfo_Void callback_); - }; [Entity=Interface] interface DragInfo { - attribute number pointerId; [Optional] attribute unifiedDataChannel.UnifiedData data; @@ -45,52 +46,75 @@ namespace dragController { attribute TouchPoint touchPoint; [Optional] attribute DragPreviewOptions previewOptions; - + [Optional] + attribute unifiedDataChannel.DataLoadParams dataLoadParams; }; [Entity=Interface] interface AnimationOptions { - [Optional] attribute number duration; [Optional] attribute (Curve or ICurve) curve; - }; [Synthetic] callback Callback_Void = void (); [Entity=Class] interface DragPreview { - void setForegroundColor(ResourceColor color); void animate(AnimationOptions options, Callback_Void handler); - }; [Entity=Interface] interface DragEventParam { - attribute DragEvent event; attribute String extraParams; - }; [Async, Synthetic] callback AsyncCallback_DragEventParam_Void = void (DragEventParam result); + [Deprecated, Throws] + void executeDrag((CustomBuilder or DragItemInfo) custom, DragInfo dragInfo, AsyncCallback_DragEventParam_Void callback_); + [Deprecated, Throws] + async DragEventParam executeDrag((CustomBuilder or DragItemInfo) custom, DragInfo dragInfo); + [Deprecated, Throws] + DragAction createDragAction(sequence<(CustomBuilder or DragItemInfo)> customArray, DragInfo dragInfo); + [Deprecated] + DragPreview getDragPreview(); dictionary DragStartRequestStatus { - number WAITING = 0; number READY = 1; - }; - [GlobalScope] - interface GlobalScope_dragController_ohos_arkui_dragController { - - [Throws] - static void executeDrag((CustomBuilder or DragItemInfo) custom, DragInfo dragInfo, AsyncCallback_DragEventParam_Void callback_); - [Throws] - static async DragEventParam executeDrag((CustomBuilder or DragItemInfo) custom, DragInfo dragInfo); - [Throws] - static DragAction createDragAction(sequence<(CustomBuilder or DragItemInfo)> customArray, DragInfo dragInfo); - static DragPreview getDragPreview(); - + dictionary DragSpringLoadingState { + number BEGIN = 0; + number UPDATE = 1; + number END = 2; + number CANCEL = 3; + }; + [Entity=Interface] + interface DragSpringLoadingConfiguration { + [Optional] + attribute number stillTimeLimit; + [Optional] + attribute number updateInterval; + [Optional] + attribute number updateNotifyCount; + [Optional] + attribute number updateToFinishInterval; + }; + [Entity=Interface] + interface SpringLoadingDragInfos { + [Optional] + attribute unifiedDataChannel.Summary dataSummary; + [Optional] + attribute String extraInfos; + }; + [Entity=Class] + interface SpringLoadingContext { + attribute DragSpringLoadingState state; + attribute number currentNotifySequence; + [Optional] + attribute SpringLoadingDragInfos dragInfos; + [Optional] + attribute DragSpringLoadingConfiguration currentConfig; + void abort(); + void updateConfiguration(DragSpringLoadingConfiguration config); }; - }; \ No newline at end of file diff --git a/idl/@ohos.arkui.drawableDescriptor.idl b/idl/@ohos.arkui.drawableDescriptor.idl index e6f6534..a409a55 100644 --- a/idl/@ohos.arkui.drawableDescriptor.idl +++ b/idl/@ohos.arkui.drawableDescriptor.idl @@ -1,40 +1,58 @@ package ohos.arkui.drawableDescriptor; -import ohos.multimedia.image as image; +import ohos.multimedia.image.default as image; +[Entity=Interface] +interface DrawableDescriptorResult { + [Optional] + readonly attribute number width; + [Optional] + readonly attribute number height; +}; +[Entity=Interface] +interface DrawableDescriptorOptions { + [Optional] + attribute boolean fetchWhenConstructingWithUri; +}; [Entity=Class] interface DrawableDescriptor { - constructor(); image.PixelMap getPixelMap(); - + number getOriginalWidth(); + number getOriginalHeight(); + [Throws] + async DrawableDescriptorResult fetch(); + [Throws] + DrawableDescriptorResult fetchSync(); }; [Entity=Class] -interface LayeredDrawableDescriptor: DrawableDescriptor { - +interface LayeredDrawableDescriptor: [Extends] DrawableDescriptor { constructor(optional DrawableDescriptor foreground, optional DrawableDescriptor background, optional DrawableDescriptor mask); DrawableDescriptor getForeground(); DrawableDescriptor getBackground(); DrawableDescriptor getMask(); static String getMaskClipPath(); - }; [Entity=Class] -interface PixelMapDrawableDescriptor: DrawableDescriptor { - +interface PixelMapDrawableDescriptor: [Extends] DrawableDescriptor { constructor(optional image.PixelMap src); - + constructor(optional (image.PixelMap or ResourceStr) src, optional DrawableDescriptorOptions options); }; [Entity=Interface] interface AnimationOptions { - [Optional] attribute number duration; [Optional] attribute number iterations; - + [Optional] + attribute boolean fetchWhenConstructingWithUri; }; [Entity=Class] -interface AnimatedDrawableDescriptor: DrawableDescriptor { - +interface AnimatedDrawableDescriptor: [Extends] DrawableDescriptor { constructor(sequence pixelMaps, optional AnimationOptions options); - + constructor((sequence or ResourceStr) pixelMaps, optional AnimationOptions options); + [Throws] + boolean isRunning(); + [Throws] + void start(); + [Throws] + void stop(); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.inspector.idl b/idl/@ohos.arkui.inspector.idl index 9950048..3d41535 100644 --- a/idl/@ohos.arkui.inspector.idl +++ b/idl/@ohos.arkui.inspector.idl @@ -1,26 +1,27 @@ -package ohos.arkui; +package ohos.arkui.inspector; +import ohos.base.Callback as Callback; +[DefaultExport] namespace inspector { - [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface ComponentObserver { - [DtsName="on", DtsTag="'layout'"] void onLayout(Callback_Void callback_); - [DtsName="off", DtsTag="'layout'"] - void offLayout(optional Callback_Void callback_); [DtsName="on", DtsTag="'draw'"] void onDraw(Callback_Void callback_); + [DtsName="on", DtsTag="'drawChildren'"] + void onDrawChildren(Callback_Void callback_); + [DtsName="off", DtsTag="'layout'"] + void offLayout(optional Callback_Void callback_); [DtsName="off", DtsTag="'draw'"] void offDraw(optional Callback_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_inspector_ohos_arkui_inspector { - - static ComponentObserver createComponentObserver(String id); - + [DtsName="off", DtsTag="'drawChildren'"] + void offDrawChildren(optional Callback_Void callback_); }; - + [Deprecated] + ComponentObserver createComponentObserver(String id); + String getInspectorByKey(String id); + Object getInspectorTree(); + boolean sendEventByKey(String id, number action, String params); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.observer.idl b/idl/@ohos.arkui.observer.idl index 29294ff..1089d9a 100644 --- a/idl/@ohos.arkui.observer.idl +++ b/idl/@ohos.arkui.observer.idl @@ -1,10 +1,18 @@ package ohos.arkui.observer; +import ohos.arkui.component.NavPathStack as NavPathStack; +import ohos.arkui.component.NavigationOperation as NavigationOperation; +import ohos.arkui.component.NavBar as NavBar; +import ohos.arkui.component.ResourceStr as ResourceStr; +import ohos.arkui.UIContext.UIContext as UIContext; +import application.UIAbilityContext.default as UIAbilityContext; import ohos.base.Callback as Callback; -import application.UIAbilityContext as UIAbilityContext; +import ohos.base.Callback as Callback; +import application.UIAbilityContext.default as UIAbilityContext; +import navigation.NavigationOperation as NavigationOperation; +import navigation.NavBar as NavBar; +[DefaultExport] namespace uiObserver { - dictionary NavDestinationState { - number ON_SHOWN = 0; number ON_HIDDEN = 1; number ON_APPEAR = 2; @@ -16,32 +24,24 @@ namespace uiObserver { number ON_ACTIVE = 8; number ON_INACTIVE = 9; number ON_BACKPRESS = 100; - }; dictionary RouterPageState { - number ABOUT_TO_APPEAR = 0; number ABOUT_TO_DISAPPEAR = 1; number ON_PAGE_SHOW = 2; number ON_PAGE_HIDE = 3; number ON_BACK_PRESS = 4; - }; dictionary ScrollEventType { - number SCROLL_START = 0; number SCROLL_STOP = 1; - }; dictionary TabContentState { - number ON_SHOW = 0; number ON_HIDE = 1; - }; [Entity=Interface] interface NavDestinationInfo { - attribute ResourceStr navigationId; attribute ResourceStr name; attribute NavDestinationState state; @@ -53,146 +53,129 @@ namespace uiObserver { attribute NavDestinationMode mode; [Optional] attribute number uniqueId; - }; [Entity=Interface] interface NavigationInfo { - attribute String navigationId; attribute NavPathStack pathStack; - + [Optional] + attribute number uniqueId; }; [Entity=Interface] interface ScrollEventInfo { - attribute String id; attribute number uniqueId; attribute ScrollEventType scrollEvent; attribute number offset; - + [Optional] + attribute Axis axis; }; [Entity=Interface] interface TabContentInfo { - attribute String tabContentId; attribute number tabContentUniqueId; attribute TabContentState state; attribute number index; attribute String id; attribute number uniqueId; - }; [Entity=Interface] interface ObserverOptions { - attribute String id; - }; [Entity=Class] interface RouterPageInfo { - attribute (UIAbilityContext or UIContext) context; attribute number index; attribute String name; attribute String path; attribute RouterPageState state; attribute String pageId; - }; [Entity=Class] interface DensityInfo { - attribute UIContext context; attribute number density; - }; [Entity=Interface] interface NavDestinationSwitchInfo { - attribute (UIAbilityContext or UIContext) context; attribute (NavDestinationInfo or NavBar) from; attribute (NavDestinationInfo or NavBar) to; attribute NavigationOperation operation; - }; [Entity=Interface] interface NavDestinationSwitchObserverOptions { - attribute ResourceStr navigationId; - }; [Entity=Literal, Synthetic] interface Literal_ResourceStr_navigationId { - attribute ResourceStr navigationId; - }; [Synthetic] callback Callback_NavDestinationInfo_Void = void (NavDestinationInfo parameter); + [DtsName="on", DtsTag="'navDestinationUpdate'"] + void onNavDestinationUpdate(Literal_ResourceStr_navigationId options, Callback_NavDestinationInfo_Void callback_); + [DtsName="on", DtsTag="'navDestinationUpdate'"] + void onNavDestinationUpdate(NavDestinationSwitchObserverOptions options, Callback_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationUpdate'"] + void offNavDestinationUpdate(Literal_ResourceStr_navigationId options, optional Callback_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationUpdate'"] + void offNavDestinationUpdate(NavDestinationSwitchObserverOptions options, optional Callback_NavDestinationInfo_Void callback_); + [DtsName="on", DtsTag="'navDestinationUpdate'"] + void onNavDestinationUpdate(Callback_NavDestinationInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationUpdate'"] + void offNavDestinationUpdate(optional Callback_NavDestinationInfo_Void callback_); [Synthetic] callback Callback_ScrollEventInfo_Void = void (ScrollEventInfo parameter); + [DtsName="on", DtsTag="'scrollEvent'"] + void onScrollEvent(ObserverOptions options, Callback_ScrollEventInfo_Void callback_); + [DtsName="off", DtsTag="'scrollEvent'"] + void offScrollEvent(ObserverOptions options, optional Callback_ScrollEventInfo_Void callback_); + [DtsName="on", DtsTag="'scrollEvent'"] + void onScrollEvent(Callback_ScrollEventInfo_Void callback_); + [DtsName="off", DtsTag="'scrollEvent'"] + void offScrollEvent(optional Callback_ScrollEventInfo_Void callback_); [Synthetic] callback Callback_RouterPageInfo_Void = void (RouterPageInfo parameter); + [DtsName="on", DtsTag="'routerPageUpdate'"] + void onRouterPageUpdate((UIAbilityContext or UIContext) context, Callback_RouterPageInfo_Void callback_); + [DtsName="off", DtsTag="'routerPageUpdate'"] + void offRouterPageUpdate((UIAbilityContext or UIContext) context, optional Callback_RouterPageInfo_Void callback_); [Synthetic] callback Callback_DensityInfo_Void = void (DensityInfo parameter); + [DtsName="on", DtsTag="'densityUpdate'"] + void onDensityUpdate(UIContext context, Callback_DensityInfo_Void callback_); + [DtsName="off", DtsTag="'densityUpdate'"] + void offDensityUpdate(UIContext context, optional Callback_DensityInfo_Void callback_); [Synthetic] callback Callback_Void = void (); + [DtsName="on", DtsTag="'willDraw'"] + void onWillDraw(UIContext context, Callback_Void callback_); + [DtsName="off", DtsTag="'willDraw'"] + void offWillDraw(UIContext context, optional Callback_Void callback_); + [DtsName="on", DtsTag="'didLayout'"] + void onDidLayout(UIContext context, Callback_Void callback_); + [DtsName="off", DtsTag="'didLayout'"] + void offDidLayout(UIContext context, optional Callback_Void callback_); [Synthetic] callback Callback_TabContentInfo_Void = void (TabContentInfo parameter); + [DtsName="on", DtsTag="'tabContentUpdate'"] + void onTabContentUpdate(ObserverOptions options, Callback_TabContentInfo_Void callback_); + [DtsName="off", DtsTag="'tabContentUpdate'"] + void offTabContentUpdate(ObserverOptions options, optional Callback_TabContentInfo_Void callback_); + [DtsName="on", DtsTag="'tabContentUpdate'"] + void onTabContentUpdate(Callback_TabContentInfo_Void callback_); + [DtsName="off", DtsTag="'tabContentUpdate'"] + void offTabContentUpdate(optional Callback_TabContentInfo_Void callback_); [Synthetic] callback Callback_NavDestinationSwitchInfo_Void = void (NavDestinationSwitchInfo parameter); - [GlobalScope] - interface GlobalScope_uiObserver_ohos_arkui_observer { - - [DtsName="on", DtsTag="'navDestinationUpdate'"] - static void onNavDestinationUpdate(Literal_ResourceStr_navigationId options, Callback_NavDestinationInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationUpdate'"] - static void offNavDestinationUpdate(Literal_ResourceStr_navigationId options, optional Callback_NavDestinationInfo_Void callback_); - [DtsName="on", DtsTag="'navDestinationUpdate'"] - static void onNavDestinationUpdate(Callback_NavDestinationInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationUpdate'"] - static void offNavDestinationUpdate(optional Callback_NavDestinationInfo_Void callback_); - [DtsName="on", DtsTag="'scrollEvent'"] - static void onScrollEvent(ObserverOptions options, Callback_ScrollEventInfo_Void callback_); - [DtsName="off", DtsTag="'scrollEvent'"] - static void offScrollEvent(ObserverOptions options, optional Callback_ScrollEventInfo_Void callback_); - [DtsName="on", DtsTag="'scrollEvent'"] - static void onScrollEvent(Callback_ScrollEventInfo_Void callback_); - [DtsName="off", DtsTag="'scrollEvent'"] - static void offScrollEvent(optional Callback_ScrollEventInfo_Void callback_); - [DtsName="on", DtsTag="'routerPageUpdate'"] - static void onRouterPageUpdate((UIAbilityContext or UIContext) context, Callback_RouterPageInfo_Void callback_); - [DtsName="off", DtsTag="'routerPageUpdate'"] - static void offRouterPageUpdate((UIAbilityContext or UIContext) context, optional Callback_RouterPageInfo_Void callback_); - [DtsName="on", DtsTag="'densityUpdate'"] - static void onDensityUpdate(UIContext context, Callback_DensityInfo_Void callback_); - [DtsName="off", DtsTag="'densityUpdate'"] - static void offDensityUpdate(UIContext context, optional Callback_DensityInfo_Void callback_); - [DtsName="on", DtsTag="'willDraw'"] - static void onWillDraw(UIContext context, Callback_Void callback_); - [DtsName="off", DtsTag="'willDraw'"] - static void offWillDraw(UIContext context, optional Callback_Void callback_); - [DtsName="on", DtsTag="'didLayout'"] - static void onDidLayout(UIContext context, Callback_Void callback_); - [DtsName="off", DtsTag="'didLayout'"] - static void offDidLayout(UIContext context, optional Callback_Void callback_); - [DtsName="on", DtsTag="'tabContentUpdate'"] - static void onTabContentUpdate(ObserverOptions options, Callback_TabContentInfo_Void callback_); - [DtsName="off", DtsTag="'tabContentUpdate'"] - static void offTabContentUpdate(ObserverOptions options, optional Callback_TabContentInfo_Void callback_); - [DtsName="on", DtsTag="'tabContentUpdate'"] - static void onTabContentUpdate(Callback_TabContentInfo_Void callback_); - [DtsName="off", DtsTag="'tabContentUpdate'"] - static void offTabContentUpdate(optional Callback_TabContentInfo_Void callback_); - [DtsName="on", DtsTag="'navDestinationSwitch'"] - static void onNavDestinationSwitch((UIAbilityContext or UIContext) context, Callback_NavDestinationSwitchInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationSwitch'"] - static void offNavDestinationSwitch((UIAbilityContext or UIContext) context, optional Callback_NavDestinationSwitchInfo_Void callback_); - [DtsName="on", DtsTag="'navDestinationSwitch'"] - static void onNavDestinationSwitch((UIAbilityContext or UIContext) context, NavDestinationSwitchObserverOptions observerOptions, Callback_NavDestinationSwitchInfo_Void callback_); - [DtsName="off", DtsTag="'navDestinationSwitch'"] - static void offNavDestinationSwitch((UIAbilityContext or UIContext) context, NavDestinationSwitchObserverOptions observerOptions, optional Callback_NavDestinationSwitchInfo_Void callback_); - - }; - + [DtsName="on", DtsTag="'navDestinationSwitch'"] + void onNavDestinationSwitch((UIAbilityContext or UIContext) context, Callback_NavDestinationSwitchInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationSwitch'"] + void offNavDestinationSwitch((UIAbilityContext or UIContext) context, optional Callback_NavDestinationSwitchInfo_Void callback_); + [DtsName="on", DtsTag="'navDestinationSwitch'"] + void onNavDestinationSwitch((UIAbilityContext or UIContext) context, NavDestinationSwitchObserverOptions observerOptions, Callback_NavDestinationSwitchInfo_Void callback_); + [DtsName="off", DtsTag="'navDestinationSwitch'"] + void offNavDestinationSwitch((UIAbilityContext or UIContext) context, NavDestinationSwitchObserverOptions observerOptions, optional Callback_NavDestinationSwitchInfo_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.performanceMonitor.idl b/idl/@ohos.arkui.performanceMonitor.idl index 85a6998..20a2722 100644 --- a/idl/@ohos.arkui.performanceMonitor.idl +++ b/idl/@ohos.arkui.performanceMonitor.idl @@ -1,30 +1,20 @@ -package ohos.arkui; +package ohos.arkui.performanceMonitor; +[DefaultExport] namespace performanceMonitor { - dictionary ActionType { - number LAST_DOWN = 0; number LAST_UP = 1; number FIRST_MOVE = 2; - }; dictionary SourceType { - number PERF_TOUCH_EVENT = 0; number PERF_MOUSE_EVENT = 1; number PERF_TOUCHPAD_EVENT = 2; number PERF_JOYSTICK_EVENT = 3; number PERF_KEY_EVENT = 4; - }; - [GlobalScope] - interface GlobalScope_performanceMonitor_ohos_arkui_performanceMonitor { - - static void begin(String scene, ActionType startInputType, optional String note); - static void end(String scene); - [Throws] - static void recordInputEventTime(ActionType type, SourceType sourceType, number time); - - }; - + void begin(String scene, ActionType startInputType, optional String note); + void end(String scene); + [Throws] + void recordInputEventTime(ActionType type, SourceType sourceType, number time); }; \ No newline at end of file diff --git a/idl/@ohos.arkui.shape.idl b/idl/@ohos.arkui.shape.idl index 34b1614..92fbe5e 100644 --- a/idl/@ohos.arkui.shape.idl +++ b/idl/@ohos.arkui.shape.idl @@ -1,77 +1,61 @@ package ohos.arkui.shape; +import arkui.component.units.Position as Position; +import arkui.component.units.ResourceColor as ResourceColor; +import arkui.component.units.Length as Length; +import arkui.component.units.SizeOptions as SizeOptions; [Entity=Interface] interface ShapeSize { - [Optional] attribute (number or String) width; [Optional] attribute (number or String) height; - }; [Entity=Interface] interface RectShapeOptions: ShapeSize { - [Optional] attribute (number or String or sequence<(number or String)>) radius; - }; [Entity=Interface] interface RoundRectShapeOptions: ShapeSize { - [Optional] attribute (number or String) radiusWidth; [Optional] attribute (number or String) radiusHeight; - }; [Entity=Interface] interface PathShapeOptions { - [Optional] attribute String commands; - }; [Entity=Class, TypeParameters="T"] interface CommonShapeMethod { - T offset(Position offset); T fill(ResourceColor color); T position(Position position); - }; [Entity=Class, TypeParameters="T"] -interface BaseShape: [TypeArguments="T"] CommonShapeMethod { - +interface BaseShape: [Extends, TypeArguments="T"] CommonShapeMethod { T width(Length width); T height(Length height); T size(SizeOptions size); - }; [Entity=Class] -interface RectShape: [TypeArguments="RectShape"] BaseShape { - +interface RectShape: [Extends, TypeArguments="RectShape"] BaseShape { constructor(optional (RectShapeOptions or RoundRectShapeOptions) options); RectShape radiusWidth((number or String) rWidth); RectShape radiusHeight((number or String) rHeight); RectShape radius((number or String or sequence<(number or String)>) radius); - }; [Entity=Class] -interface CircleShape: [TypeArguments="CircleShape"] BaseShape { - +interface CircleShape: [Extends, TypeArguments="CircleShape"] BaseShape { constructor(optional ShapeSize options); - }; [Entity=Class] -interface EllipseShape: [TypeArguments="EllipseShape"] BaseShape { - +interface EllipseShape: [Extends, TypeArguments="EllipseShape"] BaseShape { constructor(optional ShapeSize options); - }; [Entity=Class] -interface PathShape: [TypeArguments="PathShape"] CommonShapeMethod { - +interface PathShape: [Extends, TypeArguments="PathShape"] CommonShapeMethod { constructor(optional PathShapeOptions options); PathShape commands(String commands); - }; \ No newline at end of file diff --git a/idl/@ohos.arkui.theme.idl b/idl/@ohos.arkui.theme.idl index 2285690..809697d 100644 --- a/idl/@ohos.arkui.theme.idl +++ b/idl/@ohos.arkui.theme.idl @@ -1,13 +1,11 @@ package ohos.arkui.theme; +import arkui.component.units.ResourceColor as ResourceColor; [Entity=Interface] interface Theme { - attribute Colors colors; - }; [Entity=Interface] interface Colors { - attribute ResourceColor brand; attribute ResourceColor warning; attribute ResourceColor alert; @@ -59,19 +57,18 @@ interface Colors { attribute ResourceColor interactiveActive; attribute ResourceColor interactiveSelect; attribute ResourceColor interactiveClick; - }; [Entity=Interface] interface CustomTheme { - [Optional] attribute CustomColors colors; - + [Optional] + attribute CustomDarkColors darkColors; }; typedef [TypeArguments="Colors"] Partial CustomColors; +typedef [TypeArguments="Colors"] Partial CustomColors; +typedef [TypeArguments="Colors"] Partial CustomDarkColors; [Entity=Class] interface ThemeControl { - static void setDefaultTheme(CustomTheme theme); - }; \ No newline at end of file diff --git a/idl/@ohos.arkui.uiExtension.idl b/idl/@ohos.arkui.uiExtension.idl index 3811612..a1acfb3 100644 --- a/idl/@ohos.arkui.uiExtension.idl +++ b/idl/@ohos.arkui.uiExtension.idl @@ -1,30 +1,29 @@ -package ohos.arkui; +package ohos.arkui.uiExtension; import ohos.base.Callback as Callback; -import ohos.window as window; +import ohos.window.default as window; +[DefaultExport] namespace uiExtension { - [Synthetic] callback Callback_AvoidAreaInfo_Void = void (AvoidAreaInfo parameter); [Synthetic] - callback Callback_window_Size_Void = void (window.Size parameter); + callback Callback_Window_Size_Void = void (window.Size parameter); [Synthetic] callback Callback_RectChangeOptions_Void = void (RectChangeOptions parameter); [Entity=Interface] interface WindowProxy { - attribute WindowProxyProperties properties; [Throws] window.AvoidArea getWindowAvoidArea(window.AvoidAreaType type); [Throws, DtsName="on", DtsTag="'avoidAreaChange'"] void onAvoidAreaChange(Callback_AvoidAreaInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'avoidAreaChange'"] - void offAvoidAreaChange(optional Callback_AvoidAreaInfo_Void callback_); [Throws, DtsName="on", DtsTag="'windowSizeChange'"] - void onWindowSizeChange(Callback_window_Size_Void callback_); - [Throws, DtsName="off", DtsTag="'windowSizeChange'"] - void offWindowSizeChange(optional Callback_window_Size_Void callback_); + void onWindowSizeChange(Callback_Window_Size_Void callback_); [Throws, DtsName="on", DtsTag="'rectChange'"] void onRectChange(number reasons, Callback_RectChangeOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'avoidAreaChange'"] + void offAvoidAreaChange(optional Callback_AvoidAreaInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'windowSizeChange'"] + void offWindowSizeChange(optional Callback_Window_Size_Void callback_); [Throws, DtsName="off", DtsTag="'rectChange'"] void offRectChange(optional Callback_RectChangeOptions_Void callback_); [Throws] @@ -35,10 +34,8 @@ namespace uiExtension { async void setWaterMarkFlag(boolean enable); [Throws] async void occupyEvents(number eventFlags); - }; dictionary EventFlag { - number EVENT_NONE = 0; number EVENT_PAN_GESTURE_LEFT = 1; number EVENT_PAN_GESTURE_RIGHT = 2; @@ -46,32 +43,22 @@ namespace uiExtension { number EVENT_PAN_GESTURE_DOWN = 8; number EVENT_CLICK = 256; number EVENT_LONG_PRESS = 512; - }; [Entity=Interface] interface AvoidAreaInfo { - attribute window.AvoidAreaType type; attribute window.AvoidArea area; - }; [Entity=Interface] interface WindowProxyProperties { - attribute window.Rect uiExtensionHostWindowProxyRect; - }; dictionary RectChangeReason { - number HOST_WINDOW_RECT_CHANGE = 1; - }; [Entity=Interface] interface RectChangeOptions { - attribute window.Rect rect; attribute RectChangeReason reason; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.backgroundTaskManager.idl b/idl/@ohos.backgroundTaskManager.idl index ddd4769..bfc68c7 100644 --- a/idl/@ohos.backgroundTaskManager.idl +++ b/idl/@ohos.backgroundTaskManager.idl @@ -1,28 +1,41 @@ -package ohos; +package ohos.backgroundTaskManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.WantAgent as WantAgent; -import application.Context as Context; +import ohos.wantAgent.WantAgent as WantAgent; +import application.BaseContext.default as Context; +[DefaultExport] namespace backgroundTaskManager { - [Entity=Interface, Deprecated] interface DelaySuspendInfo { - [Deprecated] attribute number requestId; [Deprecated] attribute number actualDelayTime; - }; + [Deprecated] + void cancelSuspendDelay(number requestId); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void getRemainingDelayTime(number requestId, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getRemainingDelayTime(number requestId); [Synthetic] callback Callback_Void = void (); + [Deprecated] + DelaySuspendInfo requestSuspendDelay(String reason, Callback_Void callback_); [Async, Synthetic] callback AsyncCallback_Void = void (); [Deprecated] + void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent, AsyncCallback_Void callback_); + [Deprecated] + async void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent); + [Deprecated] + void stopBackgroundRunning(Context context, AsyncCallback_Void callback_); + [Deprecated] + async void stopBackgroundRunning(Context context); + [Deprecated] dictionary BackgroundMode { - [Deprecated] number DATA_TRANSFER = 1; [Deprecated] @@ -41,28 +54,5 @@ namespace backgroundTaskManager { number VOIP = 8; [Deprecated] number TASK_KEEPING = 9; - - }; - [GlobalScope] - interface GlobalScope_backgroundTaskManager_ohos_backgroundTaskManager { - - [Deprecated] - static void cancelSuspendDelay(number requestId); - [Deprecated] - static void getRemainingDelayTime(number requestId, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getRemainingDelayTime(number requestId); - [Deprecated] - static DelaySuspendInfo requestSuspendDelay(String reason, Callback_Void callback_); - [Deprecated] - static void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent, AsyncCallback_Void callback_); - [Deprecated] - static async void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent); - [Deprecated] - static void stopBackgroundRunning(Context context, AsyncCallback_Void callback_); - [Deprecated] - static async void stopBackgroundRunning(Context context); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.base.idl b/idl/@ohos.base.idl index 524411d..3947e5a 100644 --- a/idl/@ohos.base.idl +++ b/idl/@ohos.base.idl @@ -1,30 +1,22 @@ package ohos.base; [Entity=Interface, TypeParameters="T"] interface Callback { - [CallSignature] void invoke(T data); - }; -[Entity=Interface, TypeParameters="T extends Error = BusinessError"] +[Entity=Interface, TypeParameters="T"] interface ErrorCallback { - [CallSignature] void invoke(T err); - }; -[Entity=Interface, TypeParameters="T,E = void"] +[Entity=Interface, TypeParameters="T,E"] interface AsyncCallback { - [CallSignature] - void invoke([TypeArguments="E"] BusinessError err, T data); - + void invoke(BusinessError err, T data); }; -[Entity=Interface, TypeParameters="T = void"] +[Entity=Interface, TypeParameters="T"] interface BusinessError: Error { - attribute number code; [Optional] attribute T data; - }; \ No newline at end of file diff --git a/idl/@ohos.batteryInfo.idl b/idl/@ohos.batteryInfo.idl index a22111d..8770e5f 100644 --- a/idl/@ohos.batteryInfo.idl +++ b/idl/@ohos.batteryInfo.idl @@ -1,34 +1,33 @@ -package ohos; +package ohos.batteryInfo; +[DefaultExport] namespace batteryInfo { - + [Throws] + number setBatteryConfig(String sceneName, String sceneValue); + [Throws] + String getBatteryConfig(String sceneName); + [Throws] + boolean isBatteryConfigSupported(String sceneName); dictionary BatteryPluggedType { - number NONE = 0; number AC = 1; number USB = 2; number WIRELESS = 3; - }; dictionary BatteryChargeState { - number NONE = 0; number ENABLE = 1; number DISABLE = 2; number FULL = 3; - }; dictionary BatteryHealthState { - number UNKNOWN = 0; number GOOD = 1; number OVERHEAT = 2; number OVERVOLTAGE = 3; number COLD = 4; number DEAD = 5; - }; dictionary BatteryCapacityLevel { - number LEVEL_FULL = 0; number LEVEL_HIGH = 1; number LEVEL_NORMAL = 2; @@ -36,10 +35,8 @@ namespace batteryInfo { number LEVEL_WARNING = 4; number LEVEL_CRITICAL = 5; number LEVEL_SHUTDOWN = 6; - }; dictionary CommonEventBatteryChangedKey { - String EXTRA_SOC = "soc"; String EXTRA_CHARGE_STATE = "chargeState"; String EXTRA_HEALTH_STATE = "healthState"; @@ -49,18 +46,5 @@ namespace batteryInfo { String EXTRA_TEMPERATURE = "temperature"; String EXTRA_PRESENT = "present"; String EXTRA_CAPACITY_LEVEL = "capacityLevel"; - }; - [GlobalScope] - interface GlobalScope_batteryInfo_ohos_batteryInfo { - - [Throws] - static number setBatteryConfig(String sceneName, String sceneValue); - [Throws] - static String getBatteryConfig(String sceneName); - [Throws] - static boolean isBatteryConfigSupported(String sceneName); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.batteryStatistics.idl b/idl/@ohos.batteryStatistics.idl index f1f3a2c..3463c62 100644 --- a/idl/@ohos.batteryStatistics.idl +++ b/idl/@ohos.batteryStatistics.idl @@ -1,10 +1,9 @@ package ohos.batteryStatistics; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; +[DefaultExport] namespace batteryStats { - dictionary ConsumptionType { - number CONSUMPTION_TYPE_INVALID = -17; number CONSUMPTION_TYPE_APP = -16; number CONSUMPTION_TYPE_BLUETOOTH = -15; @@ -14,34 +13,25 @@ namespace batteryStats { number CONSUMPTION_TYPE_SCREEN = -11; number CONSUMPTION_TYPE_USER = -10; number CONSUMPTION_TYPE_WIFI = -9; - }; + [Throws] + async sequence getBatteryStats(); [Async, Synthetic] callback AsyncCallback_Array_BatteryStatsInfo_Void = void (sequence result); + [Throws] + void getBatteryStats(AsyncCallback_Array_BatteryStatsInfo_Void callback_); + [Throws] + f64 getAppPowerValue(i32 uid); + [Throws] + f64 getAppPowerPercent(i32 uid); + [Throws] + f64 getHardwareUnitPowerValue(ConsumptionType type); + [Throws] + f64 getHardwareUnitPowerPercent(ConsumptionType type); [Entity=Interface] interface BatteryStatsInfo { - - attribute number uid; + attribute i32 uid; attribute ConsumptionType type; - attribute number power; - + attribute f64 power; }; - [GlobalScope] - interface GlobalScope_batteryStats_ohos_batteryStatistics { - - [Throws] - static async sequence getBatteryStats(); - [Throws] - static void getBatteryStats(AsyncCallback_Array_BatteryStatsInfo_Void callback_); - [Throws] - static number getAppPowerValue(number uid); - [Throws] - static number getAppPowerPercent(number uid); - [Throws] - static number getHardwareUnitPowerValue(ConsumptionType type); - [Throws] - static number getHardwareUnitPowerPercent(ConsumptionType type); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.a2dp.idl b/idl/@ohos.bluetooth.a2dp.idl index a21a628..e0ea808 100644 --- a/idl/@ohos.bluetooth.a2dp.idl +++ b/idl/@ohos.bluetooth.a2dp.idl @@ -1,16 +1,17 @@ -package ohos.bluetooth; +package ohos.bluetooth.a2dp; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.bluetooth.baseProfile as baseProfile; +import ohos.bluetooth.baseProfile.default as baseProfile; +[DefaultExport] namespace a2dp { - typedef baseProfile.BaseProfile BaseProfile; + [Throws] + A2dpSourceProfile createA2dpSrcProfile(); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface A2dpSourceProfile: BaseProfile { - [Throws] void connect(String deviceId); [Throws] @@ -34,6 +35,8 @@ namespace a2dp { [Throws] void disableAbsoluteVolume(String deviceId, AsyncCallback_Void callback_); [Throws] + sequence getCurrentFullCodecInfo(String deviceId); + [Throws] CodecInfo getCurrentCodecInfo(String deviceId); [Throws] void setCurrentCodecInfo(String deviceId, CodecInfo codecInfo); @@ -43,50 +46,51 @@ namespace a2dp { async void enableAutoPlay(String deviceId); [Throws] async number getAutoPlayDisabledDuration(String deviceId); - }; [Entity=Interface] interface CodecInfo { - attribute CodecType codecType; attribute CodecBitsPerSample codecBitsPerSample; attribute CodecChannelMode codecChannelMode; attribute CodecSampleRate codecSampleRate; - + [Optional] + attribute CodecBitRate codecBitRate; + [Optional] + attribute CodecFrameLength codecFrameLength; + }; + [Entity=Interface] + interface CodecInfoList { + attribute CodecType codecType; + attribute sequence codecBitsPerSampleArray; + attribute sequence codecChannelModeArray; + attribute sequence codecSampleRateArray; + attribute sequence codecBitRateArray; + attribute sequence codecFrameLengthArray; }; dictionary PlayingState { - number STATE_NOT_PLAYING = 0; number STATE_PLAYING = 1; - }; dictionary CodecType { - number CODEC_TYPE_INVALID = -1; number CODEC_TYPE_SBC = 0; number CODEC_TYPE_AAC = 1; number CODEC_TYPE_L2HC = 2; number CODEC_TYPE_L2HCST = 3; number CODEC_TYPE_LDAC = 4; - }; dictionary CodecChannelMode { - number CODEC_CHANNEL_MODE_NONE = 0; number CODEC_CHANNEL_MODE_MONO = 1; number CODEC_CHANNEL_MODE_STEREO = 2; - }; dictionary CodecBitsPerSample { - number CODEC_BITS_PER_SAMPLE_NONE = 0; number CODEC_BITS_PER_SAMPLE_16 = 1; number CODEC_BITS_PER_SAMPLE_24 = 2; number CODEC_BITS_PER_SAMPLE_32 = 3; - }; dictionary CodecSampleRate { - number CODEC_SAMPLE_RATE_NONE = 0; number CODEC_SAMPLE_RATE_44100 = 1; number CODEC_SAMPLE_RATE_48000 = 2; @@ -94,14 +98,20 @@ namespace a2dp { number CODEC_SAMPLE_RATE_96000 = 4; number CODEC_SAMPLE_RATE_176400 = 5; number CODEC_SAMPLE_RATE_192000 = 6; - }; - [GlobalScope] - interface GlobalScope_a2dp_ohos_bluetooth_a2dp { - - [Throws] - static A2dpSourceProfile createA2dpSrcProfile(); - + dictionary CodecBitRate { + number CODEC_BIT_RATE_96000 = 0; + number CODEC_BIT_RATE_128000 = 1; + number CODEC_BIT_RATE_192000 = 2; + number CODEC_BIT_RATE_256000 = 3; + number CODEC_BIT_RATE_320000 = 4; + number CODEC_BIT_RATE_480000 = 5; + number CODEC_BIT_RATE_640000 = 6; + number CODEC_BIT_RATE_960000 = 7; + number CODEC_BIT_RATE_ABR = 8; + }; + dictionary CodecFrameLength { + number CODEC_FRAME_LENGTH_5MS = 0; + number CODEC_FRAME_LENGTH_10MS = 1; }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.access.idl b/idl/@ohos.bluetooth.access.idl index cd8baaa..7219a8f 100644 --- a/idl/@ohos.bluetooth.access.idl +++ b/idl/@ohos.bluetooth.access.idl @@ -1,14 +1,45 @@ -package ohos.bluetooth; +package ohos.bluetooth.access; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace access { - + [Throws] + void enableBluetooth(); + [Throws] + void disableBluetooth(); + [Throws] + async void enableBluetoothAsync(); + [Throws] + async void disableBluetoothAsync(); + [Throws] + async void notifyDialogResult(NotifyDialogResultParams notifyDialogResultParams); + [Throws] + async void restrictBluetooth(); + [Throws] + BluetoothState getState(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void factoryReset(AsyncCallback_Void callback_); + [Throws] + async void factoryReset(); + [Throws] + String getLocalAddress(); [Synthetic] callback Callback_BluetoothState_Void = void (BluetoothState parameter); + [Throws, DtsName="on", DtsTag="'stateChange'"] + void onStateChange(Callback_BluetoothState_Void callback_); + [Throws, DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional Callback_BluetoothState_Void callback_); + [Throws] + async void addPersistentDeviceId(String deviceId); + [Throws] + async void deletePersistentDeviceId(String deviceId); + [Throws] + sequence getPersistentDeviceIds(); + [Throws] + boolean isValidRandomDeviceId(String deviceId); dictionary BluetoothState { - number STATE_OFF = 0; number STATE_TURNING_ON = 1; number STATE_ON = 2; @@ -16,30 +47,13 @@ namespace access { number STATE_BLE_TURNING_ON = 4; number STATE_BLE_ON = 5; number STATE_BLE_TURNING_OFF = 6; - }; - [GlobalScope] - interface GlobalScope_access_ohos_bluetooth_access { - - [Throws] - static void enableBluetooth(); - [Throws] - static void disableBluetooth(); - [Throws] - static async void restrictBluetooth(); - [Throws] - static BluetoothState getState(); - [Throws] - static void factoryReset(AsyncCallback_Void callback_); - [Throws] - static async void factoryReset(); - [Throws] - static String getLocalAddress(); - [Throws, DtsName="on", DtsTag="'stateChange'"] - static void onStateChange(Callback_BluetoothState_Void callback_); - [Throws, DtsName="off", DtsTag="'stateChange'"] - static void offStateChange(optional Callback_BluetoothState_Void callback_); - + [Entity=Interface] + interface NotifyDialogResultParams { + attribute DialogType dialogType; + attribute boolean dialogResult; + }; + dictionary DialogType { + number BLUETOOTH_SWITCH = 0; }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.baseProfile.idl b/idl/@ohos.bluetooth.baseProfile.idl index 9f795dc..628ec23 100644 --- a/idl/@ohos.bluetooth.baseProfile.idl +++ b/idl/@ohos.bluetooth.baseProfile.idl @@ -1,34 +1,28 @@ -package ohos.bluetooth; +package ohos.bluetooth.baseProfile; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.bluetooth.constant as constant; +import ohos.bluetooth.constant.default as constant; +[DefaultExport] namespace baseProfile { - typedef constant.ProfileConnectionState ProfileConnectionState; dictionary ConnectionStrategy { - number CONNECTION_STRATEGY_UNSUPPORTED = 0; number CONNECTION_STRATEGY_ALLOWED = 1; number CONNECTION_STRATEGY_FORBIDDEN = 2; - }; dictionary DisconnectCause { - number USER_DISCONNECT = 0; number CONNECT_FROM_KEYBOARD = 1; number CONNECT_FROM_MOUSE = 2; number CONNECT_FROM_CAR = 3; number TOO_MANY_CONNECTED_DEVICES = 4; number CONNECT_FAIL_INTERNAL = 5; - }; [Entity=Interface] interface StateChangeParam { - attribute String deviceId; attribute ProfileConnectionState state; attribute DisconnectCause cause; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -38,7 +32,6 @@ namespace baseProfile { callback Callback_StateChangeParam_Void = void (StateChangeParam parameter); [Entity=Interface] interface BaseProfile { - [Throws] async void setConnectionStrategy(String deviceId, ConnectionStrategy strategy); [Throws] @@ -55,7 +48,5 @@ namespace baseProfile { void onConnectionStateChange(Callback_StateChangeParam_Void callback_); [Throws, DtsName="off", DtsTag="'connectionStateChange'"] void offConnectionStateChange(optional Callback_StateChangeParam_Void callback_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.ble.idl b/idl/@ohos.bluetooth.ble.idl index ff332b4..8be5104 100644 --- a/idl/@ohos.bluetooth.ble.idl +++ b/idl/@ohos.bluetooth.ble.idl @@ -1,18 +1,56 @@ -package ohos.bluetooth; +package ohos.bluetooth.ble; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.bluetooth.constant as constant; +import ohos.bluetooth.constant.default as constant; +[DefaultExport] namespace ble { - typedef constant.ProfileConnectionState ProfileConnectionState; + GattServer createGattServer(); + [Throws] + GattClientDevice createGattClientDevice(String deviceId); + BleScanner createBleScanner(); + [Throws] + sequence getConnectedBLEDevices(); + [Throws] + void startBLEScan(sequence filters, optional ScanOptions options); + [Throws] + void stopBLEScan(); + [Throws] + void startAdvertising(AdvertiseSetting setting, AdvertiseData advData, optional AdvertiseData advResponse); + [Throws] + void stopAdvertising(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void startAdvertising(AdvertisingParams advertisingParams, AsyncCallback_Number_Void callback_); + [Throws] + async number startAdvertising(AdvertisingParams advertisingParams); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enableAdvertising(AdvertisingEnableParams advertisingEnableParams, AsyncCallback_Void callback_); + [Throws] + async void enableAdvertising(AdvertisingEnableParams advertisingEnableParams); + [Throws] + void disableAdvertising(AdvertisingDisableParams advertisingDisableParams, AsyncCallback_Void callback_); + [Throws] + async void disableAdvertising(AdvertisingDisableParams advertisingDisableParams); + [Throws] + void stopAdvertising(number advertisingId, AsyncCallback_Void callback_); + [Throws] + async void stopAdvertising(number advertisingId); [Synthetic] callback Callback_AdvertisingStateChangeInfo_Void = void (AdvertisingStateChangeInfo parameter); + [Throws, DtsName="on", DtsTag="'advertisingStateChange'"] + void onAdvertisingStateChange(Callback_AdvertisingStateChangeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'advertisingStateChange'"] + void offAdvertisingStateChange(optional Callback_AdvertisingStateChangeInfo_Void callback_); [Synthetic] callback Callback_Array_ScanResult_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'BLEDeviceFind'"] + void onBLEDeviceFind(Callback_Array_ScanResult_Void callback_); + [Throws, DtsName="off", DtsTag="'BLEDeviceFind'"] + void offBLEDeviceFind(optional Callback_Array_ScanResult_Void callback_); [Synthetic] callback Callback_CharacteristicReadRequest_Void = void (CharacteristicReadRequest parameter); [Synthetic] @@ -27,7 +65,6 @@ namespace ble { callback Callback_Number_Void = void (number parameter); [Entity=Interface] interface GattServer { - [Throws] void addService(GattService service); [Throws] @@ -42,29 +79,28 @@ namespace ble { void sendResponse(ServerResponse serverResponse); [Throws, DtsName="on", DtsTag="'characteristicRead'"] void onCharacteristicRead(Callback_CharacteristicReadRequest_Void callback_); - [Throws, DtsName="off", DtsTag="'characteristicRead'"] - void offCharacteristicRead(optional Callback_CharacteristicReadRequest_Void callback_); [Throws, DtsName="on", DtsTag="'characteristicWrite'"] void onCharacteristicWrite(Callback_CharacteristicWriteRequest_Void callback_); - [Throws, DtsName="off", DtsTag="'characteristicWrite'"] - void offCharacteristicWrite(optional Callback_CharacteristicWriteRequest_Void callback_); [Throws, DtsName="on", DtsTag="'descriptorRead'"] void onDescriptorRead(Callback_DescriptorReadRequest_Void callback_); - [Throws, DtsName="off", DtsTag="'descriptorRead'"] - void offDescriptorRead(optional Callback_DescriptorReadRequest_Void callback_); [Throws, DtsName="on", DtsTag="'descriptorWrite'"] void onDescriptorWrite(Callback_DescriptorWriteRequest_Void callback_); - [Throws, DtsName="off", DtsTag="'descriptorWrite'"] - void offDescriptorWrite(optional Callback_DescriptorWriteRequest_Void callback_); [Throws, DtsName="on", DtsTag="'connectionStateChange'"] void onConnectionStateChange(Callback_BLEConnectionChangeState_Void callback_); - [Throws, DtsName="off", DtsTag="'connectionStateChange'"] - void offConnectionStateChange(optional Callback_BLEConnectionChangeState_Void callback_); [Throws, DtsName="on", DtsTag="'BLEMtuChange'"] void onBLEMtuChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'characteristicRead'"] + void offCharacteristicRead(optional Callback_CharacteristicReadRequest_Void callback_); + [Throws, DtsName="off", DtsTag="'characteristicWrite'"] + void offCharacteristicWrite(optional Callback_CharacteristicWriteRequest_Void callback_); + [Throws, DtsName="off", DtsTag="'descriptorRead'"] + void offDescriptorRead(optional Callback_DescriptorReadRequest_Void callback_); + [Throws, DtsName="off", DtsTag="'descriptorWrite'"] + void offDescriptorWrite(optional Callback_DescriptorWriteRequest_Void callback_); + [Throws, DtsName="off", DtsTag="'connectionStateChange'"] + void offConnectionStateChange(optional Callback_BLEConnectionChangeState_Void callback_); [Throws, DtsName="off", DtsTag="'BLEMtuChange'"] void offBLEMtuChange(optional Callback_Number_Void callback_); - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); @@ -78,7 +114,6 @@ namespace ble { callback Callback_BLECharacteristic_Void = void (BLECharacteristic parameter); [Entity=Interface] interface GattClientDevice { - [Throws] void connect(); [Throws] @@ -125,23 +160,21 @@ namespace ble { async void setCharacteristicChangeIndication(BLECharacteristic characteristic, boolean enable); [Throws, DtsName="on", DtsTag="'BLECharacteristicChange'"] void onBLECharacteristicChange(Callback_BLECharacteristic_Void callback_); - [Throws, DtsName="off", DtsTag="'BLECharacteristicChange'"] - void offBLECharacteristicChange(optional Callback_BLECharacteristic_Void callback_); [Throws, DtsName="on", DtsTag="'BLEConnectionStateChange'"] void onBLEConnectionStateChange(Callback_BLEConnectionChangeState_Void callback_); - [Throws, DtsName="off", DtsTag="'BLEConnectionStateChange'"] - void offBLEConnectionStateChange(optional Callback_BLEConnectionChangeState_Void callback_); [Throws, DtsName="on", DtsTag="'BLEMtuChange'"] void onBLEMtuChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'BLECharacteristicChange'"] + void offBLECharacteristicChange(optional Callback_BLECharacteristic_Void callback_); + [Throws, DtsName="off", DtsTag="'BLEConnectionStateChange'"] + void offBLEConnectionStateChange(optional Callback_BLEConnectionChangeState_Void callback_); [Throws, DtsName="off", DtsTag="'BLEMtuChange'"] void offBLEMtuChange(optional Callback_Number_Void callback_); - }; [Synthetic] callback Callback_ScanReport_Void = void (ScanReport parameter); [Entity=Interface] interface BleScanner { - [Throws] async void startScan(sequence filters, optional ScanOptions options); [Throws] @@ -150,21 +183,17 @@ namespace ble { void onBLEDeviceFind(Callback_ScanReport_Void callback_); [Throws, DtsName="off", DtsTag="'BLEDeviceFind'"] void offBLEDeviceFind(optional Callback_ScanReport_Void callback_); - }; [Entity=Interface] interface GattService { - attribute String serviceUuid; attribute boolean isPrimary; attribute sequence characteristics; [Optional] attribute sequence includeServices; - }; [Entity=Interface] interface BLECharacteristic { - attribute String serviceUuid; attribute String characteristicUuid; attribute buffer characteristicValue; @@ -173,41 +202,37 @@ namespace ble { attribute GattProperties properties; [Optional] attribute number characteristicValueHandle; - + [Optional] + attribute GattPermissions permissions; }; [Entity=Interface] interface BLEDescriptor { - attribute String serviceUuid; attribute String characteristicUuid; attribute String descriptorUuid; attribute buffer descriptorValue; [Optional] attribute number descriptorHandle; - + [Optional] + attribute GattPermissions permissions; }; [Entity=Interface] interface NotifyCharacteristic { - attribute String serviceUuid; attribute String characteristicUuid; attribute buffer characteristicValue; attribute boolean confirm; - }; [Entity=Interface] interface CharacteristicReadRequest { - attribute String deviceId; attribute number transId; attribute number offset; attribute String characteristicUuid; attribute String serviceUuid; - }; [Entity=Interface] interface CharacteristicWriteRequest { - attribute String deviceId; attribute number transId; attribute number offset; @@ -216,22 +241,18 @@ namespace ble { attribute buffer value; attribute String characteristicUuid; attribute String serviceUuid; - }; [Entity=Interface] interface DescriptorReadRequest { - attribute String deviceId; attribute number transId; attribute number offset; attribute String descriptorUuid; attribute String characteristicUuid; attribute String serviceUuid; - }; [Entity=Interface] interface DescriptorWriteRequest { - attribute String deviceId; attribute number transId; attribute number offset; @@ -241,56 +262,44 @@ namespace ble { attribute String descriptorUuid; attribute String characteristicUuid; attribute String serviceUuid; - }; [Entity=Interface] interface ServerResponse { - attribute String deviceId; attribute number transId; attribute number status; attribute number offset; attribute buffer value; - }; [Entity=Interface] interface BLEConnectionChangeState { - attribute String deviceId; attribute ProfileConnectionState state; - }; [Entity=Interface] interface ScanResult { - attribute String deviceId; attribute number rssi; attribute buffer data; attribute String deviceName; attribute boolean connectable; - }; [Entity=Interface] interface ScanReport { - attribute ScanReportType reportType; attribute sequence scanResult; - }; [Entity=Interface] interface AdvertiseSetting { - [Optional] attribute number interval; [Optional] attribute number txPower; [Optional] attribute boolean connectable; - }; [Entity=Interface] interface AdvertiseData { - attribute sequence serviceUuids; attribute sequence manufactureData; attribute sequence serviceData; @@ -298,57 +307,43 @@ namespace ble { attribute boolean includeDeviceName; [Optional] attribute boolean includeTxPower; - }; [Entity=Interface] interface AdvertisingParams { - attribute AdvertiseSetting advertisingSettings; attribute AdvertiseData advertisingData; [Optional] attribute AdvertiseData advertisingResponse; [Optional] attribute number duration; - }; [Entity=Interface] interface AdvertisingEnableParams { - attribute number advertisingId; [Optional] attribute number duration; - }; [Entity=Interface] interface AdvertisingDisableParams { - attribute number advertisingId; - }; [Entity=Interface] interface AdvertisingStateChangeInfo { - attribute number advertisingId; attribute AdvertisingState state; - }; [Entity=Interface] interface ManufactureData { - attribute number manufactureId; attribute buffer manufactureValue; - }; [Entity=Interface] interface ServiceData { - attribute String serviceUuid; attribute buffer serviceValue; - }; [Entity=Interface] interface ScanFilter { - [Optional] attribute String deviceId; [Optional] @@ -371,11 +366,9 @@ namespace ble { attribute buffer manufactureData; [Optional] attribute buffer manufactureDataMask; - }; [Entity=Interface] interface ScanOptions { - [Optional] attribute number interval; [Optional] @@ -386,11 +379,9 @@ namespace ble { attribute PhyType phyType; [Optional] attribute ScanReportMode reportMode; - }; [Entity=Interface] interface GattProperties { - [Optional] attribute boolean write; [Optional] @@ -401,96 +392,64 @@ namespace ble { attribute boolean notify; [Optional] attribute boolean indicate; - + [Optional] + attribute boolean broadcast; + [Optional] + attribute boolean authenticatedSignedWrite; + [Optional] + attribute boolean extendedProperties; }; dictionary GattWriteType { - number WRITE = 1; number WRITE_NO_RESPONSE = 2; - }; dictionary ScanDuty { - number SCAN_MODE_LOW_POWER = 0; number SCAN_MODE_BALANCED = 1; number SCAN_MODE_LOW_LATENCY = 2; - }; dictionary MatchMode { - number MATCH_MODE_AGGRESSIVE = 1; number MATCH_MODE_STICKY = 2; - }; dictionary AdvertisingState { - number STARTED = 1; number ENABLED = 2; number DISABLED = 3; number STOPPED = 4; - }; dictionary PhyType { - number PHY_LE_1M = 1; number PHY_LE_ALL_SUPPORTED = 255; - }; dictionary ScanReportMode { - number NORMAL = 1; + number BATCH = 2; number FENCE_SENSITIVITY_LOW = 10; number FENCE_SENSITIVITY_HIGH = 11; - }; dictionary ScanReportType { - number ON_FOUND = 1; number ON_LOST = 2; - + number ON_BATCH = 3; }; - [GlobalScope] - interface GlobalScope_ble_ohos_bluetooth_ble { - - static GattServer createGattServer(); - [Throws] - static GattClientDevice createGattClientDevice(String deviceId); - static BleScanner createBleScanner(); - [Throws] - static sequence getConnectedBLEDevices(); - [Throws] - static void startBLEScan(sequence filters, optional ScanOptions options); - [Throws] - static void stopBLEScan(); - [Throws] - static void startAdvertising(AdvertiseSetting setting, AdvertiseData advData, optional AdvertiseData advResponse); - [Throws] - static void stopAdvertising(); - [Throws] - static void startAdvertising(AdvertisingParams advertisingParams, AsyncCallback_Number_Void callback_); - [Throws] - static async number startAdvertising(AdvertisingParams advertisingParams); - [Throws] - static void enableAdvertising(AdvertisingEnableParams advertisingEnableParams, AsyncCallback_Void callback_); - [Throws] - static async void enableAdvertising(AdvertisingEnableParams advertisingEnableParams); - [Throws] - static void disableAdvertising(AdvertisingDisableParams advertisingDisableParams, AsyncCallback_Void callback_); - [Throws] - static async void disableAdvertising(AdvertisingDisableParams advertisingDisableParams); - [Throws] - static void stopAdvertising(number advertisingId, AsyncCallback_Void callback_); - [Throws] - static async void stopAdvertising(number advertisingId); - [Throws, DtsName="on", DtsTag="'advertisingStateChange'"] - static void onAdvertisingStateChange(Callback_AdvertisingStateChangeInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'advertisingStateChange'"] - static void offAdvertisingStateChange(optional Callback_AdvertisingStateChangeInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'BLEDeviceFind'"] - static void onBLEDeviceFind(Callback_Array_ScanResult_Void callback_); - [Throws, DtsName="off", DtsTag="'BLEDeviceFind'"] - static void offBLEDeviceFind(optional Callback_Array_ScanResult_Void callback_); - + [Entity=Interface] + interface GattPermissions { + [Optional] + attribute boolean read; + [Optional] + attribute boolean readEncrypted; + [Optional] + attribute boolean readEncryptedMitm; + [Optional] + attribute boolean write; + [Optional] + attribute boolean writeEncrypted; + [Optional] + attribute boolean writeEncryptedMitm; + [Optional] + attribute boolean writeSigned; + [Optional] + attribute boolean writeSignedMitm; }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.connection.idl b/idl/@ohos.bluetooth.connection.idl index facc0b1..e16ef1d 100644 --- a/idl/@ohos.bluetooth.connection.idl +++ b/idl/@ohos.bluetooth.connection.idl @@ -1,77 +1,168 @@ -package ohos.bluetooth; +package ohos.bluetooth.connection; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.bluetooth.constant as constant; +import ohos.bluetooth.constant.default as constant; +[DefaultExport] namespace connection { - typedef constant.ProfileConnectionState ProfileConnectionState; typedef constant.ProfileId ProfileId; typedef constant.ProfileUuids ProfileUuids; typedef constant.MajorClass MajorClass; typedef constant.MajorMinorClass MajorMinorClass; + [Throws] + ProfileConnectionState getProfileConnectionState(optional ProfileId profileId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void pairDevice(String deviceId, AsyncCallback_Void callback_); + [Throws] + async void pairDevice(String deviceId); + [Throws] + void pairCredibleDevice(String deviceId, BluetoothTransport transport, AsyncCallback_Void callback_); + [Throws] + async void pairCredibleDevice(String deviceId, BluetoothTransport transport); + [Throws] + void cancelPairedDevice(String deviceId, AsyncCallback_Void callback_); + [Throws] + async void cancelPairedDevice(String deviceId); + [Throws] + void cancelPairingDevice(String deviceId, AsyncCallback_Void callback_); + [Throws] + async void cancelPairingDevice(String deviceId); + [Throws] + String getRemoteDeviceName(String deviceId); + [Throws] + String getRemoteDeviceName(String deviceId, optional boolean alias); + [Throws] + DeviceClass getRemoteDeviceClass(String deviceId); + [Throws] + BluetoothTransport getRemoteDeviceTransport(String deviceId); + [Throws] + String getLocalName(); + [Throws] + sequence getPairedDevices(); + [Throws] + BondState getPairState(String deviceId); + [Throws] + void setDevicePairingConfirmation(String deviceId, boolean accept); + [Throws] + void setDevicePinCode(String deviceId, String code, AsyncCallback_Void callback_); + [Throws] + async void setDevicePinCode(String deviceId, String code); + [Deprecated, Throws] + void setLocalName(String name); + [Throws] + void setBluetoothScanMode(ScanMode mode, number duration); + [Throws] + ScanMode getBluetoothScanMode(); + [Throws] + void startBluetoothDiscovery(); + [Throws] + void stopBluetoothDiscovery(); + [Throws] + boolean isBluetoothDiscovering(); [Async, Synthetic] callback AsyncCallback_Array_ProfileUuids_Void = void (sequence result); + [Throws] + void getLocalProfileUuids(AsyncCallback_Array_ProfileUuids_Void callback_); + [Throws] + async sequence getLocalProfileUuids(); + [Throws] + void getRemoteProfileUuids(String deviceId, AsyncCallback_Array_ProfileUuids_Void callback_); + [Throws] + async sequence getRemoteProfileUuids(String deviceId); + [Throws] + void connectAllowedProfiles(String deviceId, AsyncCallback_Void callback_); + [Throws] + async void connectAllowedProfiles(String deviceId); + [Throws] + void disconnectAllowedProfiles(String deviceId, AsyncCallback_Void callback_); + [Throws] + async BatteryInfo getRemoteDeviceBatteryInfo(String deviceId); + [Throws] + String getRemoteProductId(String deviceId); + [Throws] + async void disconnectAllowedProfiles(String deviceId); + [Throws] + async void setRemoteDeviceName(String deviceId, String name); + [Throws] + async void setRemoteDeviceType(String deviceId, DeviceType type); + [Throws] + async DeviceType getRemoteDeviceType(String deviceId); + [Throws] + async void controlDeviceAction(ControlDeviceActionParams controlDeviceActionParams); + [Throws] + async number getLastConnectionTime(String deviceId); + [Throws] + async void updateCloudBluetoothDevice(TrustedPairedDevices trustedPairedDevices); [Synthetic] callback Callback_Array_String_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'bluetoothDeviceFind'"] + void onBluetoothDeviceFind(Callback_Array_String_Void callback_); + [Throws, DtsName="off", DtsTag="'bluetoothDeviceFind'"] + void offBluetoothDeviceFind(optional Callback_Array_String_Void callback_); [Synthetic] callback Callback_Array_DiscoveryResult_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'discoveryResult'"] + void onDiscoveryResult(Callback_Array_DiscoveryResult_Void callback_); + [Throws, DtsName="off", DtsTag="'discoveryResult'"] + void offDiscoveryResult(optional Callback_Array_DiscoveryResult_Void callback_); [Synthetic] callback Callback_BondStateParam_Void = void (BondStateParam parameter); + [Throws, DtsName="on", DtsTag="'bondStateChange'"] + void onBondStateChange(Callback_BondStateParam_Void callback_); + [Throws, DtsName="off", DtsTag="'bondStateChange'"] + void offBondStateChange(optional Callback_BondStateParam_Void callback_); [Synthetic] callback Callback_PinRequiredParam_Void = void (PinRequiredParam parameter); + [Throws, DtsName="on", DtsTag="'pinRequired'"] + void onPinRequired(Callback_PinRequiredParam_Void callback_); + [Throws, DtsName="off", DtsTag="'pinRequired'"] + void offPinRequired(optional Callback_PinRequiredParam_Void callback_); [Synthetic] callback Callback_BatteryInfo_Void = void (BatteryInfo parameter); + [Throws, DtsName="on", DtsTag="'batteryChange'"] + void onBatteryChange(Callback_BatteryInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'batteryChange'"] + void offBatteryChange(optional Callback_BatteryInfo_Void callback_); [Entity=Interface] interface BondStateParam { - attribute String deviceId; attribute BondState state; attribute UnbondCause cause; - }; [Entity=Interface] interface PinRequiredParam { - attribute String deviceId; attribute String pinCode; attribute PinType pinType; - }; [Entity=Interface] interface DeviceClass { - attribute MajorClass majorClass; attribute MajorMinorClass majorMinorClass; attribute number classOfDevice; - }; dictionary BluetoothTransport { - number TRANSPORT_BR_EDR = 0; number TRANSPORT_LE = 1; - + number TRANSPORT_DUAL = 2; + number TRANSPORT_UNKNOWN = 3; }; dictionary ScanMode { - number SCAN_MODE_NONE = 0; number SCAN_MODE_CONNECTABLE = 1; number SCAN_MODE_GENERAL_DISCOVERABLE = 2; number SCAN_MODE_LIMITED_DISCOVERABLE = 3; number SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4; number SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5; - }; dictionary BondState { - number BOND_STATE_INVALID = 0; number BOND_STATE_BONDING = 1; number BOND_STATE_BONDED = 2; - }; dictionary PinType { - number PIN_TYPE_ENTER_PIN_CODE = 0; number PIN_TYPE_ENTER_PASSKEY = 1; number PIN_TYPE_CONFIRM_PASSKEY = 2; @@ -80,20 +171,16 @@ namespace connection { number PIN_TYPE_DISPLAY_PIN_CODE = 5; number PIN_TYPE_OOB_CONSENT = 6; number PIN_TYPE_PIN_16_DIGITS = 7; - }; [Entity=Interface] interface DiscoveryResult { - attribute String deviceId; attribute number rssi; attribute String deviceName; attribute DeviceClass deviceClass; - }; [Entity=Interface] interface BatteryInfo { - attribute String deviceId; attribute number batteryLevel; attribute number leftEarBatteryLevel; @@ -102,18 +189,14 @@ namespace connection { attribute DeviceChargeState rightEarChargeState; attribute number boxBatteryLevel; attribute DeviceChargeState boxChargeState; - }; dictionary DeviceChargeState { - number DEVICE_NORMAL_CHARGE_NOT_CHARGED = 0; number DEVICE_NORMAL_CHARGE_IN_CHARGING = 1; number DEVICE_SUPER_CHARGE_NOT_CHARGED = 2; number DEVICE_SUPER_CHARGE_IN_CHARGING = 3; - }; dictionary DeviceType { - number DEVICE_TYPE_DEFAULT = 0; number DEVICE_TYPE_CAR = 1; number DEVICE_TYPE_HEADSET = 2; @@ -122,58 +205,44 @@ namespace connection { number DEVICE_TYPE_WATCH = 5; number DEVICE_TYPE_SPEAKER = 6; number DEVICE_TYPE_OTHERS = 7; - }; dictionary UnbondCause { - number USER_REMOVED = 0; number REMOTE_DEVICE_DOWN = 1; number AUTH_FAILURE = 2; number AUTH_REJECTED = 3; number INTERNAL_ERROR = 4; - }; [Entity=Interface] interface ControlDeviceActionParams { - attribute String deviceId; attribute ControlType type; attribute ControlTypeValue typeValue; attribute ControlObject controlObject; - }; dictionary ControlType { - number PLAY = 0; number VIBRATE = 1; number FLASH = 2; number LOCK = 3; number ERASE = 4; - }; dictionary ControlTypeValue { - number DISABLE = 0; number ENABLE = 1; number QUERY = 2; - }; dictionary ControlObject { - number LEFT_EAR = 0; number RIGHT_EAR = 1; number LEFT_RIGHT_EAR = 2; - }; [Entity=Interface] interface TrustedPairedDevices { - attribute sequence trustedPairedDevices; - }; [Entity=Interface] interface TrustedPairedDevice { - attribute String sn; attribute String deviceType; attribute String modelId; @@ -190,110 +259,5 @@ namespace connection { attribute number deviceNameTime; attribute buffer secureAdvertisingInfo; attribute number pairState; - }; - [GlobalScope] - interface GlobalScope_connection_ohos_bluetooth_connection { - - [Throws] - static ProfileConnectionState getProfileConnectionState(optional ProfileId profileId); - [Throws] - static void pairDevice(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void pairDevice(String deviceId); - [Throws] - static void pairCredibleDevice(String deviceId, BluetoothTransport transport, AsyncCallback_Void callback_); - [Throws] - static async void pairCredibleDevice(String deviceId, BluetoothTransport transport); - [Throws] - static void cancelPairedDevice(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void cancelPairedDevice(String deviceId); - [Throws] - static void cancelPairingDevice(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void cancelPairingDevice(String deviceId); - [Throws] - static String getRemoteDeviceName(String deviceId); - [Throws] - static DeviceClass getRemoteDeviceClass(String deviceId); - [Throws] - static String getLocalName(); - [Throws] - static sequence getPairedDevices(); - [Throws] - static BondState getPairState(String deviceId); - [Throws] - static void setDevicePairingConfirmation(String deviceId, boolean accept); - [Throws] - static void setDevicePinCode(String deviceId, String code, AsyncCallback_Void callback_); - [Throws] - static async void setDevicePinCode(String deviceId, String code); - [Deprecated, Throws] - static void setLocalName(String name); - [Throws] - static void setBluetoothScanMode(ScanMode mode, number duration); - [Throws] - static ScanMode getBluetoothScanMode(); - [Throws] - static void startBluetoothDiscovery(); - [Throws] - static void stopBluetoothDiscovery(); - [Throws] - static boolean isBluetoothDiscovering(); - [Throws] - static void getLocalProfileUuids(AsyncCallback_Array_ProfileUuids_Void callback_); - [Throws] - static async sequence getLocalProfileUuids(); - [Throws] - static void getRemoteProfileUuids(String deviceId, AsyncCallback_Array_ProfileUuids_Void callback_); - [Throws] - static async sequence getRemoteProfileUuids(String deviceId); - [Throws] - static void connectAllowedProfiles(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void connectAllowedProfiles(String deviceId); - [Throws] - static void disconnectAllowedProfiles(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async BatteryInfo getRemoteDeviceBatteryInfo(String deviceId); - [Throws] - static String getRemoteProductId(String deviceId); - [Throws] - static async void disconnectAllowedProfiles(String deviceId); - [Throws] - static async void setRemoteDeviceName(String deviceId, String name); - [Throws] - static async void setRemoteDeviceType(String deviceId, DeviceType type); - [Throws] - static async DeviceType getRemoteDeviceType(String deviceId); - [Throws] - static async void controlDeviceAction(ControlDeviceActionParams controlDeviceActionParams); - [Throws] - static async number getLastConnectionTime(String deviceId); - [Throws] - static async void updateCloudBluetoothDevice(TrustedPairedDevices trustedPairedDevices); - [Throws, DtsName="on", DtsTag="'bluetoothDeviceFind'"] - static void onBluetoothDeviceFind(Callback_Array_String_Void callback_); - [Throws, DtsName="off", DtsTag="'bluetoothDeviceFind'"] - static void offBluetoothDeviceFind(optional Callback_Array_String_Void callback_); - [Throws, DtsName="on", DtsTag="'discoveryResult'"] - static void onDiscoveryResult(Callback_Array_DiscoveryResult_Void callback_); - [Throws, DtsName="off", DtsTag="'discoveryResult'"] - static void offDiscoveryResult(optional Callback_Array_DiscoveryResult_Void callback_); - [Throws, DtsName="on", DtsTag="'bondStateChange'"] - static void onBondStateChange(Callback_BondStateParam_Void callback_); - [Throws, DtsName="off", DtsTag="'bondStateChange'"] - static void offBondStateChange(optional Callback_BondStateParam_Void callback_); - [Throws, DtsName="on", DtsTag="'pinRequired'"] - static void onPinRequired(Callback_PinRequiredParam_Void callback_); - [Throws, DtsName="off", DtsTag="'pinRequired'"] - static void offPinRequired(optional Callback_PinRequiredParam_Void callback_); - [Throws, DtsName="on", DtsTag="'batteryChange'"] - static void onBatteryChange(Callback_BatteryInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'batteryChange'"] - static void offBatteryChange(optional Callback_BatteryInfo_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.constant.idl b/idl/@ohos.bluetooth.constant.idl index 22faab4..59ce248 100644 --- a/idl/@ohos.bluetooth.constant.idl +++ b/idl/@ohos.bluetooth.constant.idl @@ -1,16 +1,13 @@ -package ohos.bluetooth; +package ohos.bluetooth.constant; +[DefaultExport] namespace constant { - dictionary ProfileId { - number PROFILE_A2DP_SOURCE = 1; number PROFILE_HANDSFREE_AUDIO_GATEWAY = 4; number PROFILE_HID_HOST = 6; number PROFILE_PAN_NETWORK = 7; - }; dictionary ProfileUuids { - String PROFILE_UUID_HFP_AG = "0000111F-0000-1000-8000-00805F9B34FB"; String PROFILE_UUID_HFP_HF = "0000111E-0000-1000-8000-00805F9B34FB"; String PROFILE_UUID_HSP_AG = "00001112-0000-1000-8000-00805F9B34FB"; @@ -21,18 +18,14 @@ namespace constant { String PROFILE_UUID_AVRCP_TG = "0000110C-0000-1000-8000-00805F9B34FB"; String PROFILE_UUID_HID = "00001124-0000-1000-8000-00805F9B34FB"; String PROFILE_UUID_HOGP = "00001812-0000-1000-8000-00805F9B34FB"; - }; dictionary ProfileConnectionState { - number STATE_DISCONNECTED = 0; number STATE_CONNECTING = 1; number STATE_CONNECTED = 2; number STATE_DISCONNECTING = 3; - }; dictionary MajorClass { - number MAJOR_MISC = 0; number MAJOR_COMPUTER = 256; number MAJOR_PHONE = 512; @@ -44,10 +37,8 @@ namespace constant { number MAJOR_TOY = 2048; number MAJOR_HEALTH = 2304; number MAJOR_UNCATEGORIZED = 7936; - }; dictionary MajorMinorClass { - number COMPUTER_UNCATEGORIZED = 256; number COMPUTER_DESKTOP = 260; number COMPUTER_SERVER = 264; @@ -134,14 +125,10 @@ namespace constant { number HEALTH_ANKLE_PROSTHESIS = 2356; number HEALTH_GENERIC_HEALTH_MANAGER = 2360; number HEALTH_PERSONAL_MOBILITY_DEVICE = 2364; - }; dictionary AccessAuthorization { - number UNKNOWN = 0; number ALLOWED = 1; number REJECTED = 2; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.hfp.idl b/idl/@ohos.bluetooth.hfp.idl index 1b296a6..a890928 100644 --- a/idl/@ohos.bluetooth.hfp.idl +++ b/idl/@ohos.bluetooth.hfp.idl @@ -1,23 +1,15 @@ -package ohos.bluetooth; -import ohos.bluetooth.baseProfile as baseProfile; +package ohos.bluetooth.hfp; +import ohos.bluetooth.baseProfile.default as baseProfile; +[DefaultExport] namespace hfp { - typedef baseProfile.BaseProfile BaseProfile; + [Throws] + HandsFreeAudioGatewayProfile createHfpAgProfile(); [Entity=Interface] interface HandsFreeAudioGatewayProfile: BaseProfile { - [Throws] void connect(String deviceId); [Throws] void disconnect(String deviceId); - }; - [GlobalScope] - interface GlobalScope_hfp_ohos_bluetooth_hfp { - - [Throws] - static HandsFreeAudioGatewayProfile createHfpAgProfile(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.hid.idl b/idl/@ohos.bluetooth.hid.idl index 91ecbf0..527da86 100644 --- a/idl/@ohos.bluetooth.hid.idl +++ b/idl/@ohos.bluetooth.hid.idl @@ -1,23 +1,15 @@ -package ohos.bluetooth; -import ohos.bluetooth.baseProfile as baseProfile; +package ohos.bluetooth.hid; +import ohos.bluetooth.baseProfile.default as baseProfile; +[DefaultExport] namespace hid { - typedef baseProfile.BaseProfile BaseProfile; + [Throws] + HidHostProfile createHidHostProfile(); [Entity=Interface] interface HidHostProfile: BaseProfile { - [Throws] void connect(String deviceId); [Throws] void disconnect(String deviceId); - }; - [GlobalScope] - interface GlobalScope_hid_ohos_bluetooth_hid { - - [Throws] - static HidHostProfile createHidHostProfile(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.idl b/idl/@ohos.bluetooth.idl index 1804fff..c4fc71c 100644 --- a/idl/@ohos.bluetooth.idl +++ b/idl/@ohos.bluetooth.idl @@ -1,34 +1,99 @@ -package ohos; +package ohos.bluetooth; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace bluetooth { - + [Deprecated] + BluetoothState getState(); + [Deprecated] + ProfileConnectionState getBtConnectionState(); + [Deprecated] + boolean pairDevice(String deviceId); + [Deprecated] + boolean cancelPairedDevice(String deviceId); + [Deprecated] + String getRemoteDeviceName(String deviceId); + [Deprecated] + DeviceClass getRemoteDeviceClass(String deviceId); + [Deprecated] + boolean enableBluetooth(); + [Deprecated] + boolean disableBluetooth(); + [Deprecated] + String getLocalName(); + [Deprecated] + sequence getPairedDevices(); + [Deprecated] + ProfileConnectionState getProfileConnState(ProfileId profileId); + [Deprecated] + boolean setDevicePairingConfirmation(String device, boolean accept); + [Deprecated] + boolean setLocalName(String name); + [Deprecated] + boolean setBluetoothScanMode(ScanMode mode, number duration); + [Deprecated] + ScanMode getBluetoothScanMode(); + [Deprecated] + boolean startBluetoothDiscovery(); + [Deprecated] + boolean stopBluetoothDiscovery(); [Synthetic] callback Callback_Array_String_Void = void (sequence parameter); + [Deprecated, DtsName="on", DtsTag="'bluetoothDeviceFind'"] + void onBluetoothDeviceFind(Callback_Array_String_Void callback_); + [Deprecated, DtsName="off", DtsTag="'bluetoothDeviceFind'"] + void offBluetoothDeviceFind(optional Callback_Array_String_Void callback_); [Synthetic] callback Callback_BondStateParam_Void = void (BondStateParam parameter); + [Deprecated, DtsName="on", DtsTag="'bondStateChange'"] + void onBondStateChange(Callback_BondStateParam_Void callback_); + [Deprecated, DtsName="off", DtsTag="'bondStateChange'"] + void offBondStateChange(optional Callback_BondStateParam_Void callback_); [Synthetic] callback Callback_PinRequiredParam_Void = void (PinRequiredParam parameter); + [Deprecated, DtsName="on", DtsTag="'pinRequired'"] + void onPinRequired(Callback_PinRequiredParam_Void callback_); + [Deprecated, DtsName="off", DtsTag="'pinRequired'"] + void offPinRequired(optional Callback_PinRequiredParam_Void callback_); [Synthetic] callback Callback_BluetoothState_Void = void (BluetoothState parameter); + [Deprecated, DtsName="on", DtsTag="'stateChange'"] + void onStateChange(Callback_BluetoothState_Void callback_); + [Deprecated, DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional Callback_BluetoothState_Void callback_); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void sppListen(String name, SppOption option, AsyncCallback_Number_Void callback_); + [Deprecated] + void sppAccept(number serverSocket, AsyncCallback_Number_Void callback_); + [Deprecated] + void sppConnect(String device, SppOption option, AsyncCallback_Number_Void callback_); + [Deprecated] + void sppCloseServerSocket(number socket); + [Deprecated] + void sppCloseClientSocket(number socket); + [Deprecated] + boolean sppWrite(number clientSocket, buffer data); [Synthetic] callback Callback_Buffer_Void = void (buffer parameter); + [Deprecated, DtsName="on", DtsTag="'sppRead'"] + void onSppRead(number clientSocket, Callback_Buffer_Void callback_); + [Deprecated, DtsName="off", DtsTag="'sppRead'"] + void offSppRead(number clientSocket, optional Callback_Buffer_Void callback_); + [Deprecated] + (A2dpSourceProfile or HandsFreeAudioGatewayProfile) getProfile(ProfileId profileId); [Entity=Interface, Deprecated] interface BaseProfile { - [Deprecated] sequence getConnectionDevices(); [Deprecated] ProfileConnectionState getDeviceState(String device); - }; [Synthetic] callback Callback_StateChangeParam_Void = void (StateChangeParam parameter); [Entity=Interface, Deprecated] interface A2dpSourceProfile: BaseProfile { - [Deprecated] boolean connect(String device); [Deprecated] @@ -39,11 +104,9 @@ namespace bluetooth { void offConnectionStateChange(optional Callback_StateChangeParam_Void callback_); [Deprecated] PlayingState getPlayingState(String device); - }; [Entity=Interface, Deprecated] interface HandsFreeAudioGatewayProfile: BaseProfile { - [Deprecated] boolean connect(String device); [Deprecated] @@ -52,32 +115,24 @@ namespace bluetooth { void onConnectionStateChange(Callback_StateChangeParam_Void callback_); [Deprecated, DtsName="off", DtsTag="'connectionStateChange'"] void offConnectionStateChange(optional Callback_StateChangeParam_Void callback_); - }; namespace BLE { - + [Deprecated] + GattServer createGattServer(); + [Deprecated] + GattClientDevice createGattClientDevice(String deviceId); + [Deprecated] + sequence getConnectedBLEDevices(); + [Deprecated] + void startBLEScan(sequence filters, optional ScanOptions options); + [Deprecated] + void stopBLEScan(); [Synthetic] callback Callback_Array_ScanResult_Void = void (sequence parameter); - [GlobalScope] - interface GlobalScope_bluetooth.BLE_ohos_bluetooth { - - [Deprecated] - static GattServer createGattServer(); - [Deprecated] - static GattClientDevice createGattClientDevice(String deviceId); - [Deprecated] - static sequence getConnectedBLEDevices(); - [Deprecated] - static void startBLEScan(sequence filters, optional ScanOptions options); - [Deprecated] - static void stopBLEScan(); - [Deprecated, DtsName="on", DtsTag="'BLEDeviceFind'"] - static void onBLEDeviceFind(Callback_Array_ScanResult_Void callback_); - [Deprecated, DtsName="off", DtsTag="'BLEDeviceFind'"] - static void offBLEDeviceFind(optional Callback_Array_ScanResult_Void callback_); - - }; - + [Deprecated, DtsName="on", DtsTag="'BLEDeviceFind'"] + void onBLEDeviceFind(Callback_Array_ScanResult_Void callback_); + [Deprecated, DtsName="off", DtsTag="'BLEDeviceFind'"] + void offBLEDeviceFind(optional Callback_Array_ScanResult_Void callback_); }; [Synthetic] callback Callback_CharacteristicReadReq_Void = void (CharacteristicReadReq parameter); @@ -91,7 +146,6 @@ namespace bluetooth { callback Callback_BLEConnectChangedState_Void = void (BLEConnectChangedState parameter); [Entity=Interface, Deprecated] interface GattServer { - [Deprecated] void startAdvertising(AdvertiseSetting setting, AdvertiseData advData, optional AdvertiseData advResponse); [Deprecated] @@ -108,25 +162,24 @@ namespace bluetooth { boolean sendResponse(ServerResponse serverResponse); [Deprecated, DtsName="on", DtsTag="'characteristicRead'"] void onCharacteristicRead(Callback_CharacteristicReadReq_Void callback_); - [Deprecated, DtsName="off", DtsTag="'characteristicRead'"] - void offCharacteristicRead(optional Callback_CharacteristicReadReq_Void callback_); [Deprecated, DtsName="on", DtsTag="'characteristicWrite'"] void onCharacteristicWrite(Callback_CharacteristicWriteReq_Void callback_); - [Deprecated, DtsName="off", DtsTag="'characteristicWrite'"] - void offCharacteristicWrite(optional Callback_CharacteristicWriteReq_Void callback_); [Deprecated, DtsName="on", DtsTag="'descriptorRead'"] void onDescriptorRead(Callback_DescriptorReadReq_Void callback_); - [Deprecated, DtsName="off", DtsTag="'descriptorRead'"] - void offDescriptorRead(optional Callback_DescriptorReadReq_Void callback_); [Deprecated, DtsName="on", DtsTag="'descriptorWrite'"] void onDescriptorWrite(Callback_DescriptorWriteReq_Void callback_); - [Deprecated, DtsName="off", DtsTag="'descriptorWrite'"] - void offDescriptorWrite(optional Callback_DescriptorWriteReq_Void callback_); [Deprecated, DtsName="on", DtsTag="'connectStateChange'"] void onConnectStateChange(Callback_BLEConnectChangedState_Void callback_); + [Deprecated, DtsName="off", DtsTag="'characteristicRead'"] + void offCharacteristicRead(optional Callback_CharacteristicReadReq_Void callback_); + [Deprecated, DtsName="off", DtsTag="'characteristicWrite'"] + void offCharacteristicWrite(optional Callback_CharacteristicWriteReq_Void callback_); + [Deprecated, DtsName="off", DtsTag="'descriptorRead'"] + void offDescriptorRead(optional Callback_DescriptorReadReq_Void callback_); + [Deprecated, DtsName="off", DtsTag="'descriptorWrite'"] + void offDescriptorWrite(optional Callback_DescriptorWriteReq_Void callback_); [Deprecated, DtsName="off", DtsTag="'connectStateChange'"] void offConnectStateChange(optional Callback_BLEConnectChangedState_Void callback_); - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); @@ -140,7 +193,6 @@ namespace bluetooth { callback Callback_BLECharacteristic_Void = void (BLECharacteristic parameter); [Entity=Interface, Deprecated] interface GattClientDevice { - [Deprecated] boolean connect(); [Deprecated] @@ -177,17 +229,15 @@ namespace bluetooth { boolean setNotifyCharacteristicChanged(BLECharacteristic characteristic, boolean enable); [Deprecated, DtsName="on", DtsTag="'BLECharacteristicChange'"] void onBLECharacteristicChange(Callback_BLECharacteristic_Void callback_); - [Deprecated, DtsName="off", DtsTag="'BLECharacteristicChange'"] - void offBLECharacteristicChange(optional Callback_BLECharacteristic_Void callback_); [Deprecated, DtsName="on", DtsTag="'BLEConnectionStateChange'"] void onBLEConnectionStateChange(Callback_BLEConnectChangedState_Void callback_); + [Deprecated, DtsName="off", DtsTag="'BLECharacteristicChange'"] + void offBLECharacteristicChange(optional Callback_BLECharacteristic_Void callback_); [Deprecated, DtsName="off", DtsTag="'BLEConnectionStateChange'"] void offBLEConnectionStateChange(optional Callback_BLEConnectChangedState_Void callback_); - }; [Entity=Interface, Deprecated] interface GattService { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -196,11 +246,9 @@ namespace bluetooth { attribute sequence characteristics; [Optional, Deprecated] attribute sequence includeServices; - }; [Entity=Interface, Deprecated] interface BLECharacteristic { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -209,11 +257,9 @@ namespace bluetooth { attribute buffer characteristicValue; [Deprecated] attribute sequence descriptors; - }; [Entity=Interface, Deprecated] interface BLEDescriptor { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -222,11 +268,9 @@ namespace bluetooth { attribute String descriptorUuid; [Deprecated] attribute buffer descriptorValue; - }; [Entity=Interface, Deprecated] interface NotifyCharacteristic { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -235,11 +279,9 @@ namespace bluetooth { attribute buffer characteristicValue; [Deprecated] attribute boolean confirm; - }; [Entity=Interface, Deprecated] interface CharacteristicReadReq { - [Deprecated] attribute String deviceId; [Deprecated] @@ -250,11 +292,9 @@ namespace bluetooth { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface CharacteristicWriteReq { - [Deprecated] attribute String deviceId; [Deprecated] @@ -271,11 +311,9 @@ namespace bluetooth { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface DescriptorReadReq { - [Deprecated] attribute String deviceId; [Deprecated] @@ -288,11 +326,9 @@ namespace bluetooth { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface DescriptorWriteReq { - [Deprecated] attribute String deviceId; [Deprecated] @@ -311,11 +347,9 @@ namespace bluetooth { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface ServerResponse { - [Deprecated] attribute String deviceId; [Deprecated] @@ -326,153 +360,123 @@ namespace bluetooth { attribute number offset; [Deprecated] attribute buffer value; - }; [Entity=Interface, Deprecated] interface BLEConnectChangedState { - [Deprecated] attribute String deviceId; [Deprecated] attribute ProfileConnectionState state; - }; [Entity=Interface, Deprecated] interface ScanResult { - [Deprecated] attribute String deviceId; [Deprecated] attribute number rssi; [Deprecated] attribute buffer data; - }; [Entity=Interface, Deprecated] interface AdvertiseSetting { - [Optional, Deprecated] attribute number interval; [Optional, Deprecated] attribute number txPower; [Optional, Deprecated] attribute boolean connectable; - }; [Entity=Interface, Deprecated] interface AdvertiseData { - [Deprecated] attribute sequence serviceUuids; [Deprecated] attribute sequence manufactureData; [Deprecated] attribute sequence serviceData; - }; [Entity=Interface, Deprecated] interface ManufactureData { - [Deprecated] attribute number manufactureId; [Deprecated] attribute buffer manufactureValue; - }; [Entity=Interface, Deprecated] interface ServiceData { - [Deprecated] attribute String serviceUuid; [Deprecated] attribute buffer serviceValue; - }; [Entity=Interface, Deprecated] interface ScanFilter { - [Optional, Deprecated] attribute String deviceId; [Optional, Deprecated] attribute String name; [Optional, Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface ScanOptions { - [Optional, Deprecated] attribute number interval; [Optional, Deprecated] attribute ScanDuty dutyMode; [Optional, Deprecated] attribute MatchMode matchMode; - }; [Entity=Interface, Deprecated] interface SppOption { - [Deprecated] attribute String uuid; [Deprecated] attribute boolean secure; [Deprecated] attribute SppType type; - }; [Entity=Interface, Deprecated] interface PinRequiredParam { - [Deprecated] attribute String deviceId; [Deprecated] attribute String pinCode; - }; [Entity=Interface, Deprecated] interface DeviceClass { - [Deprecated] attribute MajorClass majorClass; [Deprecated] attribute MajorMinorClass majorMinorClass; [Deprecated] attribute number classOfDevice; - }; [Entity=Interface, Deprecated] interface BondStateParam { - [Deprecated] attribute String deviceId; [Deprecated] attribute BondState state; - }; [Deprecated] dictionary ScanDuty { - [Deprecated] number SCAN_MODE_LOW_POWER = 0; [Deprecated] number SCAN_MODE_BALANCED = 1; [Deprecated] number SCAN_MODE_LOW_LATENCY = 2; - }; [Deprecated] dictionary MatchMode { - [Deprecated] number MATCH_MODE_AGGRESSIVE = 1; [Deprecated] number MATCH_MODE_STICKY = 2; - }; [Deprecated] dictionary ProfileConnectionState { - [Deprecated] number STATE_DISCONNECTED = 0; [Deprecated] @@ -481,11 +485,9 @@ namespace bluetooth { number STATE_CONNECTED = 2; [Deprecated] number STATE_DISCONNECTING = 3; - }; [Deprecated] dictionary BluetoothState { - [Deprecated] number STATE_OFF = 0; [Deprecated] @@ -500,18 +502,14 @@ namespace bluetooth { number STATE_BLE_ON = 5; [Deprecated] number STATE_BLE_TURNING_OFF = 6; - }; [Deprecated] dictionary SppType { - [Deprecated] number SPP_RFCOMM = 0; - }; [Deprecated] dictionary ScanMode { - [Deprecated] number SCAN_MODE_NONE = 0; [Deprecated] @@ -524,22 +522,18 @@ namespace bluetooth { number SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4; [Deprecated] number SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5; - }; [Deprecated] dictionary BondState { - [Deprecated] number BOND_STATE_INVALID = 0; [Deprecated] number BOND_STATE_BONDING = 1; [Deprecated] number BOND_STATE_BONDED = 2; - }; [Deprecated] dictionary MajorClass { - [Deprecated] number MAJOR_MISC = 0; [Deprecated] @@ -562,11 +556,9 @@ namespace bluetooth { number MAJOR_HEALTH = 2304; [Deprecated] number MAJOR_UNCATEGORIZED = 7936; - }; [Deprecated] dictionary MajorMinorClass { - [Deprecated] number COMPUTER_UNCATEGORIZED = 256; [Deprecated] @@ -739,107 +731,26 @@ namespace bluetooth { number HEALTH_GENERIC_HEALTH_MANAGER = 2360; [Deprecated] number HEALTH_PERSONAL_MOBILITY_DEVICE = 2364; - }; [Entity=Interface, Deprecated] interface StateChangeParam { - [Deprecated] attribute String deviceId; [Deprecated] attribute ProfileConnectionState state; - }; [Deprecated] dictionary PlayingState { - [Deprecated] number STATE_NOT_PLAYING = 0; [Deprecated] number STATE_PLAYING = 1; - }; [Deprecated] dictionary ProfileId { - [Deprecated] number PROFILE_A2DP_SOURCE = 1; [Deprecated] number PROFILE_HANDS_FREE_AUDIO_GATEWAY = 4; - - }; - [GlobalScope] - interface GlobalScope_bluetooth_ohos_bluetooth { - - [Deprecated] - static BluetoothState getState(); - [Deprecated] - static ProfileConnectionState getBtConnectionState(); - [Deprecated] - static boolean pairDevice(String deviceId); - [Deprecated] - static boolean cancelPairedDevice(String deviceId); - [Deprecated] - static String getRemoteDeviceName(String deviceId); - [Deprecated] - static DeviceClass getRemoteDeviceClass(String deviceId); - [Deprecated] - static boolean enableBluetooth(); - [Deprecated] - static boolean disableBluetooth(); - [Deprecated] - static String getLocalName(); - [Deprecated] - static sequence getPairedDevices(); - [Deprecated] - static ProfileConnectionState getProfileConnState(ProfileId profileId); - [Deprecated] - static boolean setDevicePairingConfirmation(String device, boolean accept); - [Deprecated] - static boolean setLocalName(String name); - [Deprecated] - static boolean setBluetoothScanMode(ScanMode mode, number duration); - [Deprecated] - static ScanMode getBluetoothScanMode(); - [Deprecated] - static boolean startBluetoothDiscovery(); - [Deprecated] - static boolean stopBluetoothDiscovery(); - [Deprecated, DtsName="on", DtsTag="'bluetoothDeviceFind'"] - static void onBluetoothDeviceFind(Callback_Array_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'bluetoothDeviceFind'"] - static void offBluetoothDeviceFind(optional Callback_Array_String_Void callback_); - [Deprecated, DtsName="on", DtsTag="'bondStateChange'"] - static void onBondStateChange(Callback_BondStateParam_Void callback_); - [Deprecated, DtsName="off", DtsTag="'bondStateChange'"] - static void offBondStateChange(optional Callback_BondStateParam_Void callback_); - [Deprecated, DtsName="on", DtsTag="'pinRequired'"] - static void onPinRequired(Callback_PinRequiredParam_Void callback_); - [Deprecated, DtsName="off", DtsTag="'pinRequired'"] - static void offPinRequired(optional Callback_PinRequiredParam_Void callback_); - [Deprecated, DtsName="on", DtsTag="'stateChange'"] - static void onStateChange(Callback_BluetoothState_Void callback_); - [Deprecated, DtsName="off", DtsTag="'stateChange'"] - static void offStateChange(optional Callback_BluetoothState_Void callback_); - [Deprecated] - static void sppListen(String name, SppOption option, AsyncCallback_Number_Void callback_); - [Deprecated] - static void sppAccept(number serverSocket, AsyncCallback_Number_Void callback_); - [Deprecated] - static void sppConnect(String device, SppOption option, AsyncCallback_Number_Void callback_); - [Deprecated] - static void sppCloseServerSocket(number socket); - [Deprecated] - static void sppCloseClientSocket(number socket); - [Deprecated] - static boolean sppWrite(number clientSocket, buffer data); - [Deprecated, DtsName="on", DtsTag="'sppRead'"] - static void onSppRead(number clientSocket, Callback_Buffer_Void callback_); - [Deprecated, DtsName="off", DtsTag="'sppRead'"] - static void offSppRead(number clientSocket, optional Callback_Buffer_Void callback_); - [Deprecated] - static (A2dpSourceProfile or HandsFreeAudioGatewayProfile) getProfile(ProfileId profileId); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.map.idl b/idl/@ohos.bluetooth.map.idl index f143ed7..ca36d39 100644 --- a/idl/@ohos.bluetooth.map.idl +++ b/idl/@ohos.bluetooth.map.idl @@ -1,27 +1,19 @@ -package ohos.bluetooth; -import ohos.bluetooth.baseProfile as baseProfile; -import ohos.bluetooth.constant as constant; +package ohos.bluetooth.map; +import ohos.bluetooth.baseProfile.default as baseProfile; +import ohos.bluetooth.constant.default as constant; +[DefaultExport] namespace map { - typedef baseProfile.BaseProfile BaseProfile; typedef constant.AccessAuthorization AccessAuthorization; + [Throws] + MapMseProfile createMapMseProfile(); [Entity=Interface] interface MapMseProfile: BaseProfile { - [Throws] void disconnect(String deviceId); [Throws] async void setMessageAccessAuthorization(String deviceId, AccessAuthorization authorization); [Throws] async AccessAuthorization getMessageAccessAuthorization(String deviceId); - }; - [GlobalScope] - interface GlobalScope_map_ohos_bluetooth_map { - - [Throws] - static MapMseProfile createMapMseProfile(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.opp.idl b/idl/@ohos.bluetooth.opp.idl new file mode 100644 index 0000000..223c2ef --- /dev/null +++ b/idl/@ohos.bluetooth.opp.idl @@ -0,0 +1,68 @@ +package ohos.bluetooth.opp; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace opp { + [Throws] + OppServerProfile createOppServerProfile(); + [Synthetic] + callback Callback_OppTransferInformation_Void = void (OppTransferInformation parameter); + [Entity=Interface] + interface OppServerProfile { + [Throws, DtsName="on", DtsTag="'transferStateChange'"] + void onTransferStateChange(Callback_OppTransferInformation_Void callback_); + [Throws, DtsName="on", DtsTag="'receiveIncomingFile'"] + void onReceiveIncomingFile(Callback_OppTransferInformation_Void callback_); + [Throws, DtsName="off", DtsTag="'transferStateChange'"] + void offTransferStateChange(optional Callback_OppTransferInformation_Void callback_); + [Throws, DtsName="off", DtsTag="'receiveIncomingFile'"] + void offReceiveIncomingFile(optional Callback_OppTransferInformation_Void callback_); + [Throws] + async void sendFile(String deviceId, sequence fileHolds); + [Throws] + async void setIncomingFileConfirmation(boolean accept, number fileFd); + [Throws] + async void cancelTransfer(); + [Throws] + async OppTransferInformation getCurrentTransferInformation(); + [Throws] + async void setLastReceivedFileUri(String uri); + }; + dictionary DirectionType { + number OUTBOUND = 0; + number INBOUND = 1; + }; + dictionary TransferStatus { + number PENDING = 0; + number RUNNING = 1; + number FINISH = 2; + }; + dictionary TransferResult { + number SUCCESS = 0; + number ERROR_UNSUPPORTED_TYPE = 1; + number ERROR_BAD_REQUEST = 2; + number ERROR_NOT_ACCEPTABLE = 3; + number ERROR_CANCELED = 4; + number ERROR_CONNECTION_FAILED = 5; + number ERROR_TRANSFER_FAILED = 6; + number ERROR_UNKNOWN = 7; + }; + [Entity=Interface] + interface OppTransferInformation { + attribute String filePath; + attribute String remoteDeviceName; + attribute String remoteDeviceId; + attribute DirectionType direction; + attribute TransferStatus status; + attribute TransferResult result; + attribute number currentBytes; + attribute number totalBytes; + attribute number currentCount; + attribute number totalCount; + }; + [Entity=Interface] + interface FileHolder { + attribute String filePath; + attribute number fileSize; + attribute number fileFd; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.pan.idl b/idl/@ohos.bluetooth.pan.idl index 725c138..b9e6383 100644 --- a/idl/@ohos.bluetooth.pan.idl +++ b/idl/@ohos.bluetooth.pan.idl @@ -1,25 +1,17 @@ -package ohos.bluetooth; -import ohos.bluetooth.baseProfile as baseProfile; +package ohos.bluetooth.pan; +import ohos.bluetooth.baseProfile.default as baseProfile; +[DefaultExport] namespace pan { - typedef baseProfile.BaseProfile BaseProfile; + [Throws] + PanProfile createPanProfile(); [Entity=Interface] interface PanProfile: BaseProfile { - [Throws] void disconnect(String deviceId); [Throws] void setTethering(boolean enable); [Throws] boolean isTetheringOn(); - }; - [GlobalScope] - interface GlobalScope_pan_ohos_bluetooth_pan { - - [Throws] - static PanProfile createPanProfile(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.pbap.idl b/idl/@ohos.bluetooth.pbap.idl index ee36f66..fd71b14 100644 --- a/idl/@ohos.bluetooth.pbap.idl +++ b/idl/@ohos.bluetooth.pbap.idl @@ -1,18 +1,18 @@ -package ohos.bluetooth; +package ohos.bluetooth.pbap; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.bluetooth.baseProfile as baseProfile; -import ohos.bluetooth.constant as constant; +import ohos.bluetooth.baseProfile.default as baseProfile; +import ohos.bluetooth.constant.default as constant; +[DefaultExport] namespace pbap { - typedef baseProfile.BaseProfile BaseProfile; typedef constant.AccessAuthorization AccessAuthorization; dictionary ShareType { - number SHARE_NAME_AND_PHONE_NUMBER = 0; number SHARE_ALL = 1; number SHARE_NOTHING = 2; - }; + [Throws] + PbapServerProfile createPbapServerProfile(); [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] @@ -21,7 +21,6 @@ namespace pbap { callback AsyncCallback_AccessAuthorization_Void = void (AccessAuthorization result); [Entity=Interface] interface PbapServerProfile: BaseProfile { - [Throws] void disconnect(String deviceId); [Throws] @@ -40,14 +39,5 @@ namespace pbap { void getPhoneBookAccessAuthorization(String deviceId, AsyncCallback_AccessAuthorization_Void callback_); [Throws] async AccessAuthorization getPhoneBookAccessAuthorization(String deviceId); - }; - [GlobalScope] - interface GlobalScope_pbap_ohos_bluetooth_pbap { - - [Throws] - static PbapServerProfile createPbapServerProfile(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.socket.idl b/idl/@ohos.bluetooth.socket.idl index c451d39..9247838 100644 --- a/idl/@ohos.bluetooth.socket.idl +++ b/idl/@ohos.bluetooth.socket.idl @@ -1,45 +1,41 @@ -package ohos.bluetooth; +package ohos.bluetooth.socket; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace socket { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void sppListen(String name, SppOptions options, AsyncCallback_Number_Void callback_); + [Throws] + void sppAccept(number serverSocket, AsyncCallback_Number_Void callback_); + [Throws] + void sppConnect(String deviceId, SppOptions options, AsyncCallback_Number_Void callback_); + [Throws] + String getDeviceId(number clientSocket); + [Throws] + void sppCloseServerSocket(number socket); + [Throws] + void sppCloseClientSocket(number socket); + [Throws] + void sppWrite(number clientSocket, buffer data); [Synthetic] callback Callback_Buffer_Void = void (buffer parameter); + [Throws, DtsName="on", DtsTag="'sppRead'"] + void onSppRead(number clientSocket, Callback_Buffer_Void callback_); + [Throws, DtsName="off", DtsTag="'sppRead'"] + void offSppRead(number clientSocket, optional Callback_Buffer_Void callback_); + [Throws] + async void sppWriteAsync(number clientSocket, buffer data); + [Throws] + async buffer sppReadAsync(number clientSocket); [Entity=Interface] interface SppOptions { - attribute String uuid; attribute boolean secure; attribute SppType type; - }; dictionary SppType { - number SPP_RFCOMM = 0; - }; - [GlobalScope] - interface GlobalScope_socket_ohos_bluetooth_socket { - - [Throws] - static void sppListen(String name, SppOptions options, AsyncCallback_Number_Void callback_); - [Throws] - static void sppAccept(number serverSocket, AsyncCallback_Number_Void callback_); - [Throws] - static void sppConnect(String deviceId, SppOptions options, AsyncCallback_Number_Void callback_); - [Throws] - static void sppCloseServerSocket(number socket); - [Throws] - static void sppCloseClientSocket(number socket); - [Throws] - static void sppWrite(number clientSocket, buffer data); - [Throws, DtsName="on", DtsTag="'sppRead'"] - static void onSppRead(number clientSocket, Callback_Buffer_Void callback_); - [Throws, DtsName="off", DtsTag="'sppRead'"] - static void offSppRead(number clientSocket, optional Callback_Buffer_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bluetooth.wearDetection.idl b/idl/@ohos.bluetooth.wearDetection.idl index 1580627..01035f7 100644 --- a/idl/@ohos.bluetooth.wearDetection.idl +++ b/idl/@ohos.bluetooth.wearDetection.idl @@ -1,32 +1,26 @@ -package ohos.bluetooth; +package ohos.bluetooth.wearDetection; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace wearDetection { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enableWearDetection(String deviceId, AsyncCallback_Void callback_); + [Throws] + async void enableWearDetection(String deviceId); + [Throws] + void disableWearDetection(String deviceId, AsyncCallback_Void callback_); + [Throws] + async void disableWearDetection(String deviceId); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); - [GlobalScope] - interface GlobalScope_wearDetection_ohos_bluetooth_wearDetection { - - [Throws] - static void enableWearDetection(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void enableWearDetection(String deviceId); - [Throws] - static void disableWearDetection(String deviceId, AsyncCallback_Void callback_); - [Throws] - static async void disableWearDetection(String deviceId); - [Throws] - static void isWearDetectionSupported(String deviceId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isWearDetectionSupported(String deviceId); - [Throws] - static void isWearDetectionEnabled(String deviceId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isWearDetectionEnabled(String deviceId); - - }; - + [Throws] + void isWearDetectionSupported(String deviceId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isWearDetectionSupported(String deviceId); + [Throws] + void isWearDetectionEnabled(String deviceId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isWearDetectionEnabled(String deviceId); }; \ No newline at end of file diff --git a/idl/@ohos.bluetoothManager.idl b/idl/@ohos.bluetoothManager.idl index 6f850a7..06cae14 100644 --- a/idl/@ohos.bluetoothManager.idl +++ b/idl/@ohos.bluetoothManager.idl @@ -1,34 +1,99 @@ -package ohos; +package ohos.bluetoothManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace bluetoothManager { - + [Deprecated, Throws] + BluetoothState getState(); + [Deprecated, Throws] + ProfileConnectionState getBtConnectionState(); + [Deprecated, Throws] + void pairDevice(String deviceId); + [Deprecated, Throws] + void cancelPairedDevice(String deviceId); + [Deprecated, Throws] + String getRemoteDeviceName(String deviceId); + [Deprecated, Throws] + DeviceClass getRemoteDeviceClass(String deviceId); + [Deprecated, Throws] + void enableBluetooth(); + [Deprecated, Throws] + void disableBluetooth(); + [Deprecated, Throws] + String getLocalName(); + [Deprecated, Throws] + sequence getPairedDevices(); + [Deprecated, Throws] + ProfileConnectionState getProfileConnectionState(ProfileId profileId); + [Deprecated, Throws] + void setDevicePairingConfirmation(String device, boolean accept); + [Deprecated, Throws] + void setLocalName(String name); + [Deprecated, Throws] + void setBluetoothScanMode(ScanMode mode, number duration); + [Deprecated, Throws] + ScanMode getBluetoothScanMode(); + [Deprecated, Throws] + void startBluetoothDiscovery(); + [Deprecated, Throws] + void stopBluetoothDiscovery(); [Synthetic] callback Callback_Array_String_Void = void (sequence parameter); + [Deprecated, Throws, DtsName="on", DtsTag="'bluetoothDeviceFind'"] + void onBluetoothDeviceFind(Callback_Array_String_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'bluetoothDeviceFind'"] + void offBluetoothDeviceFind(optional Callback_Array_String_Void callback_); [Synthetic] callback Callback_BondStateParam_Void = void (BondStateParam parameter); + [Deprecated, Throws, DtsName="on", DtsTag="'bondStateChange'"] + void onBondStateChange(Callback_BondStateParam_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'bondStateChange'"] + void offBondStateChange(optional Callback_BondStateParam_Void callback_); [Synthetic] callback Callback_PinRequiredParam_Void = void (PinRequiredParam parameter); + [Deprecated, Throws, DtsName="on", DtsTag="'pinRequired'"] + void onPinRequired(Callback_PinRequiredParam_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'pinRequired'"] + void offPinRequired(optional Callback_PinRequiredParam_Void callback_); [Synthetic] callback Callback_BluetoothState_Void = void (BluetoothState parameter); + [Deprecated, Throws, DtsName="on", DtsTag="'stateChange'"] + void onStateChange(Callback_BluetoothState_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional Callback_BluetoothState_Void callback_); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated, Throws] + void sppListen(String name, SppOption option, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void sppAccept(number serverSocket, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void sppConnect(String device, SppOption option, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void sppCloseServerSocket(number socket); + [Deprecated, Throws] + void sppCloseClientSocket(number socket); + [Deprecated, Throws] + void sppWrite(number clientSocket, buffer data); [Synthetic] callback Callback_Buffer_Void = void (buffer parameter); + [Deprecated, Throws, DtsName="on", DtsTag="'sppRead'"] + void onSppRead(number clientSocket, Callback_Buffer_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'sppRead'"] + void offSppRead(number clientSocket, optional Callback_Buffer_Void callback_); + [Deprecated, Throws] + (A2dpSourceProfile or HandsFreeAudioGatewayProfile or HidHostProfile or PanProfile) getProfileInstance(ProfileId profileId); [Entity=Interface, Deprecated] interface BaseProfile { - [Deprecated, Throws] sequence getConnectionDevices(); [Deprecated, Throws] ProfileConnectionState getDeviceState(String device); - }; [Synthetic] callback Callback_StateChangeParam_Void = void (StateChangeParam parameter); [Entity=Interface, Deprecated] interface A2dpSourceProfile: BaseProfile { - [Deprecated, Throws] void connect(String device); [Deprecated, Throws] @@ -39,11 +104,9 @@ namespace bluetoothManager { void offConnectionStateChange(optional Callback_StateChangeParam_Void callback_); [Deprecated, Throws] PlayingState getPlayingState(String device); - }; [Entity=Interface, Deprecated] interface HandsFreeAudioGatewayProfile: BaseProfile { - [Deprecated, Throws] void connect(String device); [Deprecated, Throws] @@ -52,11 +115,9 @@ namespace bluetoothManager { void onConnectionStateChange(Callback_StateChangeParam_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'connectionStateChange'"] void offConnectionStateChange(optional Callback_StateChangeParam_Void callback_); - }; [Entity=Interface, Deprecated] interface HidHostProfile: BaseProfile { - [Deprecated, Throws] void connect(String device); [Deprecated, Throws] @@ -65,11 +126,9 @@ namespace bluetoothManager { void onConnectionStateChange(Callback_StateChangeParam_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'connectionStateChange'"] void offConnectionStateChange(optional Callback_StateChangeParam_Void callback_); - }; [Entity=Interface, Deprecated] interface PanProfile: BaseProfile { - [Deprecated, Throws] void disconnect(String device); [Deprecated, Throws, DtsName="on", DtsTag="'connectionStateChange'"] @@ -80,32 +139,24 @@ namespace bluetoothManager { void setTethering(boolean enable); [Deprecated, Throws] boolean isTetheringOn(); - }; namespace BLE { - + [Deprecated] + GattServer createGattServer(); + [Deprecated, Throws] + GattClientDevice createGattClientDevice(String deviceId); + [Deprecated, Throws] + sequence getConnectedBLEDevices(); + [Deprecated, Throws] + void startBLEScan(sequence filters, optional ScanOptions options); + [Deprecated, Throws] + void stopBLEScan(); [Synthetic] callback Callback_Array_ScanResult_Void = void (sequence parameter); - [GlobalScope] - interface GlobalScope_bluetoothManager.BLE_ohos_bluetoothManager { - - [Deprecated] - static GattServer createGattServer(); - [Deprecated, Throws] - static GattClientDevice createGattClientDevice(String deviceId); - [Deprecated, Throws] - static sequence getConnectedBLEDevices(); - [Deprecated, Throws] - static void startBLEScan(sequence filters, optional ScanOptions options); - [Deprecated, Throws] - static void stopBLEScan(); - [Deprecated, Throws, DtsName="on", DtsTag="'BLEDeviceFind'"] - static void onBLEDeviceFind(Callback_Array_ScanResult_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'BLEDeviceFind'"] - static void offBLEDeviceFind(optional Callback_Array_ScanResult_Void callback_); - - }; - + [Deprecated, Throws, DtsName="on", DtsTag="'BLEDeviceFind'"] + void onBLEDeviceFind(Callback_Array_ScanResult_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'BLEDeviceFind'"] + void offBLEDeviceFind(optional Callback_Array_ScanResult_Void callback_); }; [Synthetic] callback Callback_CharacteristicReadRequest_Void = void (CharacteristicReadRequest parameter); @@ -119,7 +170,6 @@ namespace bluetoothManager { callback Callback_BLEConnectChangedState_Void = void (BLEConnectChangedState parameter); [Entity=Interface, Deprecated] interface GattServer { - [Deprecated, Throws] void startAdvertising(AdvertiseSetting setting, AdvertiseData advData, optional AdvertiseData advResponse); [Deprecated, Throws] @@ -136,25 +186,24 @@ namespace bluetoothManager { void sendResponse(ServerResponse serverResponse); [Deprecated, Throws, DtsName="on", DtsTag="'characteristicRead'"] void onCharacteristicRead(Callback_CharacteristicReadRequest_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'characteristicRead'"] - void offCharacteristicRead(optional Callback_CharacteristicReadRequest_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'characteristicWrite'"] void onCharacteristicWrite(Callback_CharacteristicWriteRequest_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'characteristicWrite'"] - void offCharacteristicWrite(optional Callback_CharacteristicWriteRequest_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'descriptorRead'"] void onDescriptorRead(Callback_DescriptorReadRequest_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'descriptorRead'"] - void offDescriptorRead(optional Callback_DescriptorReadRequest_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'descriptorWrite'"] void onDescriptorWrite(Callback_DescriptorWriteRequest_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'descriptorWrite'"] - void offDescriptorWrite(optional Callback_DescriptorWriteRequest_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'connectStateChange'"] void onConnectStateChange(Callback_BLEConnectChangedState_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'characteristicRead'"] + void offCharacteristicRead(optional Callback_CharacteristicReadRequest_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'characteristicWrite'"] + void offCharacteristicWrite(optional Callback_CharacteristicWriteRequest_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'descriptorRead'"] + void offDescriptorRead(optional Callback_DescriptorReadRequest_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'descriptorWrite'"] + void offDescriptorWrite(optional Callback_DescriptorWriteRequest_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'connectStateChange'"] void offConnectStateChange(optional Callback_BLEConnectChangedState_Void callback_); - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); @@ -168,7 +217,6 @@ namespace bluetoothManager { callback Callback_BLECharacteristic_Void = void (BLECharacteristic parameter); [Entity=Interface, Deprecated] interface GattClientDevice { - [Deprecated, Throws] void connect(); [Deprecated, Throws] @@ -205,17 +253,15 @@ namespace bluetoothManager { void setNotifyCharacteristicChanged(BLECharacteristic characteristic, boolean enable); [Deprecated, Throws, DtsName="on", DtsTag="'BLECharacteristicChange'"] void onBLECharacteristicChange(Callback_BLECharacteristic_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'BLECharacteristicChange'"] - void offBLECharacteristicChange(optional Callback_BLECharacteristic_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'BLEConnectionStateChange'"] void onBLEConnectionStateChange(Callback_BLEConnectChangedState_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'BLECharacteristicChange'"] + void offBLECharacteristicChange(optional Callback_BLECharacteristic_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'BLEConnectionStateChange'"] void offBLEConnectionStateChange(optional Callback_BLEConnectChangedState_Void callback_); - }; [Entity=Interface, Deprecated] interface GattService { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -224,11 +270,9 @@ namespace bluetoothManager { attribute sequence characteristics; [Optional, Deprecated] attribute sequence includeServices; - }; [Entity=Interface, Deprecated] interface BLECharacteristic { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -237,11 +281,9 @@ namespace bluetoothManager { attribute buffer characteristicValue; [Deprecated] attribute sequence descriptors; - }; [Entity=Interface, Deprecated] interface BLEDescriptor { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -250,11 +292,9 @@ namespace bluetoothManager { attribute String descriptorUuid; [Deprecated] attribute buffer descriptorValue; - }; [Entity=Interface, Deprecated] interface NotifyCharacteristic { - [Deprecated] attribute String serviceUuid; [Deprecated] @@ -263,11 +303,9 @@ namespace bluetoothManager { attribute buffer characteristicValue; [Deprecated] attribute boolean confirm; - }; [Entity=Interface, Deprecated] interface CharacteristicReadRequest { - [Deprecated] attribute String deviceId; [Deprecated] @@ -278,11 +316,9 @@ namespace bluetoothManager { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface CharacteristicWriteRequest { - [Deprecated] attribute String deviceId; [Deprecated] @@ -299,11 +335,9 @@ namespace bluetoothManager { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface DescriptorReadRequest { - [Deprecated] attribute String deviceId; [Deprecated] @@ -316,11 +350,9 @@ namespace bluetoothManager { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface DescriptorWriteRequest { - [Deprecated] attribute String deviceId; [Deprecated] @@ -339,11 +371,9 @@ namespace bluetoothManager { attribute String characteristicUuid; [Deprecated] attribute String serviceUuid; - }; [Entity=Interface, Deprecated] interface ServerResponse { - [Deprecated] attribute String deviceId; [Deprecated] @@ -354,71 +384,57 @@ namespace bluetoothManager { attribute number offset; [Deprecated] attribute buffer value; - }; [Entity=Interface, Deprecated] interface BLEConnectChangedState { - [Deprecated] attribute String deviceId; [Deprecated] attribute ProfileConnectionState state; - }; [Entity=Interface, Deprecated] interface ScanResult { - [Deprecated] attribute String deviceId; [Deprecated] attribute number rssi; [Deprecated] attribute buffer data; - }; [Entity=Interface, Deprecated] interface AdvertiseSetting { - [Optional, Deprecated] attribute number interval; [Optional, Deprecated] attribute number txPower; [Optional, Deprecated] attribute boolean connectable; - }; [Entity=Interface, Deprecated] interface AdvertiseData { - [Deprecated] attribute sequence serviceUuids; [Deprecated] attribute sequence manufactureData; [Deprecated] attribute sequence serviceData; - }; [Entity=Interface, Deprecated] interface ManufactureData { - [Deprecated] attribute number manufactureId; [Deprecated] attribute buffer manufactureValue; - }; [Entity=Interface, Deprecated] interface ServiceData { - [Deprecated] attribute String serviceUuid; [Deprecated] attribute buffer serviceValue; - }; [Entity=Interface, Deprecated] interface ScanFilter { - [Optional, Deprecated] attribute String deviceId; [Optional, Deprecated] @@ -441,91 +457,73 @@ namespace bluetoothManager { attribute buffer manufactureData; [Optional, Deprecated] attribute buffer manufactureDataMask; - }; [Entity=Interface, Deprecated] interface ScanOptions { - [Optional, Deprecated] attribute number interval; [Optional, Deprecated] attribute ScanDuty dutyMode; [Optional, Deprecated] attribute MatchMode matchMode; - }; [Entity=Interface, Deprecated] interface SppOption { - [Deprecated] attribute String uuid; [Deprecated] attribute boolean secure; [Deprecated] attribute SppType type; - }; [Entity=Interface, Deprecated] interface PinRequiredParam { - [Deprecated] attribute String deviceId; [Deprecated] attribute String pinCode; - }; [Entity=Interface, Deprecated] interface DeviceClass { - [Deprecated] attribute MajorClass majorClass; [Deprecated] attribute MajorMinorClass majorMinorClass; [Deprecated] attribute number classOfDevice; - }; [Entity=Interface, Deprecated] interface BondStateParam { - [Deprecated] attribute String deviceId; [Deprecated] attribute BondState state; - }; [Entity=Interface, Deprecated] interface StateChangeParam { - [Deprecated] attribute String deviceId; [Deprecated] attribute ProfileConnectionState state; - }; [Deprecated] dictionary ScanDuty { - [Deprecated] number SCAN_MODE_LOW_POWER = 0; [Deprecated] number SCAN_MODE_BALANCED = 1; [Deprecated] number SCAN_MODE_LOW_LATENCY = 2; - }; [Deprecated] dictionary MatchMode { - [Deprecated] number MATCH_MODE_AGGRESSIVE = 1; [Deprecated] number MATCH_MODE_STICKY = 2; - }; [Deprecated] dictionary ProfileConnectionState { - [Deprecated] number STATE_DISCONNECTED = 0; [Deprecated] @@ -534,11 +532,9 @@ namespace bluetoothManager { number STATE_CONNECTED = 2; [Deprecated] number STATE_DISCONNECTING = 3; - }; [Deprecated] dictionary BluetoothState { - [Deprecated] number STATE_OFF = 0; [Deprecated] @@ -553,18 +549,14 @@ namespace bluetoothManager { number STATE_BLE_ON = 5; [Deprecated] number STATE_BLE_TURNING_OFF = 6; - }; [Deprecated] dictionary SppType { - [Deprecated] number SPP_RFCOMM = 0; - }; [Deprecated] dictionary ScanMode { - [Deprecated] number SCAN_MODE_NONE = 0; [Deprecated] @@ -577,22 +569,18 @@ namespace bluetoothManager { number SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4; [Deprecated] number SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5; - }; [Deprecated] dictionary BondState { - [Deprecated] number BOND_STATE_INVALID = 0; [Deprecated] number BOND_STATE_BONDING = 1; [Deprecated] number BOND_STATE_BONDED = 2; - }; [Deprecated] dictionary MajorClass { - [Deprecated] number MAJOR_MISC = 0; [Deprecated] @@ -615,11 +603,9 @@ namespace bluetoothManager { number MAJOR_HEALTH = 2304; [Deprecated] number MAJOR_UNCATEGORIZED = 7936; - }; [Deprecated] dictionary MajorMinorClass { - [Deprecated] number COMPUTER_UNCATEGORIZED = 256; [Deprecated] @@ -792,20 +778,16 @@ namespace bluetoothManager { number HEALTH_GENERIC_HEALTH_MANAGER = 2360; [Deprecated] number HEALTH_PERSONAL_MOBILITY_DEVICE = 2364; - }; [Deprecated] dictionary PlayingState { - [Deprecated] number STATE_NOT_PLAYING = 0; [Deprecated] number STATE_PLAYING = 1; - }; [Deprecated] dictionary ProfileId { - [Deprecated] number PROFILE_A2DP_SOURCE = 1; [Deprecated] @@ -814,80 +796,5 @@ namespace bluetoothManager { number PROFILE_HID_HOST = 6; [Deprecated] number PROFILE_PAN_NETWORK = 7; - - }; - [GlobalScope] - interface GlobalScope_bluetoothManager_ohos_bluetoothManager { - - [Deprecated, Throws] - static BluetoothState getState(); - [Deprecated, Throws] - static ProfileConnectionState getBtConnectionState(); - [Deprecated, Throws] - static void pairDevice(String deviceId); - [Deprecated, Throws] - static void cancelPairedDevice(String deviceId); - [Deprecated, Throws] - static String getRemoteDeviceName(String deviceId); - [Deprecated, Throws] - static DeviceClass getRemoteDeviceClass(String deviceId); - [Deprecated, Throws] - static void enableBluetooth(); - [Deprecated, Throws] - static void disableBluetooth(); - [Deprecated, Throws] - static String getLocalName(); - [Deprecated, Throws] - static sequence getPairedDevices(); - [Deprecated, Throws] - static ProfileConnectionState getProfileConnectionState(ProfileId profileId); - [Deprecated, Throws] - static void setDevicePairingConfirmation(String device, boolean accept); - [Deprecated, Throws] - static void setLocalName(String name); - [Deprecated, Throws] - static void setBluetoothScanMode(ScanMode mode, number duration); - [Deprecated, Throws] - static ScanMode getBluetoothScanMode(); - [Deprecated, Throws] - static void startBluetoothDiscovery(); - [Deprecated, Throws] - static void stopBluetoothDiscovery(); - [Deprecated, Throws, DtsName="on", DtsTag="'bluetoothDeviceFind'"] - static void onBluetoothDeviceFind(Callback_Array_String_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'bluetoothDeviceFind'"] - static void offBluetoothDeviceFind(optional Callback_Array_String_Void callback_); - [Deprecated, Throws, DtsName="on", DtsTag="'bondStateChange'"] - static void onBondStateChange(Callback_BondStateParam_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'bondStateChange'"] - static void offBondStateChange(optional Callback_BondStateParam_Void callback_); - [Deprecated, Throws, DtsName="on", DtsTag="'pinRequired'"] - static void onPinRequired(Callback_PinRequiredParam_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'pinRequired'"] - static void offPinRequired(optional Callback_PinRequiredParam_Void callback_); - [Deprecated, Throws, DtsName="on", DtsTag="'stateChange'"] - static void onStateChange(Callback_BluetoothState_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'stateChange'"] - static void offStateChange(optional Callback_BluetoothState_Void callback_); - [Deprecated, Throws] - static void sppListen(String name, SppOption option, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void sppAccept(number serverSocket, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void sppConnect(String device, SppOption option, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void sppCloseServerSocket(number socket); - [Deprecated, Throws] - static void sppCloseClientSocket(number socket); - [Deprecated, Throws] - static void sppWrite(number clientSocket, buffer data); - [Deprecated, Throws, DtsName="on", DtsTag="'sppRead'"] - static void onSppRead(number clientSocket, Callback_Buffer_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'sppRead'"] - static void offSppRead(number clientSocket, optional Callback_Buffer_Void callback_); - [Deprecated, Throws] - static (A2dpSourceProfile or HandsFreeAudioGatewayProfile or HidHostProfile or PanProfile) getProfileInstance(ProfileId profileId); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.brightness.idl b/idl/@ohos.brightness.idl index 2bc5851..319a003 100644 --- a/idl/@ohos.brightness.idl +++ b/idl/@ohos.brightness.idl @@ -1,15 +1,9 @@ -package ohos; +package ohos.brightness; import ohos.base.BusinessError as BusinessError; +[DefaultExport] namespace brightness { - - [GlobalScope] - interface GlobalScope_brightness_ohos_brightness { - - [Throws] - static void setValue(number value); - [Throws] - static void setValue(number value, boolean continuous); - - }; - + [Throws] + void setValue(i32 value); + [Throws] + void setValue(i32 value, boolean continuous); }; \ No newline at end of file diff --git a/idl/@ohos.buffer.idl b/idl/@ohos.buffer.idl index 3176e90..3e2db59 100644 --- a/idl/@ohos.buffer.idl +++ b/idl/@ohos.buffer.idl @@ -1,25 +1,57 @@ -package ohos; +package ohos.buffer; +[DefaultExport] namespace buffer { - typedef String BufferEncoding; [Entity=Interface] interface TypedArray: Int8Array_ { - - }; - [Entity=Tuple, Synthetic, TypeParameters="number,number"] + typedef buffer TypedArray; + [Throws] + Buffer alloc(number size, optional (String or Buffer or number) fill, optional BufferEncoding encoding); + [Throws] + Buffer allocUninitializedFromPool(number size); + [Throws] + Buffer allocUninitialized(number size); + [Throws] + number byteLength((String or Buffer or TypedArray or buffer or SharedArrayBuffer) string, optional BufferEncoding encoding); + number byteLength((String or Buffer or TypedArray or buffer) doc, optional BufferEncoding encoding); + [Throws] + Buffer concat((sequence or sequence) list, optional number totalLength); + [Throws] + Buffer from(sequence array); + [Throws] + Buffer from((buffer or SharedArrayBuffer) arrayBuffer, optional number byteOffset, optional number length); + [Throws] + Buffer from(buffer arrayBuffer, optional number byteOffset, optional number length); + [Throws] + Buffer from((Buffer or buffer) buffer); + [Throws] + Buffer from(Object object_, (number or String) offsetOrEncoding, number length); + [Throws] + Buffer from(String string, optional BufferEncoding encoding); + boolean isBuffer(Object obj); + boolean isEncoding(String encoding); + [Throws] + number compare((Buffer or buffer) buf1, (Buffer or buffer) buf2); + number compare((Buffer or buffer) buf1, (Buffer or buffer) buf2); + [Throws] + Buffer transcode((Buffer or buffer) source, String fromEnc, String toEnc); + [Entity=Tuple, Synthetic] interface Tuple_Number_Number { - attribute number value0; attribute number value1; - }; [Entity=Class] interface Buffer { - attribute number length; attribute buffer buffer; attribute number byteOffset; + [Accessor=Getter] + readonly attribute number length; + [Accessor=Getter] + readonly attribute buffer buffer; + [Accessor=Getter] + readonly attribute number byteOffset; [Throws] Buffer fill((String or Buffer or buffer or number) value, optional number offset, optional number end, optional BufferEncoding encoding); [Throws] @@ -32,9 +64,9 @@ namespace buffer { boolean includes((String or number or Buffer or buffer) value, optional number byteOffset, optional BufferEncoding encoding); [Throws] number indexOf((String or number or Buffer or buffer) value, optional number byteOffset, optional BufferEncoding encoding); - ([TypeArguments="number"] IterableIterator) keys(); - ([TypeArguments="number"] IterableIterator) values(); - ([TypeArguments="Tuple_Number_Number"] IterableIterator) entries(); + sequence keys(); + sequence values(); + sequence entries(); [Throws] number lastIndexOf((String or number or Buffer or buffer) value, optional number byteOffset, optional BufferEncoding encoding); [Throws] @@ -91,6 +123,8 @@ namespace buffer { Object toJSON(); [Throws, DtsName="toString"] String toString_(optional String encoding, optional number start, optional number end); + [DtsName="toString"] + String toString_(optional BufferEncoding encoding, optional number start, optional number end); [Throws] number write(String str, optional number offset, optional number length, optional String encoding); [Throws] @@ -137,49 +171,26 @@ namespace buffer { number writeUIntBE(number value, number offset, number byteLength); [Throws] number writeUIntLE(number value, number offset, number byteLength); - + [DtsName="$_get"] + (number or undefined) dollar__get(number index); + [DtsName="$_set"] + void dollar__set(number index, number value); + }; + [Entity=Interface] + interface BlobOptions { + [Optional] + attribute String type; + [Optional] + attribute String endings; }; [Entity=Class] interface Blob { - constructor((sequence or sequence or sequence or sequence) sources, optional Object options); + constructor((sequence or sequence or sequence or sequence) sources, optional BlobOptions options); attribute number size; attribute String type; async buffer arrayBuffer(); Blob slice(optional number start, optional number end, optional String type); async String text(); - - }; - [GlobalScope] - interface GlobalScope_buffer_ohos_buffer { - - [Throws] - static Buffer alloc(number size, optional (String or Buffer or number) fill, optional BufferEncoding encoding); - [Throws] - static Buffer allocUninitializedFromPool(number size); - [Throws] - static Buffer allocUninitialized(number size); - [Throws] - static number byteLength((String or Buffer or TypedArray or buffer or SharedArrayBuffer) string, optional BufferEncoding encoding); - [Throws] - static Buffer concat((sequence or sequence) list, optional number totalLength); - [Throws] - static Buffer from(sequence array); - [Throws] - static Buffer from((buffer or SharedArrayBuffer) arrayBuffer, optional number byteOffset, optional number length); - [Throws] - static Buffer from((Buffer or buffer) buffer); - [Throws] - static Buffer from(Object object_, (number or String) offsetOrEncoding, number length); - [Throws] - static Buffer from(String string, optional BufferEncoding encoding); - static boolean isBuffer(Object obj); - static boolean isEncoding(String encoding); - [Throws] - static number compare((Buffer or buffer) buf1, (Buffer or buffer) buf2); - [Throws] - static Buffer transcode((Buffer or buffer) source, String fromEnc, String toEnc); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bundle.appControl.idl b/idl/@ohos.bundle.appControl.idl index 43c9b03..3a9716d 100644 --- a/idl/@ohos.bundle.appControl.idl +++ b/idl/@ohos.bundle.appControl.idl @@ -1,88 +1,78 @@ -package ohos.bundle; +package ohos.bundle.appControl; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.ElementName as ElementName; -import ohos.app.ability.Want as Want; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace appControl { - dictionary ComponentType { - number UI_ABILITY = 1; number UI_EXTENSION = 2; - }; dictionary UninstallComponentType { - number EXTENSION = 1; - }; dictionary DisposedType { - number BLOCK_APPLICATION = 1; number BLOCK_ABILITY = 2; number NON_BLOCK = 3; - }; dictionary ControlType { - number ALLOWED_LIST = 1; number DISALLOWED_LIST = 2; - }; [Entity=Interface] interface DisposedRule { - attribute Want want; attribute ComponentType componentType; attribute DisposedType disposedType; attribute ControlType controlType; attribute sequence elementList; attribute number priority; - }; [Entity=Interface] interface UninstallDisposedRule { - attribute Want want; attribute UninstallComponentType uninstallComponentType; attribute number priority; - + }; + [Entity=Interface] + interface DisposedRuleConfiguration { + attribute String appId; + attribute number appIndex; + attribute DisposedRule disposedRule; }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setDisposedStatus(String appId, Want disposedWant, AsyncCallback_Void callback_); + [Throws] + async void setDisposedStatus(String appId, Want disposedWant); + [Throws] + void setDisposedStatusSync(String appId, Want disposedWant); [Async, Synthetic] callback AsyncCallback_Want_Void = void (Want result); - [GlobalScope] - interface GlobalScope_appControl_ohos_bundle_appControl { - - [Throws] - static void setDisposedStatus(String appId, Want disposedWant, AsyncCallback_Void callback_); - [Throws] - static async void setDisposedStatus(String appId, Want disposedWant); - [Throws] - static void setDisposedStatusSync(String appId, Want disposedWant); - [Throws] - static void getDisposedStatus(String appId, AsyncCallback_Want_Void callback_); - [Throws] - static async Want getDisposedStatus(String appId); - [Throws] - static Want getDisposedStatusSync(String appId); - [Throws] - static void deleteDisposedStatus(String appId, AsyncCallback_Void callback_); - [Throws] - static async void deleteDisposedStatus(String appId); - [Throws] - static void deleteDisposedStatusSync(String appId, optional number appIndex); - [Throws] - static DisposedRule getDisposedRule(String appId, optional number appIndex); - [Throws] - static void setDisposedRule(String appId, DisposedRule rule, optional number appIndex); - [Throws] - static void setUninstallDisposedRule(String appIdentifier, UninstallDisposedRule rule, optional number appIndex); - [Throws] - static UninstallDisposedRule getUninstallDisposedRule(String appIdentifier, optional number appIndex); - [Throws] - static void deleteUninstallDisposedRule(String appIdentifier, optional number appIndex); - - }; - + [Throws] + void getDisposedStatus(String appId, AsyncCallback_Want_Void callback_); + [Throws] + async Want getDisposedStatus(String appId); + [Throws] + Want getDisposedStatusSync(String appId); + [Throws] + void deleteDisposedStatus(String appId, AsyncCallback_Void callback_); + [Throws] + async void deleteDisposedStatus(String appId); + [Throws] + void deleteDisposedStatusSync(String appId, optional number appIndex); + [Throws] + DisposedRule getDisposedRule(String appId, optional number appIndex); + [Throws] + void setDisposedRule(String appId, DisposedRule rule, optional number appIndex); + [Throws] + void setUninstallDisposedRule(String appIdentifier, UninstallDisposedRule rule, optional number appIndex); + [Throws] + UninstallDisposedRule getUninstallDisposedRule(String appIdentifier, optional number appIndex); + [Throws] + void deleteUninstallDisposedRule(String appIdentifier, optional number appIndex); + [Throws] + void setDisposedRules(sequence disposedRuleConfigurations); }; \ No newline at end of file diff --git a/idl/@ohos.bundle.appDomainVerify.idl b/idl/@ohos.bundle.appDomainVerify.idl index 0ace5d7..7a96f4d 100644 --- a/idl/@ohos.bundle.appDomainVerify.idl +++ b/idl/@ohos.bundle.appDomainVerify.idl @@ -1,14 +1,8 @@ -package ohos.bundle; +package ohos.bundle.appDomainVerify; +[DefaultExport] namespace appDomainVerify { - - [GlobalScope] - interface GlobalScope_appDomainVerify_ohos_bundle_appDomainVerify { - - [Throws] - static sequence queryAssociatedDomains(String bundleName); - [Throws] - static sequence queryAssociatedBundleNames(String domain); - - }; - + [Throws] + sequence queryAssociatedDomains(String bundleName); + [Throws] + sequence queryAssociatedBundleNames(String domain); }; \ No newline at end of file diff --git a/idl/@ohos.bundle.bundleManager.idl b/idl/@ohos.bundle.bundleManager.idl index 70a8e1f..78a89fc 100644 --- a/idl/@ohos.bundle.bundleManager.idl +++ b/idl/@ohos.bundle.bundleManager.idl @@ -1,24 +1,43 @@ -package ohos.bundle; +package ohos.bundle.bundleManager; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.ApplicationInfo as _ApplicationInfo; -import bundleManager.ModuleMetadata as _ModuleMetadata; -import bundleManager.PreinstalledApplicationInfo as _PreinstalledApplicationInfo; -import bundleManager.Metadata as _Metadata; -import bundleManager.PermissionDef as _PermissionDef; -import bundleManager.ElementName as _ElementName; -import bundleManager.SharedBundleInfo as _SharedBundleInfo; -import bundleManager.RecoverableApplicationInfo as _RecoverableApplicationInfo; -import ohos.app.ability.Want as Want; -import bundleManager as _AbilityInfo; -import bundleManager as _AppProvisionInfo; -import bundleManager as _BundleInfo; -import bundleManager as _HapModuleInfo; -import bundleManager as _ExtensionAbilityInfo; -import bundleManager as _Skill; +import bundleManager.Metadata.Metadata as _Metadata; +import bundleManager.ElementName.ElementName as _ElementName; +import ohos.app.ability.Want.default as Want; +import bundleManager.ApplicationInfo.ApplicationInfo as _ApplicationInfo; +import bundleManager.ApplicationInfo.ModuleMetadata as _ModuleMetadata; +import bundleManager.ApplicationInfo.PreinstalledApplicationInfo as _PreinstalledApplicationInfo; +import bundleManager.PermissionDef.PermissionDef as _PermissionDef; +import bundleManager.PluginBundleInfo.PluginBundleInfo as _PluginBundleInfo; +import bundleManager.PluginBundleInfo.PluginModuleInfo as _PluginModuleInfo; +import bundleManager.SharedBundleInfo.SharedBundleInfo as _SharedBundleInfo; +import bundleManager.RecoverableApplicationInfo.RecoverableApplicationInfo as _RecoverableApplicationInfo; +import bundleManager.AbilityInfo as _AbilityInfo; +import bundleManager.AppProvisionInfo as _AppProvisionInfo; +import bundleManager.BundleInfo as _BundleInfo; +import bundleManager.HapModuleInfo as _HapModuleInfo; +import bundleManager.ExtensionAbilityInfo as _ExtensionAbilityInfo; +import bundleManager.Skill as _Skill; +import bundleManager.ApplicationInfo.ApplicationInfo as _ApplicationInfo; +import bundleManager.ApplicationInfo.ModuleMetadata as _ModuleMetadata; +import bundleManager.ApplicationInfo.PreinstalledApplicationInfo as _PreinstalledApplicationInfo; +import bundleManager.AbilityInfo.AbilityInfo as _AbilityInfo; +import bundleManager.AbilityInfo.WindowSize as _WindowSize; +import bundleManager.BundleInfo.BundleInfo as _BundleInfo; +import bundleManager.BundleInfo.UsedScene as _UsedScene; +import bundleManager.BundleInfo.ReqPermissionDetail as _ReqPermissionDetail; +import bundleManager.BundleInfo.SignatureInfo as _SignatureInfo; +import bundleManager.BundleInfo.AppCloneIdentity as _AppCloneIdentity; +import bundleManager.HapModuleInfo.HapModuleInfo as _HapModuleInfo; +import bundleManager.HapModuleInfo.PreloadItem as _PreloadItem; +import bundleManager.HapModuleInfo.Dependency as _Dependency; +import bundleManager.HapModuleInfo.RouterItem as _RouterItem; +import bundleManager.HapModuleInfo.DataItem as _DataItem; +import bundleManager.ExtensionAbilityInfo.ExtensionAbilityInfo as _ExtensionAbilityInfo; +import bundleManager.Skill.Skill as _Skill; +import bundleManager.Skill.SkillUri as _SkillUri; +[DefaultExport] namespace bundleManager { - dictionary BundleFlag { - number GET_BUNDLE_INFO_DEFAULT = 0; number GET_BUNDLE_INFO_WITH_APPLICATION = 1; number GET_BUNDLE_INFO_WITH_HAP_MODULE = 2; @@ -34,18 +53,15 @@ namespace bundleManager { number GET_BUNDLE_INFO_ONLY_WITH_LAUNCHER_ABILITY = 4096; number GET_BUNDLE_INFO_OF_ANY_USER = 8192; number GET_BUNDLE_INFO_EXCLUDE_CLONE = 16384; - + number GET_BUNDLE_INFO_WITH_CLOUD_KIT = 32768; }; dictionary ApplicationFlag { - number GET_APPLICATION_INFO_DEFAULT = 0; number GET_APPLICATION_INFO_WITH_PERMISSION = 1; number GET_APPLICATION_INFO_WITH_METADATA = 2; number GET_APPLICATION_INFO_WITH_DISABLE = 4; - }; dictionary AbilityFlag { - number GET_ABILITY_INFO_DEFAULT = 0; number GET_ABILITY_INFO_WITH_PERMISSION = 1; number GET_ABILITY_INFO_WITH_APPLICATION = 2; @@ -54,19 +70,15 @@ namespace bundleManager { number GET_ABILITY_INFO_ONLY_SYSTEM_APP = 16; number GET_ABILITY_INFO_WITH_APP_LINKING = 64; number GET_ABILITY_INFO_WITH_SKILL = 128; - }; dictionary ExtensionAbilityFlag { - number GET_EXTENSION_ABILITY_INFO_DEFAULT = 0; number GET_EXTENSION_ABILITY_INFO_WITH_PERMISSION = 1; number GET_EXTENSION_ABILITY_INFO_WITH_APPLICATION = 2; number GET_EXTENSION_ABILITY_INFO_WITH_METADATA = 4; number GET_EXTENSION_ABILITY_INFO_WITH_SKILL = 16; - }; dictionary ExtensionAbilityType { - number FORM = 0; number WORK_SCHEDULER = 1; number INPUT_METHOD = 2; @@ -89,39 +101,35 @@ namespace bundleManager { number ADS_SERVICE = 20; number EMBEDDED_UI = 21; number INSIGHT_INTENT_UI = 22; + number FENCE = 24; + number CALLER_INFO_QUERY = 25; number ASSET_ACCELERATION = 26; + number FORM_EDIT = 27; + number DISTRIBUTED = 28; + number APP_SERVICE = 29; + number LIVE_FORM = 30; number UNSPECIFIED = 255; - }; dictionary PermissionGrantState { - number PERMISSION_DENIED = -1; number PERMISSION_GRANTED = 0; - }; dictionary SupportWindowMode { - number FULL_SCREEN = 0; number SPLIT = 1; number FLOATING = 2; - }; dictionary LaunchType { - number SINGLETON = 0; number MULTITON = 1; number SPECIFIED = 2; - }; dictionary AbilityType { - number PAGE = 1; number SERVICE = 2; number DATA = 3; - }; dictionary DisplayOrientation { - number UNSPECIFIED = 0; number LANDSCAPE = 1; number PORTRAIT = 2; @@ -137,33 +145,23 @@ namespace bundleManager { number LOCKED = 12; number AUTO_ROTATION_UNSPECIFIED = 13; number FOLLOW_DESKTOP = 14; - }; dictionary ModuleType { - number ENTRY = 1; number FEATURE = 2; number SHARED = 3; - }; dictionary BundleType { - number APP = 0; number ATOMIC_SERVICE = 1; - }; dictionary CompatiblePolicy { - number BACKWARD_COMPATIBILITY = 1; - }; dictionary ProfileType { - number INTENT_PROFILE = 1; - }; dictionary AppDistributionType { - number APP_GALLERY = 1; number ENTERPRISE = 2; number ENTERPRISE_NORMAL = 3; @@ -171,69 +169,302 @@ namespace bundleManager { number OS_INTEGRATION = 5; number CROWDTESTING = 6; number NONE = 7; - }; dictionary MultiAppModeType { - number UNSPECIFIED = 0; number MULTI_INSTANCE = 1; number APP_CLONE = 2; - }; dictionary ApplicationInfoFlag { - number FLAG_INSTALLED = 1; number FLAG_OTHER_INSTALLED = 16; number FLAG_PREINSTALLED_APP = 32; number FLAG_PREINSTALLED_APP_UPDATE = 64; - }; + [Throws] + async BundleInfo getBundleInfoForSelf(number bundleFlags); [Async, Synthetic] callback AsyncCallback_BundleInfo_Void = void (BundleInfo result); + [Throws] + void getBundleInfoForSelf(number bundleFlags, AsyncCallback_BundleInfo_Void callback_); + [Throws] + BundleInfo getBundleInfoForSelfSync(number bundleFlags); + [Throws] + void getBundleInfo(String bundleName, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); + [Throws] + void getBundleInfo(String bundleName, number bundleFlags, number userId, AsyncCallback_BundleInfo_Void callback_); + [Throws] + async BundleInfo getBundleInfo(String bundleName, number bundleFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_ApplicationInfo_Void = void (ApplicationInfo result); + [Throws] + void getApplicationInfo(String bundleName, number appFlags, AsyncCallback_ApplicationInfo_Void callback_); + [Throws] + void getApplicationInfo(String bundleName, number appFlags, number userId, AsyncCallback_ApplicationInfo_Void callback_); + [Throws] + async ApplicationInfo getApplicationInfo(String bundleName, number appFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_Array_BundleInfo_Void = void (sequence result); + [Throws] + void getAllBundleInfo(number bundleFlags, AsyncCallback_Array_BundleInfo_Void callback_); + [Throws] + void getAllBundleInfo(number bundleFlags, number userId, AsyncCallback_Array_BundleInfo_Void callback_); + [Throws] + async sequence getAllBundleInfo(number bundleFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_Array_ApplicationInfo_Void = void (sequence result); + [Throws] + void getAllApplicationInfo(number appFlags, AsyncCallback_Array_ApplicationInfo_Void callback_); + [Throws] + void getAllApplicationInfo(number appFlags, number userId, AsyncCallback_Array_ApplicationInfo_Void callback_); + [Throws] + async sequence getAllApplicationInfo(number appFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_Array_AbilityInfo_Void = void (sequence result); + [Throws] + void queryAbilityInfo(Want want, number abilityFlags, AsyncCallback_Array_AbilityInfo_Void callback_); + [Throws] + void queryAbilityInfo(Want want, number abilityFlags, number userId, AsyncCallback_Array_AbilityInfo_Void callback_); + [Throws] + async sequence queryAbilityInfo(Want want, number abilityFlags, optional number userId); + [Throws] + async sequence queryAbilityInfo(sequence wants, number abilityFlags, optional number userId); + [Throws] + sequence queryAbilityInfoSync(Want want, number abilityFlags, optional number userId); + [Throws] + async sequence getAbilityInfo(String uri, number abilityFlags); [Async, Synthetic] callback AsyncCallback_Array_ExtensionAbilityInfo_Void = void (sequence result); + [Throws] + void queryExtensionAbilityInfo(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, AsyncCallback_Array_ExtensionAbilityInfo_Void callback_); + [Throws] + void queryExtensionAbilityInfo(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, number userId, AsyncCallback_Array_ExtensionAbilityInfo_Void callback_); + [Throws] + async sequence queryExtensionAbilityInfo(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, optional number userId); + [Throws] + sequence queryExtensionAbilityInfoSync(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, optional number userId); + [Throws] + sequence queryExtensionAbilityInfoSync(Want want, String extensionAbilityType, number extensionAbilityFlags, optional number userId); + [Throws] + sequence queryExtensionAbilityInfoSync(String extensionAbilityType, number extensionAbilityFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getBundleNameByUid(number uid, AsyncCallback_String_Void callback_); + [Throws] + async String getBundleNameByUid(number uid); + [Throws] + String getBundleNameByUidSync(number uid); + [Throws] + void getBundleArchiveInfo(String hapFilePath, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); + [Throws] + async BundleInfo getBundleArchiveInfo(String hapFilePath, number bundleFlags); + [Throws] + BundleInfo getBundleArchiveInfoSync(String hapFilePath, number bundleFlags); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void cleanBundleCacheFiles(String bundleName, AsyncCallback_Void callback_); + [Throws] + async void cleanBundleCacheFiles(String bundleName); + [Throws] + async void cleanBundleCacheFiles(String bundleName, number appIndex); + [Throws] + async number getAllBundleCacheSize(); + [Throws] + async void cleanAllBundleCache(); + [Throws] + async void setApplicationEnabled(String bundleName, number appIndex, boolean isEnabled); + [Throws] + void setApplicationEnabled(String bundleName, boolean isEnabled, AsyncCallback_Void callback_); + [Throws] + async void setApplicationEnabled(String bundleName, boolean isEnabled); + [Throws] + void setApplicationEnabledSync(String bundleName, boolean isEnabled); + [Throws] + async void setAbilityEnabled(AbilityInfo info, number appIndex, boolean isEnabled); + [Throws] + void setAbilityEnabled(AbilityInfo info, boolean isEnabled, AsyncCallback_Void callback_); + [Throws] + async void setAbilityEnabled(AbilityInfo info, boolean isEnabled); + [Throws] + void setAbilityEnabledSync(AbilityInfo info, boolean isEnabled); + [Throws] + async boolean isApplicationEnabled(String bundleName, number appIndex); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isApplicationEnabled(String bundleName, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isApplicationEnabled(String bundleName); + [Throws] + boolean isApplicationEnabledSync(String bundleName); + [Throws] + async boolean isAbilityEnabled(AbilityInfo info, number appIndex); + [Throws] + void isAbilityEnabled(AbilityInfo info, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isAbilityEnabled(AbilityInfo info); + [Throws] + boolean isAbilityEnabledSync(AbilityInfo info); [Async, Synthetic] callback AsyncCallback_Want_Void = void (Want result); + [Throws] + void getLaunchWantForBundle(String bundleName, number userId, AsyncCallback_Want_Void callback_); + [Throws] + void getLaunchWantForBundle(String bundleName, AsyncCallback_Want_Void callback_); + [Throws] + async Want getLaunchWantForBundle(String bundleName, optional number userId); + [Throws] + Want getLaunchWantForBundleSync(String bundleName, optional number userId); + [Throws] + Want getLaunchWant(); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void getProfileByAbility(String moduleName, String abilityName, String metadataName, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getProfileByAbility(String moduleName, String abilityName, optional String metadataName); + [Throws] + sequence getProfileByAbilitySync(String moduleName, String abilityName, optional String metadataName); + [Throws] + void getProfileByExtensionAbility(String moduleName, String extensionAbilityName, String metadataName, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getProfileByExtensionAbility(String moduleName, String extensionAbilityName, optional String metadataName); + [Throws] + sequence getProfileByExtensionAbilitySync(String moduleName, String extensionAbilityName, optional String metadataName); [Async, Synthetic] callback AsyncCallback_PermissionDef_Void = void (PermissionDef result); + [Throws] + void getPermissionDef(String permissionName, AsyncCallback_PermissionDef_Void callback_); + [Throws] + async PermissionDef getPermissionDef(String permissionName); + [Throws] + PermissionDef getPermissionDefSync(String permissionName); + [Throws] + void getAbilityLabel(String bundleName, String moduleName, String abilityName, AsyncCallback_String_Void callback_); + [Throws] + async String getAbilityLabel(String bundleName, String moduleName, String abilityName); + [Throws] + String getAbilityLabelSync(String bundleName, String moduleName, String abilityName); + [Throws] + ApplicationInfo getApplicationInfoSync(String bundleName, number applicationFlags, number userId); + [Throws] + ApplicationInfo getApplicationInfoSync(String bundleName, number applicationFlags); + [Throws] + BundleInfo getBundleInfoSync(String bundleName, number bundleFlags, number userId); + [Throws] + BundleInfo getBundleInfoSync(String bundleName, number bundleFlags); [Async, Synthetic] callback AsyncCallback_Array_SharedBundleInfo_Void = void (sequence result); + [Throws] + void getAllSharedBundleInfo(AsyncCallback_Array_SharedBundleInfo_Void callback_); + [Throws] + async sequence getAllSharedBundleInfo(); + [Throws] + void getSharedBundleInfo(String bundleName, String moduleName, AsyncCallback_Array_SharedBundleInfo_Void callback_); + [Throws] + async sequence getSharedBundleInfo(String bundleName, String moduleName); [Async, Synthetic] callback AsyncCallback_AppProvisionInfo_Void = void (AppProvisionInfo result); + [Throws] + void getAppProvisionInfo(String bundleName, AsyncCallback_AppProvisionInfo_Void callback_); + [Throws] + void getAppProvisionInfo(String bundleName, number userId, AsyncCallback_AppProvisionInfo_Void callback_); + [Throws] + async AppProvisionInfo getAppProvisionInfo(String bundleName, optional number userId); + [Throws] + AppProvisionInfo getAppProvisionInfoSync(String bundleName, optional number userId); + [Throws] + String getSpecifiedDistributionType(String bundleName); + [Throws] + String getAdditionalInfo(String bundleName); + [Throws] + String getJsonProfile(ProfileType profileType, String bundleName, optional String moduleName, optional number userId); + [Throws] + async sequence getExtResource(String bundleName); + [Throws] + async void enableDynamicIcon(String bundleName, String moduleName); + [Throws] + async void enableDynamicIcon(String bundleName, String moduleName, optional BundleOptions option); + [Throws] + async void disableDynamicIcon(String bundleName); + [Throws] + async void disableDynamicIcon(String bundleName, optional BundleOptions option); + [Throws] + async String getDynamicIcon(String bundleName); + [Throws] + async sequence getDynamicIconInfo(String bundleName); + [Throws] + async sequence getAllDynamicIconInfo(optional number userId); + [Throws] + void verifyAbc(sequence abcPaths, boolean deleteOriginalFiles, AsyncCallback_Void callback_); + [Throws] + async void verifyAbc(sequence abcPaths, boolean deleteOriginalFiles); [Async, Synthetic] callback AsyncCallback_Array_RecoverableApplicationInfo_Void = void (sequence result); + [Throws] + void getRecoverableApplicationInfo(AsyncCallback_Array_RecoverableApplicationInfo_Void callback_); + [Throws] + async sequence getRecoverableApplicationInfo(); + [Throws] + void setAdditionalInfo(String bundleName, String additionalInfo); + [Throws] + async void deleteAbc(String abcPath); + [Throws] + boolean canOpenLink(String link); + [Throws] + async sequence getAllPreinstalledApplicationInfo(); + [Throws] + sequence getAllBundleInfoByDeveloperId(String developerId); + [Throws] + sequence getDeveloperIds(optional number appDistributionType); + [Throws] + void switchUninstallState(String bundleName, boolean state); + [Throws] + SignatureInfo getSignatureInfo(number uid); + [Throws] + async BundleInfo getAppCloneBundleInfo(String bundleName, number appIndex, number bundleFlags, optional number userId); + [Throws] + async sequence getAllAppCloneBundleInfo(String bundleName, number bundleFlags, optional number userId); + [Throws] + async AppCloneIdentity getAppCloneIdentity(number uid); + [Throws] + async sequence getAllPluginInfo(String hostBundleName, optional number userId); + [Throws] + async void migrateData(sequence sourcePaths, String destinationPath); + [Throws] + String getSandboxDataDir(String bundleName, number appIndex); + AppCloneIdentity getAppCloneIdentityBySandboxDataDir(String sandboxDataDir); typedef _ApplicationInfo ApplicationInfo; typedef _ModuleMetadata ModuleMetadata; typedef _Metadata Metadata; typedef _BundleInfo.BundleInfo BundleInfo; + typedef _BundleInfo BundleInfo; typedef _BundleInfo.UsedScene UsedScene; + typedef _UsedScene UsedScene; typedef _BundleInfo.ReqPermissionDetail ReqPermissionDetail; + typedef _ReqPermissionDetail ReqPermissionDetail; typedef _BundleInfo.SignatureInfo SignatureInfo; + typedef _SignatureInfo SignatureInfo; typedef _BundleInfo.AppCloneIdentity AppCloneIdentity; + typedef _AppCloneIdentity AppCloneIdentity; typedef _HapModuleInfo.HapModuleInfo HapModuleInfo; + typedef _HapModuleInfo HapModuleInfo; typedef _HapModuleInfo.PreloadItem PreloadItem; + typedef _PreloadItem PreloadItem; typedef _HapModuleInfo.Dependency Dependency; + typedef _Dependency Dependency; typedef _HapModuleInfo.RouterItem RouterItem; + typedef _RouterItem RouterItem; typedef _HapModuleInfo.DataItem DataItem; + typedef _DataItem DataItem; typedef _AbilityInfo.AbilityInfo AbilityInfo; + typedef _AbilityInfo AbilityInfo; typedef _AbilityInfo.WindowSize WindowSize; + typedef _WindowSize WindowSize; typedef _ExtensionAbilityInfo.ExtensionAbilityInfo ExtensionAbilityInfo; + typedef _ExtensionAbilityInfo ExtensionAbilityInfo; typedef _PermissionDef PermissionDef; typedef _ElementName ElementName; typedef _SharedBundleInfo SharedBundleInfo; @@ -241,220 +472,12 @@ namespace bundleManager { typedef _AppProvisionInfo.Validity Validity; typedef _RecoverableApplicationInfo RecoverableApplicationInfo; typedef _Skill.Skill Skill; + typedef _Skill Skill; typedef _Skill.SkillUri SkillUrl; + typedef _SkillUri SkillUrl; typedef _PreinstalledApplicationInfo PreinstalledApplicationInfo; - [GlobalScope] - interface GlobalScope_bundleManager_ohos_bundle_bundleManager { - - [Throws] - static async BundleInfo getBundleInfoForSelf(number bundleFlags); - [Throws] - static void getBundleInfoForSelf(number bundleFlags, AsyncCallback_BundleInfo_Void callback_); - [Throws] - static BundleInfo getBundleInfoForSelfSync(number bundleFlags); - [Throws] - static void getBundleInfo(String bundleName, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); - [Throws] - static void getBundleInfo(String bundleName, number bundleFlags, number userId, AsyncCallback_BundleInfo_Void callback_); - [Throws] - static async BundleInfo getBundleInfo(String bundleName, number bundleFlags, optional number userId); - [Throws] - static void getApplicationInfo(String bundleName, number appFlags, AsyncCallback_ApplicationInfo_Void callback_); - [Throws] - static void getApplicationInfo(String bundleName, number appFlags, number userId, AsyncCallback_ApplicationInfo_Void callback_); - [Throws] - static async ApplicationInfo getApplicationInfo(String bundleName, number appFlags, optional number userId); - [Throws] - static void getAllBundleInfo(number bundleFlags, AsyncCallback_Array_BundleInfo_Void callback_); - [Throws] - static void getAllBundleInfo(number bundleFlags, number userId, AsyncCallback_Array_BundleInfo_Void callback_); - [Throws] - static async sequence getAllBundleInfo(number bundleFlags, optional number userId); - [Throws] - static void getAllApplicationInfo(number appFlags, AsyncCallback_Array_ApplicationInfo_Void callback_); - [Throws] - static void getAllApplicationInfo(number appFlags, number userId, AsyncCallback_Array_ApplicationInfo_Void callback_); - [Throws] - static async sequence getAllApplicationInfo(number appFlags, optional number userId); - [Throws] - static void queryAbilityInfo(Want want, number abilityFlags, AsyncCallback_Array_AbilityInfo_Void callback_); - [Throws] - static void queryAbilityInfo(Want want, number abilityFlags, number userId, AsyncCallback_Array_AbilityInfo_Void callback_); - [Throws] - static async sequence queryAbilityInfo(Want want, number abilityFlags, optional number userId); - [Throws] - static async sequence queryAbilityInfo(sequence wants, number abilityFlags, optional number userId); - [Throws] - static sequence queryAbilityInfoSync(Want want, number abilityFlags, optional number userId); - [Throws] - static void queryExtensionAbilityInfo(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, AsyncCallback_Array_ExtensionAbilityInfo_Void callback_); - [Throws] - static void queryExtensionAbilityInfo(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, number userId, AsyncCallback_Array_ExtensionAbilityInfo_Void callback_); - [Throws] - static async sequence queryExtensionAbilityInfo(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, optional number userId); - [Throws] - static sequence queryExtensionAbilityInfoSync(Want want, ExtensionAbilityType extensionAbilityType, number extensionAbilityFlags, optional number userId); - [Throws] - static sequence queryExtensionAbilityInfoSync(Want want, String extensionAbilityType, number extensionAbilityFlags, optional number userId); - [Throws] - static sequence queryExtensionAbilityInfoSync(String extensionAbilityType, number extensionAbilityFlags, optional number userId); - [Throws] - static void getBundleNameByUid(number uid, AsyncCallback_String_Void callback_); - [Throws] - static async String getBundleNameByUid(number uid); - [Throws] - static String getBundleNameByUidSync(number uid); - [Throws] - static void getBundleArchiveInfo(String hapFilePath, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); - [Throws] - static async BundleInfo getBundleArchiveInfo(String hapFilePath, number bundleFlags); - [Throws] - static BundleInfo getBundleArchiveInfoSync(String hapFilePath, number bundleFlags); - [Throws] - static void cleanBundleCacheFiles(String bundleName, AsyncCallback_Void callback_); - [Throws] - static async void cleanBundleCacheFiles(String bundleName); - [Throws] - static async void cleanBundleCacheFiles(String bundleName, number appIndex); - [Throws] - static async number getAllBundleCacheSize(); - [Throws] - static async void cleanAllBundleCache(); - [Throws] - static async void setApplicationEnabled(String bundleName, number appIndex, boolean isEnabled); - [Throws] - static void setApplicationEnabled(String bundleName, boolean isEnabled, AsyncCallback_Void callback_); - [Throws] - static async void setApplicationEnabled(String bundleName, boolean isEnabled); - [Throws] - static void setApplicationEnabledSync(String bundleName, boolean isEnabled); - [Throws] - static async void setAbilityEnabled(AbilityInfo info, number appIndex, boolean isEnabled); - [Throws] - static void setAbilityEnabled(AbilityInfo info, boolean isEnabled, AsyncCallback_Void callback_); - [Throws] - static async void setAbilityEnabled(AbilityInfo info, boolean isEnabled); - [Throws] - static void setAbilityEnabledSync(AbilityInfo info, boolean isEnabled); - [Throws] - static async boolean isApplicationEnabled(String bundleName, number appIndex); - [Throws] - static void isApplicationEnabled(String bundleName, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isApplicationEnabled(String bundleName); - [Throws] - static boolean isApplicationEnabledSync(String bundleName); - [Throws] - static async boolean isAbilityEnabled(AbilityInfo info, number appIndex); - [Throws] - static void isAbilityEnabled(AbilityInfo info, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isAbilityEnabled(AbilityInfo info); - [Throws] - static boolean isAbilityEnabledSync(AbilityInfo info); - [Throws] - static void getLaunchWantForBundle(String bundleName, number userId, AsyncCallback_Want_Void callback_); - [Throws] - static void getLaunchWantForBundle(String bundleName, AsyncCallback_Want_Void callback_); - [Throws] - static async Want getLaunchWantForBundle(String bundleName, optional number userId); - [Throws] - static Want getLaunchWantForBundleSync(String bundleName, optional number userId); - [Throws] - static Want getLaunchWant(); - [Throws] - static void getProfileByAbility(String moduleName, String abilityName, String metadataName, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getProfileByAbility(String moduleName, String abilityName, optional String metadataName); - [Throws] - static sequence getProfileByAbilitySync(String moduleName, String abilityName, optional String metadataName); - [Throws] - static void getProfileByExtensionAbility(String moduleName, String extensionAbilityName, String metadataName, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getProfileByExtensionAbility(String moduleName, String extensionAbilityName, optional String metadataName); - [Throws] - static sequence getProfileByExtensionAbilitySync(String moduleName, String extensionAbilityName, optional String metadataName); - [Throws] - static void getPermissionDef(String permissionName, AsyncCallback_PermissionDef_Void callback_); - [Throws] - static async PermissionDef getPermissionDef(String permissionName); - [Throws] - static PermissionDef getPermissionDefSync(String permissionName); - [Throws] - static void getAbilityLabel(String bundleName, String moduleName, String abilityName, AsyncCallback_String_Void callback_); - [Throws] - static async String getAbilityLabel(String bundleName, String moduleName, String abilityName); - [Throws] - static String getAbilityLabelSync(String bundleName, String moduleName, String abilityName); - [Throws] - static ApplicationInfo getApplicationInfoSync(String bundleName, number applicationFlags, number userId); - [Throws] - static ApplicationInfo getApplicationInfoSync(String bundleName, number applicationFlags); - [Throws] - static BundleInfo getBundleInfoSync(String bundleName, number bundleFlags, number userId); - [Throws] - static BundleInfo getBundleInfoSync(String bundleName, number bundleFlags); - [Throws] - static void getAllSharedBundleInfo(AsyncCallback_Array_SharedBundleInfo_Void callback_); - [Throws] - static async sequence getAllSharedBundleInfo(); - [Throws] - static void getSharedBundleInfo(String bundleName, String moduleName, AsyncCallback_Array_SharedBundleInfo_Void callback_); - [Throws] - static async sequence getSharedBundleInfo(String bundleName, String moduleName); - [Throws] - static void getAppProvisionInfo(String bundleName, AsyncCallback_AppProvisionInfo_Void callback_); - [Throws] - static void getAppProvisionInfo(String bundleName, number userId, AsyncCallback_AppProvisionInfo_Void callback_); - [Throws] - static async AppProvisionInfo getAppProvisionInfo(String bundleName, optional number userId); - [Throws] - static AppProvisionInfo getAppProvisionInfoSync(String bundleName, optional number userId); - [Throws] - static String getSpecifiedDistributionType(String bundleName); - [Throws] - static String getAdditionalInfo(String bundleName); - [Throws] - static String getJsonProfile(ProfileType profileType, String bundleName, optional String moduleName, optional number userId); - [Throws] - static async sequence getExtResource(String bundleName); - [Throws] - static async void enableDynamicIcon(String bundleName, String moduleName); - [Throws] - static async void disableDynamicIcon(String bundleName); - [Throws] - static async String getDynamicIcon(String bundleName); - [Throws] - static void verifyAbc(sequence abcPaths, boolean deleteOriginalFiles, AsyncCallback_Void callback_); - [Throws] - static async void verifyAbc(sequence abcPaths, boolean deleteOriginalFiles); - [Throws] - static void getRecoverableApplicationInfo(AsyncCallback_Array_RecoverableApplicationInfo_Void callback_); - [Throws] - static async sequence getRecoverableApplicationInfo(); - [Throws] - static void setAdditionalInfo(String bundleName, String additionalInfo); - [Throws] - static async void deleteAbc(String abcPath); - [Throws] - static boolean canOpenLink(String link); - [Throws] - static async sequence getAllPreinstalledApplicationInfo(); - [Throws] - static sequence getAllBundleInfoByDeveloperId(String developerId); - [Throws] - static sequence getDeveloperIds(optional number appDistributionType); - [Throws] - static void switchUninstallState(String bundleName, boolean state); - [Throws] - static SignatureInfo getSignatureInfo(number uid); - [Throws] - static async BundleInfo getAppCloneBundleInfo(String bundleName, number appIndex, number bundleFlags, optional number userId); - [Throws] - static async sequence getAllAppCloneBundleInfo(String bundleName, number bundleFlags, optional number userId); - [Throws] - static async AppCloneIdentity getAppCloneIdentity(number uid); - - }; - + typedef _PluginBundleInfo PluginBundleInfo; + typedef _PluginModuleInfo PluginModuleInfo; + typedef _BundleInfo.DynamicIconInfo DynamicIconInfo; + typedef _BundleInfo.BundleOptions BundleOptions; }; \ No newline at end of file diff --git a/idl/@ohos.bundle.bundleMonitor.idl b/idl/@ohos.bundle.bundleMonitor.idl index e81ce36..679d3ac 100644 --- a/idl/@ohos.bundle.bundleMonitor.idl +++ b/idl/@ohos.bundle.bundleMonitor.idl @@ -1,26 +1,18 @@ -package ohos.bundle; +package ohos.bundle.bundleMonitor; import ohos.base.Callback as Callback; +[DefaultExport] namespace bundleMonitor { - [Entity=Interface] interface BundleChangedInfo { - readonly attribute String bundleName; readonly attribute number userId; readonly attribute number appIndex; - }; typedef String BundleChangedEvent; [Synthetic] callback Callback_BundleChangedInfo_Void = void (BundleChangedInfo parameter); - [GlobalScope] - interface GlobalScope_bundleMonitor_ohos_bundle_bundleMonitor { - - [Throws] - static void on(BundleChangedEvent type, Callback_BundleChangedInfo_Void callback_); - [Throws] - static void off(BundleChangedEvent type, optional Callback_BundleChangedInfo_Void callback_); - - }; - + [Throws] + void on(BundleChangedEvent type, Callback_BundleChangedInfo_Void callback_); + [Throws] + void off(BundleChangedEvent type, optional Callback_BundleChangedInfo_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.bundle.bundleResourceManager.idl b/idl/@ohos.bundle.bundleResourceManager.idl index d47ef17..8e6d27d 100644 --- a/idl/@ohos.bundle.bundleResourceManager.idl +++ b/idl/@ohos.bundle.bundleResourceManager.idl @@ -1,44 +1,42 @@ -package ohos.bundle; +package ohos.bundle.bundleResourceManager; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.BundleResourceInfo as _BundleResourceInfo; -import bundleManager.LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo; +import bundleManager.BundleResourceInfo.BundleResourceInfo as _BundleResourceInfo; +import bundleManager.LauncherAbilityResourceInfo.LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo; +import ohos.base.AsyncCallback as AsyncCallback; +import bundleManager.BundleResourceInfo.BundleResourceInfo as _BundleResourceInfo; +import bundleManager.LauncherAbilityResourceInfo.LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo; +[DefaultExport] namespace bundleResourceManager { - dictionary ResourceFlag { - number GET_RESOURCE_INFO_ALL = 1; number GET_RESOURCE_INFO_WITH_LABEL = 2; number GET_RESOURCE_INFO_WITH_ICON = 4; number GET_RESOURCE_INFO_WITH_SORTED_BY_LABEL = 8; number GET_RESOURCE_INFO_WITH_DRAWABLE_DESCRIPTOR = 16; - + number GET_RESOURCE_INFO_ONLY_WITH_MAIN_ABILITY = 32; }; + [Throws] + BundleResourceInfo getBundleResourceInfo(String bundleName, optional number resourceFlags); + [Throws] + BundleResourceInfo getBundleResourceInfo(String bundleName, optional number resourceFlags, optional number appIndex); + [Throws] + sequence getLauncherAbilityResourceInfo(String bundleName, optional number resourceFlags); + [Throws] + sequence getLauncherAbilityResourceInfo(String bundleName, optional number resourceFlags, optional number appIndex); [Async, Synthetic] callback AsyncCallback_Array_BundleResourceInfo_Void = void (sequence result); + [Throws] + void getAllBundleResourceInfo(number resourceFlags, AsyncCallback_Array_BundleResourceInfo_Void callback_); + [Throws] + async sequence getAllBundleResourceInfo(number resourceFlags); [Async, Synthetic] callback AsyncCallback_Array_LauncherAbilityResourceInfo_Void = void (sequence result); + [Throws] + void getAllLauncherAbilityResourceInfo(number resourceFlags, AsyncCallback_Array_LauncherAbilityResourceInfo_Void callback_); + [Throws] + async sequence getAllLauncherAbilityResourceInfo(number resourceFlags); + [Throws] + sequence getExtensionAbilityResourceInfo(String bundleName, bundleManager.ExtensionAbilityType extensionAbilityType, number resourceFlags, optional number appIndex); typedef _BundleResourceInfo BundleResourceInfo; typedef _LauncherAbilityResourceInfo LauncherAbilityResourceInfo; - [GlobalScope] - interface GlobalScope_bundleResourceManager_ohos_bundle_bundleResourceManager { - - [Throws] - static BundleResourceInfo getBundleResourceInfo(String bundleName, optional number resourceFlags); - [Throws] - static BundleResourceInfo getBundleResourceInfo(String bundleName, optional number resourceFlags, optional number appIndex); - [Throws] - static sequence getLauncherAbilityResourceInfo(String bundleName, optional number resourceFlags); - [Throws] - static sequence getLauncherAbilityResourceInfo(String bundleName, optional number resourceFlags, optional number appIndex); - [Throws] - static void getAllBundleResourceInfo(number resourceFlags, AsyncCallback_Array_BundleResourceInfo_Void callback_); - [Throws] - static async sequence getAllBundleResourceInfo(number resourceFlags); - [Throws] - static void getAllLauncherAbilityResourceInfo(number resourceFlags, AsyncCallback_Array_LauncherAbilityResourceInfo_Void callback_); - [Throws] - static async sequence getAllLauncherAbilityResourceInfo(number resourceFlags); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bundle.defaultAppManager.idl b/idl/@ohos.bundle.defaultAppManager.idl index 1cb5d2f..04b26f0 100644 --- a/idl/@ohos.bundle.defaultAppManager.idl +++ b/idl/@ohos.bundle.defaultAppManager.idl @@ -1,11 +1,10 @@ -package ohos.bundle; +package ohos.bundle.defaultAppManager; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.BundleInfo as BundleInfo; -import bundleManager.ElementName as ElementName; +import bundleManager.BundleInfo.BundleInfo as BundleInfo; +import bundleManager.ElementName.ElementName as ElementName; +[DefaultExport] namespace defaultAppManager { - dictionary ApplicationType { - String BROWSER = "Web Browser"; String IMAGE = "Image Gallery"; String AUDIO = "Audio Player"; @@ -15,48 +14,41 @@ namespace defaultAppManager { String EXCEL = "Excel Viewer"; String PPT = "PPT Viewer"; String EMAIL = "Email"; - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isDefaultApplication(String type, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isDefaultApplication(String type); + [Throws] + boolean isDefaultApplicationSync(String type); [Async, Synthetic] callback AsyncCallback_BundleInfo_Void = void (BundleInfo result); + [Throws] + void getDefaultApplication(String type, number userId, AsyncCallback_BundleInfo_Void callback_); + [Throws] + void getDefaultApplication(String type, AsyncCallback_BundleInfo_Void callback_); + [Throws] + async BundleInfo getDefaultApplication(String type, optional number userId); + [Throws] + BundleInfo getDefaultApplicationSync(String type, optional number userId); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_defaultAppManager_ohos_bundle_defaultAppManager { - - [Throws] - static void isDefaultApplication(String type, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isDefaultApplication(String type); - [Throws] - static boolean isDefaultApplicationSync(String type); - [Throws] - static void getDefaultApplication(String type, number userId, AsyncCallback_BundleInfo_Void callback_); - [Throws] - static void getDefaultApplication(String type, AsyncCallback_BundleInfo_Void callback_); - [Throws] - static async BundleInfo getDefaultApplication(String type, optional number userId); - [Throws] - static BundleInfo getDefaultApplicationSync(String type, optional number userId); - [Throws] - static void setDefaultApplication(String type, ElementName elementName, number userId, AsyncCallback_Void callback_); - [Throws] - static void setDefaultApplication(String type, ElementName elementName, AsyncCallback_Void callback_); - [Throws] - static async void setDefaultApplication(String type, ElementName elementName, optional number userId); - [Throws] - static void setDefaultApplicationSync(String type, ElementName elementName, optional number userId); - [Throws] - static void resetDefaultApplication(String type, number userId, AsyncCallback_Void callback_); - [Throws] - static void resetDefaultApplication(String type, AsyncCallback_Void callback_); - [Throws] - static async void resetDefaultApplication(String type, optional number userId); - [Throws] - static void resetDefaultApplicationSync(String type, optional number userId); - - }; - + [Throws] + void setDefaultApplication(String type, ElementName elementName, number userId, AsyncCallback_Void callback_); + [Throws] + void setDefaultApplication(String type, ElementName elementName, AsyncCallback_Void callback_); + [Throws] + async void setDefaultApplication(String type, ElementName elementName, optional number userId); + [Throws] + void setDefaultApplicationSync(String type, ElementName elementName, optional number userId); + [Throws] + void resetDefaultApplication(String type, number userId, AsyncCallback_Void callback_); + [Throws] + void resetDefaultApplication(String type, AsyncCallback_Void callback_); + [Throws] + async void resetDefaultApplication(String type, optional number userId); + [Throws] + void resetDefaultApplicationSync(String type, optional number userId); }; \ No newline at end of file diff --git a/idl/@ohos.bundle.distributedBundleManager.idl b/idl/@ohos.bundle.distributedBundleManager.idl index f2a963c..408e134 100644 --- a/idl/@ohos.bundle.distributedBundleManager.idl +++ b/idl/@ohos.bundle.distributedBundleManager.idl @@ -1,34 +1,28 @@ -package ohos.bundle; +package ohos.bundle.distributedBundleManager; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.ElementName as ElementName; -import bundleManager.RemoteAbilityInfo as _RemoteAbilityInfo; +import bundleManager.ElementName.ElementName as ElementName; +import bundleManager.RemoteAbilityInfo.RemoteAbilityInfo as _RemoteAbilityInfo; +[DefaultExport] namespace distributedBundleManager { - [Async, Synthetic] callback AsyncCallback_RemoteAbilityInfo_Void = void (RemoteAbilityInfo result); + [Throws] + void getRemoteAbilityInfo(ElementName elementName, AsyncCallback_RemoteAbilityInfo_Void callback_); + [Throws] + async RemoteAbilityInfo getRemoteAbilityInfo(ElementName elementName); [Async, Synthetic] callback AsyncCallback_Array_RemoteAbilityInfo_Void = void (sequence result); + [Throws] + void getRemoteAbilityInfo(sequence elementNames, AsyncCallback_Array_RemoteAbilityInfo_Void callback_); + [Throws] + async sequence getRemoteAbilityInfo(sequence elementNames); + [Throws] + void getRemoteAbilityInfo(ElementName elementName, String locale, AsyncCallback_RemoteAbilityInfo_Void callback_); + [Throws] + async RemoteAbilityInfo getRemoteAbilityInfo(ElementName elementName, String locale); + [Throws] + void getRemoteAbilityInfo(sequence elementNames, String locale, AsyncCallback_Array_RemoteAbilityInfo_Void callback_); + [Throws] + async sequence getRemoteAbilityInfo(sequence elementNames, String locale); typedef _RemoteAbilityInfo RemoteAbilityInfo; - [GlobalScope] - interface GlobalScope_distributedBundleManager_ohos_bundle_distributedBundleManager { - - [Throws] - static void getRemoteAbilityInfo(ElementName elementName, AsyncCallback_RemoteAbilityInfo_Void callback_); - [Throws] - static async RemoteAbilityInfo getRemoteAbilityInfo(ElementName elementName); - [Throws] - static void getRemoteAbilityInfo(sequence elementNames, AsyncCallback_Array_RemoteAbilityInfo_Void callback_); - [Throws] - static async sequence getRemoteAbilityInfo(sequence elementNames); - [Throws] - static void getRemoteAbilityInfo(ElementName elementName, String locale, AsyncCallback_RemoteAbilityInfo_Void callback_); - [Throws] - static async RemoteAbilityInfo getRemoteAbilityInfo(ElementName elementName, String locale); - [Throws] - static void getRemoteAbilityInfo(sequence elementNames, String locale, AsyncCallback_Array_RemoteAbilityInfo_Void callback_); - [Throws] - static async sequence getRemoteAbilityInfo(sequence elementNames, String locale); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bundle.freeInstall.idl b/idl/@ohos.bundle.freeInstall.idl index bc2aa85..d34fba6 100644 --- a/idl/@ohos.bundle.freeInstall.idl +++ b/idl/@ohos.bundle.freeInstall.idl @@ -1,64 +1,76 @@ -package ohos.bundle; +package ohos.bundle.freeInstall; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.DispatchInfo as _DispatchInfo; -import bundleManager as _PackInfo; +import bundleManager.DispatchInfo.DispatchInfo as _DispatchInfo; +import bundleManager.BundlePackInfo as _PackInfo; +import bundleManager.BundlePackInfo.BundlePackInfo as _BundlePackInfo; +import bundleManager.BundlePackInfo.PackageConfig as _PackageConfig; +import bundleManager.BundlePackInfo.PackageSummary as _PackageSummary; +import bundleManager.BundlePackInfo.BundleConfigInfo as _BundleConfigInfo; +import bundleManager.BundlePackInfo.ExtensionAbility as _ExtensionAbility; +import bundleManager.BundlePackInfo.ModuleConfigInfo as _ModuleConfigInfo; +import bundleManager.BundlePackInfo.ModuleDistroInfo as _ModuleDistroInfo; +import bundleManager.BundlePackInfo.ModuleAbilityInfo as _ModuleAbilityInfo; +import bundleManager.BundlePackInfo.AbilityFormInfo as _AbilityFormInfo; +import bundleManager.BundlePackInfo.Version as _Version; +import bundleManager.BundlePackInfo.ApiVersion as _ApiVersion; +[DefaultExport] namespace freeInstall { - dictionary UpgradeFlag { - number NOT_UPGRADE = 0; number SINGLE_UPGRADE = 1; number RELATION_UPGRADE = 2; - }; dictionary BundlePackFlag { - number GET_PACK_INFO_ALL = 0; number GET_PACKAGES = 1; number GET_BUNDLE_SUMMARY = 2; number GET_MODULE_SUMMARY = 4; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setHapModuleUpgradeFlag(String bundleName, String moduleName, UpgradeFlag upgradeFlag, AsyncCallback_Void callback_); + [Throws] + async void setHapModuleUpgradeFlag(String bundleName, String moduleName, UpgradeFlag upgradeFlag); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isHapModuleRemovable(String bundleName, String moduleName, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isHapModuleRemovable(String bundleName, String moduleName); [Async, Synthetic] callback AsyncCallback_BundlePackInfo_Void = void (BundlePackInfo result); + [Throws] + void getBundlePackInfo(String bundleName, BundlePackFlag bundlePackFlag, AsyncCallback_BundlePackInfo_Void callback_); + [Throws] + async BundlePackInfo getBundlePackInfo(String bundleName, BundlePackFlag bundlePackFlag); [Async, Synthetic] callback AsyncCallback_DispatchInfo_Void = void (DispatchInfo result); + [Throws] + void getDispatchInfo(AsyncCallback_DispatchInfo_Void callback_); + [Throws] + async DispatchInfo getDispatchInfo(); typedef _DispatchInfo DispatchInfo; typedef _PackInfo.BundlePackInfo BundlePackInfo; + typedef _BundlePackInfo BundlePackInfo; typedef _PackInfo.PackageConfig PackageConfig; + typedef _PackageConfig PackageConfig; typedef _PackInfo.PackageSummary PackageSummary; + typedef _PackageSummary PackageSummary; typedef _PackInfo.BundleConfigInfo BundleConfigInfo; + typedef _BundleConfigInfo BundleConfigInfo; typedef _PackInfo.ExtensionAbility ExtensionAbility; + typedef _ExtensionAbility ExtensionAbility; typedef _PackInfo.ModuleConfigInfo ModuleConfigInfo; + typedef _ModuleConfigInfo ModuleConfigInfo; typedef _PackInfo.ModuleDistroInfo ModuleDistroInfo; + typedef _ModuleDistroInfo ModuleDistroInfo; typedef _PackInfo.ModuleAbilityInfo ModuleAbilityInfo; + typedef _ModuleAbilityInfo ModuleAbilityInfo; typedef _PackInfo.AbilityFormInfo AbilityFormInfo; + typedef _AbilityFormInfo AbilityFormInfo; typedef _PackInfo.Version Version; + typedef _Version Version; typedef _PackInfo.ApiVersion ApiVersion; - [GlobalScope] - interface GlobalScope_freeInstall_ohos_bundle_freeInstall { - - [Throws] - static void setHapModuleUpgradeFlag(String bundleName, String moduleName, UpgradeFlag upgradeFlag, AsyncCallback_Void callback_); - [Throws] - static async void setHapModuleUpgradeFlag(String bundleName, String moduleName, UpgradeFlag upgradeFlag); - [Throws] - static void isHapModuleRemovable(String bundleName, String moduleName, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isHapModuleRemovable(String bundleName, String moduleName); - [Throws] - static void getBundlePackInfo(String bundleName, BundlePackFlag bundlePackFlag, AsyncCallback_BundlePackInfo_Void callback_); - [Throws] - static async BundlePackInfo getBundlePackInfo(String bundleName, BundlePackFlag bundlePackFlag); - [Throws] - static void getDispatchInfo(AsyncCallback_DispatchInfo_Void callback_); - [Throws] - static async DispatchInfo getDispatchInfo(); - - }; - + typedef _ApiVersion ApiVersion; }; \ No newline at end of file diff --git a/idl/@ohos.bundle.idl b/idl/@ohos.bundle.idl index b6309aa..59fa06a 100644 --- a/idl/@ohos.bundle.idl +++ b/idl/@ohos.bundle.idl @@ -1,17 +1,16 @@ -package ohos; +package ohos.bundle; import ohos.base.AsyncCallback as AsyncCallback; -import bundle.ApplicationInfo as ApplicationInfo; -import bundle.AbilityInfo as AbilityInfo; -import bundle.PermissionDef as PermissionDef; -import ohos.app.ability.Want as Want; -import ohos.multimedia.image as image; +import bundle.applicationInfo.ApplicationInfo as ApplicationInfo; +import bundle.abilityInfo.AbilityInfo as AbilityInfo; +import bundle.PermissionDef.PermissionDef as PermissionDef; +import ohos.app.ability.Want.default as Want; +import ohos.multimedia.image.default as image; import bundle.bundleInfo.BundleInfo as BundleInfo; import bundle.bundleInstaller.BundleInstaller as BundleInstaller; +[DefaultExport] namespace bundle { - [Deprecated] dictionary BundleFlag { - [Deprecated] number GET_BUNDLE_DEFAULT = 0; [Deprecated] @@ -36,31 +35,25 @@ namespace bundle { number GET_ABILITY_INFO_WITH_DISABLE = 256; [Deprecated] number GET_APPLICATION_INFO_WITH_DISABLE = 512; - }; [Deprecated] dictionary ColorMode { - [Deprecated] number AUTO_MODE = -1; [Deprecated] number DARK_MODE = 0; [Deprecated] number LIGHT_MODE = 1; - }; [Deprecated] dictionary GrantStatus { - [Deprecated] number PERMISSION_DENIED = -1; [Deprecated] number PERMISSION_GRANTED = 0; - }; [Deprecated] dictionary AbilityType { - [Deprecated] number UNKNOWN = 0; [Deprecated] @@ -69,20 +62,16 @@ namespace bundle { number SERVICE = 2; [Deprecated] number DATA = 3; - }; [Deprecated] dictionary AbilitySubType { - [Deprecated] number UNSPECIFIED = 0; [Deprecated] number CA = 1; - }; [Deprecated] dictionary DisplayOrientation { - [Deprecated] number UNSPECIFIED = 0; [Deprecated] @@ -91,27 +80,21 @@ namespace bundle { number PORTRAIT = 2; [Deprecated] number FOLLOW_RECENT = 3; - }; [Deprecated] dictionary LaunchMode { - [Deprecated] number SINGLETON = 0; [Deprecated] number STANDARD = 1; - }; [Entity=Interface, Deprecated] interface BundleOptions { - [Optional, Deprecated] attribute number userId; - }; [Deprecated] dictionary InstallErrorCode { - [Deprecated] number SUCCESS = 0; [Deprecated] @@ -152,120 +135,113 @@ namespace bundle { number STATUS_INSTALL_PERMISSION_DENIED = 68; [Deprecated] number STATUS_UNINSTALL_PERMISSION_DENIED = 69; - }; [Async, Synthetic] callback AsyncCallback_BundleInfo_Void = void (BundleInfo result); + [Deprecated] + void getBundleInfo(String bundleName, number bundleFlags, BundleOptions options, AsyncCallback_BundleInfo_Void callback_); + [Deprecated] + void getBundleInfo(String bundleName, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); + [Deprecated] + async BundleInfo getBundleInfo(String bundleName, number bundleFlags, optional BundleOptions options); [Async, Synthetic] callback AsyncCallback_BundleInstaller_Void = void (BundleInstaller result); + [Deprecated] + void getBundleInstaller(AsyncCallback_BundleInstaller_Void callback_); + [Deprecated] + async BundleInstaller getBundleInstaller(); [Async, Synthetic] callback AsyncCallback_AbilityInfo_Void = void (AbilityInfo result); + [Deprecated] + void getAbilityInfo(String bundleName, String abilityName, AsyncCallback_AbilityInfo_Void callback_); + [Deprecated] + async AbilityInfo getAbilityInfo(String bundleName, String abilityName); [Async, Synthetic] callback AsyncCallback_ApplicationInfo_Void = void (ApplicationInfo result); + [Deprecated] + void getApplicationInfo(String bundleName, number bundleFlags, number userId, AsyncCallback_ApplicationInfo_Void callback_); + [Deprecated] + void getApplicationInfo(String bundleName, number bundleFlags, AsyncCallback_ApplicationInfo_Void callback_); + [Deprecated] + async ApplicationInfo getApplicationInfo(String bundleName, number bundleFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_Array_AbilityInfo_Void = void (sequence result); + [Deprecated] + void queryAbilityByWant(Want want, number bundleFlags, number userId, AsyncCallback_Array_AbilityInfo_Void callback_); + [Deprecated] + void queryAbilityByWant(Want want, number bundleFlags, AsyncCallback_Array_AbilityInfo_Void callback_); + [Deprecated] + async sequence queryAbilityByWant(Want want, number bundleFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_Array_BundleInfo_Void = void (sequence result); + [Deprecated] + void getAllBundleInfo(BundleFlag bundleFlag, number userId, AsyncCallback_Array_BundleInfo_Void callback_); + [Deprecated] + void getAllBundleInfo(BundleFlag bundleFlag, AsyncCallback_Array_BundleInfo_Void callback_); + [Deprecated] + async sequence getAllBundleInfo(BundleFlag bundleFlag, optional number userId); [Async, Synthetic] callback AsyncCallback_Array_ApplicationInfo_Void = void (sequence result); + [Deprecated] + void getAllApplicationInfo(number bundleFlags, number userId, AsyncCallback_Array_ApplicationInfo_Void callback_); + [Deprecated] + void getAllApplicationInfo(number bundleFlags, AsyncCallback_Array_ApplicationInfo_Void callback_); + [Deprecated] + async sequence getAllApplicationInfo(number bundleFlags, optional number userId); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Deprecated] + void getNameForUid(number uid, AsyncCallback_String_Void callback_); + [Deprecated] + async String getNameForUid(number uid); + [Deprecated] + void getBundleArchiveInfo(String hapFilePath, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); + [Deprecated] + async BundleInfo getBundleArchiveInfo(String hapFilePath, number bundleFlags); [Async, Synthetic] callback AsyncCallback_Want_Void = void (Want result); + [Deprecated] + void getLaunchWantForBundle(String bundleName, AsyncCallback_Want_Void callback_); + [Deprecated] + async Want getLaunchWantForBundle(String bundleName); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void cleanBundleCacheFiles(String bundleName, AsyncCallback_Void callback_); + [Deprecated] + async void cleanBundleCacheFiles(String bundleName); + [Deprecated] + void setApplicationEnabled(String bundleName, boolean isEnable, AsyncCallback_Void callback_); + [Deprecated] + async void setApplicationEnabled(String bundleName, boolean isEnable); + [Deprecated] + void setAbilityEnabled(AbilityInfo info, boolean isEnable, AsyncCallback_Void callback_); + [Deprecated] + async void setAbilityEnabled(AbilityInfo info, boolean isEnable); [Async, Synthetic] callback AsyncCallback_PermissionDef_Void = void (PermissionDef result); + [Deprecated] + void getPermissionDef(String permissionName, AsyncCallback_PermissionDef_Void callback_); + [Deprecated] + async PermissionDef getPermissionDef(String permissionName); + [Deprecated] + void getAbilityLabel(String bundleName, String abilityName, AsyncCallback_String_Void callback_); + [Deprecated] + async String getAbilityLabel(String bundleName, String abilityName); [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); + [Deprecated] + void getAbilityIcon(String bundleName, String abilityName, AsyncCallback_Image_PixelMap_Void callback_); + [Deprecated] + async image.PixelMap getAbilityIcon(String bundleName, String abilityName); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); - [GlobalScope] - interface GlobalScope_bundle_ohos_bundle { - - [Deprecated] - static void getBundleInfo(String bundleName, number bundleFlags, BundleOptions options, AsyncCallback_BundleInfo_Void callback_); - [Deprecated] - static void getBundleInfo(String bundleName, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); - [Deprecated] - static async BundleInfo getBundleInfo(String bundleName, number bundleFlags, optional BundleOptions options); - [Deprecated] - static void getBundleInstaller(AsyncCallback_BundleInstaller_Void callback_); - [Deprecated] - static async BundleInstaller getBundleInstaller(); - [Deprecated] - static void getAbilityInfo(String bundleName, String abilityName, AsyncCallback_AbilityInfo_Void callback_); - [Deprecated] - static async AbilityInfo getAbilityInfo(String bundleName, String abilityName); - [Deprecated] - static void getApplicationInfo(String bundleName, number bundleFlags, number userId, AsyncCallback_ApplicationInfo_Void callback_); - [Deprecated] - static void getApplicationInfo(String bundleName, number bundleFlags, AsyncCallback_ApplicationInfo_Void callback_); - [Deprecated] - static async ApplicationInfo getApplicationInfo(String bundleName, number bundleFlags, optional number userId); - [Deprecated] - static void queryAbilityByWant(Want want, number bundleFlags, number userId, AsyncCallback_Array_AbilityInfo_Void callback_); - [Deprecated] - static void queryAbilityByWant(Want want, number bundleFlags, AsyncCallback_Array_AbilityInfo_Void callback_); - [Deprecated] - static async sequence queryAbilityByWant(Want want, number bundleFlags, optional number userId); - [Deprecated] - static void getAllBundleInfo(BundleFlag bundleFlag, number userId, AsyncCallback_Array_BundleInfo_Void callback_); - [Deprecated] - static void getAllBundleInfo(BundleFlag bundleFlag, AsyncCallback_Array_BundleInfo_Void callback_); - [Deprecated] - static async sequence getAllBundleInfo(BundleFlag bundleFlag, optional number userId); - [Deprecated] - static void getAllApplicationInfo(number bundleFlags, number userId, AsyncCallback_Array_ApplicationInfo_Void callback_); - [Deprecated] - static void getAllApplicationInfo(number bundleFlags, AsyncCallback_Array_ApplicationInfo_Void callback_); - [Deprecated] - static async sequence getAllApplicationInfo(number bundleFlags, optional number userId); - [Deprecated] - static void getNameForUid(number uid, AsyncCallback_String_Void callback_); - [Deprecated] - static async String getNameForUid(number uid); - [Deprecated] - static void getBundleArchiveInfo(String hapFilePath, number bundleFlags, AsyncCallback_BundleInfo_Void callback_); - [Deprecated] - static async BundleInfo getBundleArchiveInfo(String hapFilePath, number bundleFlags); - [Deprecated] - static void getLaunchWantForBundle(String bundleName, AsyncCallback_Want_Void callback_); - [Deprecated] - static async Want getLaunchWantForBundle(String bundleName); - [Deprecated] - static void cleanBundleCacheFiles(String bundleName, AsyncCallback_Void callback_); - [Deprecated] - static async void cleanBundleCacheFiles(String bundleName); - [Deprecated] - static void setApplicationEnabled(String bundleName, boolean isEnable, AsyncCallback_Void callback_); - [Deprecated] - static async void setApplicationEnabled(String bundleName, boolean isEnable); - [Deprecated] - static void setAbilityEnabled(AbilityInfo info, boolean isEnable, AsyncCallback_Void callback_); - [Deprecated] - static async void setAbilityEnabled(AbilityInfo info, boolean isEnable); - [Deprecated] - static void getPermissionDef(String permissionName, AsyncCallback_PermissionDef_Void callback_); - [Deprecated] - static async PermissionDef getPermissionDef(String permissionName); - [Deprecated] - static void getAbilityLabel(String bundleName, String abilityName, AsyncCallback_String_Void callback_); - [Deprecated] - static async String getAbilityLabel(String bundleName, String abilityName); - [Deprecated] - static void getAbilityIcon(String bundleName, String abilityName, AsyncCallback_image_PixelMap_Void callback_); - [Deprecated] - static async image.PixelMap getAbilityIcon(String bundleName, String abilityName); - [Deprecated] - static void isAbilityEnabled(AbilityInfo info, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isAbilityEnabled(AbilityInfo info); - [Deprecated] - static void isApplicationEnabled(String bundleName, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isApplicationEnabled(String bundleName); - - }; - + [Deprecated] + void isAbilityEnabled(AbilityInfo info, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isAbilityEnabled(AbilityInfo info); + [Deprecated] + void isApplicationEnabled(String bundleName, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isApplicationEnabled(String bundleName); }; \ No newline at end of file diff --git a/idl/@ohos.bundle.innerBundleManager.idl b/idl/@ohos.bundle.innerBundleManager.idl index 1776bed..3f3caa1 100644 --- a/idl/@ohos.bundle.innerBundleManager.idl +++ b/idl/@ohos.bundle.innerBundleManager.idl @@ -1,42 +1,36 @@ -package ohos.bundle; +package ohos.bundle.innerBundleManager; import ohos.base.AsyncCallback as AsyncCallback; -import bundle.BundleStatusCallback as _BundleStatusCallback; -import bundle.LauncherAbilityInfo as LauncherAbilityInfo; +import bundle.bundleStatusCallback.BundleStatusCallback as _BundleStatusCallback; +import bundle.launcherAbilityInfo.LauncherAbilityInfo as LauncherAbilityInfo; import bundle.shortcutInfo.ShortcutInfo as ShortcutInfo; +[DefaultExport] namespace innerBundleManager { - [Async, Synthetic] callback AsyncCallback_Array_LauncherAbilityInfo_Void = void (sequence result); + [Deprecated] + void getLauncherAbilityInfos(String bundleName, number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); + [Deprecated] + async sequence getLauncherAbilityInfos(String bundleName, number userId); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Deprecated, DtsName="on", DtsTag="'BundleStatusChange'"] + void onBundleStatusChange(BundleStatusCallback bundleStatusCallback, AsyncCallback_String_Void callback_); + [Deprecated, DtsName="on", DtsTag="'BundleStatusChange'"] + async String onBundleStatusChange(BundleStatusCallback bundleStatusCallback); + [Deprecated, DtsName="off", DtsTag="'BundleStatusChange'"] + void offBundleStatusChange(AsyncCallback_String_Void callback_); + [Deprecated, DtsName="off", DtsTag="'BundleStatusChange'"] + async String offBundleStatusChange(); + [Deprecated] + void getAllLauncherAbilityInfos(number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); + [Deprecated] + async sequence getAllLauncherAbilityInfos(number userId); [Async, Synthetic] callback AsyncCallback_Array_ShortcutInfo_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_innerBundleManager_ohos_bundle_innerBundleManager { - - [Deprecated] - static void getLauncherAbilityInfos(String bundleName, number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); - [Deprecated] - static async sequence getLauncherAbilityInfos(String bundleName, number userId); - [Deprecated, DtsName="on", DtsTag="'BundleStatusChange'"] - static void onBundleStatusChange(BundleStatusCallback bundleStatusCallback, AsyncCallback_String_Void callback_); - [Deprecated, DtsName="on", DtsTag="'BundleStatusChange'"] - static async String onBundleStatusChange(BundleStatusCallback bundleStatusCallback); - [Deprecated, DtsName="off", DtsTag="'BundleStatusChange'"] - static void offBundleStatusChange(AsyncCallback_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'BundleStatusChange'"] - static async String offBundleStatusChange(); - [Deprecated] - static void getAllLauncherAbilityInfos(number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); - [Deprecated] - static async sequence getAllLauncherAbilityInfos(number userId); - [Deprecated] - static void getShortcutInfos(String bundleName, AsyncCallback_Array_ShortcutInfo_Void callback_); - [Deprecated] - static async sequence getShortcutInfos(String bundleName); - - }; - + [Deprecated] + void getShortcutInfos(String bundleName, AsyncCallback_Array_ShortcutInfo_Void callback_); + [Deprecated] + async sequence getShortcutInfos(String bundleName); }; [Deprecated] typedef _BundleStatusCallback BundleStatusCallback; \ No newline at end of file diff --git a/idl/@ohos.bundle.installer.idl b/idl/@ohos.bundle.installer.idl index d6e5a3c..73291a8 100644 --- a/idl/@ohos.bundle.installer.idl +++ b/idl/@ohos.bundle.installer.idl @@ -1,14 +1,19 @@ -package ohos.bundle; +package ohos.bundle.installer; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace installer { - [Async, Synthetic] callback AsyncCallback_BundleInstaller_Void = void (BundleInstaller result); + [Throws] + void getBundleInstaller(AsyncCallback_BundleInstaller_Void callback_); + [Throws] + async BundleInstaller getBundleInstaller(); + [Throws] + BundleInstaller getBundleInstallerSync(); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface BundleInstaller { - [Throws] void install(sequence hapFilePaths, InstallParam installParam, AsyncCallback_Void callback_); [Throws] @@ -22,16 +27,16 @@ namespace installer { [Throws] async void uninstall(String bundleName, optional InstallParam installParam); [Throws] + void uninstall(UninstallParam uninstallParam, AsyncCallback_Void callback_); + [Throws] + async void uninstall(UninstallParam uninstallParam); + [Throws] void recover(String bundleName, InstallParam installParam, AsyncCallback_Void callback_); [Throws] void recover(String bundleName, AsyncCallback_Void callback_); [Throws] async void recover(String bundleName, optional InstallParam installParam); [Throws] - void uninstall(UninstallParam uninstallParam, AsyncCallback_Void callback_); - [Throws] - async void uninstall(UninstallParam uninstallParam); - [Throws] void updateBundleForSelf(sequence hapFilePaths, InstallParam installParam, AsyncCallback_Void callback_); [Throws] void updateBundleForSelf(sequence hapFilePaths, AsyncCallback_Void callback_); @@ -46,46 +51,38 @@ namespace installer { [Throws] async number createAppClone(String bundleName, optional CreateAppCloneParam createAppCloneParam); [Throws] - async void destroyAppClone(String bundleName, number appIndex, optional number userId); - [Throws] - async void destroyAppClone(String bundleName, number appIndex, optional DestroyAppCloneParam destroyAppCloneParam); + async void destroyAppClone(String bundleName, number appIndex, optional (number or DestroyAppCloneParam) options); [Throws] async void installPreexistingApp(String bundleName, optional number userId); - + [Throws] + async void installPlugin(String hostBundleName, sequence pluginFilePaths, optional PluginParam pluginParam); + [Throws] + async void uninstallPlugin(String hostBundleName, String pluginBundleName, optional PluginParam pluginParam); }; [Entity=Interface] interface HashParam { - attribute String moduleName; attribute String hashValue; - }; [Entity=Interface, Deprecated] interface VerifyCodeParam { - [Deprecated] attribute String moduleName; [Deprecated] attribute String signatureFilePath; - }; [Entity=Interface] interface PGOParam { - attribute String moduleName; attribute String pgoFilePath; - }; [Entity=Interface] interface Parameters { - attribute String key; attribute String value; - }; [Entity=Interface] interface InstallParam { - [Optional] attribute number userId; [Optional] @@ -108,44 +105,32 @@ namespace installer { attribute sequence pgoParams; [Optional] attribute sequence parameters; - }; [Entity=Interface] interface UninstallParam { - attribute String bundleName; [Optional] attribute number versionCode; - }; [Entity=Interface] interface CreateAppCloneParam { - [Optional] attribute number userId; [Optional] attribute number appIndex; - }; [Entity=Interface] interface DestroyAppCloneParam { - [Optional] attribute number userId; [Optional] attribute sequence parameters; - }; - [GlobalScope] - interface GlobalScope_installer_ohos_bundle_installer { - - [Throws] - static void getBundleInstaller(AsyncCallback_BundleInstaller_Void callback_); - [Throws] - static async BundleInstaller getBundleInstaller(); - [Throws] - static BundleInstaller getBundleInstallerSync(); - + [Entity=Interface] + interface PluginParam { + [Optional] + attribute number userId; + [Optional] + attribute sequence parameters; }; - }; \ No newline at end of file diff --git a/idl/@ohos.bundle.launcherBundleManager.idl b/idl/@ohos.bundle.launcherBundleManager.idl index 4f5a8db..5f03453 100644 --- a/idl/@ohos.bundle.launcherBundleManager.idl +++ b/idl/@ohos.bundle.launcherBundleManager.idl @@ -1,44 +1,43 @@ -package ohos.bundle; +package ohos.bundle.launcherBundleManager; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.LauncherAbilityInfo as _LauncherAbilityInfo; -import bundleManager.ShortcutInfo as _ShortcutInfo; -import bundleManager.ShortcutWant as _ShortcutWant; -import bundleManager.ParameterItem as _ParameterItem; -import ohos.app.ability.StartOptions as StartOptions; +import bundleManager.LauncherAbilityInfo.LauncherAbilityInfo as _LauncherAbilityInfo; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import bundleManager.ShortcutInfo.ShortcutInfo as _ShortcutInfo; +import bundleManager.ShortcutInfo.ShortcutWant as _ShortcutWant; +import bundleManager.ShortcutInfo.ParameterItem as _ParameterItem; +import ohos.app.ability.StartOptions.default as StartOptions; +[DefaultExport] namespace launcherBundleManager { - [Async, Synthetic] callback AsyncCallback_Array_LauncherAbilityInfo_Void = void (sequence result); + [Throws] + void getLauncherAbilityInfo(String bundleName, number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); + [Throws] + async sequence getLauncherAbilityInfo(String bundleName, number userId); + [Throws] + sequence getLauncherAbilityInfoSync(String bundleName, number userId); + [Throws] + void getAllLauncherAbilityInfo(number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); + [Throws] + async sequence getAllLauncherAbilityInfo(number userId); [Async, Synthetic] callback AsyncCallback_Array_ShortcutInfo_Void = void (sequence result); + [Throws] + void getShortcutInfo(String bundleName, AsyncCallback_Array_ShortcutInfo_Void callback_); + [Throws] + async sequence getShortcutInfo(String bundleName); + [Throws] + sequence getShortcutInfoSync(String bundleName); + [Throws] + sequence getShortcutInfoSync(String bundleName, number userId); + [Throws] + sequence getShortcutInfoByAppIndex(String bundleName, number appIndex); + [Throws] + async void startShortcut(ShortcutInfo shortcutInfo, optional StartOptions options); + [Throws] + async void startShortcutWithReason(ShortcutInfo shortcutInfo, String startReason, optional StartOptions options); typedef _LauncherAbilityInfo LauncherAbilityInfo; typedef _ShortcutInfo ShortcutInfo; typedef _ShortcutWant ShortcutWant; typedef _ParameterItem ParameterItem; - [GlobalScope] - interface GlobalScope_launcherBundleManager_ohos_bundle_launcherBundleManager { - - [Throws] - static void getLauncherAbilityInfo(String bundleName, number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); - [Throws] - static async sequence getLauncherAbilityInfo(String bundleName, number userId); - [Throws] - static sequence getLauncherAbilityInfoSync(String bundleName, number userId); - [Throws] - static void getAllLauncherAbilityInfo(number userId, AsyncCallback_Array_LauncherAbilityInfo_Void callback_); - [Throws] - static async sequence getAllLauncherAbilityInfo(number userId); - [Throws] - static void getShortcutInfo(String bundleName, AsyncCallback_Array_ShortcutInfo_Void callback_); - [Throws] - static async sequence getShortcutInfo(String bundleName); - [Throws] - static sequence getShortcutInfoSync(String bundleName); - [Throws] - static sequence getShortcutInfoSync(String bundleName, number userId); - [Throws] - static async void startShortcut(ShortcutInfo shortcutInfo, optional StartOptions options); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bundle.overlay.idl b/idl/@ohos.bundle.overlay.idl index 3d4586f..2fdb21d 100644 --- a/idl/@ohos.bundle.overlay.idl +++ b/idl/@ohos.bundle.overlay.idl @@ -1,47 +1,43 @@ -package ohos.bundle; +package ohos.bundle.overlay; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager as _OverlayModuleInfo; +import bundleManager.OverlayModuleInfo as _OverlayModuleInfo; +import bundleManager.OverlayModuleInfo.OverlayModuleInfo as _OverlayModuleInfo; +[DefaultExport] namespace overlay { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setOverlayEnabled(String moduleName, boolean isEnabled, AsyncCallback_Void callback_); + [Throws] + async void setOverlayEnabled(String moduleName, boolean isEnabled); + [Throws] + void setOverlayEnabledByBundleName(String bundleName, String moduleName, boolean isEnabled, AsyncCallback_Void callback_); + [Throws] + async void setOverlayEnabledByBundleName(String bundleName, String moduleName, boolean isEnabled); [Async, Synthetic] callback AsyncCallback_OverlayModuleInfo_Void = void (OverlayModuleInfo result); + [Throws] + void getOverlayModuleInfo(String moduleName, AsyncCallback_OverlayModuleInfo_Void callback_); + [Throws] + async OverlayModuleInfo getOverlayModuleInfo(String moduleName); [Async, Synthetic] callback AsyncCallback_Array_OverlayModuleInfo_Void = void (sequence result); + [Throws] + void getTargetOverlayModuleInfos(String targetModuleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); + [Throws] + async sequence getTargetOverlayModuleInfos(String targetModuleName); + [Throws] + void getOverlayModuleInfoByBundleName(String bundleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); + [Throws] + void getOverlayModuleInfoByBundleName(String bundleName, String moduleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); + [Throws] + async sequence getOverlayModuleInfoByBundleName(String bundleName, optional String moduleName); + [Throws] + void getTargetOverlayModuleInfosByBundleName(String targetBundleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); + [Throws] + void getTargetOverlayModuleInfosByBundleName(String targetBundleName, String moduleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); + [Throws] + async sequence getTargetOverlayModuleInfosByBundleName(String targetBundleName, optional String moduleName); typedef _OverlayModuleInfo.OverlayModuleInfo OverlayModuleInfo; - [GlobalScope] - interface GlobalScope_overlay_ohos_bundle_overlay { - - [Throws] - static void setOverlayEnabled(String moduleName, boolean isEnabled, AsyncCallback_Void callback_); - [Throws] - static async void setOverlayEnabled(String moduleName, boolean isEnabled); - [Throws] - static void setOverlayEnabledByBundleName(String bundleName, String moduleName, boolean isEnabled, AsyncCallback_Void callback_); - [Throws] - static async void setOverlayEnabledByBundleName(String bundleName, String moduleName, boolean isEnabled); - [Throws] - static void getOverlayModuleInfo(String moduleName, AsyncCallback_OverlayModuleInfo_Void callback_); - [Throws] - static async OverlayModuleInfo getOverlayModuleInfo(String moduleName); - [Throws] - static void getTargetOverlayModuleInfos(String targetModuleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); - [Throws] - static async sequence getTargetOverlayModuleInfos(String targetModuleName); - [Throws] - static void getOverlayModuleInfoByBundleName(String bundleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); - [Throws] - static void getOverlayModuleInfoByBundleName(String bundleName, String moduleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); - [Throws] - static async sequence getOverlayModuleInfoByBundleName(String bundleName, optional String moduleName); - [Throws] - static void getTargetOverlayModuleInfosByBundleName(String targetBundleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); - [Throws] - static void getTargetOverlayModuleInfosByBundleName(String targetBundleName, String moduleName, AsyncCallback_Array_OverlayModuleInfo_Void callback_); - [Throws] - static async sequence getTargetOverlayModuleInfosByBundleName(String targetBundleName, optional String moduleName); - - }; - + typedef _OverlayModuleInfo OverlayModuleInfo; }; \ No newline at end of file diff --git a/idl/@ohos.bundle.shortcutManager.idl b/idl/@ohos.bundle.shortcutManager.idl index f7c6d6e..8ada179 100644 --- a/idl/@ohos.bundle.shortcutManager.idl +++ b/idl/@ohos.bundle.shortcutManager.idl @@ -1,22 +1,19 @@ -package ohos.bundle; -import bundleManager.ShortcutInfo as _ShortcutInfo; -import bundleManager.ShortcutWant as _ShortcutWant; -import bundleManager.ParameterItem as _ParameterItem; +package ohos.bundle.shortcutManager; +import bundleManager.ShortcutInfo.ShortcutInfo as _ShortcutInfo; +import bundleManager.ShortcutInfo.ShortcutWant as _ShortcutWant; +import bundleManager.ShortcutInfo.ParameterItem as _ParameterItem; +[DefaultExport] namespace shortcutManager { - + [Throws] + async void addDesktopShortcutInfo(ShortcutInfo shortcutInfo, number userId); + [Throws] + async void deleteDesktopShortcutInfo(ShortcutInfo shortcutInfo, number userId); + [Throws] + async sequence getAllDesktopShortcutInfo(number userId); + [Throws] + async void setShortcutVisibleForSelf(String id, boolean visible); + async sequence getAllShortcutInfoForSelf(); typedef _ShortcutInfo ShortcutInfo; typedef _ShortcutWant ShortcutWant; typedef _ParameterItem ParameterItem; - [GlobalScope] - interface GlobalScope_shortcutManager_ohos_bundle_shortcutManager { - - [Throws] - static async void addDesktopShortcutInfo(ShortcutInfo shortcutInfo, number userId); - [Throws] - static async void deleteDesktopShortcutInfo(ShortcutInfo shortcutInfo, number userId); - [Throws] - static async sequence getAllDesktopShortcutInfo(number userId); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.bundleState.idl b/idl/@ohos.bundleState.idl index 835d8c8..f5a85f5 100644 --- a/idl/@ohos.bundleState.idl +++ b/idl/@ohos.bundleState.idl @@ -1,11 +1,10 @@ -package ohos; +package ohos.bundleState; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace bundleState { - [Entity=Interface, Deprecated] interface BundleStateInfo { - [Deprecated] attribute number id; [Optional, Deprecated] @@ -28,11 +27,9 @@ namespace bundleState { attribute number infosEndTime; [Deprecated] void merge(BundleStateInfo toMerge); - }; [Entity=Interface, Deprecated] interface BundleActiveState { - [Optional, Deprecated] attribute number appUsagePriorityGroup; [Optional, Deprecated] @@ -45,22 +42,30 @@ namespace bundleState { attribute number stateOccurredTime; [Optional, Deprecated] attribute number stateType; - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isIdleState(String bundleName, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isIdleState(String bundleName); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void queryAppUsagePriorityGroup(AsyncCallback_Number_Void callback_); + [Deprecated] + async number queryAppUsagePriorityGroup(); [Entity=Interface, Deprecated] interface BundleActiveInfoResponse { - - }; [Async, Synthetic] callback AsyncCallback_BundleActiveInfoResponse_Void = void (BundleActiveInfoResponse result); [Deprecated] + void queryBundleStateInfos(number begin, number end, AsyncCallback_BundleActiveInfoResponse_Void callback_); + [Deprecated] + async BundleActiveInfoResponse queryBundleStateInfos(number begin, number end); + [Deprecated] dictionary IntervalType { - [Deprecated] number BY_OPTIMIZED = 0; [Deprecated] @@ -71,40 +76,21 @@ namespace bundleState { number BY_MONTHLY = 3; [Deprecated] number BY_ANNUALLY = 4; - }; [Async, Synthetic] callback AsyncCallback_Array_BundleStateInfo_Void = void (sequence result); + [Deprecated] + void queryBundleStateInfoByInterval(IntervalType byInterval, number begin, number end, AsyncCallback_Array_BundleStateInfo_Void callback_); + [Deprecated] + async sequence queryBundleStateInfoByInterval(IntervalType byInterval, number begin, number end); [Async, Synthetic] callback AsyncCallback_Array_BundleActiveState_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_bundleState_ohos_bundleState { - - [Deprecated] - static void isIdleState(String bundleName, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isIdleState(String bundleName); - [Deprecated] - static void queryAppUsagePriorityGroup(AsyncCallback_Number_Void callback_); - [Deprecated] - static async number queryAppUsagePriorityGroup(); - [Deprecated] - static void queryBundleStateInfos(number begin, number end, AsyncCallback_BundleActiveInfoResponse_Void callback_); - [Deprecated] - static async BundleActiveInfoResponse queryBundleStateInfos(number begin, number end); - [Deprecated] - static void queryBundleStateInfoByInterval(IntervalType byInterval, number begin, number end, AsyncCallback_Array_BundleStateInfo_Void callback_); - [Deprecated] - static async sequence queryBundleStateInfoByInterval(IntervalType byInterval, number begin, number end); - [Deprecated] - static void queryBundleActiveStates(number begin, number end, AsyncCallback_Array_BundleActiveState_Void callback_); - [Deprecated] - static async sequence queryBundleActiveStates(number begin, number end); - [Deprecated] - static void queryCurrentBundleActiveStates(number begin, number end, AsyncCallback_Array_BundleActiveState_Void callback_); - [Deprecated] - static async sequence queryCurrentBundleActiveStates(number begin, number end); - - }; - + [Deprecated] + void queryBundleActiveStates(number begin, number end, AsyncCallback_Array_BundleActiveState_Void callback_); + [Deprecated] + async sequence queryBundleActiveStates(number begin, number end); + [Deprecated] + void queryCurrentBundleActiveStates(number begin, number end, AsyncCallback_Array_BundleActiveState_Void callback_); + [Deprecated] + async sequence queryCurrentBundleActiveStates(number begin, number end); }; \ No newline at end of file diff --git a/idl/@ohos.bytrace.idl b/idl/@ohos.bytrace.idl index 0855f5a..1a54573 100644 --- a/idl/@ohos.bytrace.idl +++ b/idl/@ohos.bytrace.idl @@ -1,16 +1,10 @@ -package ohos; +package ohos.bytrace; +[DefaultExport] namespace bytrace { - - [GlobalScope] - interface GlobalScope_bytrace_ohos_bytrace { - - [Deprecated] - static void startTrace(String name, number taskId, optional number expectedTime); - [Deprecated] - static void finishTrace(String name, number taskId); - [Deprecated] - static void traceByValue(String name, number count); - - }; - + [Deprecated] + void startTrace(String name, number taskId, optional number expectedTime); + [Deprecated] + void finishTrace(String name, number taskId); + [Deprecated] + void traceByValue(String name, number count); }; \ No newline at end of file diff --git a/idl/@ohos.calendarManager.idl b/idl/@ohos.calendarManager.idl index bb561e8..290834d 100644 --- a/idl/@ohos.calendarManager.idl +++ b/idl/@ohos.calendarManager.idl @@ -1,8 +1,9 @@ -package ohos; +package ohos.calendarManager; import ohos.base.AsyncCallback as AsyncCallback; -import application.Context as Context; +import application.Context.default as Context; +[DefaultExport] namespace calendarManager { - + CalendarManager getCalendarManager(Context context); [Async, Synthetic] callback AsyncCallback_Calendar_Void = void (Calendar result); [Async, Synthetic] @@ -11,7 +12,6 @@ namespace calendarManager { callback AsyncCallback_Array_Calendar_Void = void (sequence result); [Entity=Interface] interface CalendarManager { - [Throws] async Calendar createCalendar(CalendarAccount calendarAccount); [Throws] @@ -31,7 +31,6 @@ namespace calendarManager { [Throws] void getAllCalendars(AsyncCallback_Array_Calendar_Void callback_); async number editEvent(Event event); - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); @@ -39,7 +38,6 @@ namespace calendarManager { callback AsyncCallback_Array_Event_Void = void (sequence result); [Entity=Interface] interface Calendar { - readonly attribute number id; async number addEvent(Event event); void addEvent(Event event, AsyncCallback_Number_Void callback_); @@ -58,29 +56,24 @@ namespace calendarManager { async void setConfig(CalendarConfig config); void setConfig(CalendarConfig config, AsyncCallback_Void callback_); CalendarAccount getAccount(); - + async sequence queryEventInstances(number start, number end, optional sequence ids, optional sequence eventKey); }; [Entity=Interface] interface CalendarAccount { - readonly attribute String name; attribute CalendarType type; [Optional] attribute String displayName; - }; [Entity=Interface] interface CalendarConfig { - [Optional] attribute boolean enableReminder; [Optional] attribute (number or String) color; - }; [Entity=Interface] interface Event { - [Optional] attribute number id; attribute EventType type; @@ -108,45 +101,39 @@ namespace calendarManager { attribute String identifier; [Optional] attribute boolean isLunar; - + [Optional] + attribute number instanceStartTime; + [Optional] + attribute number instanceEndTime; }; dictionary CalendarType { - String LOCAL = "local"; String EMAIL = "email"; String BIRTHDAY = "birthday"; String CALDAV = "caldav"; String SUBSCRIBED = "subscribed"; - }; [Entity=Interface] interface Location { - [Optional] attribute String location; [Optional] attribute number longitude; [Optional] attribute number latitude; - }; [Entity=Class] interface EventFilter { - static EventFilter filterById(sequence ids); static EventFilter filterByTime(number start, number end); static EventFilter filterByTitle(String title); - }; dictionary EventType { - number NORMAL = 0; number IMPORTANT = 1; - }; [Entity=Interface] interface RecurrenceRule { - attribute RecurrenceFrequency recurrenceFrequency; [Optional] attribute number expire; @@ -168,19 +155,15 @@ namespace calendarManager { attribute sequence weeksOfYear; [Optional] attribute sequence monthsOfYear; - }; dictionary RecurrenceFrequency { - number YEARLY = 0; number MONTHLY = 1; number WEEKLY = 2; number DAILY = 3; - }; [Entity=Interface] interface Attendee { - attribute String name; attribute String email; [Optional] @@ -189,41 +172,31 @@ namespace calendarManager { attribute AttendeeType type; [Optional] attribute AttendeeStatus status; - }; dictionary AttendeeRole { - String ORGANIZER = "organizer"; String PARTICIPANT = "participant"; - }; dictionary AttendeeType { - number REQUIRED = 1; number OPTIONAL = 2; number RESOURCE = 3; - }; dictionary AttendeeStatus { - number UNKNOWN = 0; number TENTATIVE = 1; number ACCEPTED = 2; number DECLINED = 3; number UNRESPONSIVE = 4; - }; [Entity=Interface] interface EventService { - attribute ServiceType type; attribute String uri; [Optional] attribute String description; - }; dictionary ServiceType { - String MEETING = "Meeting"; String WATCHING = "Watching"; String REPAYMENT = "Repayment"; @@ -233,13 +206,5 @@ namespace calendarManager { String CLASS = "Class"; String SPORTS_EVENTS = "SportsEvents"; String SPORTS_EXERCISE = "SportsExercise"; - - }; - [GlobalScope] - interface GlobalScope_calendarManager_ohos_calendarManager { - - static CalendarManager getCalendarManager(Context context); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.charger.idl b/idl/@ohos.charger.idl index d0b7bc8..3847178 100644 --- a/idl/@ohos.charger.idl +++ b/idl/@ohos.charger.idl @@ -1,8 +1,7 @@ -package ohos; +package ohos.charger; +[DefaultExport] namespace charger { - dictionary ChargeType { - number NONE = 0; number WIRED_NORMAL = 1; number WIRED_QUICK = 2; @@ -10,7 +9,5 @@ namespace charger { number WIRELESS_NORMAL = 4; number WIRELESS_QUICK = 5; number WIRELESS_SUPER_QUICK = 6; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.commonEvent.idl b/idl/@ohos.commonEvent.idl index 3039110..f7c4755 100644 --- a/idl/@ohos.commonEvent.idl +++ b/idl/@ohos.commonEvent.idl @@ -1,20 +1,35 @@ -package ohos; +package ohos.commonEvent; import ohos.base.AsyncCallback as AsyncCallback; -import commonEvent.CommonEventData as CommonEventData; -import commonEvent.CommonEventSubscriber as CommonEventSubscriber; -import commonEvent.CommonEventSubscribeInfo as CommonEventSubscribeInfo; -import commonEvent.CommonEventPublishData as CommonEventPublishData; +import commonEvent.commonEventData.CommonEventData as CommonEventData; +import commonEvent.commonEventSubscriber.CommonEventSubscriber as CommonEventSubscriber; +import commonEvent.commonEventSubscribeInfo.CommonEventSubscribeInfo as CommonEventSubscribeInfo; +import commonEvent.commonEventPublishData.CommonEventPublishData as CommonEventPublishData; +[DefaultExport] namespace commonEvent { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void publish(String event, AsyncCallback_Void callback_); + [Deprecated] + void publish(String event, CommonEventPublishData options, AsyncCallback_Void callback_); + [Deprecated] + void publishAsUser(String event, number userId, AsyncCallback_Void callback_); + [Deprecated] + void publishAsUser(String event, number userId, CommonEventPublishData options, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_CommonEventSubscriber_Void = void (CommonEventSubscriber result); + [Deprecated] + void createSubscriber(CommonEventSubscribeInfo subscribeInfo, AsyncCallback_CommonEventSubscriber_Void callback_); + [Deprecated] + async CommonEventSubscriber createSubscriber(CommonEventSubscribeInfo subscribeInfo); [Async, Synthetic] callback AsyncCallback_CommonEventData_Void = void (CommonEventData result); [Deprecated] + void subscribe(CommonEventSubscriber subscriber, AsyncCallback_CommonEventData_Void callback_); + [Deprecated] + void unsubscribe(CommonEventSubscriber subscriber, optional AsyncCallback_Void callback_); + [Deprecated] dictionary Support { - [Deprecated] String COMMON_EVENT_BOOT_COMPLETED = "usual.event.BOOT_COMPLETED"; [Deprecated] @@ -303,28 +318,5 @@ namespace commonEvent { String COMMON_EVENT_AIRPLANE_MODE_CHANGED = "usual.event.AIRPLANE_MODE"; [Deprecated] String COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN"; - - }; - [GlobalScope] - interface GlobalScope_commonEvent_ohos_commonEvent { - - [Deprecated] - static void publish(String event, AsyncCallback_Void callback_); - [Deprecated] - static void publish(String event, CommonEventPublishData options, AsyncCallback_Void callback_); - [Deprecated] - static void publishAsUser(String event, number userId, AsyncCallback_Void callback_); - [Deprecated] - static void publishAsUser(String event, number userId, CommonEventPublishData options, AsyncCallback_Void callback_); - [Deprecated] - static void createSubscriber(CommonEventSubscribeInfo subscribeInfo, AsyncCallback_CommonEventSubscriber_Void callback_); - [Deprecated] - static async CommonEventSubscriber createSubscriber(CommonEventSubscribeInfo subscribeInfo); - [Deprecated] - static void subscribe(CommonEventSubscriber subscriber, AsyncCallback_CommonEventData_Void callback_); - [Deprecated] - static void unsubscribe(CommonEventSubscriber subscriber, optional AsyncCallback_Void callback_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.commonEventManager.idl b/idl/@ohos.commonEventManager.idl index cfada2c..3ec219f 100644 --- a/idl/@ohos.commonEventManager.idl +++ b/idl/@ohos.commonEventManager.idl @@ -1,19 +1,51 @@ -package ohos; +package ohos.commonEventManager; import ohos.base.AsyncCallback as AsyncCallback; -import commonEvent.CommonEventData as _CommonEventData; -import commonEvent.CommonEventSubscriber as _CommonEventSubscriber; -import commonEvent.CommonEventSubscribeInfo as _CommonEventSubscribeInfo; -import commonEvent.CommonEventPublishData as _CommonEventPublishData; +import ohos.base.Callback as Callback; +import commonEvent.commonEventData.CommonEventData as _CommonEventData; +import commonEvent.commonEventSubscriber.CommonEventSubscriber as _CommonEventSubscriber; +import commonEvent.commonEventSubscribeInfo.CommonEventSubscribeInfo as _CommonEventSubscribeInfo; +import commonEvent.commonEventPublishData.CommonEventPublishData as _CommonEventPublishData; +[DefaultExport] namespace commonEventManager { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void publish(String event, AsyncCallback_Void callback_); + [Throws] + void publish(String event, CommonEventPublishData options, AsyncCallback_Void callback_); + [Throws] + void publishAsUser(String event, number userId, AsyncCallback_Void callback_); + [Throws] + void publishAsUser(String event, number userId, CommonEventPublishData options, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_CommonEventSubscriber_Void = void (CommonEventSubscriber result); + [Throws] + void createSubscriber(CommonEventSubscribeInfo subscribeInfo, AsyncCallback_CommonEventSubscriber_Void callback_); + [Throws] + async CommonEventSubscriber createSubscriber(CommonEventSubscribeInfo subscribeInfo); + [Throws] + CommonEventSubscriber createSubscriberSync(CommonEventSubscribeInfo subscribeInfo); [Async, Synthetic] callback AsyncCallback_CommonEventData_Void = void (CommonEventData result); + [Throws] + void subscribe(CommonEventSubscriber subscriber, AsyncCallback_CommonEventData_Void callback_); + [Synthetic] + callback Callback_CommonEventData_Void = void (CommonEventData parameter); + [Throws] + async void subscribeToEvent(CommonEventSubscriber subscriber, Callback_CommonEventData_Void callback_); + [Throws] + void unsubscribe(CommonEventSubscriber subscriber, optional AsyncCallback_Void callback_); + [Throws] + void removeStickyCommonEvent(String event, AsyncCallback_Void callback_); + [Throws] + async void removeStickyCommonEvent(String event); + [Throws] + void setStaticSubscriberState(boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setStaticSubscriberState(boolean enable); + [Throws] + async void setStaticSubscriberState(boolean enable, optional sequence events); dictionary Support { - String COMMON_EVENT_BOOT_COMPLETED = "usual.event.BOOT_COMPLETED"; String COMMON_EVENT_LOCKED_BOOT_COMPLETED = "usual.event.LOCKED_BOOT_COMPLETED"; String COMMON_EVENT_SHUTDOWN = "usual.event.SHUTDOWN"; @@ -68,6 +100,8 @@ namespace commonEventManager { String COMMON_EVENT_USER_SWITCHED = "usual.event.USER_SWITCHED"; String COMMON_EVENT_USER_STARTING = "usual.event.USER_STARTING"; String COMMON_EVENT_USER_UNLOCKED = "usual.event.USER_UNLOCKED"; + String COMMON_EVENT_USER_LOCKING = "usual.event.USER_LOCKING"; + String COMMON_EVENT_USER_LOCKED = "usual.event.USER_LOCKED"; String COMMON_EVENT_USER_STOPPING = "usual.event.USER_STOPPING"; String COMMON_EVENT_USER_STOPPED = "usual.event.USER_STOPPED"; String COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN = "common.event.DISTRIBUTED_ACCOUNT_LOGIN"; @@ -218,44 +252,15 @@ namespace commonEventManager { String COMMON_EVENT_VPN_CONNECTION_STATUS_CHANGED = "usual.event.VPN_CONNECTION_STATUS_CHANGED"; String COMMON_EVENT_RESTORE_START = "usual.event.RESTORE_START"; String COMMON_EVENT_MANAGED_BROWSER_POLICY_CHANGED = "usual.event.MANAGED_BROWSER_POLICY_CHANGED"; - + String COMMON_EVENT_DEFAULT_APPLICATION_CHANGED = "usual.event.DEFAULT_APPLICATION_CHANGED"; + String COMMON_EVENT_SHORTCUT_CHANGED = "usual.event.SHORTCUT_CHANGED"; + String COMMON_EVENT_KIOSK_MODE_ON = "usual.event.KIOSK_MODE_ON"; + String COMMON_EVENT_KIOSK_MODE_OFF = "usual.event.KIOSK_MODE_OFF"; + String COMMON_EVENT_CUSTOM_CONFIG_POLICY_UPDATED = "usual.event.CUSTOM_CONFIG_POLICY_UPDATED"; + String COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED = "usual.event.CUSTOM_ROAMING_REGION_UPDATED"; }; typedef _CommonEventData CommonEventData; typedef _CommonEventSubscriber CommonEventSubscriber; typedef _CommonEventSubscribeInfo CommonEventSubscribeInfo; typedef _CommonEventPublishData CommonEventPublishData; - [GlobalScope] - interface GlobalScope_commonEventManager_ohos_commonEventManager { - - [Throws] - static void publish(String event, AsyncCallback_Void callback_); - [Throws] - static void publish(String event, CommonEventPublishData options, AsyncCallback_Void callback_); - [Throws] - static void publishAsUser(String event, number userId, AsyncCallback_Void callback_); - [Throws] - static void publishAsUser(String event, number userId, CommonEventPublishData options, AsyncCallback_Void callback_); - [Throws] - static void createSubscriber(CommonEventSubscribeInfo subscribeInfo, AsyncCallback_CommonEventSubscriber_Void callback_); - [Throws] - static async CommonEventSubscriber createSubscriber(CommonEventSubscribeInfo subscribeInfo); - [Throws] - static CommonEventSubscriber createSubscriberSync(CommonEventSubscribeInfo subscribeInfo); - [Throws] - static void subscribe(CommonEventSubscriber subscriber, AsyncCallback_CommonEventData_Void callback_); - [Throws] - static void unsubscribe(CommonEventSubscriber subscriber, optional AsyncCallback_Void callback_); - [Throws] - static void removeStickyCommonEvent(String event, AsyncCallback_Void callback_); - [Throws] - static async void removeStickyCommonEvent(String event); - [Throws] - static void setStaticSubscriberState(boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setStaticSubscriberState(boolean enable); - [Throws] - static async void setStaticSubscriberState(boolean enable, optional sequence events); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.configPolicy.idl b/idl/@ohos.configPolicy.idl index 91d54ae..62320cb 100644 --- a/idl/@ohos.configPolicy.idl +++ b/idl/@ohos.configPolicy.idl @@ -1,55 +1,47 @@ -package ohos; +package ohos.configPolicy; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace configPolicy { - dictionary FollowXMode { - number DEFAULT = 0; number NO_RULE_FOLLOWED = 1; number SIM_DEFAULT = 10; number SIM_1 = 11; number SIM_2 = 12; number USER_DEFINED = 100; - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getOneCfgFile(String relPath, AsyncCallback_String_Void callback_); + [Throws] + void getOneCfgFile(String relPath, FollowXMode followMode, AsyncCallback_String_Void callback_); + [Throws] + void getOneCfgFile(String relPath, FollowXMode followMode, String extra, AsyncCallback_String_Void callback_); + [Throws] + async String getOneCfgFile(String relPath); + [Throws] + async String getOneCfgFile(String relPath, FollowXMode followMode, optional String extra); + [Throws] + String getOneCfgFileSync(String relPath, optional FollowXMode followMode, optional String extra); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_configPolicy_ohos_configPolicy { - - [Throws] - static undefined getOneCfgFile(String relPath, AsyncCallback_String_Void callback_); - [Throws] - static undefined getOneCfgFile(String relPath, FollowXMode followMode, AsyncCallback_String_Void callback_); - [Throws] - static undefined getOneCfgFile(String relPath, FollowXMode followMode, String extra, AsyncCallback_String_Void callback_); - [Throws] - static async String getOneCfgFile(String relPath); - [Throws] - static async String getOneCfgFile(String relPath, FollowXMode followMode, optional String extra); - [Throws] - static String getOneCfgFileSync(String relPath, optional FollowXMode followMode, optional String extra); - [Throws] - static undefined getCfgFiles(String relPath, AsyncCallback_Array_String_Void callback_); - [Throws] - static undefined getCfgFiles(String relPath, FollowXMode followMode, AsyncCallback_Array_String_Void callback_); - [Throws] - static undefined getCfgFiles(String relPath, FollowXMode followMode, String extra, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getCfgFiles(String relPath); - [Throws] - static async sequence getCfgFiles(String relPath, FollowXMode followMode, optional String extra); - [Throws] - static sequence getCfgFilesSync(String relPath, optional FollowXMode followMode, optional String extra); - [Throws] - static undefined getCfgDirList(AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getCfgDirList(); - [Throws] - static sequence getCfgDirListSync(); - - }; - + [Throws] + void getCfgFiles(String relPath, AsyncCallback_Array_String_Void callback_); + [Throws] + void getCfgFiles(String relPath, FollowXMode followMode, AsyncCallback_Array_String_Void callback_); + [Throws] + void getCfgFiles(String relPath, FollowXMode followMode, String extra, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getCfgFiles(String relPath); + [Throws] + async sequence getCfgFiles(String relPath, FollowXMode followMode, optional String extra); + [Throws] + sequence getCfgFilesSync(String relPath, optional FollowXMode followMode, optional String extra); + [Throws] + void getCfgDirList(AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getCfgDirList(); + [Throws] + sequence getCfgDirListSync(); }; \ No newline at end of file diff --git a/idl/@ohos.connectedTag.idl b/idl/@ohos.connectedTag.idl index f40fb61..3fdd1a6 100644 --- a/idl/@ohos.connectedTag.idl +++ b/idl/@ohos.connectedTag.idl @@ -1,55 +1,47 @@ -package ohos; +package ohos.connectedTag; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; import ohos.base.Callback as Callback; +[DefaultExport] namespace connectedTag { - + [Deprecated] + boolean init(); + [Throws] + void initialize(); + [Deprecated] + boolean uninit(); + [Throws] + void uninitialize(); + [Deprecated] + async String readNdefTag(); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Deprecated] + void readNdefTag(AsyncCallback_String_Void callback_); + [Throws] + async sequence read(); [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); + [Throws] + void read(AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async void writeNdefTag(String data); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void writeNdefTag(String data, AsyncCallback_Void callback_); + [Throws] + async void write(sequence data); + [Throws] + void write(sequence data, AsyncCallback_Void callback_); [Synthetic] callback Callback_Number_Void = void (number parameter); + [DtsName="on", DtsTag="'notify'"] + void onNotify(Callback_Number_Void callback_); + [DtsName="off", DtsTag="'notify'"] + void offNotify(optional Callback_Number_Void callback_); dictionary NfcRfType { - number NFC_RF_LEAVE = 0; number NFC_RF_ENTER = 1; - }; - [GlobalScope] - interface GlobalScope_connectedTag_ohos_connectedTag { - - [Deprecated] - static boolean init(); - [Throws] - static void initialize(); - [Deprecated] - static boolean uninit(); - [Throws] - static void uninitialize(); - [Deprecated] - static async String readNdefTag(); - [Deprecated] - static void readNdefTag(AsyncCallback_String_Void callback_); - [Throws] - static async sequence read(); - [Throws] - static void read(AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async void writeNdefTag(String data); - [Deprecated] - static void writeNdefTag(String data, AsyncCallback_Void callback_); - [Throws] - static async void write(sequence data); - [Throws] - static void write(sequence data, AsyncCallback_Void callback_); - [DtsName="on", DtsTag="'notify'"] - static void onNotify(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'notify'"] - static void offNotify(optional Callback_Number_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.contact.idl b/idl/@ohos.contact.idl index 2891517..17afb62 100644 --- a/idl/@ohos.contact.idl +++ b/idl/@ohos.contact.idl @@ -1,28 +1,210 @@ -package ohos; +package ohos.contact; import ohos.base.AsyncCallback as AsyncCallback; -import application.Context as Context; -import ohos.data.ValueType as ValueType; +import application.BaseContext.default as Context; +import ohos.data.ValuesBucket.ValueType as ValueType; +[DefaultExport] namespace contact { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void addContact(Contact contact, AsyncCallback_Number_Void callback_); + [Throws] + void addContact(Context context, Contact contact, AsyncCallback_Number_Void callback_); + [Deprecated] + async number addContact(Contact contact); + [Throws] + async number addContact(Context context, Contact contact); [Async, Synthetic] callback AsyncCallback_Array_Contact_Void = void (sequence result); + [Deprecated] + void selectContact(AsyncCallback_Array_Contact_Void callback_); + [Throws] + void selectContacts(AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + async sequence selectContact(); + async sequence selectContacts(); + [Throws] + void selectContacts(ContactSelectionOptions options, AsyncCallback_Array_Contact_Void callback_); + [Throws] + async sequence selectContacts(ContactSelectionOptions options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void deleteContact(String key, AsyncCallback_Void callback_); + [Throws] + void deleteContact(Context context, String key, AsyncCallback_Void callback_); + [Deprecated] + async void deleteContact(String key); + [Throws] + async void deleteContact(Context context, String key); [Async, Synthetic] callback AsyncCallback_Contact_Void = void (Contact result); + [Deprecated] + void queryContact(String key, AsyncCallback_Contact_Void callback_); + [Throws] + void queryContact(Context context, String key, AsyncCallback_Contact_Void callback_); + [Deprecated] + void queryContact(String key, Holder holder, AsyncCallback_Contact_Void callback_); + [Throws] + void queryContact(Context context, String key, Holder holder, AsyncCallback_Contact_Void callback_); + [Deprecated] + void queryContact(String key, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); + [Throws] + void queryContact(Context context, String key, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); + [Deprecated] + void queryContact(String key, Holder holder, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); + [Throws] + void queryContact(Context context, String key, Holder holder, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); + [Deprecated] + async Contact queryContact(String key, optional Holder holder, optional ContactAttributes attrs); + [Throws] + async Contact queryContact(Context context, String key, optional Holder holder, optional ContactAttributes attrs); + [Deprecated] + void queryContacts(AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContacts(Context context, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContacts(Holder holder, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContacts(Context context, Holder holder, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContacts(ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContacts(Context context, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContacts(Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContacts(Context context, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + async sequence queryContacts(optional Holder holder, optional ContactAttributes attrs); + [Throws] + async sequence queryContacts(Context context, optional Holder holder, optional ContactAttributes attrs); + [Deprecated] + void queryContactsByEmail(String email, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByEmail(Context context, String email, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContactsByEmail(String email, Holder holder, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByEmail(Context context, String email, Holder holder, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContactsByEmail(String email, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByEmail(Context context, String email, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContactsByEmail(String email, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByEmail(Context context, String email, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + async sequence queryContactsByEmail(String email, optional Holder holder, optional ContactAttributes attrs); + [Throws] + async sequence queryContactsByEmail(Context context, String email, optional Holder holder, optional ContactAttributes attrs); + [Deprecated] + void queryContactsByPhoneNumber(String phoneNumber, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByPhoneNumber(Context context, String phoneNumber, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContactsByPhoneNumber(String phoneNumber, Holder holder, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByPhoneNumber(Context context, String phoneNumber, Holder holder, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContactsByPhoneNumber(String phoneNumber, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByPhoneNumber(Context context, String phoneNumber, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + void queryContactsByPhoneNumber(String phoneNumber, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Throws] + void queryContactsByPhoneNumber(Context context, String phoneNumber, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); + [Deprecated] + async sequence queryContactsByPhoneNumber(String phoneNumber, optional Holder holder, optional ContactAttributes attrs); + [Throws] + async sequence queryContactsByPhoneNumber(Context context, String phoneNumber, optional Holder holder, optional ContactAttributes attrs); [Async, Synthetic] callback AsyncCallback_Array_Group_Void = void (sequence result); + [Deprecated] + void queryGroups(AsyncCallback_Array_Group_Void callback_); + [Throws] + void queryGroups(Context context, AsyncCallback_Array_Group_Void callback_); + [Deprecated] + void queryGroups(Holder holder, AsyncCallback_Array_Group_Void callback_); + [Throws] + void queryGroups(Context context, Holder holder, AsyncCallback_Array_Group_Void callback_); + [Deprecated] + async sequence queryGroups(optional Holder holder); + [Throws] + async sequence queryGroups(Context context, optional Holder holder); [Async, Synthetic] callback AsyncCallback_Array_Holder_Void = void (sequence result); + [Deprecated] + void queryHolders(AsyncCallback_Array_Holder_Void callback_); + [Throws] + void queryHolders(Context context, AsyncCallback_Array_Holder_Void callback_); + [Deprecated] + async sequence queryHolders(); + [Throws] + async sequence queryHolders(Context context); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Deprecated] + void queryKey(number id, AsyncCallback_String_Void callback_); + [Throws] + void queryKey(Context context, number id, AsyncCallback_String_Void callback_); + [Deprecated] + void queryKey(number id, Holder holder, AsyncCallback_String_Void callback_); + [Throws] + void queryKey(Context context, number id, Holder holder, AsyncCallback_String_Void callback_); + [Deprecated] + async String queryKey(number id, optional Holder holder); + [Throws] + async String queryKey(Context context, number id, optional Holder holder); + [Deprecated] + void queryMyCard(AsyncCallback_Contact_Void callback_); + [Throws] + void queryMyCard(Context context, AsyncCallback_Contact_Void callback_); + [Deprecated] + void queryMyCard(ContactAttributes attrs, AsyncCallback_Contact_Void callback_); + [Throws] + void queryMyCard(Context context, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); + [Deprecated] + async Contact queryMyCard(optional ContactAttributes attrs); + [Throws] + async Contact queryMyCard(Context context, optional ContactAttributes attrs); + [Deprecated] + void updateContact(Contact contact, AsyncCallback_Void callback_); + [Throws] + void updateContact(Context context, Contact contact, AsyncCallback_Void callback_); + [Deprecated] + void updateContact(Contact contact, ContactAttributes attrs, AsyncCallback_Void callback_); + [Throws] + void updateContact(Context context, Contact contact, ContactAttributes attrs, AsyncCallback_Void callback_); + [Deprecated] + async void updateContact(Contact contact, optional ContactAttributes attrs); + [Throws] + async void updateContact(Context context, Contact contact, optional ContactAttributes attrs); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isLocalContact(number id, AsyncCallback_Boolean_Void callback_); + [Throws] + void isLocalContact(Context context, number id, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isLocalContact(number id); + [Throws] + async boolean isLocalContact(Context context, number id); + [Deprecated] + void isMyCard(number id, AsyncCallback_Boolean_Void callback_); + [Throws] + void isMyCard(Context context, number id, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isMyCard(number id); + [Throws] + async boolean isMyCard(Context context, number id); + [Throws] + async number addContactViaUI(Context context, Contact contact); + [Throws] + async number saveToExistingContactViaUI(Context context, Contact contact); [Entity=Interface] interface ContactSelectionOptions { - [Optional] attribute boolean isMultiSelect; [Optional] @@ -31,25 +213,19 @@ namespace contact { attribute boolean isDisplayedByName; [Optional] attribute ContactSelectionFilter filter; - }; [Entity=Interface] interface ContactSelectionFilter { - attribute FilterClause filterClause; attribute FilterType filterType; - }; dictionary FilterType { - number SHOW_FILTER = 0; number DEFAULT_SELECT = 1; number SHOW_FILTER_AND_DEFAULT_SELECT = 2; - }; [Entity=Interface] interface FilterClause { - [Optional] attribute sequence id; [Optional] @@ -58,43 +234,33 @@ namespace contact { attribute DataFilter dataItem; [Optional] attribute sequence focusModeList; - }; [Entity=Interface] interface FilterOptions { - attribute FilterCondition filterCondition; [Optional] attribute (String or sequence) value; - }; dictionary FilterCondition { - number IS_NOT_NULL = 0; number EQUAL_TO = 1; number NOT_EQUAL_TO = 2; number IN = 3; number NOT_IN = 4; number CONTAINS = 5; - }; [Entity=Interface] interface DataFilter { - attribute DataField field; attribute sequence options; - }; dictionary DataField { - number EMAIL = 0; number PHONE = 1; number ORGANIZATION = 2; - }; [Entity=Class] interface Contact { - static readonly attribute number INVALID_CONTACT_ID; [Optional] readonly attribute number id; @@ -130,16 +296,12 @@ namespace contact { attribute Note note; [Optional] attribute Organization organization; - }; [Entity=Class] interface ContactAttributes { - attribute sequence attributes; - }; dictionary Attribute { - number ATTR_CONTACT_EVENT = 0; number ATTR_EMAIL = 1; number ATTR_GROUP_MEMBERSHIP = 2; @@ -154,11 +316,9 @@ namespace contact { number ATTR_RELATION = 11; number ATTR_SIP_ADDRESS = 12; number ATTR_WEBSITE = 13; - }; [Entity=Class] interface Email { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number EMAIL_HOME; static readonly attribute number EMAIL_WORK; @@ -171,11 +331,9 @@ namespace contact { attribute String displayName; [Optional] attribute number labelId; - }; [Entity=Class] interface Event { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number EVENT_ANNIVERSARY; static readonly attribute number EVENT_OTHER; @@ -186,29 +344,23 @@ namespace contact { attribute String labelName; [Optional] attribute number labelId; - }; [Entity=Class] interface Group { - [Optional] attribute number groupId; attribute String title; - }; [Entity=Class] interface Holder { - readonly attribute String bundleName; [Optional] readonly attribute String displayName; [Optional] attribute number holderId; - }; [Entity=Class] interface ImAddress { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number IM_AIM; static readonly attribute number IM_MSN; @@ -223,11 +375,9 @@ namespace contact { attribute String labelName; [Optional] attribute number labelId; - }; [Entity=Class] interface Name { - [Optional] attribute String familyName; [Optional] @@ -245,31 +395,23 @@ namespace contact { attribute String namePrefix; [Optional] attribute String nameSuffix; - }; [Entity=Class] interface NickName { - attribute String nickName; - }; [Entity=Class] interface Note { - attribute String noteContent; - }; [Entity=Class] interface Organization { - attribute String name; [Optional] attribute String title; - }; [Entity=Class] interface PhoneNumber { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number NUM_HOME; static readonly attribute number NUM_MOBILE; @@ -297,17 +439,13 @@ namespace contact { attribute String phoneNumber; [Optional] attribute number labelId; - }; [Entity=Class] interface Portrait { - attribute String uri; - }; [Entity=Class] interface PostalAddress { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number ADDR_HOME; static readonly attribute number ADDR_WORK; @@ -332,11 +470,9 @@ namespace contact { attribute String street; [Optional] attribute number labelId; - }; [Entity=Class] interface Relation { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number RELATION_ASSISTANT; static readonly attribute number RELATION_BROTHER; @@ -358,11 +494,9 @@ namespace contact { attribute String relationName; [Optional] attribute number labelId; - }; [Entity=Class] interface SipAddress { - static readonly attribute number CUSTOM_LABEL; static readonly attribute number SIP_HOME; static readonly attribute number SIP_WORK; @@ -373,201 +507,9 @@ namespace contact { attribute String sipAddress; [Optional] attribute number labelId; - }; [Entity=Class] interface Website { - attribute String website; - }; - [GlobalScope] - interface GlobalScope_contact_ohos_contact { - - [Deprecated] - static void addContact(Contact contact, AsyncCallback_Number_Void callback_); - [Throws] - static void addContact(Context context, Contact contact, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number addContact(Contact contact); - [Throws] - static async number addContact(Context context, Contact contact); - [Deprecated] - static void selectContact(AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void selectContacts(AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static async sequence selectContact(); - static async sequence selectContacts(); - [Throws] - static void selectContacts(ContactSelectionOptions options, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static async sequence selectContacts(ContactSelectionOptions options); - [Deprecated] - static void deleteContact(String key, AsyncCallback_Void callback_); - [Throws] - static void deleteContact(Context context, String key, AsyncCallback_Void callback_); - [Deprecated] - static async void deleteContact(String key); - [Throws] - static async void deleteContact(Context context, String key); - [Deprecated] - static void queryContact(String key, AsyncCallback_Contact_Void callback_); - [Throws] - static void queryContact(Context context, String key, AsyncCallback_Contact_Void callback_); - [Deprecated] - static void queryContact(String key, Holder holder, AsyncCallback_Contact_Void callback_); - [Throws] - static void queryContact(Context context, String key, Holder holder, AsyncCallback_Contact_Void callback_); - [Deprecated] - static void queryContact(String key, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); - [Throws] - static void queryContact(Context context, String key, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); - [Deprecated] - static void queryContact(String key, Holder holder, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); - [Throws] - static void queryContact(Context context, String key, Holder holder, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); - [Deprecated] - static async Contact queryContact(String key, optional Holder holder, optional ContactAttributes attrs); - [Throws] - static async Contact queryContact(Context context, String key, optional Holder holder, optional ContactAttributes attrs); - [Deprecated] - static void queryContacts(AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContacts(Context context, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContacts(Holder holder, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContacts(Context context, Holder holder, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContacts(ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContacts(Context context, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContacts(Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContacts(Context context, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static async sequence queryContacts(optional Holder holder, optional ContactAttributes attrs); - [Throws] - static async sequence queryContacts(Context context, optional Holder holder, optional ContactAttributes attrs); - [Deprecated] - static void queryContactsByEmail(String email, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByEmail(Context context, String email, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContactsByEmail(String email, Holder holder, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByEmail(Context context, String email, Holder holder, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContactsByEmail(String email, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByEmail(Context context, String email, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContactsByEmail(String email, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByEmail(Context context, String email, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static async sequence queryContactsByEmail(String email, optional Holder holder, optional ContactAttributes attrs); - [Throws] - static async sequence queryContactsByEmail(Context context, String email, optional Holder holder, optional ContactAttributes attrs); - [Deprecated] - static void queryContactsByPhoneNumber(String phoneNumber, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByPhoneNumber(Context context, String phoneNumber, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContactsByPhoneNumber(String phoneNumber, Holder holder, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByPhoneNumber(Context context, String phoneNumber, Holder holder, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContactsByPhoneNumber(String phoneNumber, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByPhoneNumber(Context context, String phoneNumber, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static void queryContactsByPhoneNumber(String phoneNumber, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Throws] - static void queryContactsByPhoneNumber(Context context, String phoneNumber, Holder holder, ContactAttributes attrs, AsyncCallback_Array_Contact_Void callback_); - [Deprecated] - static async sequence queryContactsByPhoneNumber(String phoneNumber, optional Holder holder, optional ContactAttributes attrs); - [Throws] - static async sequence queryContactsByPhoneNumber(Context context, String phoneNumber, optional Holder holder, optional ContactAttributes attrs); - [Deprecated] - static void queryGroups(AsyncCallback_Array_Group_Void callback_); - [Throws] - static void queryGroups(Context context, AsyncCallback_Array_Group_Void callback_); - [Deprecated] - static void queryGroups(Holder holder, AsyncCallback_Array_Group_Void callback_); - [Throws] - static void queryGroups(Context context, Holder holder, AsyncCallback_Array_Group_Void callback_); - [Deprecated] - static async sequence queryGroups(optional Holder holder); - [Throws] - static async sequence queryGroups(Context context, optional Holder holder); - [Deprecated] - static void queryHolders(AsyncCallback_Array_Holder_Void callback_); - [Throws] - static void queryHolders(Context context, AsyncCallback_Array_Holder_Void callback_); - [Deprecated] - static async sequence queryHolders(); - [Throws] - static async sequence queryHolders(Context context); - [Deprecated] - static void queryKey(number id, AsyncCallback_String_Void callback_); - [Throws] - static void queryKey(Context context, number id, AsyncCallback_String_Void callback_); - [Deprecated] - static void queryKey(number id, Holder holder, AsyncCallback_String_Void callback_); - [Throws] - static void queryKey(Context context, number id, Holder holder, AsyncCallback_String_Void callback_); - [Deprecated] - static async String queryKey(number id, optional Holder holder); - [Throws] - static async String queryKey(Context context, number id, optional Holder holder); - [Deprecated] - static void queryMyCard(AsyncCallback_Contact_Void callback_); - [Throws] - static void queryMyCard(Context context, AsyncCallback_Contact_Void callback_); - [Deprecated] - static void queryMyCard(ContactAttributes attrs, AsyncCallback_Contact_Void callback_); - [Throws] - static void queryMyCard(Context context, ContactAttributes attrs, AsyncCallback_Contact_Void callback_); - [Deprecated] - static async Contact queryMyCard(optional ContactAttributes attrs); - [Throws] - static async Contact queryMyCard(Context context, optional ContactAttributes attrs); - [Deprecated] - static void updateContact(Contact contact, AsyncCallback_Void callback_); - [Throws] - static void updateContact(Context context, Contact contact, AsyncCallback_Void callback_); - [Deprecated] - static void updateContact(Contact contact, ContactAttributes attrs, AsyncCallback_Void callback_); - [Throws] - static void updateContact(Context context, Contact contact, ContactAttributes attrs, AsyncCallback_Void callback_); - [Deprecated] - static async void updateContact(Contact contact, optional ContactAttributes attrs); - [Throws] - static async void updateContact(Context context, Contact contact, optional ContactAttributes attrs); - [Deprecated] - static void isLocalContact(number id, AsyncCallback_Boolean_Void callback_); - [Throws] - static void isLocalContact(Context context, number id, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isLocalContact(number id); - [Throws] - static async boolean isLocalContact(Context context, number id); - [Deprecated] - static void isMyCard(number id, AsyncCallback_Boolean_Void callback_); - [Throws] - static void isMyCard(Context context, number id, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isMyCard(number id); - [Throws] - static async boolean isMyCard(Context context, number id); - [Throws] - static async number addContactViaUI(Context context, Contact contact); - [Throws] - static async number saveToExistingContactViaUI(Context context, Contact contact); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.continuation.continuationManager.idl b/idl/@ohos.continuation.continuationManager.idl index b10cd8f..3600b71 100644 --- a/idl/@ohos.continuation.continuationManager.idl +++ b/idl/@ohos.continuation.continuationManager.idl @@ -1,96 +1,86 @@ -package ohos.continuation; +package ohos.continuation.continuationManager; import ohos.base.Callback as Callback; import ohos.base.AsyncCallback as AsyncCallback; -import continuation.ContinuationResult as _ContinuationResult; -import continuation.ContinuationExtraParams as _ContinuationExtraParams; +import continuation.continuationResult.ContinuationResult as _ContinuationResult; +import continuation.continuationExtraParams.ContinuationExtraParams as _ContinuationExtraParams; +[DefaultExport] namespace continuationManager { - [Synthetic] callback Callback_Array_ContinuationResult_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'deviceSelected'"] + void onDeviceSelected(number token, Callback_Array_ContinuationResult_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceSelected'"] + void offDeviceSelected(number token); + [Throws, DtsName="on", DtsTag="'deviceUnselected'"] + void onDeviceUnselected(number token, Callback_Array_ContinuationResult_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceUnselected'"] + void offDeviceUnselected(number token); [Synthetic] callback Callback_ContinuationResult_Void = void (ContinuationResult parameter); + [Deprecated, DtsName="on", DtsTag="'deviceConnect'"] + void onDeviceConnect(Callback_ContinuationResult_Void callback_); + [Deprecated, DtsName="off", DtsTag="'deviceConnect'"] + void offDeviceConnect(optional Callback_ContinuationResult_Void callback_); [Synthetic] callback Callback_String_Void = void (String parameter); + [Deprecated, DtsName="on", DtsTag="'deviceDisconnect'"] + void onDeviceDisconnect(Callback_String_Void callback_); + [Deprecated, DtsName="off", DtsTag="'deviceDisconnect'"] + void offDeviceDisconnect(optional Callback_String_Void callback_); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void register(AsyncCallback_Number_Void callback_); + [Deprecated] + void register(ContinuationExtraParams options, AsyncCallback_Number_Void callback_); + [Deprecated] + async number register(optional ContinuationExtraParams options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void unregister(number token, AsyncCallback_Void callback_); + [Deprecated] + async void unregister(number token); + [Deprecated] + void updateConnectStatus(number token, String deviceId, DeviceConnectState status, AsyncCallback_Void callback_); + [Deprecated] + async void updateConnectStatus(number token, String deviceId, DeviceConnectState status); + [Deprecated] + void startDeviceManager(number token, AsyncCallback_Void callback_); + [Deprecated] + void startDeviceManager(number token, ContinuationExtraParams options, AsyncCallback_Void callback_); + [Deprecated] + async void startDeviceManager(number token, optional ContinuationExtraParams options); + [Throws] + void registerContinuation(AsyncCallback_Number_Void callback_); + [Throws] + void registerContinuation(ContinuationExtraParams options, AsyncCallback_Number_Void callback_); + [Throws] + async number registerContinuation(optional ContinuationExtraParams options); + [Throws] + void unregisterContinuation(number token, AsyncCallback_Void callback_); + [Throws] + async void unregisterContinuation(number token); + [Throws] + void updateContinuationState(number token, String deviceId, DeviceConnectState status, AsyncCallback_Void callback_); + [Throws] + async void updateContinuationState(number token, String deviceId, DeviceConnectState status); + [Throws] + void startContinuationDeviceManager(number token, AsyncCallback_Void callback_); + [Throws] + void startContinuationDeviceManager(number token, ContinuationExtraParams options, AsyncCallback_Void callback_); + [Throws] + async void startContinuationDeviceManager(number token, optional ContinuationExtraParams options); dictionary DeviceConnectState { - number IDLE = 0; number CONNECTING = 1; number CONNECTED = 2; number DISCONNECTING = 3; - }; dictionary ContinuationMode { - number COLLABORATION_SINGLE = 0; number COLLABORATION_MULTIPLE = 1; - }; typedef _ContinuationResult ContinuationResult; typedef _ContinuationExtraParams ContinuationExtraParams; - [GlobalScope] - interface GlobalScope_continuationManager_ohos_continuation_continuationManager { - - [Throws, DtsName="on", DtsTag="'deviceSelected'"] - static void onDeviceSelected(number token, Callback_Array_ContinuationResult_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceSelected'"] - static void offDeviceSelected(number token); - [Throws, DtsName="on", DtsTag="'deviceUnselected'"] - static void onDeviceUnselected(number token, Callback_Array_ContinuationResult_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceUnselected'"] - static void offDeviceUnselected(number token); - [Deprecated, DtsName="on", DtsTag="'deviceConnect'"] - static void onDeviceConnect(Callback_ContinuationResult_Void callback_); - [Deprecated, DtsName="off", DtsTag="'deviceConnect'"] - static void offDeviceConnect(optional Callback_ContinuationResult_Void callback_); - [Deprecated, DtsName="on", DtsTag="'deviceDisconnect'"] - static void onDeviceDisconnect(Callback_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'deviceDisconnect'"] - static void offDeviceDisconnect(optional Callback_String_Void callback_); - [Deprecated] - static void register(AsyncCallback_Number_Void callback_); - [Deprecated] - static void register(ContinuationExtraParams options, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number register(optional ContinuationExtraParams options); - [Deprecated] - static void unregister(number token, AsyncCallback_Void callback_); - [Deprecated] - static async void unregister(number token); - [Deprecated] - static void updateConnectStatus(number token, String deviceId, DeviceConnectState status, AsyncCallback_Void callback_); - [Deprecated] - static async void updateConnectStatus(number token, String deviceId, DeviceConnectState status); - [Deprecated] - static void startDeviceManager(number token, AsyncCallback_Void callback_); - [Deprecated] - static void startDeviceManager(number token, ContinuationExtraParams options, AsyncCallback_Void callback_); - [Deprecated] - static async void startDeviceManager(number token, optional ContinuationExtraParams options); - [Throws] - static void registerContinuation(AsyncCallback_Number_Void callback_); - [Throws] - static void registerContinuation(ContinuationExtraParams options, AsyncCallback_Number_Void callback_); - [Throws] - static async number registerContinuation(optional ContinuationExtraParams options); - [Throws] - static void unregisterContinuation(number token, AsyncCallback_Void callback_); - [Throws] - static async void unregisterContinuation(number token); - [Throws] - static void updateContinuationState(number token, String deviceId, DeviceConnectState status, AsyncCallback_Void callback_); - [Throws] - static async void updateContinuationState(number token, String deviceId, DeviceConnectState status); - [Throws] - static void startContinuationDeviceManager(number token, AsyncCallback_Void callback_); - [Throws] - static void startContinuationDeviceManager(number token, ContinuationExtraParams options, AsyncCallback_Void callback_); - [Throws] - static async void startContinuationDeviceManager(number token, optional ContinuationExtraParams options); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.convertxml.idl b/idl/@ohos.convertxml.idl index 7cb7d41..35f5960 100644 --- a/idl/@ohos.convertxml.idl +++ b/idl/@ohos.convertxml.idl @@ -1,9 +1,8 @@ package ohos.convertxml; +[DefaultExport] namespace xml { - [Entity=Interface] interface ConvertOptions { - attribute boolean trim; [Optional] attribute boolean ignoreDeclaration; @@ -30,18 +29,14 @@ namespace xml { attribute String typeKey; attribute String nameKey; attribute String elementsKey; - }; [Entity=Class] interface ConvertXML { - [Deprecated] Object convert(String xml, optional ConvertOptions options); [Deprecated, Throws] Object convertToJSObject(String xml, optional ConvertOptions options); [Throws] Object fastConvertToJSObject(String xml, optional ConvertOptions options); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.cooperate.idl b/idl/@ohos.cooperate.idl index bcce2ee..987d222 100644 --- a/idl/@ohos.cooperate.idl +++ b/idl/@ohos.cooperate.idl @@ -1,11 +1,10 @@ -package ohos; +package ohos.cooperate; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace cooperate { - [Deprecated] dictionary CooperateMsg { - [Deprecated] number COOPERATE_PREPARE = 0; [Deprecated] @@ -22,10 +21,8 @@ namespace cooperate { number COOPERATE_DEACTIVATE_FAIL = 6; [Deprecated] number COOPERATE_SESSION_DISCONNECTED = 7; - }; dictionary CooperateState { - number COOPERATE_PREPARE = 0; number COOPERATE_UNPREPARE = 1; number COOPERATE_ACTIVATE = 2; @@ -34,99 +31,94 @@ namespace cooperate { number COOPERATE_DEACTIVATE_SUCCESS = 5; number COOPERATE_DEACTIVATE_FAILURE = 6; number COOPERATE_SESSION_DISCONNECTED = 7; - }; [Entity=Interface] interface CooperateMessage { - attribute String networkId; attribute CooperateState state; - }; [Entity=Interface] interface MouseLocation { - attribute number displayX; attribute number displayY; attribute number displayWidth; attribute number displayHeight; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated, Throws] + void prepare(AsyncCallback_Void callback_); + [Deprecated, Throws] + async void prepare(); + [Throws] + void prepareCooperate(AsyncCallback_Void callback_); + [Throws] + async void prepareCooperate(); + [Deprecated, Throws] + void unprepare(AsyncCallback_Void callback_); + [Deprecated, Throws] + async void unprepare(); + [Throws] + void unprepareCooperate(AsyncCallback_Void callback_); + [Throws] + async void unprepareCooperate(); + [Deprecated, Throws] + void activate(String targetNetworkId, number inputDeviceId, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void activate(String targetNetworkId, number inputDeviceId); + [Throws] + void activateCooperate(String targetNetworkId, number inputDeviceId, AsyncCallback_Void callback_); + [Throws] + async void activateCooperate(String targetNetworkId, number inputDeviceId); + [Deprecated, Throws] + void deactivate(boolean isUnchained, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void deactivate(boolean isUnchained); + [Throws] + void deactivateCooperate(boolean isUnchained, AsyncCallback_Void callback_); + [Throws] + async void deactivateCooperate(boolean isUnchained); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated, Throws] + void getCrossingSwitchState(String networkId, AsyncCallback_Boolean_Void callback_); + [Deprecated, Throws] + async boolean getCrossingSwitchState(String networkId); + [Throws] + void getCooperateSwitchState(String networkId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getCooperateSwitchState(String networkId); [Entity=Literal, Synthetic] interface Literal_String_networkId_CooperateMsg_msg { - attribute String networkId; attribute CooperateMsg msg; - }; [Synthetic] callback Callback_Literal_String_networkId_CooperateMsg_msg_Void = void (Literal_String_networkId_CooperateMsg_msg parameter); + [Deprecated, Throws, DtsName="on", DtsTag="'cooperate'"] + void onCooperate(Callback_Literal_String_networkId_CooperateMsg_msg_Void callback_); [Synthetic] callback Callback_Void = void (); + [Deprecated, Throws, DtsName="off", DtsTag="'cooperate'"] + void offCooperate(optional Callback_Void callback_); [Synthetic] callback Callback_CooperateMessage_Void = void (CooperateMessage parameter); + [Throws, DtsName="on", DtsTag="'cooperateMessage'"] + void onCooperateMessage(Callback_CooperateMessage_Void callback_); + [Throws, DtsName="off", DtsTag="'cooperateMessage'"] + void offCooperateMessage(optional Callback_CooperateMessage_Void callback_); [Synthetic] callback Callback_MouseLocation_Void = void (MouseLocation parameter); - [GlobalScope] - interface GlobalScope_cooperate_ohos_cooperate { - - [Deprecated, Throws] - static void prepare(AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void prepare(); - [Throws] - static void prepareCooperate(AsyncCallback_Void callback_); - [Throws] - static async void prepareCooperate(); - [Deprecated, Throws] - static void unprepare(AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void unprepare(); - [Throws] - static void unprepareCooperate(AsyncCallback_Void callback_); - [Throws] - static async void unprepareCooperate(); - [Deprecated, Throws] - static void activate(String targetNetworkId, number inputDeviceId, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void activate(String targetNetworkId, number inputDeviceId); - [Throws] - static void activateCooperate(String targetNetworkId, number inputDeviceId, AsyncCallback_Void callback_); - [Throws] - static async void activateCooperate(String targetNetworkId, number inputDeviceId); - [Deprecated, Throws] - static void deactivate(boolean isUnchained, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void deactivate(boolean isUnchained); - [Throws] - static void deactivateCooperate(boolean isUnchained, AsyncCallback_Void callback_); - [Throws] - static async void deactivateCooperate(boolean isUnchained); - [Deprecated, Throws] - static void getCrossingSwitchState(String networkId, AsyncCallback_Boolean_Void callback_); - [Deprecated, Throws] - static async boolean getCrossingSwitchState(String networkId); - [Throws] - static void getCooperateSwitchState(String networkId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getCooperateSwitchState(String networkId); - [Deprecated, Throws, DtsName="on", DtsTag="'cooperate'"] - static void onCooperate(Callback_Literal_String_networkId_CooperateMsg_msg_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'cooperate'"] - static void offCooperate(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'cooperateMessage'"] - static void onCooperateMessage(Callback_CooperateMessage_Void callback_); - [Throws, DtsName="off", DtsTag="'cooperateMessage'"] - static void offCooperateMessage(optional Callback_CooperateMessage_Void callback_); - [Throws, DtsName="on", DtsTag="'cooperateMouse'"] - static void onCooperateMouse(String networkId, Callback_MouseLocation_Void callback_); - [Throws, DtsName="off", DtsTag="'cooperateMouse'"] - static void offCooperateMouse(String networkId, optional Callback_MouseLocation_Void callback_); - + [Throws, DtsName="on", DtsTag="'cooperateMouse'"] + void onCooperateMouse(String networkId, Callback_MouseLocation_Void callback_); + [Throws, DtsName="off", DtsTag="'cooperateMouse'"] + void offCooperateMouse(String networkId, optional Callback_MouseLocation_Void callback_); + [Throws] + async void activateCooperateWithOptions(String targetNetworkId, number inputDeviceId, optional CooperateOptions cooperateOptions); + [Entity=Interface] + interface CooperateOptions { + attribute number displayX; + attribute number displayId; + attribute number displayY; }; - }; \ No newline at end of file diff --git a/idl/@ohos.curves.idl b/idl/@ohos.curves.idl index d1b227c..dd4b6e6 100644 --- a/idl/@ohos.curves.idl +++ b/idl/@ohos.curves.idl @@ -1,8 +1,7 @@ -package ohos; +package ohos.curves; +[DefaultExport] namespace curves { - dictionary Curve { - [OriginalEnumMemberName=Linear] number LINEAR = 0; [OriginalEnumMemberName=Ease] @@ -29,36 +28,27 @@ namespace curves { number SMOOTH = 11; [OriginalEnumMemberName=Friction] number FRICTION = 12; - }; [Entity=Interface] interface ICurve { - number interpolate(number fraction); - }; + ICurve initCurve(optional Curve curve); + [Deprecated] + String init(optional Curve curve); + ICurve stepsCurve(number count, boolean end); [Synthetic] callback Callback_Number_Number = number (number fraction); - [GlobalScope] - interface GlobalScope_curves_ohos_curves { - - static ICurve initCurve(optional Curve curve); - [Deprecated] - static String init(optional Curve curve); - static ICurve stepsCurve(number count, boolean end); - static ICurve customCurve(Callback_Number_Number interpolate); - [Deprecated] - static String steps(number count, boolean end); - static ICurve cubicBezierCurve(number x1, number y1, number x2, number y2); - [Deprecated] - static String cubicBezier(number x1, number y1, number x2, number y2); - static ICurve springCurve(number velocity, number mass, number stiffness, number damping); - [Deprecated] - static String spring(number velocity, number mass, number stiffness, number damping); - static ICurve springMotion(optional number response, optional number dampingFraction, optional number overlapDuration); - static ICurve responsiveSpringMotion(optional number response, optional number dampingFraction, optional number overlapDuration); - static ICurve interpolatingSpring(number velocity, number mass, number stiffness, number damping); - - }; - + ICurve customCurve(Callback_Number_Number interpolate); + [Deprecated] + String steps(number count, boolean end); + ICurve cubicBezierCurve(number x1, number y1, number x2, number y2); + [Deprecated] + String cubicBezier(number x1, number y1, number x2, number y2); + ICurve springCurve(number velocity, number mass, number stiffness, number damping); + [Deprecated] + String spring(number velocity, number mass, number stiffness, number damping); + ICurve springMotion(optional number response, optional number dampingFraction, optional number overlapDuration); + ICurve responsiveSpringMotion(optional number response, optional number dampingFraction, optional number overlapDuration); + ICurve interpolatingSpring(number velocity, number mass, number stiffness, number damping); }; \ No newline at end of file diff --git a/idl/@ohos.customization.customConfig.idl b/idl/@ohos.customization.customConfig.idl index 7de8bb5..d65796d 100644 --- a/idl/@ohos.customization.customConfig.idl +++ b/idl/@ohos.customization.customConfig.idl @@ -1,11 +1,5 @@ -package ohos.customization; +package ohos.customization.customConfig; +[DefaultExport] namespace customConfig { - - [GlobalScope] - interface GlobalScope_customConfig_ohos_customization_customConfig { - - static String getChannelId(); - - }; - + String getChannelId(); }; \ No newline at end of file diff --git a/idl/@ohos.data.DataShareResultSet.idl b/idl/@ohos.data.DataShareResultSet.idl index 95a2e52..cc2e233 100644 --- a/idl/@ohos.data.DataShareResultSet.idl +++ b/idl/@ohos.data.DataShareResultSet.idl @@ -1,16 +1,13 @@ -package ohos.data; +package ohos.data.DataShareResultSet; dictionary DataType { - number TYPE_NULL = 0; number TYPE_LONG = 1; number TYPE_DOUBLE = 2; number TYPE_STRING = 3; number TYPE_BLOB = 4; - }; -[Entity=Interface] +[Entity=Interface, DefaultExport] interface DataShareResultSet { - attribute sequence columnNames; attribute number columnCount; attribute number rowCount; @@ -29,5 +26,4 @@ interface DataShareResultSet { number getColumnIndex(String columnName); String getColumnName(number columnIndex); DataType getDataType(number columnIndex); - }; \ No newline at end of file diff --git a/idl/@ohos.data.ValuesBucket.idl b/idl/@ohos.data.ValuesBucket.idl index 96cac01..03882c1 100644 --- a/idl/@ohos.data.ValuesBucket.idl +++ b/idl/@ohos.data.ValuesBucket.idl @@ -1,3 +1,3 @@ -package ohos.data; +package ohos.data.ValuesBucket; typedef (number or String or boolean) ValueType; typedef record ValuesBucket; \ No newline at end of file diff --git a/idl/@ohos.data.cloudData.idl b/idl/@ohos.data.cloudData.idl index d888768..d4f54fa 100644 --- a/idl/@ohos.data.cloudData.idl +++ b/idl/@ohos.data.cloudData.idl @@ -1,44 +1,45 @@ -package ohos.data; +package ohos.data.cloudData; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.data.relationalStore as relationalStore; -import ohos.data.commonType as commonType; +import ohos.base.Callback as Callback; +import ohos.data.relationalStore.default as relationalStore; +import ohos.data.commonType.default as commonType; +[DefaultExport] namespace cloudData { - dictionary ClearAction { - number CLEAR_CLOUD_INFO = 0; number CLEAR_CLOUD_DATA_AND_INFO = 1; - }; + const String DATA_CHANGE_EVENT_ID = "cloud_data_change"; [Entity=Interface] interface ExtraData { - attribute String eventId; attribute String extraData; - }; [Entity=Interface] interface StatisticInfo { - attribute String table; attribute number inserted; attribute number updated; attribute number normal; - + }; + dictionary SyncStatus { + number RUNNING = 0; + number FINISHED = 1; }; [Entity=Interface] interface SyncInfo { - - attribute Date startTime; - attribute Date finishTime; + attribute date startTime; + attribute date finishTime; attribute relationalStore.ProgressCode code; - + [Optional] + attribute SyncStatus syncStatus; }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Synthetic] + callback Callback_RelationalStore_ProgressDetails_Void = void (relationalStore.ProgressDetails parameter); [Entity=Class] interface Config { - [Throws] static void enableCloud(String accountId, record switches, AsyncCallback_Void callback_); [Throws] @@ -71,38 +72,31 @@ namespace cloudData { static async void clear(String accountId, record appActions); [Throws] static async void setGlobalCloudStrategy(StrategyType strategy, optional sequence param); - + [Throws] + static async void cloudSync(String bundleName, String storeId, relationalStore.SyncMode mode, Callback_RelationalStore_ProgressDetails_Void progress); }; dictionary StrategyType { - number NETWORK = 0; - }; dictionary NetWorkStrategy { - number WIFI = 1; number CELLULAR = 2; - }; + [Throws] + async void setCloudStrategy(StrategyType strategy, optional sequence param); namespace sharing { - dictionary Role { - number ROLE_INVITER = 0; number ROLE_INVITEE = 1; - }; dictionary State { - number STATE_UNKNOWN = 0; number STATE_ACCEPTED = 1; number STATE_REJECTED = 2; number STATE_SUSPENDED = 3; number STATE_UNAVAILABLE = 4; - }; dictionary SharingCode { - number SUCCESS = 0; number REPEATED_REQUEST = 1; number NOT_INVITER = 2; @@ -117,21 +111,17 @@ namespace cloudData { number INVALID_INVITATION = 11; number RATE_LIMIT = 12; number CUSTOM_ERROR = 1000; - }; [Entity=Interface, TypeParameters="T"] interface Result { - attribute number code; [Optional] attribute String description; [Optional] attribute T value; - }; [Entity=Interface] interface Privilege { - [Optional] attribute boolean writable; [Optional] @@ -142,11 +132,9 @@ namespace cloudData { attribute boolean deletable; [Optional] attribute boolean shareable; - }; [Entity=Interface] interface Participant { - attribute String identity; [Optional] attribute Role role; @@ -156,64 +144,48 @@ namespace cloudData { attribute Privilege privilege; [Optional] attribute String attachInfo; - }; + [Throws] + async relationalStore.ResultSet allocResourceAndShare(String storeId, relationalStore.RdbPredicates predicates, sequence participants, optional sequence columns); [Async, Synthetic] - callback AsyncCallback_relationalStore_ResultSet_Void = void (relationalStore.ResultSet result); + callback AsyncCallback_RelationalStore_ResultSet_Void = void (relationalStore.ResultSet result); + [Throws] + void allocResourceAndShare(String storeId, relationalStore.RdbPredicates predicates, sequence participants, AsyncCallback_RelationalStore_ResultSet_Void callback_); + [Throws] + void allocResourceAndShare(String storeId, relationalStore.RdbPredicates predicates, sequence participants, sequence columns, AsyncCallback_RelationalStore_ResultSet_Void callback_); [Async, Synthetic] callback AsyncCallback_Result_Void = void ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result result); - [GlobalScope] - interface GlobalScope_cloudData.sharing_ohos_data_cloudData { - - [Throws] - static async relationalStore.ResultSet allocResourceAndShare(String storeId, relationalStore.RdbPredicates predicates, sequence participants, optional sequence columns); - [Throws] - static void allocResourceAndShare(String storeId, relationalStore.RdbPredicates predicates, sequence participants, AsyncCallback_relationalStore_ResultSet_Void callback_); - [Throws] - static void allocResourceAndShare(String storeId, relationalStore.RdbPredicates predicates, sequence participants, sequence columns, AsyncCallback_relationalStore_ResultSet_Void callback_); - [Throws] - static void share(String sharingResource, sequence participants, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result) share(String sharingResource, sequence participants); - [Throws] - static void unshare(String sharingResource, sequence participants, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result) unshare(String sharingResource, sequence participants); - [Throws] - static void exit(String sharingResource, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="void"] Result) exit(String sharingResource); - [Throws] - static void changePrivilege(String sharingResource, sequence participants, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result) changePrivilege(String sharingResource, sequence participants); - [Throws] - static void queryParticipants(String sharingResource, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="sequence"] Result) queryParticipants(String sharingResource); - [Throws] - static void queryParticipantsByInvitation(String invitationCode, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="sequence"] Result) queryParticipantsByInvitation(String invitationCode); - [Throws] - static void confirmInvitation(String invitationCode, State state, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="String"] Result) confirmInvitation(String invitationCode, State state); - [Throws] - static void changeConfirmation(String sharingResource, State state, AsyncCallback_Result_Void callback_); - [Throws] - static async ([TypeArguments="void"] Result) changeConfirmation(String sharingResource, State state); - - }; - - }; - [GlobalScope] - interface GlobalScope_cloudData_ohos_data_cloudData { - - const String DATA_CHANGE_EVENT_ID = "cloud_data_change"; [Throws] - static async void setCloudStrategy(StrategyType strategy, optional sequence param); - + void share(String sharingResource, sequence participants, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result) share(String sharingResource, sequence participants); + [Throws] + void unshare(String sharingResource, sequence participants, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result) unshare(String sharingResource, sequence participants); + [Throws] + void exit(String sharingResource, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="void"] Result) exit(String sharingResource); + [Throws] + void changePrivilege(String sharingResource, sequence participants, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="sequence<[TypeArguments='Participant'] Result>"] Result) changePrivilege(String sharingResource, sequence participants); + [Throws] + void queryParticipants(String sharingResource, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="sequence"] Result) queryParticipants(String sharingResource); + [Throws] + void queryParticipantsByInvitation(String invitationCode, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="sequence"] Result) queryParticipantsByInvitation(String invitationCode); + [Throws] + void confirmInvitation(String invitationCode, State state, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="String"] Result) confirmInvitation(String invitationCode, State state); + [Throws] + void changeConfirmation(String sharingResource, State state, AsyncCallback_Result_Void callback_); + [Throws] + async ([TypeArguments="void"] Result) changeConfirmation(String sharingResource, State state); }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.cloudExtension.idl b/idl/@ohos.data.cloudExtension.idl index 86ed975..8ff5784 100644 --- a/idl/@ohos.data.cloudExtension.idl +++ b/idl/@ohos.data.cloudExtension.idl @@ -1,46 +1,37 @@ -package ohos.data; -import ohos.rpc as rpc; -import ohos.data.cloudData as cloudData; -import ohos.data.relationalStore as relationalStore; +package ohos.data.cloudExtension; +import ohos.rpc.default as rpc; +import ohos.data.cloudData.default as cloudData; +import ohos.data.relationalStore.default as relationalStore; +[DefaultExport] namespace cloudExtension { - [Entity=Interface] interface CloudAsset: relationalStore.Asset { - attribute String assetId; attribute String hash; - }; typedef sequence CloudAssets; typedef ((number or String or boolean or buffer or CloudAsset or CloudAssets) or undefined) CloudType; [Entity=Interface] interface CloudInfo { - attribute ServiceInfo cloudInfo; attribute record apps; - }; [Entity=Interface] interface ServiceInfo { - attribute boolean enableCloud; attribute String id; attribute number totalSpace; attribute number remainingSpace; attribute number user; - }; [Entity=Interface] interface AppBriefInfo { - attribute String appId; attribute String bundleName; attribute boolean cloudSwitch; attribute number instanceId; - }; dictionary FieldType { - number NULL = 0; number NUMBER = 1; number REAL = 2; @@ -49,89 +40,67 @@ namespace cloudExtension { number BLOB = 5; number ASSET = 6; number ASSETS = 7; - }; [Entity=Interface] interface Field { - attribute String alias; attribute String colName; attribute FieldType type; attribute boolean primary; attribute boolean nullable; - }; [Entity=Interface] interface Table { - attribute String alias; attribute String name; attribute sequence fields; - }; [Entity=Interface] interface Database { - attribute String name; attribute String alias; attribute sequence tables; - }; [Entity=Interface] interface AppSchema { - attribute String bundleName; attribute number version; attribute sequence databases; - }; [Entity=Interface] interface CloudData { - attribute String nextCursor; attribute boolean hasMore; attribute sequence> values; - }; [Entity=Interface] interface SubscribeInfo { - attribute number expirationTime; attribute record> subscribe; - }; [Entity=Interface] interface SubscribeId { - attribute String databaseAlias; attribute String id; - }; dictionary Flag { - number INSERT = 0; number UPDATE = 1; number DELETE = 2; - }; [Entity=Interface] interface ExtensionValue { - readonly attribute String id; readonly attribute number createTime; readonly attribute number modifyTime; readonly attribute Flag operation; - }; [Entity=Interface] interface LockInfo { - attribute number interval; attribute number lockId; - }; dictionary ErrorCode { - number SUCCESS = 0; number UNKNOWN_ERROR = 1; number NETWORK_ERROR = 2; @@ -139,21 +108,21 @@ namespace cloudExtension { number LOCKED_BY_OTHERS = 4; number RECORD_LIMIT_EXCEEDED = 5; number NO_SPACE_FOR_ASSET = 6; - }; [Entity=Interface, TypeParameters="T"] interface Result { - attribute number code; [Optional] attribute String description; [Optional] attribute T value; - }; + async rpc.RemoteObject createShareServiceStub(ShareCenter instance); + async rpc.RemoteObject createCloudServiceStub(CloudService instance); + async rpc.RemoteObject createCloudDBStub(CloudDB instance); + async rpc.RemoteObject createAssetLoaderStub(AssetLoader instance); [Entity=Interface] interface CloudDB { - async ([TypeArguments="sequence"] Result) generateId(number count); async sequence<[TypeArguments="record"] Result> insert(String table, sequence> values, sequence> extensions); async sequence<[TypeArguments="record"] Result> update(String table, sequence> values, sequence> extensions); @@ -162,18 +131,14 @@ namespace cloudExtension { async ([TypeArguments="LockInfo"] Result) lock(); async ([TypeArguments="LockInfo"] Result) heartbeat(number lockId); async ([TypeArguments="boolean"] Result) unlock(number lockId); - }; [Entity=Interface] interface AssetLoader { - async sequence<[TypeArguments="CloudAsset"] Result> download(String table, String gid, String prefix, sequence assets); async sequence<[TypeArguments="CloudAsset"] Result> upload(String table, String gid, sequence assets); - }; [Entity=Interface] interface ShareCenter { - async ([TypeArguments="sequence<[TypeArguments='cloudData.sharing.Participant'] Result>"] Result) share(number userId, String bundleName, String sharingResource, sequence participants); async ([TypeArguments="sequence<[TypeArguments='cloudData.sharing.Participant'] Result>"] Result) unshare(number userId, String bundleName, String sharingResource, sequence participants); async ([TypeArguments="void"] Result) exit(number userId, String bundleName, String sharingResource); @@ -182,11 +147,9 @@ namespace cloudExtension { async ([TypeArguments="sequence"] Result) queryParticipantsByInvitation(number userId, String bundleName, String invitationCode); async ([TypeArguments="String"] Result) confirmInvitation(number userId, String bundleName, String invitationCode, cloudData.sharing.State state); async ([TypeArguments="void"] Result) changeConfirmation(number userId, String bundleName, String sharingResource, cloudData.sharing.State state); - }; [Entity=Interface] interface CloudService { - async ServiceInfo getServiceInfo(); async record getAppBriefInfo(); async ([TypeArguments="AppSchema"] Result) getAppSchema(String bundleName); @@ -195,16 +158,5 @@ namespace cloudExtension { async rpc.RemoteObject connectDB(String bundleName, Database database); async rpc.RemoteObject connectAssetLoader(String bundleName, Database database); async rpc.RemoteObject connectShareCenter(number userId, String bundleName); - - }; - [GlobalScope] - interface GlobalScope_cloudExtension_ohos_data_cloudExtension { - - static async rpc.RemoteObject createShareServiceStub(ShareCenter instance); - static async rpc.RemoteObject createCloudServiceStub(CloudService instance); - static async rpc.RemoteObject createCloudDBStub(CloudDB instance); - static async rpc.RemoteObject createAssetLoaderStub(AssetLoader instance); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.data.commonType.idl b/idl/@ohos.data.commonType.idl index 210a709..85138a3 100644 --- a/idl/@ohos.data.commonType.idl +++ b/idl/@ohos.data.commonType.idl @@ -1,19 +1,16 @@ -package ohos.data; +package ohos.data.commonType; +[DefaultExport] namespace commonType { - dictionary AssetStatus { - number ASSET_NORMAL = 0; number ASSET_INSERT = 1; number ASSET_UPDATE = 2; number ASSET_DELETE = 3; number ASSET_ABNORMAL = 4; number ASSET_DOWNLOADING = 5; - }; [Entity=Interface] interface Asset { - attribute String name; attribute String uri; attribute String path; @@ -22,10 +19,8 @@ namespace commonType { attribute String size; [Optional] attribute AssetStatus status; - }; typedef sequence Assets; typedef ((number or String or boolean or buffer or Asset or Assets) or undefined) ValueType; typedef record ValuesBucket; - }; \ No newline at end of file diff --git a/idl/@ohos.data.dataAbility.idl b/idl/@ohos.data.dataAbility.idl index a0f9a6e..1a36a97 100644 --- a/idl/@ohos.data.dataAbility.idl +++ b/idl/@ohos.data.dataAbility.idl @@ -1,11 +1,11 @@ -package ohos.data; +package ohos.data.dataAbility; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.data.rdb as rdb; +import ohos.data.rdb.default as rdb; +[DefaultExport] namespace dataAbility { - + rdb.RdbPredicates createRdbPredicates(String name, DataAbilityPredicates dataAbilityPredicates); [Entity=Class] interface DataAbilityPredicates { - DataAbilityPredicates equalTo(String field, ValueType value); DataAbilityPredicates notEqualTo(String field, ValueType value); DataAbilityPredicates beginWrap(); @@ -35,14 +35,6 @@ namespace dataAbility { DataAbilityPredicates indexedBy(String field); DataAbilityPredicates in(String field, sequence value); DataAbilityPredicates notIn(String field, sequence value); - }; typedef (number or String or boolean) ValueType; - [GlobalScope] - interface GlobalScope_dataAbility_ohos_data_dataAbility { - - static rdb.RdbPredicates createRdbPredicates(String name, DataAbilityPredicates dataAbilityPredicates); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.dataShare.idl b/idl/@ohos.data.dataShare.idl index ffb905f..95c57d4 100644 --- a/idl/@ohos.data.dataShare.idl +++ b/idl/@ohos.data.dataShare.idl @@ -1,94 +1,83 @@ -package ohos.data; +package ohos.data.dataShare; import ohos.base.AsyncCallback as AsyncCallback; -import application.Context as Context; -import ohos.data.DataShareResultSet as DataShareResultSet; -import ohos.data.dataSharePredicates as dataSharePredicates; -import ohos.data.ValuesBucket as ValuesBucket; +import application.Context.default as Context; +import ohos.data.DataShareResultSet.default as DataShareResultSet; +import ohos.data.dataSharePredicates.default as dataSharePredicates; +import ohos.data.ValuesBucket.ValuesBucket as ValuesBucket; +import ohos.data.ValuesBucket.ValueType as ValueType; +[DefaultExport] namespace dataShare { - [Entity=Interface] interface DataShareHelperOptions { - [Optional] attribute boolean isProxy; [Optional] attribute number waitTime; - }; [Async, Synthetic] callback AsyncCallback_DataShareHelper_Void = void (DataShareHelper result); + [Throws] + void createDataShareHelper(Context context, String uri, AsyncCallback_DataShareHelper_Void callback_); + [Throws] + void createDataShareHelper(Context context, String uri, DataShareHelperOptions options, AsyncCallback_DataShareHelper_Void callback_); + [Throws] + async DataShareHelper createDataShareHelper(Context context, String uri, optional DataShareHelperOptions options); + [Throws] + async void enableSilentProxy(Context context, optional String uri); + [Throws] + async void disableSilentProxy(Context context, optional String uri); [Entity=Interface] interface TemplateId { - attribute String subscriberId; attribute String bundleNameOfOwner; - }; [Entity=Interface] interface PublishedItem { - attribute String key; attribute (String or buffer) data; attribute String subscriberId; - }; [Entity=Interface] interface RdbDataChangeNode { - attribute String uri; attribute TemplateId templateId; attribute sequence data; - }; [Entity=Interface] interface PublishedDataChangeNode { - attribute String bundleName; attribute sequence data; - }; [Entity=Interface] interface Template { - attribute record predicates; attribute String scheduler; [Optional] attribute String update; - }; [Entity=Interface] interface OperationResult { - attribute String key; attribute number result; - }; [Entity=Interface] interface UpdateOperation { - attribute ValuesBucket values; attribute dataSharePredicates.DataSharePredicates predicates; - }; dictionary ChangeType { - number INSERT = 0; number DELETE = 1; number UPDATE = 2; - }; dictionary SubscriptionType { - number SUBSCRIPTION_TYPE_EXACT_URI = 0; - }; [Entity=Interface] interface ChangeInfo { - attribute ChangeType type; attribute String uri; attribute sequence values; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -110,28 +99,27 @@ namespace dataShare { callback AsyncCallback_String_Void = void (String result); [Entity=Interface] interface DataShareHelper { - [Throws, DtsName="on", DtsTag="'dataChange'"] void onDataChange(String uri, AsyncCallback_Void callback_); - [Throws, DtsName="off", DtsTag="'dataChange'"] - void offDataChange(String uri, optional AsyncCallback_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'dataChange'"] void onDataChange(SubscriptionType type, String uri, AsyncCallback_ChangeInfo_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'dataChange'"] - void offDataChange(SubscriptionType type, String uri, optional AsyncCallback_ChangeInfo_Void callback_); - [Throws] - void addTemplate(String uri, String subscriberId, Template template); - [Throws] - void delTemplate(String uri, String subscriberId); [Throws, DtsName="on", DtsTag="'rdbDataChange'"] sequence onRdbDataChange(sequence uris, TemplateId templateId, AsyncCallback_RdbDataChangeNode_Void callback_); - [Throws, DtsName="off", DtsTag="'rdbDataChange'"] - sequence offRdbDataChange(sequence uris, TemplateId templateId, optional AsyncCallback_RdbDataChangeNode_Void callback_); [Throws, DtsName="on", DtsTag="'publishedDataChange'"] sequence onPublishedDataChange(sequence uris, String subscriberId, AsyncCallback_PublishedDataChangeNode_Void callback_); + [Throws, DtsName="off", DtsTag="'dataChange'"] + void offDataChange(String uri, optional AsyncCallback_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'dataChange'"] + void offDataChange(SubscriptionType type, String uri, optional AsyncCallback_ChangeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'rdbDataChange'"] + sequence offRdbDataChange(sequence uris, TemplateId templateId, optional AsyncCallback_RdbDataChangeNode_Void callback_); [Throws, DtsName="off", DtsTag="'publishedDataChange'"] sequence offPublishedDataChange(sequence uris, String subscriberId, optional AsyncCallback_PublishedDataChangeNode_Void callback_); [Throws] + void addTemplate(String uri, String subscriberId, Template template); + [Throws] + void delTemplate(String uri, String subscriberId); + [Throws] void publish(sequence data, String bundleName, number version, AsyncCallback_Array_OperationResult_Void callback_); [Throws] void publish(sequence data, String bundleName, AsyncCallback_Array_OperationResult_Void callback_); @@ -179,22 +167,61 @@ namespace dataShare { async void notifyChange(ChangeInfo data); [Throws] async void close(); - }; - [GlobalScope] - interface GlobalScope_dataShare_ohos_data_dataShare { - - [Throws] - static void createDataShareHelper(Context context, String uri, AsyncCallback_DataShareHelper_Void callback_); - [Throws] - static void createDataShareHelper(Context context, String uri, DataShareHelperOptions options, AsyncCallback_DataShareHelper_Void callback_); + [Throws] + async DataProxyHandle createDataProxyHandle(); + [Entity=Interface] + interface ProxyData { + attribute String uri; + [Optional] + attribute ValueType value; + [Optional] + attribute sequence allowList; + }; + [Entity=Interface] + interface DataProxyChangeInfo { + attribute ChangeType type; + attribute String uri; + attribute ValueType value; + }; + dictionary DataProxyErrorCode { + number SUCCESS = 0; + number URI_NOT_EXIST = 1; + number NO_PERMISSION = 2; + number OVER_LIMIT = 3; + }; + [Entity=Interface] + interface DataProxyResult { + attribute String uri; + attribute DataProxyErrorCode result; + }; + [Entity=Interface] + interface DataProxyGetResult { + attribute String uri; + attribute DataProxyErrorCode result; + attribute (ValueType or undefined) value; + attribute (sequence or undefined) allowList; + }; + dictionary DataProxyType { + number SHARED_CONFIG = 0; + }; + [Entity=Interface] + interface DataProxyConfig { + attribute DataProxyType type; + }; + [Async, Synthetic] + callback AsyncCallback_Array_DataProxyChangeInfo_Void = void (sequence result); + [Entity=Interface] + interface DataProxyHandle { + [Throws, DtsName="on", DtsTag="0|event|'dataChange'"] + sequence onDataChange(sequence uris, DataProxyConfig config, AsyncCallback_Array_DataProxyChangeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'dataChange'"] + sequence offDataChange(sequence uris, DataProxyConfig config, optional AsyncCallback_Array_DataProxyChangeInfo_Void callback_); [Throws] - static async DataShareHelper createDataShareHelper(Context context, String uri, optional DataShareHelperOptions options); + async sequence publish(sequence data, DataProxyConfig config); [Throws] - static async void enableSilentProxy(Context context, optional String uri); + async sequence delete(sequence uris, DataProxyConfig config); [Throws] - static async void disableSilentProxy(Context context, optional String uri); - + async sequence get(sequence uris, DataProxyConfig config); }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.dataSharePredicates.idl b/idl/@ohos.data.dataSharePredicates.idl index ba935bf..cc5f494 100644 --- a/idl/@ohos.data.dataSharePredicates.idl +++ b/idl/@ohos.data.dataSharePredicates.idl @@ -1,10 +1,9 @@ -package ohos.data; -import ohos.data.ValueType as ValueType; +package ohos.data.dataSharePredicates; +import ohos.data.ValuesBucket.ValueType as ValueType; +[DefaultExport] namespace dataSharePredicates { - [Entity=Class] interface DataSharePredicates { - DataSharePredicates equalTo(String field, ValueType value); DataSharePredicates notEqualTo(String field, ValueType value); DataSharePredicates beginWrap(); @@ -36,7 +35,5 @@ namespace dataSharePredicates { DataSharePredicates notIn(String field, sequence value); DataSharePredicates prefixKey(String prefix); DataSharePredicates inKeys(sequence keys); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.distributedData.idl b/idl/@ohos.data.distributedData.idl index b700410..1510205 100644 --- a/idl/@ohos.data.distributedData.idl +++ b/idl/@ohos.data.distributedData.idl @@ -1,51 +1,37 @@ -package ohos.data; +package ohos.data.distributedData; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace distributedData { - [Entity=Interface, Deprecated] interface KVManagerConfig { - [Deprecated] attribute UserInfo userInfo; [Deprecated] attribute String bundleName; - }; [Entity=Interface, Deprecated] interface UserInfo { - [Optional, Deprecated] attribute String userId; [Optional, Deprecated] attribute UserType userType; - }; [Deprecated] dictionary UserType { - [Deprecated] number SAME_USER_ID = 0; - }; namespace Constants { - - [GlobalScope] - interface GlobalScope_distributedData.Constants_ohos_data_distributedData { - - const number MAX_KEY_LENGTH = 1024; - const number MAX_VALUE_LENGTH = 4194303; - const number MAX_KEY_LENGTH_DEVICE = 896; - const number MAX_STORE_ID_LENGTH = 128; - const number MAX_QUERY_LENGTH = 512000; - const number MAX_BATCH_SIZE = 128; - - }; - + const number MAX_KEY_LENGTH = 1024; + const number MAX_VALUE_LENGTH = 4194303; + const number MAX_KEY_LENGTH_DEVICE = 896; + const number MAX_STORE_ID_LENGTH = 128; + const number MAX_QUERY_LENGTH = 512000; + const number MAX_BATCH_SIZE = 128; }; [Deprecated] dictionary ValueType { - [Deprecated] number STRING = 0; [Deprecated] @@ -58,29 +44,23 @@ namespace distributedData { number BOOLEAN = 4; [Deprecated] number DOUBLE = 5; - }; [Entity=Interface, Deprecated] interface Value { - [Deprecated] attribute ValueType type; [Deprecated] attribute (buffer or String or number or boolean) value; - }; [Entity=Interface, Deprecated] interface Entry { - [Deprecated] attribute String key; [Deprecated] attribute Value value; - }; [Entity=Interface, Deprecated] interface ChangeNotification { - [Deprecated] attribute sequence insertEntries; [Deprecated] @@ -89,44 +69,36 @@ namespace distributedData { attribute sequence deleteEntries; [Deprecated] attribute String deviceId; - }; [Deprecated] dictionary SyncMode { - [Deprecated] number PULL_ONLY = 0; [Deprecated] number PUSH_ONLY = 1; [Deprecated] number PUSH_PULL = 2; - }; [Deprecated] dictionary SubscribeType { - [Deprecated] number SUBSCRIBE_TYPE_LOCAL = 0; [Deprecated] number SUBSCRIBE_TYPE_REMOTE = 1; [Deprecated] number SUBSCRIBE_TYPE_ALL = 2; - }; [Deprecated] dictionary KVStoreType { - [Deprecated] number DEVICE_COLLABORATION = 0; [Deprecated] number SINGLE_VERSION = 1; [Deprecated] number MULTI_VERSION = 2; - }; [Deprecated] dictionary SecurityLevel { - [Deprecated] number NO_LEVEL = 0; [Deprecated] @@ -139,11 +111,9 @@ namespace distributedData { number S3 = 5; [Deprecated] number S4 = 6; - }; [Entity=Interface, Deprecated] interface Options { - [Optional, Deprecated] attribute boolean createIfMissing; [Optional, Deprecated] @@ -158,11 +128,10 @@ namespace distributedData { attribute SecurityLevel securityLevel; [Optional, Deprecated] attribute Schema schema; - }; [Entity=Class, Deprecated] interface Schema { - + [Deprecated] constructor(); [Deprecated] attribute FieldNode root; @@ -172,11 +141,10 @@ namespace distributedData { attribute number mode; [Deprecated] attribute number skip; - }; [Entity=Class, Deprecated] interface FieldNode { - + [Deprecated] constructor(String name); [Deprecated] attribute String default; @@ -186,11 +154,9 @@ namespace distributedData { attribute number type; [Deprecated] boolean appendChild(FieldNode child); - }; [Entity=Interface, Deprecated] interface KvStoreResultSet { - [Deprecated] number getCount(); [Deprecated] @@ -217,11 +183,10 @@ namespace distributedData { boolean isAfterLast(); [Deprecated] Entry getEntry(); - }; [Entity=Class, Deprecated] interface Query { - + [Deprecated] constructor(); [Deprecated] Query reset(); @@ -275,7 +240,6 @@ namespace distributedData { Query deviceId(String deviceId); [Deprecated] String getSqlLike(); - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -283,16 +247,13 @@ namespace distributedData { callback Callback_ChangeNotification_Void = void (ChangeNotification parameter); [Entity=Tuple, Synthetic] interface Tuple_String_Number { - attribute String value0; attribute number value1; - }; [Synthetic] callback Callback_Array_Tuple_String_Number_Void = void (sequence parameter); [Entity=Interface, Deprecated] interface KVStore { - [Deprecated, Throws] void put(String key, (buffer or String or number or boolean) value, AsyncCallback_Void callback_); [Deprecated, Throws] @@ -337,7 +298,6 @@ namespace distributedData { void setSyncRange(sequence localLabels, sequence remoteSupportLabels, AsyncCallback_Void callback_); [Deprecated, Throws] async void setSyncRange(sequence localLabels, sequence remoteSupportLabels); - }; [Async, Synthetic] callback AsyncCallback_Union_Buffer_String_Boolean_Number_Void = void ((buffer or String or boolean or number) result); @@ -351,7 +311,6 @@ namespace distributedData { callback AsyncCallback_SecurityLevel_Void = void (SecurityLevel result); [Entity=Interface, Deprecated] interface SingleKVStore: KVStore { - [Deprecated, Throws] void get(String key, AsyncCallback_Union_Buffer_String_Boolean_Number_Void callback_); [Deprecated, Throws] @@ -402,13 +361,11 @@ namespace distributedData { void getSecurityLevel(AsyncCallback_SecurityLevel_Void callback_); [Deprecated, Throws] async SecurityLevel getSecurityLevel(); - }; [Async, Synthetic] callback AsyncCallback_Union_Boolean_String_Number_Buffer_Void = void ((boolean or String or number or buffer) result); [Entity=Interface, Deprecated] interface DeviceKVStore: KVStore { - [Deprecated, Throws] void get(String deviceId, String key, AsyncCallback_Union_Boolean_String_Number_Buffer_Void callback_); [Deprecated, Throws] @@ -463,22 +420,24 @@ namespace distributedData { void offDataChange(optional Callback_ChangeNotification_Void listener); [Deprecated, Throws, DtsName="off", DtsTag="0|event|'syncComplete'"] void offSyncComplete(optional Callback_Array_Tuple_String_Number_Void syncCallback); - }; [Async, Synthetic] callback AsyncCallback_KVManager_Void = void (KVManager result); + [Deprecated, Throws] + void createKVManager(KVManagerConfig config, AsyncCallback_KVManager_Void callback_); + [Deprecated, Throws] + async KVManager createKVManager(KVManagerConfig config); [Async, Synthetic] - callback AsyncCallback_T_Void = void (any result); + callback AsyncCallback_T_Void = void (T result); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); [Synthetic] callback Callback_Void = void (); [Entity=Interface, Deprecated] interface KVManager { - - [Deprecated, TypeParameters="T extends KVStore"] + [Deprecated, TypeParameters="T"] async T getKVStore(String storeId, Options options); - [Deprecated, TypeParameters="T extends KVStore"] + [Deprecated, TypeParameters="T"] void getKVStore(String storeId, Options options, AsyncCallback_T_Void callback_); [Deprecated, Throws] void closeKVStore(String appId, String storeId, KVStore kvStore, AsyncCallback_Void callback_); @@ -496,16 +455,5 @@ namespace distributedData { void onDistributedDataServiceDie(Callback_Void deathCallback); [Deprecated, Throws, DtsName="off", DtsTag="0|event|'distributedDataServiceDie'"] void offDistributedDataServiceDie(optional Callback_Void deathCallback); - - }; - [GlobalScope] - interface GlobalScope_distributedData_ohos_data_distributedData { - - [Deprecated, Throws] - static void createKVManager(KVManagerConfig config, AsyncCallback_KVManager_Void callback_); - [Deprecated, Throws] - static async KVManager createKVManager(KVManagerConfig config); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.distributedDataObject.idl b/idl/@ohos.data.distributedDataObject.idl index 0e3deff..7724a73 100644 --- a/idl/@ohos.data.distributedDataObject.idl +++ b/idl/@ohos.data.distributedDataObject.idl @@ -1,51 +1,52 @@ -package ohos.data; +package ohos.data.distributedDataObject; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; +import application.BaseContext.default as Context; +import ohos.data.commonType.default as commonType; +[DefaultExport] namespace distributedDataObject { - [Entity=Interface] interface BindInfo { - attribute String storeName; attribute String tableName; attribute commonType.ValuesBucket primaryKey; attribute String field; attribute String assetName; - }; + [Deprecated] + DistributedObject createDistributedObject(Object source); + [Throws] + DataObject create(Context context, Object source); + String genSessionId(); [Entity=Interface] interface SaveSuccessResponse { - attribute String sessionId; attribute number version; attribute String deviceId; - }; [Entity=Interface] interface RevokeSaveSuccessResponse { - attribute String sessionId; - }; + callback DataObserver = void (String sessionId, sequence fields); + callback StatusObserver = void (String sessionId, String networkId, String status); + callback ProgressObserver = void (String sessionId, number progress); [Synthetic] callback Callback_String_Array_String_Void = void (String sessionId, sequence fields); [Synthetic] callback Callback_String_String_String_Void = void (String sessionId, String networkId, String status); [Entity=Interface, Deprecated] interface DistributedObject { - [Deprecated] boolean setSessionId(optional String sessionId); [Deprecated, DtsName="on", DtsTag="'change'"] void onChange(Callback_String_Array_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'change'"] - void offChange(optional Callback_String_Array_String_Void callback_); [Deprecated, DtsName="on", DtsTag="'status'"] void onStatus(Callback_String_String_String_Void callback_); + [Deprecated, DtsName="off", DtsTag="'change'"] + void offChange(optional Callback_String_Array_String_Void callback_); [Deprecated, DtsName="off", DtsTag="'status'"] void offStatus(optional Callback_String_String_String_Void callback_); - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -55,7 +56,6 @@ namespace distributedDataObject { callback AsyncCallback_RevokeSaveSuccessResponse_Void = void (RevokeSaveSuccessResponse result); [Entity=Interface] interface DataObject { - [Throws] void setSessionId(String sessionId, AsyncCallback_Void callback_); [Throws] @@ -64,12 +64,24 @@ namespace distributedDataObject { async void setSessionId(optional String sessionId); [Throws, DtsName="on", DtsTag="'change'"] void onChange(Callback_String_Array_String_Void callback_); - [Throws, DtsName="off", DtsTag="'change'"] - void offChange(optional Callback_String_Array_String_Void callback_); [Throws, DtsName="on", DtsTag="'status'"] void onStatus(Callback_String_String_String_Void callback_); + [DtsName="on", DtsTag="'change'"] + void onChange(DataObserver callback_); + [DtsName="on", DtsTag="'status'"] + void onStatus(StatusObserver callback_); + [DtsName="on", DtsTag="'progressChanged'"] + void onProgressChanged(ProgressObserver callback_); + [Throws, DtsName="off", DtsTag="'change'"] + void offChange(optional Callback_String_Array_String_Void callback_); [Throws, DtsName="off", DtsTag="'status'"] void offStatus(optional Callback_String_String_String_Void callback_); + [DtsName="off", DtsTag="'change'"] + void offChange(optional DataObserver callback_); + [DtsName="off", DtsTag="'status'"] + void offStatus(optional StatusObserver callback_); + [DtsName="off", DtsTag="'progressChanged'"] + void offProgressChanged(optional ProgressObserver callback_); [Throws] void save(String deviceId, AsyncCallback_SaveSuccessResponse_Void callback_); [Throws] @@ -82,17 +94,9 @@ namespace distributedDataObject { void bindAssetStore(String assetKey, BindInfo bindInfo, AsyncCallback_Void callback_); [Throws] async void bindAssetStore(String assetKey, BindInfo bindInfo); - - }; - [GlobalScope] - interface GlobalScope_distributedDataObject_ohos_data_distributedDataObject { - - [Deprecated] - static DistributedObject createDistributedObject(Object source); [Throws] - static DataObject create(Context context, Object source); - static String genSessionId(); - + async void setAsset(String assetKey, String uri); + [Throws] + async void setAssets(String assetsKey, sequence uris); }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.distributedKVStore.idl b/idl/@ohos.data.distributedKVStore.idl index 94531ec..5db984b 100644 --- a/idl/@ohos.data.distributedKVStore.idl +++ b/idl/@ohos.data.distributedKVStore.idl @@ -1,93 +1,72 @@ -package ohos.data; +package ohos.data.distributedKVStore; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.data.ValuesBucket as ValuesBucket; -import ohos.data.dataSharePredicates as dataSharePredicates; -import application.BaseContext as BaseContext; +import ohos.data.ValuesBucket.ValuesBucket as ValuesBucket; +import ohos.data.dataSharePredicates.default as dataSharePredicates; +import application.BaseContext.default as BaseContext; +[DefaultExport] namespace distributedKVStore { - [Entity=Interface] interface KVManagerConfig { - attribute String bundleName; attribute BaseContext context; - }; [Entity=Interface] interface Constants { - readonly attribute number MAX_KEY_LENGTH; readonly attribute number MAX_VALUE_LENGTH; readonly attribute number MAX_KEY_LENGTH_DEVICE; readonly attribute number MAX_STORE_ID_LENGTH; readonly attribute number MAX_QUERY_LENGTH; readonly attribute number MAX_BATCH_SIZE; - }; dictionary ValueType { - number STRING = 0; number INTEGER = 1; number FLOAT = 2; number BYTE_ARRAY = 3; number BOOLEAN = 4; number DOUBLE = 5; - }; [Entity=Interface] interface Value { - attribute ValueType type; attribute (buffer or String or number or boolean) value; - }; [Entity=Interface] interface Entry { - attribute String key; attribute Value value; - }; [Entity=Interface] interface ChangeNotification { - attribute sequence insertEntries; attribute sequence updateEntries; attribute sequence deleteEntries; attribute String deviceId; - }; dictionary SyncMode { - number PULL_ONLY = 0; number PUSH_ONLY = 1; number PUSH_PULL = 2; - }; dictionary SubscribeType { - number SUBSCRIBE_TYPE_LOCAL = 0; number SUBSCRIBE_TYPE_REMOTE = 1; number SUBSCRIBE_TYPE_ALL = 2; - }; dictionary KVStoreType { - number DEVICE_COLLABORATION = 0; number SINGLE_VERSION = 1; - }; dictionary SecurityLevel { - number S1 = 0; number S2 = 1; number S3 = 2; number S4 = 3; - }; [Entity=Interface] interface Options { - [Optional] attribute boolean createIfMissing; [Optional] @@ -101,32 +80,26 @@ namespace distributedKVStore { attribute SecurityLevel securityLevel; [Optional] attribute Schema schema; - }; [Entity=Class] interface Schema { - constructor(); attribute FieldNode root; attribute sequence indexes; attribute number mode; attribute number skip; - }; [Entity=Class] interface FieldNode { - constructor(String name); attribute String default; attribute boolean nullable; attribute number type; [Throws] boolean appendChild(FieldNode child); - }; [Entity=Interface] interface KVStoreResultSet { - number getCount(); number getPosition(); boolean moveToFirst(); @@ -142,11 +115,9 @@ namespace distributedKVStore { boolean isBeforeFirst(); boolean isAfterLast(); Entry getEntry(); - }; [Entity=Class] interface Query { - constructor(); Query reset(); [Throws] @@ -195,7 +166,6 @@ namespace distributedKVStore { [Throws] Query deviceId(String deviceId); String getSqlLike(); - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -209,10 +179,8 @@ namespace distributedKVStore { callback AsyncCallback_Number_Void = void (number result); [Entity=Tuple, Synthetic] interface Tuple_String_Number { - attribute String value0; attribute number value1; - }; [Async, Synthetic] callback AsyncCallback_Array_Tuple_String_Number_Void = void (sequence result); @@ -224,7 +192,6 @@ namespace distributedKVStore { callback AsyncCallback_SecurityLevel_Void = void (SecurityLevel result); [Entity=Interface] interface SingleKVStore { - [Throws] void put(String key, (buffer or String or number or boolean) value, AsyncCallback_Void callback_); [Throws] @@ -242,7 +209,7 @@ namespace distributedKVStore { [Throws] async void delete(String key); [Throws] - undefined delete(dataSharePredicates.DataSharePredicates predicates, AsyncCallback_Void callback_); + void delete(dataSharePredicates.DataSharePredicates predicates, AsyncCallback_Void callback_); [Throws] async void delete(dataSharePredicates.DataSharePredicates predicates); [Throws] @@ -337,11 +304,9 @@ namespace distributedKVStore { void getSecurityLevel(AsyncCallback_SecurityLevel_Void callback_); [Throws] async SecurityLevel getSecurityLevel(); - }; [Entity=Interface] interface DeviceKVStore: SingleKVStore { - [Throws] void get(String key, AsyncCallback_Union_Boolean_String_Number_Buffer_Void callback_); [Throws] @@ -398,17 +363,17 @@ namespace distributedKVStore { void getResultSize(String deviceId, Query query, AsyncCallback_Number_Void callback_); [Throws] async number getResultSize(String deviceId, Query query); - }; + [Throws] + KVManager createKVManager(KVManagerConfig config); [Async, Synthetic] - callback AsyncCallback_T_Void = void (any result); + callback AsyncCallback_T_Void = void (T result); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface KVManager { - [Throws, TypeParameters="T"] void getKVStore(String storeId, Options options, AsyncCallback_T_Void callback_); [Throws, TypeParameters="T"] @@ -429,14 +394,5 @@ namespace distributedKVStore { void onDistributedDataServiceDie(Callback_Void deathCallback); [Throws, DtsName="off", DtsTag="0|event|'distributedDataServiceDie'"] void offDistributedDataServiceDie(optional Callback_Void deathCallback); - }; - [GlobalScope] - interface GlobalScope_distributedKVStore_ohos_data_distributedKVStore { - - [Throws] - static KVManager createKVManager(KVManagerConfig config); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.intelligence.idl b/idl/@ohos.data.intelligence.idl new file mode 100644 index 0000000..2fe3e70 --- /dev/null +++ b/idl/@ohos.data.intelligence.idl @@ -0,0 +1,46 @@ +package ohos.data.intelligence; +[DefaultExport] +namespace intelligence { + [Throws] + async TextEmbedding getTextEmbeddingModel(ModelConfig config); + [Throws] + async ImageEmbedding getImageEmbeddingModel(ModelConfig config); + [Entity=Interface] + interface ModelConfig { + attribute ModelVersion version; + attribute boolean isNpuAvailable; + [Optional] + attribute String cachePath; + }; + dictionary ModelVersion { + number BASIC_MODEL = 0; + }; + [Entity=Interface] + interface TextEmbedding { + [Throws] + async void loadModel(); + [Throws] + async void releaseModel(); + [Throws] + async sequence getEmbedding(String text); + [Throws] + async sequence> getEmbedding(sequence batchTexts); + }; + [Entity=Interface] + interface ImageEmbedding { + [Throws] + async void loadModel(); + [Throws] + async void releaseModel(); + [Throws] + async sequence getEmbedding(Image image); + }; + typedef String Image; + [Throws] + async sequence splitText(String text, SplitConfig config); + [Entity=Interface] + interface SplitConfig { + attribute number size; + attribute number overlapRatio; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.data.preferences.idl b/idl/@ohos.data.preferences.idl index 22e5766..204a56e 100644 --- a/idl/@ohos.data.preferences.idl +++ b/idl/@ohos.data.preferences.idl @@ -1,30 +1,58 @@ -package ohos.data; +package ohos.data.preferences; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; +import application.BaseContext.default as Context; +[DefaultExport] namespace preferences { - typedef (number or String or boolean or sequence or sequence or sequence or buffer or Object or bigint) ValueType; dictionary StorageType { - number XML = 0; - number CLKV = 1; - + number GSKV = 1; }; [Entity=Interface] interface Options { - attribute String name; [Optional] attribute (String or undefined) dataGroupId; [Optional] attribute (StorageType or undefined) storageType; - }; [Async, Synthetic] callback AsyncCallback_Preferences_Void = void (Preferences result); + [Throws] + void getPreferences(Context context, String name, AsyncCallback_Preferences_Void callback_); + [Throws] + void getPreferences(Context context, Options options, AsyncCallback_Preferences_Void callback_); + [Throws] + async Preferences getPreferences(Context context, String name); + [Throws] + async Preferences getPreferences(Context context, Options options); + [Throws] + Preferences getPreferencesSync(Context context, Options options); + [Throws] + boolean isStorageTypeSupported(StorageType type); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void deletePreferences(Context context, String name, AsyncCallback_Void callback_); + [Throws] + void deletePreferences(Context context, Options options, AsyncCallback_Void callback_); + [Throws] + async void deletePreferences(Context context, String name); + [Throws] + async void deletePreferences(Context context, Options options); + [Throws] + void removePreferencesFromCache(Context context, String name, AsyncCallback_Void callback_); + [Throws] + void removePreferencesFromCache(Context context, Options options, AsyncCallback_Void callback_); + [Throws] + async void removePreferencesFromCache(Context context, String name); + [Throws] + async void removePreferencesFromCache(Context context, Options options); + [Throws] + void removePreferencesFromCacheSync(Context context, String name); + [Throws] + void removePreferencesFromCacheSync(Context context, Options options); [Async, Synthetic] callback AsyncCallback_ValueType_Void = void (ValueType result); [Async, Synthetic] @@ -37,7 +65,6 @@ namespace preferences { callback Callback_Map_String_ValueType_Void = void (record parameter); [Entity=Interface] interface Preferences { - [Throws] void get(String key, ValueType defValue, AsyncCallback_ValueType_Void callback_); [Throws] @@ -91,44 +118,5 @@ namespace preferences { void offMultiProcessChange(optional Callback_String_Void callback_); [Throws, DtsName="off", DtsTag="'dataChange'"] void offDataChange(sequence keys, optional Callback_Map_String_ValueType_Void callback_); - }; - [GlobalScope] - interface GlobalScope_preferences_ohos_data_preferences { - - [Throws] - static void getPreferences(Context context, String name, AsyncCallback_Preferences_Void callback_); - [Throws] - static void getPreferences(Context context, Options options, AsyncCallback_Preferences_Void callback_); - [Throws] - static async Preferences getPreferences(Context context, String name); - [Throws] - static async Preferences getPreferences(Context context, Options options); - [Throws] - static Preferences getPreferencesSync(Context context, Options options); - [Throws] - static boolean isStorageTypeSupported(StorageType type); - [Throws] - static void deletePreferences(Context context, String name, AsyncCallback_Void callback_); - [Throws] - static void deletePreferences(Context context, Options options, AsyncCallback_Void callback_); - [Throws] - static async void deletePreferences(Context context, String name); - [Throws] - static async void deletePreferences(Context context, Options options); - [Throws] - static void removePreferencesFromCache(Context context, String name, AsyncCallback_Void callback_); - [Throws] - static void removePreferencesFromCache(Context context, Options options, AsyncCallback_Void callback_); - [Throws] - static async void removePreferencesFromCache(Context context, String name); - [Throws] - static async void removePreferencesFromCache(Context context, Options options); - [Throws] - static void removePreferencesFromCacheSync(Context context, String name); - [Throws] - static void removePreferencesFromCacheSync(Context context, Options options); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.rdb.idl b/idl/@ohos.data.rdb.idl index dd87e41..afdc6a0 100644 --- a/idl/@ohos.data.rdb.idl +++ b/idl/@ohos.data.rdb.idl @@ -1,29 +1,33 @@ -package ohos.data; +package ohos.data.rdb; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import data.rdb.ResultSet as _ResultSet; -import application.Context as Context; +import data.rdb.resultSet.ResultSet as _ResultSet; +import application.BaseContext.default as Context; +[DefaultExport] namespace rdb { - [Async, Synthetic] callback AsyncCallback_RdbStore_Void = void (RdbStore result); + [Deprecated] + void getRdbStore(Context context, StoreConfig config, number version, AsyncCallback_RdbStore_Void callback_); + [Deprecated] + async RdbStore getRdbStore(Context context, StoreConfig config, number version); [Async, Synthetic] callback AsyncCallback_Void = void (); [Deprecated] + void deleteRdbStore(Context context, String name, AsyncCallback_Void callback_); + [Deprecated] + async void deleteRdbStore(Context context, String name); + [Deprecated] dictionary SyncMode { - [Deprecated] number SYNC_MODE_PUSH = 0; [Deprecated] number SYNC_MODE_PULL = 1; - }; [Deprecated] dictionary SubscribeType { - [Deprecated] number SUBSCRIBE_TYPE_REMOTE = 0; - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); @@ -33,10 +37,8 @@ namespace rdb { callback AsyncCallback_String_Void = void (String result); [Entity=Tuple, Synthetic] interface Tuple_String_Number { - attribute String value0; attribute number value1; - }; [Async, Synthetic] callback AsyncCallback_Array_Tuple_String_Number_Void = void (sequence result); @@ -44,7 +46,6 @@ namespace rdb { callback Callback_Array_String_Void = void (sequence parameter); [Entity=Interface, Deprecated] interface RdbStore { - [Deprecated] void insert(String table, ValuesBucket values, AsyncCallback_Number_Void callback_); [Deprecated] @@ -95,27 +96,22 @@ namespace rdb { void onDataChange(SubscribeType type, Callback_Array_String_Void observer); [Deprecated, DtsName="off", DtsTag="0|event|'dataChange'"] void offDataChange(SubscribeType type, Callback_Array_String_Void observer); - }; [Deprecated] typedef (number or String or boolean) ValueType; [Entity=Literal] interface ValuesBucket { - [IndexSignature] ((ValueType or buffer) or undefined) indexSignature(String key); - }; [Entity=Interface, Deprecated] interface StoreConfig { - [Deprecated] attribute String name; - }; [Entity=Class, Deprecated] interface RdbPredicates { - + [Deprecated] constructor(String name); [Deprecated] RdbPredicates inDevices(sequence devices); @@ -177,22 +173,7 @@ namespace rdb { RdbPredicates in(String field, sequence value); [Deprecated] RdbPredicates notIn(String field, sequence value); - }; [Deprecated] typedef _ResultSet ResultSet; - [GlobalScope] - interface GlobalScope_rdb_ohos_data_rdb { - - [Deprecated] - static void getRdbStore(Context context, StoreConfig config, number version, AsyncCallback_RdbStore_Void callback_); - [Deprecated] - static async RdbStore getRdbStore(Context context, StoreConfig config, number version); - [Deprecated] - static void deleteRdbStore(Context context, String name, AsyncCallback_Void callback_); - [Deprecated] - static async void deleteRdbStore(Context context, String name); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.relationalStore.idl b/idl/@ohos.data.relationalStore.idl index 38bb458..7bafd40 100644 --- a/idl/@ohos.data.relationalStore.idl +++ b/idl/@ohos.data.relationalStore.idl @@ -1,23 +1,21 @@ -package ohos.data; +package ohos.data.relationalStore; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; -import ohos.data.dataSharePredicates as dataSharePredicates; +import application.BaseContext.default as Context; +import ohos.data.dataSharePredicates.default as dataSharePredicates; +import ohos.data.sendableRelationalStore.default as sendableRelationalStore; +[DefaultExport] namespace relationalStore { - dictionary AssetStatus { - number ASSET_NORMAL = 0; number ASSET_INSERT = 1; number ASSET_UPDATE = 2; number ASSET_DELETE = 3; number ASSET_ABNORMAL = 4; number ASSET_DOWNLOADING = 5; - }; [Entity=Interface] interface Asset { - attribute String name; attribute String uri; attribute String path; @@ -26,17 +24,15 @@ namespace relationalStore { attribute String size; [Optional] attribute AssetStatus status; - }; typedef sequence Assets; typedef ((number or String or boolean or buffer or Asset or Assets or bigint) or undefined) ValueType; typedef record ValuesBucket; typedef (number or String) PRIKeyType; - typedef Date UTCTime; + typedef date UTCTime; typedef record ModifyTime; [Entity=Interface] interface StoreConfig { - attribute String name; attribute SecurityLevel securityLevel; [Optional] @@ -65,17 +61,17 @@ namespace relationalStore { attribute CryptoParam cryptoParam; [Optional] attribute Tokenizer tokenizer; - + [Optional] + attribute boolean persist; + [Optional] + attribute boolean enableSemanticIndex; }; dictionary HAMode { - number SINGLE = 0; number MAIN_REPLICA = 1; - }; [Entity=Interface] interface CryptoParam { - attribute buffer encryptionKey; [Optional] attribute number iterationCount; @@ -87,60 +83,44 @@ namespace relationalStore { attribute KdfAlgo kdfAlgo; [Optional] attribute number cryptoPageSize; - }; dictionary EncryptionAlgo { - number AES_256_GCM = 0; number AES_256_CBC = 1; - }; dictionary HmacAlgo { - number SHA1 = 0; number SHA256 = 1; number SHA512 = 2; - }; dictionary KdfAlgo { - number KDF_SHA1 = 0; number KDF_SHA256 = 1; number KDF_SHA512 = 2; - }; dictionary Tokenizer { - number NONE_TOKENIZER = 0; number ICU_TOKENIZER = 1; number CUSTOM_TOKENIZER = 2; - }; dictionary Progress { - number SYNC_BEGIN = 0; number SYNC_IN_PROGRESS = 1; number SYNC_FINISH = 2; - }; [Entity=Interface] interface Statistic { - attribute number total; attribute number successful; attribute number failed; attribute number remained; - }; [Entity=Interface] interface TableDetails { - attribute Statistic upload; attribute Statistic download; - }; dictionary ProgressCode { - number SUCCESS = 0; number UNKNOWN_ERROR = 1; number NETWORK_ERROR = 2; @@ -149,84 +129,75 @@ namespace relationalStore { number RECORD_LIMIT_EXCEEDED = 5; number NO_SPACE_FOR_ASSET = 6; number BLOCKED_BY_NETWORK_STRATEGY = 7; - }; [Entity=Interface] interface ProgressDetails { - attribute Progress schedule; attribute ProgressCode code; attribute record details; - }; [Entity=Interface] interface SqlExecutionInfo { - attribute sequence sql; attribute number totalTime; attribute number waitTime; attribute number prepareTime; attribute number executeTime; - + }; + [Entity=Interface] + interface ExceptionMessage { + attribute number code; + attribute String message; + attribute String sql; + }; + [Entity=Interface] + interface SqlInfo { + attribute String sql; + attribute sequence args; }; dictionary SecurityLevel { - number S1 = 1; number S2 = 2; number S3 = 3; number S4 = 4; - }; dictionary SyncMode { - number SYNC_MODE_PUSH = 0; number SYNC_MODE_PULL = 1; number SYNC_MODE_TIME_FIRST = 2; number SYNC_MODE_NATIVE_FIRST = 3; number SYNC_MODE_CLOUD_FIRST = 4; - }; dictionary SubscribeType { - number SUBSCRIBE_TYPE_REMOTE = 0; number SUBSCRIBE_TYPE_CLOUD = 1; number SUBSCRIBE_TYPE_CLOUD_DETAILS = 2; number SUBSCRIBE_TYPE_LOCAL_DETAILS = 3; - }; dictionary ChangeType { - number DATA_CHANGE = 0; number ASSET_CHANGE = 1; - }; [Entity=Interface] interface ChangeInfo { - attribute String table; attribute ChangeType type; attribute (sequence or sequence) inserted; attribute (sequence or sequence) updated; attribute (sequence or sequence) deleted; - }; dictionary DistributedType { - number DISTRIBUTED_DEVICE = 0; number DISTRIBUTED_CLOUD = 1; - }; [Entity=Interface] interface Reference { - attribute String sourceTable; attribute String targetTable; attribute record refFields; - }; [Entity=Interface] interface DistributedConfig { - attribute boolean autoSync; [Optional] attribute sequence references; @@ -234,27 +205,21 @@ namespace relationalStore { attribute boolean asyncDownloadAsset; [Optional] attribute boolean enableCloud; - }; dictionary ConflictResolution { - number ON_CONFLICT_NONE = 0; number ON_CONFLICT_ROLLBACK = 1; number ON_CONFLICT_ABORT = 2; number ON_CONFLICT_FAIL = 3; number ON_CONFLICT_IGNORE = 4; number ON_CONFLICT_REPLACE = 5; - }; dictionary Origin { - number LOCAL = 0; number CLOUD = 1; number REMOTE = 2; - }; dictionary Field { - String CURSOR_FIELD = "#_cursor"; String ORIGIN_FIELD = "#_origin"; String DELETED_FLAG_FIELD = "#_deleted_flag"; @@ -262,32 +227,35 @@ namespace relationalStore { String OWNER_FIELD = "#_cloud_owner"; String PRIVILEGE_FIELD = "#_cloud_privilege"; String SHARING_RESOURCE_FIELD = "#_sharing_resource_field"; - }; dictionary RebuildType { - number NONE = 0; number REBUILT = 1; number REPAIRED = 2; - }; dictionary TransactionType { - number DEFERRED = 0; number IMMEDIATE = 1; number EXCLUSIVE = 2; - }; [Entity=Interface] interface TransactionOptions { - [Optional] attribute TransactionType transactionType; - + }; + dictionary ColumnType { + number NULL = 0; + number INTEGER = 1; + number REAL = 2; + number TEXT = 3; + number BLOB = 4; + number ASSET = 5; + number ASSETS = 6; + number FLOAT_VECTOR = 7; + number UNLIMITED_INT = 8; }; [Entity=Class] interface RdbPredicates { - constructor(String name); [Throws] RdbPredicates inDevices(sequence devices); @@ -348,11 +316,11 @@ namespace relationalStore { RdbPredicates notContains(String field, String value); [Throws] RdbPredicates notLike(String field, String value); - + [Throws] + RdbPredicates having(String conditions, optional sequence args); }; [Entity=Interface] interface ResultSet { - attribute sequence columnNames; attribute number columnCount; attribute number rowCount; @@ -367,6 +335,10 @@ namespace relationalStore { [Throws] String getColumnName(number columnIndex); [Throws] + async ColumnType getColumnType((number or String) columnIdentifier); + [Throws] + ColumnType getColumnTypeSync((number or String) columnIdentifier); + [Throws] boolean goTo(number offset); [Throws] boolean goToRow(number position); @@ -404,7 +376,6 @@ namespace relationalStore { boolean isColumnNull(number columnIndex); [Throws] void close(); - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); @@ -418,10 +389,8 @@ namespace relationalStore { callback AsyncCallback_String_Void = void (String result); [Entity=Tuple, Synthetic] interface Tuple_String_Number { - attribute String value0; attribute number value1; - }; [Async, Synthetic] callback AsyncCallback_Array_Tuple_String_Number_Void = void (sequence result); @@ -435,9 +404,10 @@ namespace relationalStore { callback Callback_Void = void (); [Synthetic] callback Callback_SqlExecutionInfo_Void = void (SqlExecutionInfo parameter); + [Synthetic] + callback Callback_ExceptionMessage_Void = void (ExceptionMessage parameter); [Entity=Interface] interface RdbStore { - attribute number version; attribute RebuildType rebuilt; [Throws] @@ -459,6 +429,10 @@ namespace relationalStore { [Throws] number batchInsertSync(String table, sequence values); [Throws] + async number batchInsertWithConflictResolution(String table, sequence values, ConflictResolution conflict); + [Throws] + number batchInsertWithConflictResolutionSync(String table, sequence values, ConflictResolution conflict); + [Throws] void update(ValuesBucket values, RdbPredicates predicates, AsyncCallback_Number_Void callback_); [Throws] void update(ValuesBucket values, RdbPredicates predicates, ConflictResolution conflict, AsyncCallback_Number_Void callback_); @@ -467,22 +441,22 @@ namespace relationalStore { [Throws] async number update(ValuesBucket values, RdbPredicates predicates, ConflictResolution conflict); [Throws] - number updateSync(ValuesBucket values, RdbPredicates predicates, optional ConflictResolution conflict); - [Throws] void update(String table, ValuesBucket values, dataSharePredicates.DataSharePredicates predicates, AsyncCallback_Number_Void callback_); [Throws] async number update(String table, ValuesBucket values, dataSharePredicates.DataSharePredicates predicates); [Throws] + number updateSync(ValuesBucket values, RdbPredicates predicates, optional ConflictResolution conflict); + [Throws] void delete(RdbPredicates predicates, AsyncCallback_Number_Void callback_); [Throws] async number delete(RdbPredicates predicates); [Throws] - number deleteSync(RdbPredicates predicates); - [Throws] void delete(String table, dataSharePredicates.DataSharePredicates predicates, AsyncCallback_Number_Void callback_); [Throws] async number delete(String table, dataSharePredicates.DataSharePredicates predicates); [Throws] + number deleteSync(RdbPredicates predicates); + [Throws] void query(RdbPredicates predicates, AsyncCallback_ResultSet_Void callback_); [Throws] void query(RdbPredicates predicates, sequence columns, AsyncCallback_ResultSet_Void callback_); @@ -557,8 +531,6 @@ namespace relationalStore { [Throws] void setDistributedTables(sequence tables, AsyncCallback_Void callback_); [Throws] - async void setDistributedTables(sequence tables); - [Throws] void setDistributedTables(sequence tables, DistributedType type, AsyncCallback_Void callback_); [Throws] void setDistributedTables(sequence tables, DistributedType type, DistributedConfig config, AsyncCallback_Void callback_); @@ -589,8 +561,6 @@ namespace relationalStore { [Throws] async ResultSet remoteQuery(String device, String table, RdbPredicates predicates, sequence columns); [Throws, DtsName="on", DtsTag="0|event|'dataChange'"] - void onDataChange(SubscribeType type, Callback_Array_String_Void observer); - [Throws, DtsName="on", DtsTag="0|event|'dataChange'"] void onDataChange(SubscribeType type, (Callback_Array_String_Void or Callback_Array_ChangeInfo_Void) observer); [Throws] void on(String event, boolean interProcess, Callback_Void observer); @@ -598,8 +568,10 @@ namespace relationalStore { void onAutoSyncProgress(Callback_ProgressDetails_Void progress); [Throws, DtsName="on", DtsTag="0|event|'statistics'"] void onStatistics(Callback_SqlExecutionInfo_Void observer); - [Throws, DtsName="off", DtsTag="0|event|'dataChange'"] - void offDataChange(SubscribeType type, Callback_Array_String_Void observer); + [Throws, DtsName="on", DtsTag="0|event|'sqliteErrorOccurred'"] + void onSqliteErrorOccurred(Callback_ExceptionMessage_Void observer); + [Throws, DtsName="on", DtsTag="0|event|'perfStat'"] + void onPerfStat(Callback_SqlExecutionInfo_Void observer); [Throws, DtsName="off", DtsTag="0|event|'dataChange'"] void offDataChange(SubscribeType type, optional (Callback_Array_String_Void or Callback_Array_ChangeInfo_Void) observer); [Throws] @@ -608,6 +580,10 @@ namespace relationalStore { void offAutoSyncProgress(optional Callback_ProgressDetails_Void progress); [Throws, DtsName="off", DtsTag="0|event|'statistics'"] void offStatistics(optional Callback_SqlExecutionInfo_Void observer); + [Throws, DtsName="off", DtsTag="0|event|'sqliteErrorOccurred'"] + void offSqliteErrorOccurred(optional Callback_ExceptionMessage_Void observer); + [Throws, DtsName="off", DtsTag="0|event|'perfStat'"] + void offPerfStat(optional Callback_SqlExecutionInfo_Void observer); [Throws] void emit(String event); [Throws] @@ -630,11 +606,11 @@ namespace relationalStore { async void unlockCloudContainer(); [Throws] async Transaction createTransaction(optional TransactionOptions options); - + [Throws] + async void rekey(optional CryptoParam cryptoParam); }; [Entity=Interface] interface Transaction { - [Throws] async void commit(); [Throws] @@ -648,6 +624,10 @@ namespace relationalStore { [Throws] number batchInsertSync(String table, sequence values); [Throws] + async number batchInsertWithConflictResolution(String table, sequence values, ConflictResolution conflict); + [Throws] + number batchInsertWithConflictResolutionSync(String table, sequence values, ConflictResolution conflict); + [Throws] async number update(ValuesBucket values, RdbPredicates predicates, optional ConflictResolution conflict); [Throws] number updateSync(ValuesBucket values, RdbPredicates predicates, optional ConflictResolution conflict); @@ -667,29 +647,30 @@ namespace relationalStore { async ValueType execute(String sql, optional sequence args); [Throws] ValueType executeSync(String sql, optional sequence args); - }; [Async, Synthetic] callback AsyncCallback_RdbStore_Void = void (RdbStore result); - [GlobalScope] - interface GlobalScope_relationalStore_ohos_data_relationalStore { - - [Throws] - static void getRdbStore(Context context, StoreConfig config, AsyncCallback_RdbStore_Void callback_); - [Throws] - static async RdbStore getRdbStore(Context context, StoreConfig config); - [Throws] - static void deleteRdbStore(Context context, String name, AsyncCallback_Void callback_); - [Throws] - static void deleteRdbStore(Context context, StoreConfig config, AsyncCallback_Void callback_); - [Throws] - static async void deleteRdbStore(Context context, String name); - [Throws] - static async void deleteRdbStore(Context context, StoreConfig config); - static boolean isVectorSupported(); - [Throws] - static boolean isTokenizerSupported(Tokenizer tokenizer); - - }; - + [Throws] + void getRdbStore(Context context, StoreConfig config, AsyncCallback_RdbStore_Void callback_); + [Throws] + async RdbStore getRdbStore(Context context, StoreConfig config); + [Throws] + void deleteRdbStore(Context context, String name, AsyncCallback_Void callback_); + [Throws] + void deleteRdbStore(Context context, StoreConfig config, AsyncCallback_Void callback_); + [Throws] + async void deleteRdbStore(Context context, String name); + [Throws] + async void deleteRdbStore(Context context, StoreConfig config); + boolean isVectorSupported(); + [Throws] + boolean isTokenizerSupported(Tokenizer tokenizer); + [Throws] + SqlInfo getInsertSqlInfo(String table, ValuesBucket values, optional ConflictResolution conflict); + [Throws] + SqlInfo getUpdateSqlInfo(RdbPredicates predicates, ValuesBucket values, optional ConflictResolution conflict); + [Throws] + SqlInfo getDeleteSqlInfo(RdbPredicates predicates); + [Throws] + SqlInfo getQuerySqlInfo(RdbPredicates predicates, optional sequence columns); }; \ No newline at end of file diff --git a/idl/@ohos.data.storage.idl b/idl/@ohos.data.storage.idl index 8006a54..9131219 100644 --- a/idl/@ohos.data.storage.idl +++ b/idl/@ohos.data.storage.idl @@ -1,12 +1,30 @@ -package ohos.data; +package ohos.data.storage; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace storage { - + [Deprecated, Throws] + Storage getStorageSync(String path); [Async, Synthetic] callback AsyncCallback_Storage_Void = void (Storage result); + [Deprecated, Throws] + void getStorage(String path, AsyncCallback_Storage_Void callback_); + [Deprecated, Throws] + async Storage getStorage(String path); + [Deprecated, Throws] + void deleteStorageSync(String path); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated, Throws] + void deleteStorage(String path, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void deleteStorage(String path); + [Deprecated, Throws] + void removeStorageFromCacheSync(String path); + [Deprecated, Throws] + void removeStorageFromCache(String path, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void removeStorageFromCache(String path); [Async, Synthetic] callback AsyncCallback_ValueType_Void = void (ValueType result); [Async, Synthetic] @@ -15,7 +33,6 @@ namespace storage { callback Callback_StorageObserver_Void = void (StorageObserver parameter); [Entity=Interface, Deprecated] interface Storage { - [Deprecated, Throws] ValueType getSync(String key, ValueType defValue); [Deprecated, Throws] @@ -56,39 +73,12 @@ namespace storage { void onChange(Callback_StorageObserver_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'change'"] void offChange(Callback_StorageObserver_Void callback_); - }; [Deprecated] typedef (number or String or boolean) ValueType; [Entity=Interface, Deprecated] interface StorageObserver { - [Deprecated] attribute String key; - }; - [GlobalScope] - interface GlobalScope_storage_ohos_data_storage { - - [Deprecated, Throws] - static Storage getStorageSync(String path); - [Deprecated, Throws] - static void getStorage(String path, AsyncCallback_Storage_Void callback_); - [Deprecated, Throws] - static async Storage getStorage(String path); - [Deprecated, Throws] - static void deleteStorageSync(String path); - [Deprecated, Throws] - static void deleteStorage(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void deleteStorage(String path); - [Deprecated, Throws] - static void removeStorageFromCacheSync(String path); - [Deprecated, Throws] - static void removeStorageFromCache(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void removeStorageFromCache(String path); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.unifiedDataChannel.idl b/idl/@ohos.data.unifiedDataChannel.idl index 6e36f24..085875f 100644 --- a/idl/@ohos.data.unifiedDataChannel.idl +++ b/idl/@ohos.data.unifiedDataChannel.idl @@ -1,35 +1,30 @@ -package ohos.data; +package ohos.data.unifiedDataChannel; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimedia.image as image; -import ohos.app.ability.Want as Want; +import ohos.multimedia.image.default as image; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace unifiedDataChannel { - dictionary ShareOptions { - number IN_APP = 0; number CROSS_APP = 1; - }; callback GetDelayData = UnifiedData (String type); typedef ((number or String or boolean or image.PixelMap or Want or buffer or Object) or undefined) ValueType; [Entity=Class] interface UnifiedDataProperties { - [Optional] attribute record extras; [Optional] attribute String tag; [Optional] - readonly attribute Date timestamp; + readonly attribute date timestamp; [Optional] attribute ShareOptions shareOptions; [Optional] attribute GetDelayData getDelayData; - }; [Entity=Class] interface UnifiedData { - constructor(UnifiedRecord record_); constructor(); attribute UnifiedDataProperties properties; @@ -39,18 +34,14 @@ namespace unifiedDataChannel { [Throws] boolean hasType(String type); sequence getTypes(); - }; [Entity=Class] interface Summary { - attribute record summary; attribute number totalSize; - }; [Entity=Class] interface UnifiedRecord { - constructor(); constructor(String type, ValueType value); String getType(); @@ -61,141 +52,112 @@ namespace unifiedDataChannel { [Throws] ValueType getEntry(String type); record getEntries(); - }; [Entity=Class] - interface Text: UnifiedRecord { - + interface Text: [Extends] UnifiedRecord { [Optional] attribute record details; - }; [Entity=Class] - interface PlainText: Text { - + interface PlainText: [Extends] Text { attribute String textContent; [Optional] attribute String abstract; - }; [Entity=Class] - interface Hyperlink: Text { - + interface Hyperlink: [Extends] Text { attribute String url; [Optional] attribute String description; - }; [Entity=Class] - interface HTML: Text { - + interface HTML: [Extends] Text { attribute String htmlContent; [Optional] attribute String plainContent; - }; [Entity=Class] - interface File: UnifiedRecord { - + interface File: [Extends] UnifiedRecord { [Optional] attribute record details; attribute String uri; - }; [Entity=Class] - interface Image: File { - + interface Image: [Extends] File { attribute String imageUri; - }; [Entity=Class] - interface Video: File { - + interface Video: [Extends] File { attribute String videoUri; - }; [Entity=Class] - interface Audio: File { - + interface Audio: [Extends] File { attribute String audioUri; - }; [Entity=Class] - interface Folder: File { - + interface Folder: [Extends] File { attribute String folderUri; - }; [Entity=Class] - interface SystemDefinedRecord: UnifiedRecord { - + interface SystemDefinedRecord: [Extends] UnifiedRecord { [Optional] attribute record details; - }; [Entity=Class] - interface SystemDefinedForm: SystemDefinedRecord { - + interface SystemDefinedForm: [Extends] SystemDefinedRecord { attribute number formId; attribute String formName; attribute String bundleName; attribute String abilityName; attribute String module; - }; [Entity=Class] - interface SystemDefinedAppItem: SystemDefinedRecord { - + interface SystemDefinedAppItem: [Extends] SystemDefinedRecord { attribute String appId; attribute String appName; attribute String appIconId; attribute String appLabelId; attribute String bundleName; attribute String abilityName; - }; [Entity=Class] - interface SystemDefinedPixelMap: SystemDefinedRecord { - + interface SystemDefinedPixelMap: [Extends] SystemDefinedRecord { attribute buffer rawData; - }; [Entity=Class] - interface ApplicationDefinedRecord: UnifiedRecord { - + interface ApplicationDefinedRecord: [Extends] UnifiedRecord { attribute String applicationDefinedType; attribute buffer rawData; - }; dictionary Intention { - String DATA_HUB = "DataHub"; String DRAG = "Drag"; - + String SYSTEM_SHARE = "SystemShare"; + String PICKER = "Picker"; + String MENU = "Menu"; }; - [Entity=Literal] + dictionary Visibility { + number ALL = 0; + number OWN_PROCESS = 1; + }; + [Entity=Interface] interface Options { - [Optional] attribute Intention intention; [Optional] attribute String key; - + [Optional] + attribute Visibility visibility; }; dictionary FileConflictOptions { - number OVERWRITE = 0; number SKIP = 1; - }; dictionary ProgressIndicator { - number NONE = 0; number DEFAULT = 1; - }; dictionary ListenerStatus { - number FINISHED = 0; number PROCESSING = 1; number CANCELED = 2; @@ -204,57 +166,63 @@ namespace unifiedDataChannel { number DATA_NOT_FOUND = 202; number SYNC_FAILED = 203; number COPY_FILE_FAILED = 204; - }; [Entity=Interface] interface ProgressInfo { - attribute number progress; attribute ListenerStatus status; - }; callback DataProgressListener = void (ProgressInfo progressInfo, (UnifiedData or undefined) data); [Entity=Interface] interface GetDataParams { - attribute ProgressIndicator progressIndicator; attribute DataProgressListener dataProgressListener; [Optional] attribute String destUri; [Optional] attribute FileConflictOptions fileConflictOptions; - + [Optional] + attribute DataLoadInfo acceptableInfo; + }; + [Entity=Interface] + interface DataLoadInfo { + [Optional] + attribute sequence types; + [Optional] + attribute number recordCount; + }; + callback DataLoadHandler = (UnifiedData or undefined) (optional DataLoadInfo acceptableInfo); + [Entity=Interface] + interface DataLoadParams { + attribute DataLoadHandler loadHandler; + attribute DataLoadInfo dataLoadInfo; }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void insertData(Options options, UnifiedData data, AsyncCallback_String_Void callback_); + [Throws] + async String insertData(Options options, UnifiedData data); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void updateData(Options options, UnifiedData data, AsyncCallback_Void callback_); + [Throws] + async void updateData(Options options, UnifiedData data); [Async, Synthetic] callback AsyncCallback_Array_UnifiedData_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_unifiedDataChannel_ohos_data_unifiedDataChannel { - - [Throws] - static void insertData(Options options, UnifiedData data, AsyncCallback_String_Void callback_); - [Throws] - static async String insertData(Options options, UnifiedData data); - [Throws] - static void updateData(Options options, UnifiedData data, AsyncCallback_Void callback_); - [Throws] - static async void updateData(Options options, UnifiedData data); - [Throws] - static void queryData(Options options, AsyncCallback_Array_UnifiedData_Void callback_); - [Throws] - static async sequence queryData(Options options); - [Throws] - static void deleteData(Options options, AsyncCallback_Array_UnifiedData_Void callback_); - [Throws] - static async sequence deleteData(Options options); - [Throws] - static void setAppShareOptions(Intention intention, ShareOptions shareOptions); - [Throws] - static void removeAppShareOptions(Intention intention); - - }; - + [Throws] + void queryData(Options options, AsyncCallback_Array_UnifiedData_Void callback_); + [Throws] + async sequence queryData(Options options); + [Throws] + void deleteData(Options options, AsyncCallback_Array_UnifiedData_Void callback_); + [Throws] + async sequence deleteData(Options options); + [Throws] + void setAppShareOptions(Intention intention, ShareOptions shareOptions); + [Throws] + void removeAppShareOptions(Intention intention); + [Throws] + void convertRecordsToEntries(UnifiedData data); }; \ No newline at end of file diff --git a/idl/@ohos.data.uniformDataStruct.idl b/idl/@ohos.data.uniformDataStruct.idl index 3fe4cca..ab23e22 100644 --- a/idl/@ohos.data.uniformDataStruct.idl +++ b/idl/@ohos.data.uniformDataStruct.idl @@ -1,43 +1,36 @@ -package ohos.data; -import ohos.multimedia.image as image; +package ohos.data.uniformDataStruct; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace uniformDataStruct { - [Entity=Interface] interface PlainText { - readonly attribute String uniformDataType; attribute String textContent; [Optional] attribute String abstract; [Optional] attribute record details; - }; [Entity=Interface] interface Hyperlink { - readonly attribute String uniformDataType; attribute String url; [Optional] attribute String description; [Optional] attribute record details; - }; [Entity=Interface] interface HTML { - readonly attribute String uniformDataType; attribute String htmlContent; [Optional] attribute String plainContent; [Optional] attribute record details; - }; [Entity=Interface] interface OpenHarmonyAppItem { - readonly attribute String uniformDataType; attribute String appId; attribute String appName; @@ -47,11 +40,9 @@ namespace uniformDataStruct { attribute String abilityName; [Optional] attribute record details; - }; [Entity=Interface] interface ContentForm { - readonly attribute String uniformDataType; [Optional] attribute buffer thumbData; @@ -64,11 +55,9 @@ namespace uniformDataStruct { attribute String appName; [Optional] attribute String linkUri; - }; [Entity=Interface] interface Form { - readonly attribute String uniformDataType; attribute number formId; attribute String formName; @@ -77,26 +66,20 @@ namespace uniformDataStruct { attribute String module; [Optional] attribute record details; - }; [Entity=Interface] interface FileUri { - readonly attribute String uniformDataType; attribute String oriUri; attribute String fileType; [Optional] attribute record details; - }; [Entity=Interface] interface PixelMap { - readonly attribute String uniformDataType; attribute image.PixelMap pixelMap; [Optional] attribute record details; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.data.uniformTypeDescriptor.idl b/idl/@ohos.data.uniformTypeDescriptor.idl index 9542a19..2aebd4a 100644 --- a/idl/@ohos.data.uniformTypeDescriptor.idl +++ b/idl/@ohos.data.uniformTypeDescriptor.idl @@ -1,8 +1,7 @@ -package ohos.data; +package ohos.data.uniformTypeDescriptor; +[DefaultExport] namespace uniformTypeDescriptor { - dictionary UniformDataType { - String ENTITY = "general.entity"; String OBJECT = "general.object"; String COMPOSITE_OBJECT = "general.composite-object"; @@ -180,11 +179,9 @@ namespace uniformTypeDescriptor { String OCTET_STREAM = "general.octet-stream"; String FILE_URI = "general.file-uri"; String CONTENT_FORM = "general.content-form"; - }; [Entity=Class] interface TypeDescriptor { - readonly attribute String typeId; readonly attribute sequence belongingToTypes; readonly attribute String description; @@ -200,22 +197,15 @@ namespace uniformTypeDescriptor { boolean isHigherLevelType(String type); [Throws] boolean equals(TypeDescriptor typeDescriptor); - }; - [GlobalScope] - interface GlobalScope_uniformTypeDescriptor_ohos_data_uniformTypeDescriptor { - - [Throws] - static TypeDescriptor getTypeDescriptor(String typeId); - [Throws] - static String getUniformDataTypeByFilenameExtension(String filenameExtension, optional String belongsTo); - [Throws] - static String getUniformDataTypeByMIMEType(String mimeType, optional String belongsTo); - [Throws] - static sequence getUniformDataTypesByFilenameExtension(String filenameExtension, optional String belongsTo); - [Throws] - static sequence getUniformDataTypesByMIMEType(String mimeType, optional String belongsTo); - - }; - + [Throws] + TypeDescriptor getTypeDescriptor(String typeId); + [Throws] + String getUniformDataTypeByFilenameExtension(String filenameExtension, optional String belongsTo); + [Throws] + String getUniformDataTypeByMIMEType(String mimeType, optional String belongsTo); + [Throws] + sequence getUniformDataTypesByFilenameExtension(String filenameExtension, optional String belongsTo); + [Throws] + sequence getUniformDataTypesByMIMEType(String mimeType, optional String belongsTo); }; \ No newline at end of file diff --git a/idl/@ohos.deviceAttest.idl b/idl/@ohos.deviceAttest.idl index 1539c2c..b0e2a37 100644 --- a/idl/@ohos.deviceAttest.idl +++ b/idl/@ohos.deviceAttest.idl @@ -1,29 +1,21 @@ -package ohos; +package ohos.deviceAttest; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace deviceAttest { - [Async, Synthetic] callback AsyncCallback_AttestResultInfo_Void = void (AttestResultInfo result); + [Throws] + void getAttestStatus(AsyncCallback_AttestResultInfo_Void callback_); + [Throws] + async AttestResultInfo getAttestStatus(); + [Throws] + AttestResultInfo getAttestStatusSync(); [Entity=Interface] interface AttestResultInfo { - attribute number authResult; attribute number softwareResult; attribute sequence softwareResultDetail; attribute String ticket; - }; - [GlobalScope] - interface GlobalScope_deviceAttest_ohos_deviceAttest { - - [Throws] - static void getAttestStatus(AsyncCallback_AttestResultInfo_Void callback_); - [Throws] - static async AttestResultInfo getAttestStatus(); - [Throws] - static AttestResultInfo getAttestStatusSync(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.deviceInfo.idl b/idl/@ohos.deviceInfo.idl index 4a5c958..2488415 100644 --- a/idl/@ohos.deviceInfo.idl +++ b/idl/@ohos.deviceInfo.idl @@ -1,5 +1,18 @@ -package ohos; +package ohos.deviceInfo; +[DefaultExport] namespace deviceInfo { - - + dictionary DeviceTypes { + String TYPE_DEFAULT = "default"; + String TYPE_PHONE = "phone"; + String TYPE_TABLET = "tablet"; + String TYPE_2IN1 = "2in1"; + String TYPE_TV = "tv"; + String TYPE_WEARABLE = "wearable"; + String TYPE_CAR = "car"; + }; + dictionary PerformanceClassLevel { + number CLASS_LEVEL_HIGH = 0; + number CLASS_LEVEL_MEDIUM = 1; + number CLASS_LEVEL_LOW = 2; + }; }; \ No newline at end of file diff --git a/idl/@ohos.deviceStatus.dragInteraction.idl b/idl/@ohos.deviceStatus.dragInteraction.idl index cceeb32..0ada7ac 100644 --- a/idl/@ohos.deviceStatus.dragInteraction.idl +++ b/idl/@ohos.deviceStatus.dragInteraction.idl @@ -1,37 +1,27 @@ -package ohos.deviceStatus; +package ohos.deviceStatus.dragInteraction; import ohos.base.Callback as Callback; +[DefaultExport] namespace dragInteraction { - dictionary DragState { - number MSG_DRAG_STATE_START = 1; number MSG_DRAG_STATE_STOP = 2; number MSG_DRAG_STATE_CANCEL = 3; - }; [Entity=Interface] interface Summary { - attribute String dataType; attribute number dataSize; - }; [Synthetic] callback Callback_DragState_Void = void (DragState parameter); - [GlobalScope] - interface GlobalScope_dragInteraction_ohos_deviceStatus_dragInteraction { - - [Throws, DtsName="on", DtsTag="'drag'"] - static void onDrag(Callback_DragState_Void callback_); - [Throws, DtsName="off", DtsTag="'drag'"] - static void offDrag(optional Callback_DragState_Void callback_); - [Throws] - static sequence getDataSummary(); - [Throws] - static void setDragSwitchState(boolean enabled); - [Throws] - static void setAppDragSwitchState(boolean enabled, String bundleName); - - }; - + [Throws, DtsName="on", DtsTag="'drag'"] + void onDrag(Callback_DragState_Void callback_); + [Throws, DtsName="off", DtsTag="'drag'"] + void offDrag(optional Callback_DragState_Void callback_); + [Throws] + sequence getDataSummary(); + [Throws] + void setDragSwitchState(boolean enabled); + [Throws] + void setAppDragSwitchState(boolean enabled, String bundleName); }; \ No newline at end of file diff --git a/idl/@ohos.display.idl b/idl/@ohos.display.idl index a470d93..bf144eb 100644 --- a/idl/@ohos.display.idl +++ b/idl/@ohos.display.idl @@ -1,26 +1,111 @@ -package ohos; +package ohos.display; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.graphics.colorSpaceManager as colorSpaceManager; -import ohos.graphics.hdrCapability as hdrCapability; +import ohos.graphics.colorSpaceManager.default as colorSpaceManager; +import ohos.graphics.hdrCapability.default as hdrCapability; +[DefaultExport] namespace display { - [Async, Synthetic] callback AsyncCallback_Display_Void = void (Display result); + [Deprecated] + void getDefaultDisplay(AsyncCallback_Display_Void callback_); + [Deprecated] + async Display getDefaultDisplay(); + [Throws] + Display getDefaultDisplaySync(); + [Throws] + Display getPrimaryDisplaySync(); + [Throws] + Display getDisplayByIdSync(number displayId); [Async, Synthetic] callback AsyncCallback_Array_Display_Void = void (sequence result); + [Deprecated] + void getAllDisplay(AsyncCallback_Array_Display_Void callback_); + [Deprecated] + async sequence getAllDisplay(); + [Throws] + void getAllDisplays(AsyncCallback_Array_Display_Void callback_); + [Throws] + async sequence getAllDisplays(); + [Throws] + async sequence getAllDisplayPhysicalResolution(); + [Throws] + boolean hasPrivateWindow(number displayId); [Synthetic] callback Callback_Number_Void = void (number parameter); + [Throws] + void on(String type, Callback_Number_Void callback_); + [Throws] + void off(String type, optional Callback_Number_Void callback_); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="on", DtsTag="'privateModeChange'"] + void onPrivateModeChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'privateModeChange'"] + void offPrivateModeChange(optional Callback_Boolean_Void callback_); + [Throws] + boolean isFoldable(); + [Throws] + FoldStatus getFoldStatus(); [Synthetic] callback Callback_FoldStatus_Void = void (FoldStatus parameter); + [Throws, DtsName="on", DtsTag="'foldStatusChange'"] + void onFoldStatusChange(Callback_FoldStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'foldStatusChange'"] + void offFoldStatusChange(optional Callback_FoldStatus_Void callback_); [Synthetic] callback Callback_Array_Number_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'foldAngleChange'"] + void onFoldAngleChange(Callback_Array_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'foldAngleChange'"] + void offFoldAngleChange(optional Callback_Array_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'captureStatusChange'"] + void onCaptureStatusChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'captureStatusChange'"] + void offCaptureStatusChange(optional Callback_Boolean_Void callback_); + [Throws] + boolean isCaptured(); + [Throws] + FoldDisplayMode getFoldDisplayMode(); + [Throws] + void setFoldDisplayMode(FoldDisplayMode mode); + [Throws] + void setFoldDisplayMode(FoldDisplayMode mode, String reason); [Synthetic] callback Callback_FoldDisplayMode_Void = void (FoldDisplayMode parameter); + [Throws, DtsName="on", DtsTag="'foldDisplayModeChange'"] + void onFoldDisplayModeChange(Callback_FoldDisplayMode_Void callback_); + [Throws, DtsName="off", DtsTag="'foldDisplayModeChange'"] + void offFoldDisplayModeChange(optional Callback_FoldDisplayMode_Void callback_); + [Throws] + FoldCreaseRegion getCurrentFoldCreaseRegion(); + [Throws] + void setFoldStatusLocked(boolean locked); + [Throws] + async number createVirtualScreen(VirtualScreenConfig config); + [Throws] + async void destroyVirtualScreen(number screenId); + [Throws] + async void setVirtualScreenSurface(number screenId, String surfaceId); + [Throws] + async void makeUnique(number screenId); + [Throws] + async void addVirtualScreenBlocklist(sequence windowIds); + [Throws] + async void removeVirtualScreenBlocklist(sequence windowIds); + [Throws] + RelativePosition convertGlobalToRelativeCoordinate(Position position, optional number displayId); + [Throws] + Position convertRelativeToGlobalCoordinate(RelativePosition relativePosition); + [Entity=Interface] + interface VirtualScreenConfig { + attribute String name; + attribute number width; + attribute number height; + attribute number density; + attribute String surfaceId; + }; dictionary FoldStatus { - number FOLD_STATUS_UNKNOWN = 0; number FOLD_STATUS_EXPANDED = 1; number FOLD_STATUS_FOLDED = 2; @@ -31,19 +116,15 @@ namespace display { number FOLD_STATUS_FOLDED_WITH_SECOND_HALF_FOLDED = 22; number FOLD_STATUS_HALF_FOLDED_WITH_SECOND_EXPANDED = 13; number FOLD_STATUS_HALF_FOLDED_WITH_SECOND_HALF_FOLDED = 23; - }; dictionary FoldDisplayMode { - number FOLD_DISPLAY_MODE_UNKNOWN = 0; number FOLD_DISPLAY_MODE_FULL = 1; number FOLD_DISPLAY_MODE_MAIN = 2; number FOLD_DISPLAY_MODE_SUB = 3; number FOLD_DISPLAY_MODE_COORDINATION = 4; - }; dictionary DisplayState { - number STATE_UNKNOWN = 0; number STATE_OFF = 1; number STATE_ON = 2; @@ -51,55 +132,53 @@ namespace display { number STATE_DOZE_SUSPEND = 4; number STATE_VR = 5; number STATE_ON_SUSPEND = 6; - }; dictionary Orientation { - number PORTRAIT = 0; number LANDSCAPE = 1; number PORTRAIT_INVERTED = 2; number LANDSCAPE_INVERTED = 3; - + }; + dictionary DisplaySourceMode { + number NONE = 0; + number MAIN = 1; + number MIRROR = 2; + number EXTEND = 3; + number ALONE = 4; + }; + dictionary ScreenShape { + number RECTANGLE = 0; + number ROUND = 1; }; [Entity=Interface] interface FoldCreaseRegion { - readonly attribute number displayId; readonly attribute sequence creaseRects; - }; [Entity=Interface] interface Rect { - attribute number left; attribute number top; attribute number width; attribute number height; - }; [Entity=Interface] interface WaterfallDisplayAreaRects { - readonly attribute Rect left; readonly attribute Rect right; readonly attribute Rect top; readonly attribute Rect bottom; - }; [Entity=Interface] interface CutoutInfo { - readonly attribute sequence boundingRects; readonly attribute WaterfallDisplayAreaRects waterfallDisplayAreaRects; - }; [Entity=Interface] interface DisplayPhysicalResolution { - attribute FoldDisplayMode foldDisplayMode; attribute number physicalWidth; attribute number physicalHeight; - }; [Async, Synthetic] callback AsyncCallback_CutoutInfo_Void = void (CutoutInfo result); @@ -109,7 +188,6 @@ namespace display { callback Callback_Rect_Void = void (Rect parameter); [Entity=Interface] interface Display { - attribute number id; attribute String name; attribute boolean alive; @@ -126,8 +204,18 @@ namespace display { attribute number scaledDensity; attribute number xDPI; attribute number yDPI; + [Optional] + attribute ScreenShape screenShape; attribute sequence colorSpaces; attribute sequence hdrFormats; + [Optional] + attribute DisplaySourceMode sourceMode; + [Optional] + attribute number x; + [Optional] + attribute number y; + [Optional] + attribute sequence supportedRefreshRates; [Throws] void getCutoutInfo(AsyncCallback_CutoutInfo_Void callback_); [Throws] @@ -138,76 +226,23 @@ namespace display { async boolean hasImmersiveWindow(); [Throws] async Rect getAvailableArea(); + [Throws] + FoldCreaseRegion getLiveCreaseRegion(); [Throws, DtsName="on", DtsTag="'availableAreaChange'"] void onAvailableAreaChange(Callback_Rect_Void callback_); [Throws, DtsName="off", DtsTag="'availableAreaChange'"] void offAvailableAreaChange(optional Callback_Rect_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_display_ohos_display { - - [Deprecated] - static void getDefaultDisplay(AsyncCallback_Display_Void callback_); - [Deprecated] - static async Display getDefaultDisplay(); - [Throws] - static Display getDefaultDisplaySync(); - [Throws] - static Display getPrimaryDisplaySync(); - [Throws] - static Display getDisplayByIdSync(number displayId); - [Deprecated] - static void getAllDisplay(AsyncCallback_Array_Display_Void callback_); - [Deprecated] - static async sequence getAllDisplay(); - [Throws] - static void getAllDisplays(AsyncCallback_Array_Display_Void callback_); - [Throws] - static async sequence getAllDisplays(); [Throws] - static async sequence getAllDisplayPhysicalResolution(); - [Throws] - static boolean hasPrivateWindow(number displayId); - [Throws] - static void on(String type, Callback_Number_Void callback_); - [Throws] - static void off(String type, optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'privateModeChange'"] - static void onPrivateModeChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'privateModeChange'"] - static void offPrivateModeChange(optional Callback_Boolean_Void callback_); - [Throws] - static boolean isFoldable(); - [Throws] - static FoldStatus getFoldStatus(); - [Throws, DtsName="on", DtsTag="'foldStatusChange'"] - static void onFoldStatusChange(Callback_FoldStatus_Void callback_); - [Throws, DtsName="off", DtsTag="'foldStatusChange'"] - static void offFoldStatusChange(optional Callback_FoldStatus_Void callback_); - [Throws, DtsName="on", DtsTag="'foldAngleChange'"] - static void onFoldAngleChange(Callback_Array_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'foldAngleChange'"] - static void offFoldAngleChange(optional Callback_Array_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'captureStatusChange'"] - static void onCaptureStatusChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'captureStatusChange'"] - static void offCaptureStatusChange(optional Callback_Boolean_Void callback_); - [Throws] - static boolean isCaptured(); - [Throws] - static FoldDisplayMode getFoldDisplayMode(); - [Throws] - static void setFoldDisplayMode(FoldDisplayMode mode); - [Throws, DtsName="on", DtsTag="'foldDisplayModeChange'"] - static void onFoldDisplayModeChange(Callback_FoldDisplayMode_Void callback_); - [Throws, DtsName="off", DtsTag="'foldDisplayModeChange'"] - static void offFoldDisplayModeChange(optional Callback_FoldDisplayMode_Void callback_); - [Throws] - static FoldCreaseRegion getCurrentFoldCreaseRegion(); - [Throws] - static void setFoldStatusLocked(boolean locked); - + String getDisplayCapability(); + }; + [Entity=Interface] + interface Position { + attribute number x; + attribute number y; + }; + [Entity=Interface] + interface RelativePosition { + attribute number displayId; + attribute Position position; }; - }; \ No newline at end of file diff --git a/idl/@ohos.distributedBundle.idl b/idl/@ohos.distributedBundle.idl index d9aeeb6..eb7e0fc 100644 --- a/idl/@ohos.distributedBundle.idl +++ b/idl/@ohos.distributedBundle.idl @@ -1,25 +1,19 @@ -package ohos; +package ohos.distributedBundle; import ohos.base.AsyncCallback as AsyncCallback; -import bundle.ElementName as ElementName; -import bundle.RemoteAbilityInfo as RemoteAbilityInfo; +import bundle.elementName.ElementName as ElementName; +import bundle.remoteAbilityInfo.RemoteAbilityInfo as RemoteAbilityInfo; +[DefaultExport] namespace distributedBundle { - [Async, Synthetic] callback AsyncCallback_RemoteAbilityInfo_Void = void (RemoteAbilityInfo result); + [Deprecated] + void getRemoteAbilityInfo(ElementName elementName, AsyncCallback_RemoteAbilityInfo_Void callback_); + [Deprecated] + async RemoteAbilityInfo getRemoteAbilityInfo(ElementName elementName); [Async, Synthetic] callback AsyncCallback_Array_RemoteAbilityInfo_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_distributedBundle_ohos_distributedBundle { - - [Deprecated] - static void getRemoteAbilityInfo(ElementName elementName, AsyncCallback_RemoteAbilityInfo_Void callback_); - [Deprecated] - static async RemoteAbilityInfo getRemoteAbilityInfo(ElementName elementName); - [Deprecated] - static void getRemoteAbilityInfos(sequence elementNames, AsyncCallback_Array_RemoteAbilityInfo_Void callback_); - [Deprecated] - static async sequence getRemoteAbilityInfos(sequence elementNames); - - }; - + [Deprecated] + void getRemoteAbilityInfos(sequence elementNames, AsyncCallback_Array_RemoteAbilityInfo_Void callback_); + [Deprecated] + async sequence getRemoteAbilityInfos(sequence elementNames); }; \ No newline at end of file diff --git a/idl/@ohos.distributedDeviceManager.idl b/idl/@ohos.distributedDeviceManager.idl index a6053df..e6cd2a2 100644 --- a/idl/@ohos.distributedDeviceManager.idl +++ b/idl/@ohos.distributedDeviceManager.idl @@ -1,48 +1,37 @@ -package ohos; +package ohos.distributedDeviceManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace distributedDeviceManager { - [Entity=Interface] interface DeviceBasicInfo { - attribute String deviceId; attribute String deviceName; attribute String deviceType; [Optional] attribute String networkId; - [Optional] - attribute String extraData; - }; dictionary DeviceStateChange { - number UNKNOWN = 0; number AVAILABLE = 1; number UNAVAILABLE = 2; - }; [Entity=Interface] interface DeviceProfileInfoFilterOptions { - attribute boolean isCloud; [Optional] attribute sequence deviceIdList; - }; [Entity=Interface] interface ServiceProfileInfo { - attribute String deviceId; attribute String serviceId; attribute String serviceType; [Optional] attribute String data; - }; [Entity=Interface] interface DeviceProfileInfo { - attribute String deviceId; attribute String deviceSn; attribute String mac; @@ -70,21 +59,23 @@ namespace distributedDeviceManager { attribute boolean isLocalDevice; [Optional] attribute sequence services; - + [Optional] + attribute String productName; + [Optional] + attribute String internalModel; }; [Entity=Interface] interface DeviceIconInfoFilterOptions { - attribute String productId; [Optional] attribute String subProductId; attribute String imageType; attribute String specName; - + [Optional] + attribute String internalModel; }; [Entity=Interface] interface DeviceIconInfo { - attribute String productId; [Optional] attribute String subProductId; @@ -92,61 +83,57 @@ namespace distributedDeviceManager { attribute String specName; attribute String url; attribute buffer icon; - + [Optional] + attribute String internalModel; }; dictionary StrategyForHeartbeat { - number TEMP_STOP_HEARTBEAT = 100; number START_HEARTBEAT = 101; - }; + [Entity=Interface] + interface NetworkIdQueryFilter { + attribute String wiseDeviceId; + attribute number onlineStatus; + }; + [Throws] + DeviceManager createDeviceManager(String bundleName); + [Throws] + void releaseDeviceManager(DeviceManager deviceManager); [Async, Synthetic] callback AsyncCallback_Array_DeviceBasicInfo_Void = void (sequence result); [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] Object indexSignature(String key); - }; [Entity=Literal, Synthetic] interface Literal_String_deviceId { - attribute String deviceId; - }; [Async, Synthetic] callback AsyncCallback_Literal_String_deviceId_Void = void (Literal_String_deviceId result); [Entity=Literal, Synthetic] interface Literal_DeviceStateChange_action_DeviceBasicInfo_device { - attribute DeviceStateChange action; attribute DeviceBasicInfo device; - }; [Synthetic] callback Callback_Literal_DeviceStateChange_action_DeviceBasicInfo_device_Void = void (Literal_DeviceStateChange_action_DeviceBasicInfo_device parameter); [Entity=Literal, Synthetic] interface Literal_DeviceBasicInfo_device { - attribute DeviceBasicInfo device; - }; [Synthetic] callback Callback_Literal_DeviceBasicInfo_device_Void = void (Literal_DeviceBasicInfo_device parameter); [Entity=Literal, Synthetic] interface Literal_String_deviceName { - attribute String deviceName; - }; [Synthetic] callback Callback_Literal_String_deviceName_Void = void (Literal_String_deviceName parameter); [Entity=Literal, Synthetic] interface Literal_Number_reason { - attribute number reason; - }; [Synthetic] callback Callback_Literal_Number_reason_Void = void (Literal_Number_reason parameter); @@ -154,15 +141,12 @@ namespace distributedDeviceManager { callback Callback_Literal_Empty_Void = void (Literal_Empty parameter); [Entity=Literal, Synthetic] interface Literal_String_param { - attribute String param; - }; [Synthetic] callback Callback_Literal_String_param_Void = void (Literal_String_param parameter); [Entity=Interface] interface DeviceManager { - [Throws] sequence getAvailableDeviceListSync(); [Throws] @@ -193,26 +177,26 @@ namespace distributedDeviceManager { void replyUiAction(number action, String actionResult); [Throws, DtsName="on", DtsTag="'deviceStateChange'"] void onDeviceStateChange(Callback_Literal_DeviceStateChange_action_DeviceBasicInfo_device_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceStateChange'"] - void offDeviceStateChange(optional Callback_Literal_DeviceStateChange_action_DeviceBasicInfo_device_Void callback_); [Throws, DtsName="on", DtsTag="'discoverSuccess'"] void onDiscoverSuccess(Callback_Literal_DeviceBasicInfo_device_Void callback_); - [Throws, DtsName="off", DtsTag="'discoverSuccess'"] - void offDiscoverSuccess(optional Callback_Literal_DeviceBasicInfo_device_Void callback_); [Throws, DtsName="on", DtsTag="'deviceNameChange'"] void onDeviceNameChange(Callback_Literal_String_deviceName_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceNameChange'"] - void offDeviceNameChange(optional Callback_Literal_String_deviceName_Void callback_); [Throws, DtsName="on", DtsTag="'discoverFailure'"] void onDiscoverFailure(Callback_Literal_Number_reason_Void callback_); - [Throws, DtsName="off", DtsTag="'discoverFailure'"] - void offDiscoverFailure(optional Callback_Literal_Number_reason_Void callback_); [Throws, DtsName="on", DtsTag="'serviceDie'"] void onServiceDie(optional Callback_Literal_Empty_Void callback_); - [Throws, DtsName="off", DtsTag="'serviceDie'"] - void offServiceDie(optional Callback_Literal_Empty_Void callback_); [Throws, DtsName="on", DtsTag="'replyResult'"] void onReplyResult(Callback_Literal_String_param_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceStateChange'"] + void offDeviceStateChange(optional Callback_Literal_DeviceStateChange_action_DeviceBasicInfo_device_Void callback_); + [Throws, DtsName="off", DtsTag="'discoverSuccess'"] + void offDiscoverSuccess(optional Callback_Literal_DeviceBasicInfo_device_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceNameChange'"] + void offDeviceNameChange(optional Callback_Literal_String_deviceName_Void callback_); + [Throws, DtsName="off", DtsTag="'discoverFailure'"] + void offDiscoverFailure(optional Callback_Literal_Number_reason_Void callback_); + [Throws, DtsName="off", DtsTag="'serviceDie'"] + void offServiceDie(optional Callback_Literal_Empty_Void callback_); [Throws, DtsName="off", DtsTag="'replyResult'"] void offReplyResult(optional Callback_Literal_String_param_Void callback_); [Throws] @@ -229,16 +213,9 @@ namespace distributedDeviceManager { async number setRemoteDeviceName(String deviceId, String deviceName); [Throws] void setHeartbeatPolicy(StrategyForHeartbeat policy, number delayTime); - - }; - [GlobalScope] - interface GlobalScope_distributedDeviceManager_ohos_distributedDeviceManager { - [Throws] - static DeviceManager createDeviceManager(String bundleName); + void restoreLocalDeivceName(); [Throws] - static void releaseDeviceManager(DeviceManager deviceManager); - + async sequence getDeviceNetworkIdList(NetworkIdQueryFilter filterOptions); }; - }; \ No newline at end of file diff --git a/idl/@ohos.distributedHardware.deviceManager.idl b/idl/@ohos.distributedHardware.deviceManager.idl index 8e814c1..c3f086b 100644 --- a/idl/@ohos.distributedHardware.deviceManager.idl +++ b/idl/@ohos.distributedHardware.deviceManager.idl @@ -1,11 +1,10 @@ -package ohos.distributedHardware; +package ohos.distributedHardware.deviceManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace deviceManager { - [Entity=Interface, Deprecated] interface DeviceInfo { - [Deprecated] attribute String deviceId; [Deprecated] @@ -18,11 +17,9 @@ namespace deviceManager { attribute number range; [Deprecated] attribute AuthForm authForm; - }; [Deprecated] dictionary AuthForm { - [Deprecated] number INVALID_TYPE = -1; [Deprecated] @@ -31,11 +28,9 @@ namespace deviceManager { number IDENTICAL_ACCOUNT = 1; [Deprecated] number ACROSS_ACCOUNT = 2; - }; [Deprecated] dictionary DeviceType { - [Deprecated] number UNKNOWN_TYPE = 0; [Deprecated] @@ -50,11 +45,9 @@ namespace deviceManager { number CAR = 131; [Deprecated] number TV = 156; - }; [Deprecated] dictionary DeviceStateChangeAction { - [Deprecated] number ONLINE = 0; [Deprecated] @@ -63,11 +56,9 @@ namespace deviceManager { number OFFLINE = 2; [Deprecated] number CHANGE = 3; - }; [Entity=Interface, Deprecated] interface SubscribeInfo { - [Deprecated] attribute number subscribeId; [Deprecated] @@ -82,11 +73,9 @@ namespace deviceManager { attribute boolean isWakeRemote; [Deprecated] attribute SubscribeCap capability; - }; [Entity=Interface, Deprecated] interface PublishInfo { - [Deprecated] attribute number publishId; [Deprecated] @@ -95,20 +84,16 @@ namespace deviceManager { attribute ExchangeFreq freq; [Deprecated] attribute boolean ranging; - }; [Deprecated] dictionary DiscoverMode { - [Deprecated] number DISCOVER_MODE_PASSIVE = 85; [Deprecated] number DISCOVER_MODE_ACTIVE = 170; - }; [Deprecated] dictionary ExchangeMedium { - [Deprecated] number AUTO = 0; [Deprecated] @@ -117,11 +102,9 @@ namespace deviceManager { number COAP = 2; [Deprecated] number USB = 3; - }; [Deprecated] dictionary ExchangeFreq { - [Deprecated] number LOW = 0; [Deprecated] @@ -130,134 +113,107 @@ namespace deviceManager { number HIGH = 2; [Deprecated] number SUPER_HIGH = 3; - }; [Deprecated] dictionary SubscribeCap { - [Deprecated] number SUBSCRIBE_CAPABILITY_DDMP = 0; [Deprecated] number SUBSCRIBE_CAPABILITY_OSD = 1; - }; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface, Deprecated] interface AuthParam { - [Deprecated] attribute number authType; [Deprecated] attribute Literal_Empty extraInfo; - }; [Entity=Interface, Deprecated] interface AuthInfo { - [Deprecated] attribute number authType; [Deprecated] attribute number token; [Deprecated] attribute Literal_Empty extraInfo; - }; [Async, Synthetic] callback AsyncCallback_DeviceManager_Void = void (DeviceManager result); + [Deprecated, Throws] + void createDeviceManager(String bundleName, AsyncCallback_DeviceManager_Void callback_); [Async, Synthetic] callback AsyncCallback_Array_DeviceInfo_Void = void (sequence result); [Async, Synthetic] callback AsyncCallback_DeviceInfo_Void = void (DeviceInfo result); [Entity=Literal, Synthetic] interface Literal_String_deviceId_Number_pinToken { - attribute String deviceId; [Optional] attribute number pinToken; - }; [Async, Synthetic] callback AsyncCallback_Literal_String_deviceId_Number_pinToken_Void = void (Literal_String_deviceId_Number_pinToken result); [Entity=Literal, Synthetic] interface Literal_String_deviceId_Number_level { - attribute String deviceId; attribute number level; - }; [Async, Synthetic] callback AsyncCallback_Literal_String_deviceId_Number_level_Void = void (Literal_String_deviceId_Number_level result); [Entity=Literal, Synthetic] interface Literal_String_registerInfo { - attribute String registerInfo; - }; [Async, Synthetic] callback AsyncCallback_Literal_String_registerInfo_Void = void (Literal_String_registerInfo result); [Entity=Literal, Synthetic] interface Literal_String_resultInfo { - attribute String resultInfo; - }; [Async, Synthetic] callback AsyncCallback_Literal_String_resultInfo_Void = void (Literal_String_resultInfo result); [Entity=Literal, Synthetic] interface Literal_String_param { - attribute String param; - }; [Synthetic] callback Callback_Literal_String_param_Void = void (Literal_String_param parameter); [Entity=Literal, Synthetic] interface Literal_DeviceStateChangeAction_action_DeviceInfo_device { - attribute DeviceStateChangeAction action; attribute DeviceInfo device; - }; [Synthetic] callback Callback_Literal_DeviceStateChangeAction_action_DeviceInfo_device_Void = void (Literal_DeviceStateChangeAction_action_DeviceInfo_device parameter); [Entity=Literal, Synthetic] interface Literal_Number_subscribeId_DeviceInfo_device { - attribute number subscribeId; attribute DeviceInfo device; - }; [Synthetic] callback Callback_Literal_Number_subscribeId_DeviceInfo_device_Void = void (Literal_Number_subscribeId_DeviceInfo_device parameter); [Entity=Literal, Synthetic] interface Literal_Number_reason_subscribeId { - attribute number subscribeId; attribute number reason; - }; [Synthetic] callback Callback_Literal_Number_reason_subscribeId_Void = void (Literal_Number_reason_subscribeId parameter); [Entity=Literal, Synthetic] interface Literal_Number_publishId { - attribute number publishId; - }; [Synthetic] callback Callback_Literal_Number_publishId_Void = void (Literal_Number_publishId parameter); [Entity=Literal, Synthetic] interface Literal_Number_publishId_reason { - attribute number publishId; attribute number reason; - }; [Synthetic] callback Callback_Literal_Number_publishId_reason_Void = void (Literal_Number_publishId_reason parameter); @@ -265,7 +221,6 @@ namespace deviceManager { callback Callback_Void = void (); [Entity=Interface, Deprecated] interface DeviceManager { - [Deprecated, Throws] void release(); [Deprecated, Throws] @@ -287,8 +242,6 @@ namespace deviceManager { [Deprecated, Throws] async DeviceInfo getDeviceInfo(String networkId); [Deprecated, Throws] - void startDeviceDiscovery(SubscribeInfo subscribeInfo); - [Deprecated, Throws] void startDeviceDiscovery(SubscribeInfo subscribeInfo, optional String filterOptions); [Deprecated, Throws] void stopDeviceDiscovery(number subscribeId); @@ -312,40 +265,31 @@ namespace deviceManager { void deleteCredential(String queryInfo, AsyncCallback_Literal_String_resultInfo_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'uiStateChange'"] void onUiStateChange(Callback_Literal_String_param_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'uiStateChange'"] - void offUiStateChange(optional Callback_Literal_String_param_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'deviceStateChange'"] void onDeviceStateChange(Callback_Literal_DeviceStateChangeAction_action_DeviceInfo_device_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'deviceStateChange'"] - void offDeviceStateChange(optional Callback_Literal_DeviceStateChangeAction_action_DeviceInfo_device_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'deviceFound'"] void onDeviceFound(Callback_Literal_Number_subscribeId_DeviceInfo_device_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'deviceFound'"] - void offDeviceFound(optional Callback_Literal_Number_subscribeId_DeviceInfo_device_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'discoverFail'"] void onDiscoverFail(Callback_Literal_Number_reason_subscribeId_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'discoverFail'"] - void offDiscoverFail(optional Callback_Literal_Number_reason_subscribeId_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'publishSuccess'"] void onPublishSuccess(Callback_Literal_Number_publishId_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'publishSuccess'"] - void offPublishSuccess(optional Callback_Literal_Number_publishId_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'publishFail'"] void onPublishFail(Callback_Literal_Number_publishId_reason_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'publishFail'"] - void offPublishFail(optional Callback_Literal_Number_publishId_reason_Void callback_); [Deprecated, Throws, DtsName="on", DtsTag="'serviceDie'"] void onServiceDie(Callback_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'uiStateChange'"] + void offUiStateChange(optional Callback_Literal_String_param_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'deviceStateChange'"] + void offDeviceStateChange(optional Callback_Literal_DeviceStateChangeAction_action_DeviceInfo_device_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'deviceFound'"] + void offDeviceFound(optional Callback_Literal_Number_subscribeId_DeviceInfo_device_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'discoverFail'"] + void offDiscoverFail(optional Callback_Literal_Number_reason_subscribeId_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'publishSuccess'"] + void offPublishSuccess(optional Callback_Literal_Number_publishId_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'publishFail'"] + void offPublishFail(optional Callback_Literal_Number_publishId_reason_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'serviceDie'"] void offServiceDie(optional Callback_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_deviceManager_ohos_distributedHardware_deviceManager { - - [Deprecated, Throws] - static void createDeviceManager(String bundleName, AsyncCallback_DeviceManager_Void callback_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.distributedHardware.hardwareManager.idl b/idl/@ohos.distributedHardware.hardwareManager.idl index b1b697e..efc77c6 100644 --- a/idl/@ohos.distributedHardware.hardwareManager.idl +++ b/idl/@ohos.distributedHardware.hardwareManager.idl @@ -1,10 +1,9 @@ -package ohos.distributedHardware; +package ohos.distributedHardware.hardwareManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace hardwareManager { - dictionary DistributedHardwareType { - number ALL = 0; number CAMERA = 1; number SCREEN = 8; @@ -12,32 +11,21 @@ namespace hardwareManager { number MODEM_SPEAKER = 512; number MIC = 1024; number SPEAKER = 2048; - }; dictionary DistributedHardwareErrorCode { - number ERR_CODE_DISTRIBUTED_HARDWARE_NOT_STARTED = 24200101; number ERR_CODE_DEVICE_NOT_CONNECTED = 24200102; - }; [Entity=Interface] interface HardwareDescriptor { - attribute DistributedHardwareType type; [Optional] attribute String srcNetworkId; - }; - [GlobalScope] - interface GlobalScope_hardwareManager_ohos_distributedHardware_hardwareManager { - - [Throws] - static async void pauseDistributedHardware(HardwareDescriptor description); - [Throws] - static async void resumeDistributedHardware(HardwareDescriptor description); - [Throws] - static async void stopDistributedHardware(HardwareDescriptor description); - - }; - + [Throws] + async void pauseDistributedHardware(HardwareDescriptor description); + [Throws] + async void resumeDistributedHardware(HardwareDescriptor description); + [Throws] + async void stopDistributedHardware(HardwareDescriptor description); }; \ No newline at end of file diff --git a/idl/@ohos.distributedHardware.mechanicManager.idl b/idl/@ohos.distributedHardware.mechanicManager.idl new file mode 100644 index 0000000..e5a94b9 --- /dev/null +++ b/idl/@ohos.distributedHardware.mechanicManager.idl @@ -0,0 +1,155 @@ +package ohos.distributedHardware.mechanicManager; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace mechanicManager { + [Synthetic] + callback Callback_AttachStateChangeInfo_Void = void (AttachStateChangeInfo parameter); + [Throws, DtsName="on", DtsTag="'attachStateChange'"] + void onAttachStateChange(Callback_AttachStateChangeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'attachStateChange'"] + void offAttachStateChange(optional Callback_AttachStateChangeInfo_Void callback_); + [Throws] + sequence getAttachedMechDevices(); + [Throws] + void setUserOperation(Operation operation, String mac, String params); + [Throws] + void setCameraTrackingEnabled(boolean isEnabled); + [Throws] + boolean getCameraTrackingEnabled(); + [Synthetic] + callback Callback_TrackingEventInfo_Void = void (TrackingEventInfo parameter); + [Throws, DtsName="on", DtsTag="'trackingStateChange'"] + void onTrackingStateChange(Callback_TrackingEventInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'trackingStateChange'"] + void offTrackingStateChange(optional Callback_TrackingEventInfo_Void callback_); + [Throws] + void setCameraTrackingLayout(CameraTrackingLayout trackingLayout); + [Throws] + CameraTrackingLayout getCameraTrackingLayout(); + [Throws] + async Result rotate(number mechId, RotationAngles angles, number duration); + [Throws] + async Result rotateToEulerAngles(number mechId, EulerAngles angles, number duration); + [Throws] + number getMaxRotationTime(number mechId); + [Throws] + RotationSpeed getMaxRotationSpeed(number mechId); + [Throws] + async Result rotateBySpeed(number mechId, RotationSpeed speed, number duration); + [Throws] + async void stopMoving(number mechId); + [Throws] + EulerAngles getCurrentAngles(number mechId); + [Throws] + RotationLimits getRotationLimits(number mechId); + [Throws] + RotationAxesStatus getRotationAxesStatus(number mechId); + [Synthetic] + callback Callback_RotationAxesStateChangeInfo_Void = void (RotationAxesStateChangeInfo parameter); + [Throws, DtsName="on", DtsTag="'rotationAxesStatusChange'"] + void onRotationAxesStatusChange(Callback_RotationAxesStateChangeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'rotationAxesStatusChange'"] + void offRotationAxesStatusChange(optional Callback_RotationAxesStateChangeInfo_Void callback_); + [Entity=Interface] + interface MechInfo { + attribute number mechId; + attribute MechDeviceType mechDeviceType; + attribute String mechName; + }; + [Entity=Interface] + interface RotationAngles { + [Optional] + attribute number yaw; + [Optional] + attribute number roll; + [Optional] + attribute number pitch; + }; + [Entity=Interface] + interface EulerAngles { + [Optional] + attribute number yaw; + [Optional] + attribute number roll; + [Optional] + attribute number pitch; + }; + [Entity=Interface] + interface RotationSpeed { + [Optional] + attribute number yawSpeed; + [Optional] + attribute number rollSpeed; + [Optional] + attribute number pitchSpeed; + }; + [Entity=Interface] + interface RotationLimits { + attribute number negativeYawMax; + attribute number positiveYawMax; + attribute number negativeRollMax; + attribute number positiveRollMax; + attribute number negativePitchMax; + attribute number positivePitchMax; + }; + [Entity=Interface] + interface RotationAxesStatus { + attribute boolean yawEnabled; + attribute boolean rollEnabled; + attribute boolean pitchEnabled; + [Optional] + attribute RotationAxisLimited yawLimited; + [Optional] + attribute RotationAxisLimited rollLimited; + [Optional] + attribute RotationAxisLimited pitchLimited; + }; + dictionary RotationAxisLimited { + number NOT_LIMITED = 0; + number NEGATIVE_LIMITED = 1; + number POSITIVE_LIMITED = 2; + }; + [Entity=Interface] + interface RotationAxesStateChangeInfo { + attribute number mechId; + attribute RotationAxesStatus status; + }; + [Entity=Interface] + interface TrackingEventInfo { + attribute TrackingEvent event; + }; + [Entity=Interface] + interface AttachStateChangeInfo { + attribute AttachState state; + attribute MechInfo mechInfo; + }; + dictionary Operation { + number CONNECT = 0; + number DISCONNECT = 1; + }; + dictionary TrackingEvent { + number CAMERA_TRACKING_USER_ENABLED = 0; + number CAMERA_TRACKING_USER_DISABLED = 1; + number CAMERA_TRACKING_LAYOUT_CHANGED = 2; + }; + dictionary Result { + number COMPLETED = 0; + number INTERRUPTED = 1; + number LIMITED = 2; + number TIMEOUT = 3; + number SYSTEM_ERROR = 100; + }; + dictionary MechDeviceType { + number GIMBAL_DEVICE = 0; + }; + dictionary AttachState { + number ATTACHED = 0; + number DETACHED = 1; + }; + dictionary CameraTrackingLayout { + number DEFAULT = 0; + number LEFT = 1; + number MIDDLE = 2; + number RIGHT = 3; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.distributedMissionManager.idl b/idl/@ohos.distributedMissionManager.idl index 2419877..17ca391 100644 --- a/idl/@ohos.distributedMissionManager.idl +++ b/idl/@ohos.distributedMissionManager.idl @@ -1,32 +1,56 @@ -package ohos; +package ohos.distributedMissionManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.ContinuableInfo as _ContinuableInfo; -import application.ContinueCallback as _ContinueCallback; -import application.ContinueDeviceInfo as _ContinueDeviceInfo; -import application.ContinueMissionInfo as _ContinueMissionInfo; +import application.ContinuableInfo.ContinuableInfo as _ContinuableInfo; +import application.ContinueCallback.ContinueCallback as _ContinueCallback; +import application.ContinueDeviceInfo.ContinueDeviceInfo as _ContinueDeviceInfo; +import application.ContinueMissionInfo.ContinueMissionInfo as _ContinueMissionInfo; import application.MissionCallbacks.MissionCallback as _MissionCallback; -import application.MissionDeviceInfo as _MissionDeviceInfo; -import application.MissionParameter as _MissionParameter; +import application.MissionDeviceInfo.MissionDeviceInfo as _MissionDeviceInfo; +import application.MissionParameter.MissionParameter as _MissionParameter; +[DefaultExport] namespace distributedMissionManager { - dictionary ContinueState { - number ACTIVE = 0; number INACTIVE = 1; - }; [Entity=Interface] interface ContinueCallbackInfo { - attribute ContinueState state; attribute ContinuableInfo info; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void startSyncRemoteMissions(MissionParameter parameter, AsyncCallback_Void callback_); + [Throws] + async void startSyncRemoteMissions(MissionParameter parameter); + [Throws] + void stopSyncRemoteMissions(MissionDeviceInfo parameter, AsyncCallback_Void callback_); + [Throws] + async void stopSyncRemoteMissions(MissionDeviceInfo parameter); + [Throws] + void registerMissionListener(MissionDeviceInfo parameter, MissionCallback options, AsyncCallback_Void callback_); + [Throws] + async void registerMissionListener(MissionDeviceInfo parameter, MissionCallback options); + [Throws] + void unRegisterMissionListener(MissionDeviceInfo parameter, AsyncCallback_Void callback_); + [Throws] + async void unRegisterMissionListener(MissionDeviceInfo parameter); [Synthetic] callback Callback_ContinueCallbackInfo_Void = void (ContinueCallbackInfo parameter); + [Throws, DtsName="on", DtsTag="'continueStateChange'"] + void onContinueStateChange(Callback_ContinueCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'continueStateChange'"] + void offContinueStateChange(optional Callback_ContinueCallbackInfo_Void callback_); + [Throws] + void continueMission(ContinueDeviceInfo parameter, ContinueCallback options, AsyncCallback_Void callback_); + [Throws] + async void continueMission(ContinueDeviceInfo parameter, ContinueCallback options); + [Throws] + void continueMission(ContinueMissionInfo parameter, AsyncCallback_Void callback_); + [Throws] + async void continueMission(ContinueMissionInfo parameter); typedef _ContinuableInfo ContinuableInfo; typedef _ContinueMissionInfo ContinueMissionInfo; typedef _ContinueCallback ContinueCallback; @@ -34,38 +58,4 @@ namespace distributedMissionManager { typedef _MissionCallback MissionCallback; typedef _MissionDeviceInfo MissionDeviceInfo; typedef _MissionParameter MissionParameter; - [GlobalScope] - interface GlobalScope_distributedMissionManager_ohos_distributedMissionManager { - - [Throws] - static void startSyncRemoteMissions(MissionParameter parameter, AsyncCallback_Void callback_); - [Throws] - static async void startSyncRemoteMissions(MissionParameter parameter); - [Throws] - static void stopSyncRemoteMissions(MissionDeviceInfo parameter, AsyncCallback_Void callback_); - [Throws] - static async void stopSyncRemoteMissions(MissionDeviceInfo parameter); - [Throws] - static void registerMissionListener(MissionDeviceInfo parameter, MissionCallback options, AsyncCallback_Void callback_); - [Throws] - static async void registerMissionListener(MissionDeviceInfo parameter, MissionCallback options); - [Throws] - static void unRegisterMissionListener(MissionDeviceInfo parameter, AsyncCallback_Void callback_); - [Throws] - static async void unRegisterMissionListener(MissionDeviceInfo parameter); - [Throws, DtsName="on", DtsTag="'continueStateChange'"] - static void onContinueStateChange(Callback_ContinueCallbackInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'continueStateChange'"] - static void offContinueStateChange(optional Callback_ContinueCallbackInfo_Void callback_); - [Throws] - static void continueMission(ContinueDeviceInfo parameter, ContinueCallback options, AsyncCallback_Void callback_); - [Throws] - static async void continueMission(ContinueDeviceInfo parameter, ContinueCallback options); - [Throws] - static void continueMission(ContinueMissionInfo parameter, AsyncCallback_Void callback_); - [Throws] - static async void continueMission(ContinueMissionInfo parameter); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.distributedsched.abilityConnectionManager.idl b/idl/@ohos.distributedsched.abilityConnectionManager.idl new file mode 100644 index 0000000..8820b18 --- /dev/null +++ b/idl/@ohos.distributedsched.abilityConnectionManager.idl @@ -0,0 +1,179 @@ +package ohos.distributedsched.abilityConnectionManager; +import ohos.base.Callback as Callback; +import ohos.multimedia.image.default as image; +import application.Context.default as Context; +import ohos.graphics.colorSpaceManager.default as colorSpaceManager; +[DefaultExport] +namespace abilityConnectionManager { + [Entity=Interface] + interface PeerInfo { + attribute String deviceId; + attribute String bundleName; + attribute String moduleName; + attribute String abilityName; + [Optional] + attribute String serviceName; + }; + [Entity=Interface] + interface ConnectOptions { + [Optional] + attribute boolean needSendData; + [Optional] + attribute boolean needSendStream; + [Optional] + attribute boolean needReceiveStream; + [Optional] + attribute StartOptionParams startOptions; + [Optional] + attribute record parameters; + }; + [Entity=Interface] + interface ConnectResult { + attribute boolean isConnected; + [Optional] + attribute ConnectErrorCode errorCode; + [Optional] + attribute String reason; + }; + dictionary ConnectErrorCode { + number CONNECTED_SESSION_EXISTS = 0; + number PEER_APP_REJECTED = 1; + number LOCAL_WIFI_NOT_OPEN = 2; + number PEER_WIFI_NOT_OPEN = 3; + number PEER_ABILITY_NO_ONCOLLABORATE = 4; + number SYSTEM_INTERNAL_ERROR = 5; + }; + dictionary StartOptionParams { + number START_IN_FOREGROUND = 0; + number START_IN_BACKGROUND = 1; + }; + [Entity=Interface] + interface EventCallbackInfo { + attribute number sessionId; + [Optional] + attribute DisconnectReason reason; + [Optional] + attribute String msg; + [Optional] + attribute buffer data; + [Optional] + attribute image.PixelMap image; + }; + [Entity=Interface] + interface CollaborateEventInfo { + attribute CollaborateEventType eventType; + [Optional] + attribute String eventMsg; + }; + dictionary CollaborateEventType { + number SEND_FAILURE = 0; + number COLOR_SPACE_CONVERSION_FAILURE = 1; + }; + dictionary DisconnectReason { + number PEER_APP_CLOSE_COLLABORATION = 0; + number PEER_APP_EXIT = 1; + number NETWORK_DISCONNECTED = 2; + }; + [Synthetic] + callback Callback_EventCallbackInfo_Void = void (EventCallbackInfo parameter); + [Throws, DtsName="on", DtsTag="'connect'"] + void onConnect(number sessionId, Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'connect'"] + void offConnect(number sessionId, optional Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'disconnect'"] + void onDisconnect(number sessionId, Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'disconnect'"] + void offDisconnect(number sessionId, optional Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'receiveMessage'"] + void onReceiveMessage(number sessionId, Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'receiveMessage'"] + void offReceiveMessage(number sessionId, optional Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'receiveData'"] + void onReceiveData(number sessionId, Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'receiveData'"] + void offReceiveData(number sessionId, optional Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'receiveImage'"] + void onReceiveImage(number sessionId, Callback_EventCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'receiveImage'"] + void offReceiveImage(number sessionId, optional Callback_EventCallbackInfo_Void callback_); + [Synthetic] + callback Callback_CollaborateEventInfo_Void = void (CollaborateEventInfo parameter); + [Throws, DtsName="on", DtsTag="'collaborateEvent'"] + void onCollaborateEvent(number sessionId, Callback_CollaborateEventInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'collaborateEvent'"] + void offCollaborateEvent(number sessionId, optional Callback_CollaborateEventInfo_Void callback_); + [Throws] + number createAbilityConnectionSession(String serviceName, Context context, PeerInfo peerInfo, ConnectOptions connectOptions); + void destroyAbilityConnectionSession(number sessionId); + [Throws] + (PeerInfo or undefined) getPeerInfoById(number sessionId); + [Throws] + async ConnectResult connect(number sessionId); + void disconnect(number sessionId); + [Throws] + async void acceptConnect(number sessionId, String token); + [Throws] + void reject(String token, String reason); + [Throws] + async void sendMessage(number sessionId, String msg); + [Throws] + async void sendData(number sessionId, buffer data); + [Throws] + async void sendImage(number sessionId, image.PixelMap image, optional number quality); + [Throws] + async number createStream(number sessionId, StreamParam param); + [Throws] + void setSurfaceId(number streamId, String surfaceId, SurfaceParam param); + [Throws] + String getSurfaceId(number streamId, SurfaceParam param); + [Throws] + void updateSurfaceParam(number streamId, SurfaceParam param); + [Throws] + void destroyStream(number streamId); + [Throws] + void startStream(number streamId); + [Throws] + void stopStream(number streamId); + [Entity=Interface] + interface StreamParam { + attribute String name; + attribute StreamRole role; + [Optional] + attribute number bitrate; + [Optional] + attribute colorSpaceManager.ColorSpace colorSpaceConversionTarget; + }; + [Entity=Interface] + interface SurfaceParam { + attribute number width; + attribute number height; + [Optional] + attribute VideoPixelFormat format; + [Optional] + attribute number rotation; + [Optional] + attribute FlipOptions flip; + }; + dictionary FlipOptions { + number HORIZONTAL = 0; + number VERTICAL = 1; + }; + dictionary StreamRole { + number SOURCE = 0; + number SINK = 1; + }; + dictionary VideoPixelFormat { + number UNKNOWN = -1; + number NV12 = 0; + number NV21 = 1; + }; + dictionary CollaborationKeys { + String PEER_INFO = "ohos.collaboration.key.peerInfo"; + String CONNECT_OPTIONS = "ohos.collaboration.key.connectOptions"; + String COLLABORATE_TYPE = "ohos.collaboration.key.abilityCollaborateType"; + }; + dictionary CollaborationValues { + String ABILITY_COLLABORATION_TYPE_DEFAULT = "ohos.collaboration.value.abilityCollab"; + String ABILITY_COLLABORATION_TYPE_CONNECT_PROXY = "ohos.collaboration.value.connectProxy"; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.distributedsched.linkEnhance.idl b/idl/@ohos.distributedsched.linkEnhance.idl new file mode 100644 index 0000000..1f7d5ed --- /dev/null +++ b/idl/@ohos.distributedsched.linkEnhance.idl @@ -0,0 +1,65 @@ +package ohos.distributedsched.linkEnhance; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace linkEnhance { + [Entity=Interface] + interface ConnectResult { + attribute String deviceId; + attribute boolean success; + attribute number reason; + }; + [Synthetic] + callback Callback_Connection_Void = void (Connection parameter); + [Synthetic] + callback Callback_Number_Void = void (number parameter); + [Entity=Interface] + interface Server { + [Throws] + void start(); + [Throws] + void stop(); + [Throws] + void close(); + [Throws, DtsName="on", DtsTag="'connectionAccepted'"] + void onConnectionAccepted(Callback_Connection_Void callback_); + [Throws, DtsName="on", DtsTag="'serverStopped'"] + void onServerStopped(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'connectionAccepted'"] + void offConnectionAccepted(optional Callback_Connection_Void callback_); + [Throws, DtsName="off", DtsTag="'serverStopped'"] + void offServerStopped(optional Callback_Number_Void callback_); + }; + [Throws] + Server createServer(String name); + [Synthetic] + callback Callback_ConnectResult_Void = void (ConnectResult parameter); + [Synthetic] + callback Callback_Buffer_Void = void (buffer parameter); + [Entity=Interface] + interface Connection { + [Throws] + void connect(); + [Throws] + void disconnect(); + [Throws] + void close(); + [Throws] + String getPeerDeviceId(); + [Throws] + void sendData(buffer data); + [Throws, DtsName="on", DtsTag="'connectResult'"] + void onConnectResult(Callback_ConnectResult_Void callback_); + [Throws, DtsName="on", DtsTag="'disconnected'"] + void onDisconnected(Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'dataReceived'"] + void onDataReceived(Callback_Buffer_Void callback_); + [Throws, DtsName="off", DtsTag="'connectResult'"] + void offConnectResult(optional Callback_ConnectResult_Void callback_); + [Throws, DtsName="off", DtsTag="'disconnected'"] + void offDisconnected(optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'dataReceived'"] + void offDataReceived(optional Callback_Buffer_Void callback_); + }; + [Throws] + Connection createConnection(String deviceId, String name); +}; \ No newline at end of file diff --git a/idl/@ohos.distributedsched.proxyChannelManager.idl b/idl/@ohos.distributedsched.proxyChannelManager.idl new file mode 100644 index 0000000..48efcc4 --- /dev/null +++ b/idl/@ohos.distributedsched.proxyChannelManager.idl @@ -0,0 +1,47 @@ +package ohos.distributedsched.proxyChannelManager; +[DefaultExport] +namespace proxyChannelManager { + [Throws] + async number openProxyChannel(ChannelInfo channelInfo); + [Throws] + void closeProxyChannel(number channelId); + [Throws] + async void sendData(number channelId, buffer data); + [Synthetic] + callback Callback_DataInfo_Void = void (DataInfo parameter); + [Throws, DtsName="on", DtsTag="'receiveData'"] + void onReceiveData(number channelId, Callback_DataInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'receiveData'"] + void offReceiveData(number channelId, optional Callback_DataInfo_Void callback_); + [Synthetic] + callback Callback_ChannelStateInfo_Void = void (ChannelStateInfo parameter); + [Throws, DtsName="on", DtsTag="'channelStateChange'"] + void onChannelStateChange(number channelId, Callback_ChannelStateInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'channelStateChange'"] + void offChannelStateChange(number channelId, optional Callback_ChannelStateInfo_Void callback_); + [Entity=Interface] + interface DataInfo { + attribute number channelId; + attribute buffer data; + }; + dictionary LinkType { + number LINK_BR = 0; + }; + [Entity=Interface] + interface ChannelInfo { + attribute LinkType linkType; + attribute String peerDevAddr; + attribute String peerUuid; + }; + dictionary ChannelState { + number CHANNEL_WAIT_RESUME = 0; + number CHANNEL_RESUME = 1; + number CHANNEL_EXCEPTION_SOFTWARE_FAILED = 2; + number CHANNEL_BR_NO_PAIRED = 3; + }; + [Entity=Interface] + interface ChannelStateInfo { + attribute number channelId; + attribute ChannelState state; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.dlpPermission.idl b/idl/@ohos.dlpPermission.idl index 2f08d9e..6934e5b 100644 --- a/idl/@ohos.dlpPermission.idl +++ b/idl/@ohos.dlpPermission.idl @@ -1,12 +1,11 @@ -package ohos; +package ohos.dlpPermission; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.common as common; -import ohos.app.ability.Want as Want; +import ohos.app.ability.common.default as common; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace dlpPermission { - dictionary ActionFlagType { - number ACTION_VIEW = 1; number ACTION_SAVE = 2; number ACTION_SAVE_AS = 4; @@ -18,103 +17,141 @@ namespace dlpPermission { number ACTION_PRINT = 256; number ACTION_EXPORT = 512; number ACTION_PERMISSION_CHANGE = 1024; - }; dictionary DLPFileAccess { - number NO_PERMISSION = 0; number READ_ONLY = 1; number CONTENT_EDIT = 2; number FULL_CONTROL = 3; - }; [Entity=Interface] interface DLPPermissionInfo { - attribute DLPFileAccess dlpFileAccess; attribute number flags; - }; [Entity=Interface] interface AccessedDLPFileInfo { - attribute String uri; attribute number lastOpenTime; - }; [Entity=Interface] interface RetentionSandboxInfo { - attribute number appIndex; attribute String bundleName; attribute sequence docUris; - }; + [Throws] + async boolean isDLPFile(number fd); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isDLPFile(number fd, AsyncCallback_Boolean_Void callback_); + [Throws] + async DLPPermissionInfo getDLPPermissionInfo(); [Async, Synthetic] callback AsyncCallback_DLPPermissionInfo_Void = void (DLPPermissionInfo result); + [Throws] + void getDLPPermissionInfo(AsyncCallback_DLPPermissionInfo_Void callback_); + [Throws] + String getOriginalFileName(String fileName); + [Throws] + String getDLPSuffix(); [Synthetic] callback Callback_AccessedDLPFileInfo_Void = void (AccessedDLPFileInfo parameter); + [Throws, DtsName="on", DtsTag="'openDLPFile'"] + void onOpenDLPFile(Callback_AccessedDLPFileInfo_Void listener); + [Throws, DtsName="off", DtsTag="'openDLPFile'"] + void offOpenDLPFile(optional Callback_AccessedDLPFileInfo_Void listener); + [Throws] + async boolean isInSandbox(); + [Throws] + void isInSandbox(AsyncCallback_Boolean_Void callback_); + [Throws] + async sequence getDLPSupportedFileTypes(); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void getDLPSupportedFileTypes(AsyncCallback_Array_String_Void callback_); + [Throws] + async void setRetentionState(sequence docUris); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setRetentionState(sequence docUris, AsyncCallback_Void callback_); + [Throws] + async void cancelRetentionState(sequence docUris); + [Throws] + void cancelRetentionState(sequence docUris, AsyncCallback_Void callback_); + [Throws] + async sequence getRetentionSandboxList(optional String bundleName); [Async, Synthetic] callback AsyncCallback_Array_RetentionSandboxInfo_Void = void (sequence result); + [Throws] + void getRetentionSandboxList(String bundleName, AsyncCallback_Array_RetentionSandboxInfo_Void callback_); + [Throws] + void getRetentionSandboxList(AsyncCallback_Array_RetentionSandboxInfo_Void callback_); + [Throws] + async sequence getDLPFileAccessRecords(); [Async, Synthetic] callback AsyncCallback_Array_AccessedDLPFileInfo_Void = void (sequence result); + [Throws] + void getDLPFileAccessRecords(AsyncCallback_Array_AccessedDLPFileInfo_Void callback_); [Entity=Interface] interface DLPManagerResult { - attribute number resultCode; attribute Want want; - }; + [Throws] + async DLPManagerResult startDLPManagerForResult(common.UIAbilityContext context, Want want); dictionary GatheringPolicyType { - number GATHERING = 1; number NON_GATHERING = 2; - }; + [Throws] + async GatheringPolicyType getDLPGatheringPolicy(); [Async, Synthetic] callback AsyncCallback_GatheringPolicyType_Void = void (GatheringPolicyType result); + [Throws] + void getDLPGatheringPolicy(AsyncCallback_GatheringPolicyType_Void callback_); [Entity=Interface] interface DLPSandboxInfo { - attribute number appIndex; attribute number tokenID; - }; + [Throws] + async DLPSandboxInfo installDLPSandbox(String bundleName, DLPFileAccess access, number userId, String uri); [Async, Synthetic] callback AsyncCallback_DLPSandboxInfo_Void = void (DLPSandboxInfo result); + [Throws] + void installDLPSandbox(String bundleName, DLPFileAccess access, number userId, String uri, AsyncCallback_DLPSandboxInfo_Void callback_); + [Throws] + async void uninstallDLPSandbox(String bundleName, number userId, number appIndex); + [Throws] + void uninstallDLPSandbox(String bundleName, number userId, number appIndex, AsyncCallback_Void callback_); [Entity=Interface] interface DLPSandboxState { - attribute String bundleName; attribute number appIndex; - }; [Synthetic] callback Callback_DLPSandboxState_Void = void (DLPSandboxState parameter); + [Throws, DtsName="on", DtsTag="'uninstallDLPSandbox'"] + void onUninstallDLPSandbox(Callback_DLPSandboxState_Void listener); + [Throws, DtsName="off", DtsTag="'uninstallDLPSandbox'"] + void offUninstallDLPSandbox(optional Callback_DLPSandboxState_Void listener); dictionary AccountType { - number CLOUD_ACCOUNT = 1; number DOMAIN_ACCOUNT = 2; - }; [Entity=Interface] interface AuthUser { - attribute String authAccount; attribute AccountType authAccountType; attribute DLPFileAccess dlpFileAccess; attribute number permExpiryTime; - }; [Entity=Interface] interface DLPProperty { - attribute String ownerAccount; attribute String ownerAccountID; attribute AccountType ownerAccountType; @@ -126,11 +163,11 @@ namespace dlpPermission { attribute sequence everyoneAccessList; [Optional] attribute number expireTime; - + [Optional] + attribute ActionType actionUponExpiry; }; [Entity=Interface] interface DLPFile { - attribute DLPProperty dlpProperty; [Throws] async void addDLPLinkFile(String linkFileName); @@ -160,90 +197,37 @@ namespace dlpPermission { async void closeDLPFile(); [Throws] void closeDLPFile(AsyncCallback_Void callback_); - }; + [Throws] + async DLPFile generateDLPFile(number plaintextFd, number ciphertextFd, DLPProperty property); [Async, Synthetic] callback AsyncCallback_DLPFile_Void = void (DLPFile result); - [GlobalScope] - interface GlobalScope_dlpPermission_ohos_dlpPermission { - - [Throws] - static async boolean isDLPFile(number fd); - [Throws] - static void isDLPFile(number fd, AsyncCallback_Boolean_Void callback_); - [Throws] - static async DLPPermissionInfo getDLPPermissionInfo(); - [Throws] - static void getDLPPermissionInfo(AsyncCallback_DLPPermissionInfo_Void callback_); - [Throws] - static String getOriginalFileName(String fileName); - [Throws] - static String getDLPSuffix(); - [Throws, DtsName="on", DtsTag="'openDLPFile'"] - static void onOpenDLPFile(Callback_AccessedDLPFileInfo_Void listener); - [Throws, DtsName="off", DtsTag="'openDLPFile'"] - static void offOpenDLPFile(optional Callback_AccessedDLPFileInfo_Void listener); - [Throws] - static async boolean isInSandbox(); - [Throws] - static void isInSandbox(AsyncCallback_Boolean_Void callback_); - [Throws] - static async sequence getDLPSupportedFileTypes(); - [Throws] - static void getDLPSupportedFileTypes(AsyncCallback_Array_String_Void callback_); - [Throws] - static async void setRetentionState(sequence docUris); - [Throws] - static void setRetentionState(sequence docUris, AsyncCallback_Void callback_); - [Throws] - static async void cancelRetentionState(sequence docUris); - [Throws] - static void cancelRetentionState(sequence docUris, AsyncCallback_Void callback_); - [Throws] - static async sequence getRetentionSandboxList(optional String bundleName); - [Throws] - static void getRetentionSandboxList(String bundleName, AsyncCallback_Array_RetentionSandboxInfo_Void callback_); - [Throws] - static void getRetentionSandboxList(AsyncCallback_Array_RetentionSandboxInfo_Void callback_); - [Throws] - static async sequence getDLPFileAccessRecords(); - [Throws] - static void getDLPFileAccessRecords(AsyncCallback_Array_AccessedDLPFileInfo_Void callback_); - [Throws] - static async DLPManagerResult startDLPManagerForResult(common.UIAbilityContext context, Want want); - [Throws] - static async GatheringPolicyType getDLPGatheringPolicy(); - [Throws] - static void getDLPGatheringPolicy(AsyncCallback_GatheringPolicyType_Void callback_); - [Throws] - static async DLPSandboxInfo installDLPSandbox(String bundleName, DLPFileAccess access, number userId, String uri); - [Throws] - static void installDLPSandbox(String bundleName, DLPFileAccess access, number userId, String uri, AsyncCallback_DLPSandboxInfo_Void callback_); - [Throws] - static async void uninstallDLPSandbox(String bundleName, number userId, number appIndex); - [Throws] - static void uninstallDLPSandbox(String bundleName, number userId, number appIndex, AsyncCallback_Void callback_); - [Throws, DtsName="on", DtsTag="'uninstallDLPSandbox'"] - static void onUninstallDLPSandbox(Callback_DLPSandboxState_Void listener); - [Throws, DtsName="off", DtsTag="'uninstallDLPSandbox'"] - static void offUninstallDLPSandbox(optional Callback_DLPSandboxState_Void listener); - [Throws] - static async DLPFile generateDLPFile(number plaintextFd, number ciphertextFd, DLPProperty property); - [Throws] - static void generateDLPFile(number plaintextFd, number ciphertextFd, DLPProperty property, AsyncCallback_DLPFile_Void callback_); - [Throws] - static async DLPFile openDLPFile(number ciphertextFd, String appId); - [Throws] - static void openDLPFile(number ciphertextFd, String appId, AsyncCallback_DLPFile_Void callback_); - [Throws] - static async void setSandboxAppConfig(String configInfo); - [Throws] - static async void cleanSandboxAppConfig(); - [Throws] - static async String getSandboxAppConfig(); - [Throws] - static async boolean isDLPFeatureProvided(); - + [Throws] + void generateDLPFile(number plaintextFd, number ciphertextFd, DLPProperty property, AsyncCallback_DLPFile_Void callback_); + [Throws] + async DLPFile openDLPFile(number ciphertextFd, String appId); + [Throws] + void openDLPFile(number ciphertextFd, String appId, AsyncCallback_DLPFile_Void callback_); + [Throws] + async void setSandboxAppConfig(String configInfo); + [Throws] + async void cleanSandboxAppConfig(); + [Throws] + async String getSandboxAppConfig(); + [Throws] + async boolean isDLPFeatureProvided(); + dictionary ActionType { + number NOT_OPEN = 0; + number OPEN = 1; + }; + [Entity=Interface] + interface CustomProperty { + attribute String enterprise; }; - + [Throws] + async void generateDlpFileForEnterprise(number plaintextFd, number dlpFd, DLPProperty property, CustomProperty customProperty); + [Throws] + async String queryDlpPolicy(number dlpFd); + [Throws] + async void decryptDlpFile(number dlpFd, number plaintextFd); }; \ No newline at end of file diff --git a/idl/@ohos.document.idl b/idl/@ohos.document.idl index bfc01b4..dfc516a 100644 --- a/idl/@ohos.document.idl +++ b/idl/@ohos.document.idl @@ -1,25 +1,19 @@ -package ohos; +package ohos.document; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace document { - - }; +[Deprecated, Throws] +async String choose(optional sequence types); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); +[Deprecated, Throws] +void choose(AsyncCallback_String_Void callback_); +[Deprecated, Throws] +void choose(sequence types, AsyncCallback_String_Void callback_); +[Deprecated, Throws] +async void show(String uri, String type); [Async, Synthetic] callback AsyncCallback_Void = void (); -[GlobalScope] -interface GlobalScope_ohos_document { - - [Deprecated, Throws] - static async String choose(optional sequence types); - [Deprecated, Throws] - static void choose(AsyncCallback_String_Void callback_); - [Deprecated, Throws] - static void choose(sequence types, AsyncCallback_String_Void callback_); - [Deprecated, Throws] - static async void show(String uri, String type); - [Deprecated, Throws] - static void show(String uri, String type, AsyncCallback_Void callback_); - -}; \ No newline at end of file +[Deprecated, Throws] +void show(String uri, String type, AsyncCallback_Void callback_); \ No newline at end of file diff --git a/idl/@ohos.driver.deviceManager.idl b/idl/@ohos.driver.deviceManager.idl index 884c7de..12380cb 100644 --- a/idl/@ohos.driver.deviceManager.idl +++ b/idl/@ohos.driver.deviceManager.idl @@ -1,114 +1,94 @@ -package ohos.driver; +package ohos.driver.deviceManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.rpc as rpc; +import ohos.rpc.default as rpc; +[DefaultExport] namespace deviceManager { - + [Throws] + sequence<[TypeArguments="Device"] Readonly> queryDevices(optional i32 busType); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Entity=Literal, Synthetic] - interface Literal_Number_deviceId_rpc.IRemoteObject_remote { - + interface Literal_Number_deviceId_Rpc_IRemoteObject_remote { attribute number deviceId; attribute rpc.IRemoteObject remote; - }; [Async, Synthetic] - callback AsyncCallback_Literal_Number_deviceId_rpc_IRemoteObject_remote_Void = void (Literal_Number_deviceId_rpc.IRemoteObject_remote result); + callback AsyncCallback_Literal_Number_deviceId_Rpc_IRemoteObject_remote_Void = void (Literal_Number_deviceId_Rpc_IRemoteObject_remote result); + [Deprecated, Throws] + void bindDevice(number deviceId, AsyncCallback_Number_Void onDisconnect, AsyncCallback_Literal_Number_deviceId_Rpc_IRemoteObject_remote_Void callback_); [Async, Synthetic] callback AsyncCallback_RemoteDeviceDriver_Void = void (RemoteDeviceDriver result); + [Deprecated, Throws] + void bindDeviceDriver(number deviceId, AsyncCallback_Number_Void onDisconnect, AsyncCallback_RemoteDeviceDriver_Void callback_); + [Deprecated, Throws] + async Literal_Number_deviceId_Rpc_IRemoteObject_remote bindDevice(number deviceId, AsyncCallback_Number_Void onDisconnect); + [Deprecated, Throws] + async RemoteDeviceDriver bindDeviceDriver(number deviceId, AsyncCallback_Number_Void onDisconnect); + [Deprecated, Throws] + void unbindDevice(number deviceId, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number unbindDevice(number deviceId); + [Throws] + sequence<[TypeArguments="DeviceInfo"] Readonly> queryDeviceInfo(optional long deviceId); + [Throws] + sequence<[TypeArguments="DriverInfo"] Readonly> queryDriverInfo(optional String driverUid); + [Async, Synthetic] + callback AsyncCallback_Long_Void = void (long result); + [Throws] + async RemoteDeviceDriver bindDriverWithDeviceId(long deviceId, AsyncCallback_Long_Void onDisconnect); + [Throws] + async i32 unbindDriverWithDeviceId(long deviceId); dictionary BusType { - number USB = 1; - }; [Entity=Interface] interface Device { - attribute BusType busType; - attribute number deviceId; + attribute long deviceId; attribute String description; - }; [Entity=Interface] interface USBDevice: Device { - - attribute number vendorId; - attribute number productId; - + attribute i32 vendorId; + attribute i32 productId; }; [Entity=Interface] interface RemoteDeviceDriver { - - attribute number deviceId; + attribute long deviceId; attribute rpc.IRemoteObject remote; - }; [Entity=Interface] interface USBInterfaceDesc { - - attribute number bInterfaceNumber; - attribute number bClass; - attribute number bSubClass; - attribute number bProtocol; - + attribute i32 bInterfaceNumber; + attribute i32 bClass; + attribute i32 bSubClass; + attribute i32 bProtocol; }; [Entity=Interface] interface DeviceInfo { - - attribute number deviceId; + attribute long deviceId; attribute boolean isDriverMatched; [Optional] attribute String driverUid; - }; [Entity=Interface] interface USBDeviceInfo: DeviceInfo { - - attribute number vendorId; - attribute number productId; + attribute i32 vendorId; + attribute i32 productId; attribute sequence<[TypeArguments="USBInterfaceDesc"] Readonly> interfaceDescList; - }; [Entity=Interface] interface DriverInfo { - attribute BusType busType; attribute String driverUid; attribute String driverName; attribute String driverVersion; attribute String driverSize; attribute String description; - }; [Entity=Interface] interface USBDriverInfo: DriverInfo { - - attribute sequence productIdList; - attribute sequence vendorIdList; - - }; - [GlobalScope] - interface GlobalScope_deviceManager_ohos_driver_deviceManager { - - [Throws] - static sequence<[TypeArguments="Device"] Readonly> queryDevices(optional number busType); - [Throws] - static void bindDevice(number deviceId, AsyncCallback_Number_Void onDisconnect, AsyncCallback_Literal_Number_deviceId_rpc_IRemoteObject_remote_Void callback_); - [Throws] - static void bindDeviceDriver(number deviceId, AsyncCallback_Number_Void onDisconnect, AsyncCallback_RemoteDeviceDriver_Void callback_); - [Throws] - static async Literal_Number_deviceId_rpc.IRemoteObject_remote bindDevice(number deviceId, AsyncCallback_Number_Void onDisconnect); - [Throws] - static async RemoteDeviceDriver bindDeviceDriver(number deviceId, AsyncCallback_Number_Void onDisconnect); - [Throws] - static void unbindDevice(number deviceId, AsyncCallback_Number_Void callback_); - [Throws] - static async number unbindDevice(number deviceId); - [Throws] - static sequence<[TypeArguments="DeviceInfo"] Readonly> queryDeviceInfo(optional number deviceId); - [Throws] - static sequence<[TypeArguments="DriverInfo"] Readonly> queryDriverInfo(optional String driverUid); - + attribute sequence productIdList; + attribute sequence vendorIdList; }; - }; \ No newline at end of file diff --git a/idl/@ohos.effectKit.idl b/idl/@ohos.effectKit.idl index 68a6b4c..cf06c6f 100644 --- a/idl/@ohos.effectKit.idl +++ b/idl/@ohos.effectKit.idl @@ -1,11 +1,11 @@ -package ohos; +package ohos.effectKit; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimedia.image as image; +import ohos.multimedia.image.default as image; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace effectKit { - [Entity=Interface] interface Filter { - Filter blur(number radius); Filter blur(number radius, TileMode tileMode); Filter brightness(number bright); @@ -16,11 +16,10 @@ namespace effectKit { [Deprecated] image.PixelMap getPixelMap(); async image.PixelMap getEffectPixelMap(); - + async image.PixelMap getEffectPixelMap(boolean useCpuRender); }; [Entity=Interface] interface ColorPicker { - async Color getMainColor(); Color getMainColorSync(); Color getLargestProportionColor(); @@ -28,40 +27,29 @@ namespace effectKit { Color getHighestSaturationColor(); Color getAverageColor(); boolean isBlackOrWhiteOrGrayColor(number color); - }; [Entity=Interface] interface Color { - attribute number red; attribute number green; attribute number blue; attribute number alpha; - }; + Filter createEffect(image.PixelMap source); + [Throws] + async ColorPicker createColorPicker(image.PixelMap source); + [Throws] + async ColorPicker createColorPicker(image.PixelMap source, sequence region); [Async, Synthetic] callback AsyncCallback_ColorPicker_Void = void (ColorPicker result); + [Throws] + void createColorPicker(image.PixelMap source, AsyncCallback_ColorPicker_Void callback_); + [Throws] + void createColorPicker(image.PixelMap source, sequence region, AsyncCallback_ColorPicker_Void callback_); dictionary TileMode { - number CLAMP = 0; number REPEAT = 1; number MIRROR = 2; number DECAL = 3; - }; - [GlobalScope] - interface GlobalScope_effectKit_ohos_effectKit { - - static Filter createEffect(image.PixelMap source); - [Throws] - static async ColorPicker createColorPicker(image.PixelMap source); - [Throws] - static async ColorPicker createColorPicker(image.PixelMap source, sequence region); - [Throws] - static void createColorPicker(image.PixelMap source, AsyncCallback_ColorPicker_Void callback_); - [Throws] - static void createColorPicker(image.PixelMap source, sequence region, AsyncCallback_ColorPicker_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.EnterpriseAdminExtensionAbility.idl b/idl/@ohos.enterprise.EnterpriseAdminExtensionAbility.idl index e4593fb..e3f2e56 100644 --- a/idl/@ohos.enterprise.EnterpriseAdminExtensionAbility.idl +++ b/idl/@ohos.enterprise.EnterpriseAdminExtensionAbility.idl @@ -1,8 +1,7 @@ -package ohos.enterprise; -import ohos.enterprise.systemManager as systemManager; -[Entity=Class] +package ohos.enterprise.EnterpriseAdminExtensionAbility; +import ohos.enterprise.systemManager.default as systemManager; +[Entity=Class, DefaultExport] interface EnterpriseAdminExtensionAbility { - void onAdminEnabled(); void onAdminDisabled(); void onBundleAdded(String bundleName); @@ -16,5 +15,6 @@ interface EnterpriseAdminExtensionAbility { void onAccountAdded(number accountId); void onAccountSwitched(number accountId); void onAccountRemoved(number accountId); - + void onKioskModeEntering(String bundleName, number accountId); + void onKioskModeExiting(String bundleName, number accountId); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.accountManager.idl b/idl/@ohos.enterprise.accountManager.idl index 676a486..6c9383a 100644 --- a/idl/@ohos.enterprise.accountManager.idl +++ b/idl/@ohos.enterprise.accountManager.idl @@ -1,31 +1,38 @@ -package ohos.enterprise; +package ohos.enterprise.accountManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import ohos.account.osAccount as osAccount; +import ohos.app.ability.Want.default as Want; +import ohos.account.osAccount.default as osAccount; +[DefaultExport] namespace accountManager { - + [Entity=Interface] + interface DomainAccountPolicy { + [Optional] + attribute number authenticationValidityPeriod; + [Optional] + attribute number passwordValidityPeriod; + [Optional] + attribute number passwordExpirationNotification; + }; [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_accountManager_ohos_enterprise_accountManager { - - [Throws] - static void disallowAddLocalAccount(Want admin, boolean disallow, AsyncCallback_Void callback_); - [Throws] - static async void disallowAddLocalAccount(Want admin, boolean disallow); - [Throws] - static void disallowAddOsAccountByUser(Want admin, number userId, boolean disallow); - [Throws] - static boolean isAddOsAccountByUserDisallowed(Want admin, number userId); - [Throws] - static osAccount.OsAccountInfo addOsAccount(Want admin, String name, osAccount.OsAccountType type); - [Throws] - static void disallowOsAccountAddition(Want admin, boolean disallow, optional number accountId); - [Throws] - static boolean isOsAccountAdditionDisallowed(Want admin, optional number accountId); - [Throws] - static async osAccount.OsAccountInfo addOsAccountAsync(Want admin, String name, osAccount.OsAccountType type); - - }; - + [Throws] + void disallowAddLocalAccount(Want admin, boolean disallow, AsyncCallback_Void callback_); + [Throws] + async void disallowAddLocalAccount(Want admin, boolean disallow); + [Throws] + void disallowAddOsAccountByUser(Want admin, number userId, boolean disallow); + [Throws] + boolean isAddOsAccountByUserDisallowed(Want admin, number userId); + [Throws] + osAccount.OsAccountInfo addOsAccount(Want admin, String name, osAccount.OsAccountType type); + [Throws] + void disallowOsAccountAddition(Want admin, boolean disallow, optional number accountId); + [Throws] + boolean isOsAccountAdditionDisallowed(Want admin, optional number accountId); + [Throws] + async osAccount.OsAccountInfo addOsAccountAsync(Want admin, String name, osAccount.OsAccountType type); + [Throws] + void setDomainAccountPolicy(Want admin, osAccount.DomainAccountInfo domainAccountInfo, DomainAccountPolicy policy); + [Throws] + DomainAccountPolicy getDomainAccountPolicy(Want admin, osAccount.DomainAccountInfo domainAccountInfo); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.adminManager.idl b/idl/@ohos.enterprise.adminManager.idl index 01aa79c..d584034 100644 --- a/idl/@ohos.enterprise.adminManager.idl +++ b/idl/@ohos.enterprise.adminManager.idl @@ -1,24 +1,20 @@ -package ohos.enterprise; +package ohos.enterprise.adminManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.common.default as common; +[DefaultExport] namespace adminManager { - [Entity=Interface] interface EnterpriseInfo { - attribute String name; attribute String description; - }; dictionary AdminType { - number ADMIN_TYPE_NORMAL = 0; number ADMIN_TYPE_SUPER = 1; number ADMIN_TYPE_BYOD = 2; - }; dictionary ManagedEvent { - number MANAGED_EVENT_BUNDLE_ADDED = 0; number MANAGED_EVENT_BUNDLE_REMOVED = 1; number MANAGED_EVENT_APP_START = 2; @@ -27,80 +23,89 @@ namespace adminManager { number MANAGED_EVENT_ACCOUNT_ADDED = 5; number MANAGED_EVENT_ACCOUNT_SWITCHED = 6; number MANAGED_EVENT_ACCOUNT_REMOVED = 7; - + }; + dictionary RunningMode { + number DEFAULT = 0; + number MULTI_USER = 1; + }; + dictionary Policy { + number BLOCK_LIST = 0; + number TRUST_LIST = 1; }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enableAdmin(Want admin, EnterpriseInfo enterpriseInfo, AdminType type, AsyncCallback_Void callback_); + [Throws] + void enableAdmin(Want admin, EnterpriseInfo enterpriseInfo, AdminType type, number userId, AsyncCallback_Void callback_); + [Throws] + async void enableAdmin(Want admin, EnterpriseInfo enterpriseInfo, AdminType type, optional number userId); + [Throws] + void disableAdmin(Want admin, AsyncCallback_Void callback_); + [Throws] + void disableAdmin(Want admin, number userId, AsyncCallback_Void callback_); + [Throws] + async void disableAdmin(Want admin, optional number userId); + [Throws] + void disableSuperAdmin(String bundleName, AsyncCallback_Void callback_); + [Throws] + async void disableSuperAdmin(String bundleName); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isAdminEnabled(Want admin, AsyncCallback_Boolean_Void callback_); + [Throws] + void isAdminEnabled(Want admin, number userId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isAdminEnabled(Want admin, optional number userId); [Async, Synthetic] callback AsyncCallback_EnterpriseInfo_Void = void (EnterpriseInfo result); - [GlobalScope] - interface GlobalScope_adminManager_ohos_enterprise_adminManager { - - [Throws] - static void enableAdmin(Want admin, EnterpriseInfo enterpriseInfo, AdminType type, AsyncCallback_Void callback_); - [Throws] - static void enableAdmin(Want admin, EnterpriseInfo enterpriseInfo, AdminType type, number userId, AsyncCallback_Void callback_); - [Throws] - static async void enableAdmin(Want admin, EnterpriseInfo enterpriseInfo, AdminType type, optional number userId); - [Throws] - static void disableAdmin(Want admin, AsyncCallback_Void callback_); - [Throws] - static void disableAdmin(Want admin, number userId, AsyncCallback_Void callback_); - [Throws] - static async void disableAdmin(Want admin, optional number userId); - [Throws] - static void disableSuperAdmin(String bundleName, AsyncCallback_Void callback_); - [Throws] - static async void disableSuperAdmin(String bundleName); - [Throws] - static void isAdminEnabled(Want admin, AsyncCallback_Boolean_Void callback_); - [Throws] - static void isAdminEnabled(Want admin, number userId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isAdminEnabled(Want admin, optional number userId); - [Throws] - static void getEnterpriseInfo(Want admin, AsyncCallback_EnterpriseInfo_Void callback_); - [Throws] - static async EnterpriseInfo getEnterpriseInfo(Want admin); - [Throws] - static void setEnterpriseInfo(Want admin, EnterpriseInfo enterpriseInfo, AsyncCallback_Void callback_); - [Throws] - static async void setEnterpriseInfo(Want admin, EnterpriseInfo enterpriseInfo); - [Throws] - static void isSuperAdmin(String bundleName, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isSuperAdmin(String bundleName); - [Throws] - static void subscribeManagedEvent(Want admin, sequence managedEvents, AsyncCallback_Void callback_); - [Throws] - static async void subscribeManagedEvent(Want admin, sequence managedEvents); - [Throws] - static void unsubscribeManagedEvent(Want admin, sequence managedEvents, AsyncCallback_Void callback_); - [Throws] - static async void unsubscribeManagedEvent(Want admin, sequence managedEvents); - [Throws] - static void authorizeAdmin(Want admin, String bundleName, AsyncCallback_Void callback_); - [Throws] - static async void authorizeAdmin(Want admin, String bundleName); - [Throws] - static async Want getSuperAdmin(); - [Throws] - static void subscribeManagedEventSync(Want admin, sequence managedEvents); - [Throws] - static void unsubscribeManagedEventSync(Want admin, sequence managedEvents); - [Throws] - static void setDelegatedPolicies(Want admin, String bundleName, sequence policies); - [Throws] - static sequence getDelegatedPolicies(Want admin, String bundleName); - [Throws] - static sequence getDelegatedBundleNames(Want admin, String policy); - [Throws] - static void startAdminProvision(Want admin, AdminType type, common.Context context, record parameters); - [Throws] - static async sequence getAdmins(); - - }; - + [Throws] + void getEnterpriseInfo(Want admin, AsyncCallback_EnterpriseInfo_Void callback_); + [Throws] + async EnterpriseInfo getEnterpriseInfo(Want admin); + [Throws] + void setEnterpriseInfo(Want admin, EnterpriseInfo enterpriseInfo, AsyncCallback_Void callback_); + [Throws] + async void setEnterpriseInfo(Want admin, EnterpriseInfo enterpriseInfo); + [Throws] + void setAdminRunningMode(Want admin, RunningMode mode); + [Throws] + void isSuperAdmin(String bundleName, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isSuperAdmin(String bundleName); + [Throws] + void subscribeManagedEvent(Want admin, sequence managedEvents, AsyncCallback_Void callback_); + [Throws] + async void subscribeManagedEvent(Want admin, sequence managedEvents); + [Throws] + void unsubscribeManagedEvent(Want admin, sequence managedEvents, AsyncCallback_Void callback_); + [Throws] + async void unsubscribeManagedEvent(Want admin, sequence managedEvents); + [Throws] + void authorizeAdmin(Want admin, String bundleName, AsyncCallback_Void callback_); + [Throws] + async void authorizeAdmin(Want admin, String bundleName); + [Throws] + async Want getSuperAdmin(); + [Throws] + void subscribeManagedEventSync(Want admin, sequence managedEvents); + [Throws] + void unsubscribeManagedEventSync(Want admin, sequence managedEvents); + [Throws] + void setDelegatedPolicies(Want admin, String bundleName, sequence policies); + [Throws] + sequence getDelegatedPolicies(Want admin, String bundleName); + [Throws] + boolean isByodAdmin(Want admin); + [Throws] + sequence getDelegatedBundleNames(Want admin, String policy); + [Throws] + void startAdminProvision(Want admin, AdminType type, common.Context context, record parameters); + [Throws] + async sequence getAdmins(); + [Throws] + void replaceSuperAdmin(Want oldAdmin, Want newAdmin, boolean isKeepPolicy); + [Throws] + void setDelegatedPolicies(String bundleName, number accountId, sequence policies); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.applicationManager.idl b/idl/@ohos.enterprise.applicationManager.idl index 1535957..8badce7 100644 --- a/idl/@ohos.enterprise.applicationManager.idl +++ b/idl/@ohos.enterprise.applicationManager.idl @@ -1,52 +1,71 @@ -package ohos.enterprise; +package ohos.enterprise.applicationManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace applicationManager { - + dictionary KioskFeature { + number ALLOW_NOTIFICATION_CENTER = 1; + number ALLOW_CONTROL_CENTER = 2; + }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void addDisallowedRunningBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void addDisallowedRunningBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void addDisallowedRunningBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void addDisallowedRunningBundlesSync(Want admin, sequence appIds, optional number accountId); + [Throws] + void removeDisallowedRunningBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void removeDisallowedRunningBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void removeDisallowedRunningBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void removeDisallowedRunningBundlesSync(Want admin, sequence appIds, optional number accountId); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_applicationManager_ohos_enterprise_applicationManager { - - [Throws] - static void addDisallowedRunningBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void addDisallowedRunningBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void addDisallowedRunningBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void addDisallowedRunningBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void removeDisallowedRunningBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void removeDisallowedRunningBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void removeDisallowedRunningBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void removeDisallowedRunningBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void getDisallowedRunningBundles(Want admin, AsyncCallback_Array_String_Void callback_); - [Throws] - static void getDisallowedRunningBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getDisallowedRunningBundles(Want admin, optional number userId); - [Throws] - static sequence getDisallowedRunningBundlesSync(Want admin, optional number accountId); - [Throws] - static void addAutoStartApps(Want admin, sequence autoStartApps); - [Throws] - static void removeAutoStartApps(Want admin, sequence autoStartApps); - [Throws] - static sequence getAutoStartApps(Want admin); - [Throws] - static void addKeepAliveApps(Want admin, sequence bundleNames, number accountId); - [Throws] - static void removeKeepAliveApps(Want admin, sequence bundleNames, number accountId); - [Throws] - static sequence getKeepAliveApps(Want admin, number accountId); - - }; - + [Throws] + void getDisallowedRunningBundles(Want admin, AsyncCallback_Array_String_Void callback_); + [Throws] + void getDisallowedRunningBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getDisallowedRunningBundles(Want admin, optional number userId); + [Throws] + sequence getDisallowedRunningBundlesSync(Want admin, optional number accountId); + [Throws] + void addAutoStartApps(Want admin, sequence autoStartApps); + [Throws] + void addAutoStartApps(Want admin, sequence autoStartApps, number accountId, boolean disallowModify); + [Throws] + void removeAutoStartApps(Want admin, sequence autoStartApps); + [Throws] + void removeAutoStartApps(Want admin, sequence autoStartApps, number accountId); + [Throws] + sequence getAutoStartApps(Want admin); + [Throws] + sequence getAutoStartApps(Want admin, number accountId); + [Throws] + boolean isModifyAutoStartAppsDisallowed(Want admin, Want autoStartApp, number accountId); + [Throws] + void addKeepAliveApps(Want admin, sequence bundleNames, number accountId); + [Throws] + void addKeepAliveApps(Want admin, sequence bundleNames, number accountId, boolean disallowModify); + [Throws] + void removeKeepAliveApps(Want admin, sequence bundleNames, number accountId); + [Throws] + sequence getKeepAliveApps(Want admin, number accountId); + [Throws] + boolean isModifyKeepAliveAppsDisallowed(Want admin, number accountId, String bundleName); + [Throws] + void clearUpApplicationData(Want admin, String bundleName, number appIndex, number accountId); + [Throws] + void setAllowedKioskApps(Want admin, sequence appIdentifiers); + [Throws] + sequence getAllowedKioskApps(Want admin); + boolean isAppKioskAllowed(String appIdentifier); + [Throws] + void setKioskFeatures(Want admin, sequence features); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.bluetoothManager.idl b/idl/@ohos.enterprise.bluetoothManager.idl index d821460..f670ba0 100644 --- a/idl/@ohos.enterprise.bluetoothManager.idl +++ b/idl/@ohos.enterprise.bluetoothManager.idl @@ -1,33 +1,46 @@ -package ohos.enterprise; -import ohos.app.ability.Want as Want; -import ohos.bluetooth.constant as constant; -import ohos.bluetooth.access as access; +package ohos.enterprise.bluetoothManager; +import ohos.app.ability.Want.default as Want; +import ohos.bluetooth.constant.default as constant; +import ohos.bluetooth.access.default as access; +[DefaultExport] namespace bluetoothManager { - [Entity=Interface] interface BluetoothInfo { - attribute String name; attribute access.BluetoothState state; attribute constant.ProfileConnectionState connectionState; - }; - [GlobalScope] - interface GlobalScope_bluetoothManager_ohos_enterprise_bluetoothManager { - - [Throws] - static BluetoothInfo getBluetoothInfo(Want admin); - [Throws] - static void setBluetoothDisabled(Want admin, boolean disabled); - [Throws] - static boolean isBluetoothDisabled(Want admin); - [Throws] - static void addAllowedBluetoothDevices(Want admin, sequence deviceIds); - [Throws] - static void removeAllowedBluetoothDevices(Want admin, sequence deviceIds); - [Throws] - static sequence getAllowedBluetoothDevices(Want admin); - + dictionary Protocol { + number GATT = 0; + number SPP = 1; + number OPP = 2; }; - + [Throws] + BluetoothInfo getBluetoothInfo(Want admin); + [Throws] + void setBluetoothDisabled(Want admin, boolean disabled); + [Throws] + boolean isBluetoothDisabled(Want admin); + [Throws] + void addAllowedBluetoothDevices(Want admin, sequence deviceIds); + [Throws] + void removeAllowedBluetoothDevices(Want admin, sequence deviceIds); + [Throws] + sequence getAllowedBluetoothDevices(Want admin); + [Throws] + void turnOnBluetooth(Want admin); + [Throws] + void turnOffBluetooth(Want admin); + [Throws] + void addDisallowedBluetoothDevices(Want admin, sequence deviceIds); + [Throws] + void removeDisallowedBluetoothDevices(Want admin, sequence deviceIds); + [Throws] + sequence getDisallowedBluetoothDevices(Want admin); + [Throws] + void addDisallowedBluetoothProtocols(Want admin, number accountId, sequence protocols); + [Throws] + void removeDisallowedBluetoothProtocols(Want admin, number accountId, sequence protocols); + [Throws] + sequence getDisallowedBluetoothProtocols(Want admin, number accountId); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.browser.idl b/idl/@ohos.enterprise.browser.idl index 754190b..e35da0a 100644 --- a/idl/@ohos.enterprise.browser.idl +++ b/idl/@ohos.enterprise.browser.idl @@ -1,34 +1,28 @@ -package ohos.enterprise; +package ohos.enterprise.browser; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace browser { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setPolicies(Want admin, String appId, String policies, AsyncCallback_Void callback_); + [Throws] + async void setPolicies(Want admin, String appId, String policies); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_browser_ohos_enterprise_browser { - - [Throws] - static void setPolicies(Want admin, String appId, String policies, AsyncCallback_Void callback_); - [Throws] - static async void setPolicies(Want admin, String appId, String policies); - [Throws] - static void getPolicies(Want admin, String appId, AsyncCallback_String_Void callback_); - [Throws] - static async String getPolicies(Want admin, String appId); - [Throws] - static void setPolicySync(Want admin, String appId, String policyName, String policyValue); - [Throws] - static String getPoliciesSync(Want admin, String appId); - [Throws] - static void setManagedBrowserPolicy(Want admin, String bundleName, String policyName, String policyValue); - [Throws] - static buffer getManagedBrowserPolicy(Want admin, String bundleName); - static String getSelfManagedBrowserPolicyVersion(); - static buffer getSelfManagedBrowserPolicy(); - - }; - + [Throws] + void getPolicies(Want admin, String appId, AsyncCallback_String_Void callback_); + [Throws] + async String getPolicies(Want admin, String appId); + [Throws] + void setPolicySync(Want admin, String appId, String policyName, String policyValue); + [Throws] + String getPoliciesSync(Want admin, String appId); + [Throws] + void setManagedBrowserPolicy(Want admin, String bundleName, String policyName, String policyValue); + [Throws] + buffer getManagedBrowserPolicy(Want admin, String bundleName); + String getSelfManagedBrowserPolicyVersion(); + buffer getSelfManagedBrowserPolicy(); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.bundleManager.idl b/idl/@ohos.enterprise.bundleManager.idl index a89c44f..c2d72cd 100644 --- a/idl/@ohos.enterprise.bundleManager.idl +++ b/idl/@ohos.enterprise.bundleManager.idl @@ -1,113 +1,181 @@ -package ohos.enterprise; +package ohos.enterprise.bundleManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace bundleManager { - [Entity=Interface] interface InstallParam { - [Optional] attribute number userId; [Optional] attribute number installFlag; - + [Optional] + attribute record parameters; + }; + [Entity=Interface] + interface Resource { + attribute String bundleName; + attribute String moduleName; + attribute number id; + }; + [Entity=Interface] + interface BundleInfo { + readonly attribute String name; + readonly attribute String vendor; + readonly attribute number versionCode; + readonly attribute String versionName; + readonly attribute number minCompatibleVersionCode; + readonly attribute number targetVersion; + readonly attribute ApplicationInfo appInfo; + readonly attribute SignatureInfo signatureInfo; + readonly attribute number installTime; + readonly attribute number updateTime; + readonly attribute number appIndex; + [Optional] + readonly attribute number firstInstallTime; + }; + [Entity=Interface] + interface SignatureInfo { + readonly attribute String appId; + readonly attribute String fingerprint; + readonly attribute String appIdentifier; + [Optional] + readonly attribute String certificate; + }; + [Entity=Interface] + interface ApplicationInfo { + readonly attribute String name; + readonly attribute String description; + readonly attribute number descriptionId; + readonly attribute boolean enabled; + readonly attribute String label; + readonly attribute number labelId; + readonly attribute String icon; + readonly attribute number iconId; + readonly attribute String process; + readonly attribute String codePath; + readonly attribute boolean removable; + readonly attribute number accessTokenId; + readonly attribute number uid; + readonly attribute Resource iconResource; + readonly attribute Resource labelResource; + readonly attribute Resource descriptionResource; + readonly attribute String appDistributionType; + readonly attribute String appProvisionType; + readonly attribute boolean systemApp; + readonly attribute boolean debug; + readonly attribute boolean dataUnclearable; + readonly attribute String nativeLibraryPath; + readonly attribute number appIndex; + readonly attribute String installSource; + readonly attribute String releaseType; }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void addAllowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void addAllowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void addAllowedInstallBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void addAllowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); + [Throws] + void removeAllowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void removeAllowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void removeAllowedInstallBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void removeAllowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_bundleManager_ohos_enterprise_bundleManager { - - [Throws] - static void addAllowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void addAllowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void addAllowedInstallBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void addAllowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void removeAllowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void removeAllowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void removeAllowedInstallBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void removeAllowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void getAllowedInstallBundles(Want admin, AsyncCallback_Array_String_Void callback_); - [Throws] - static void getAllowedInstallBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getAllowedInstallBundles(Want admin, optional number userId); - [Throws] - static sequence getAllowedInstallBundlesSync(Want admin, optional number accountId); - [Throws] - static void addDisallowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void addDisallowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void addDisallowedInstallBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void addDisallowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void removeDisallowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void removeDisallowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void removeDisallowedInstallBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void removeDisallowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void getDisallowedInstallBundles(Want admin, AsyncCallback_Array_String_Void callback_); - [Throws] - static void getDisallowedInstallBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getDisallowedInstallBundles(Want admin, optional number userId); - [Throws] - static sequence getDisallowedInstallBundlesSync(Want admin, optional number accountId); - [Throws] - static void addDisallowedUninstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void addDisallowedUninstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void addDisallowedUninstallBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void addDisallowedUninstallBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void removeDisallowedUninstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); - [Throws] - static void removeDisallowedUninstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); - [Throws] - static async void removeDisallowedUninstallBundles(Want admin, sequence appIds, optional number userId); - [Throws] - static void removeDisallowedUninstallBundlesSync(Want admin, sequence appIds, optional number accountId); - [Throws] - static void getDisallowedUninstallBundles(Want admin, AsyncCallback_Array_String_Void callback_); - [Throws] - static void getDisallowedUninstallBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getDisallowedUninstallBundles(Want admin, optional number userId); - [Throws] - static sequence getDisallowedUninstallBundlesSync(Want admin, optional number accountId); - [Throws] - static void uninstall(Want admin, String bundleName, AsyncCallback_Void callback_); - [Throws] - static void uninstall(Want admin, String bundleName, number userId, AsyncCallback_Void callback_); - [Throws] - static void uninstall(Want admin, String bundleName, boolean isKeepData, AsyncCallback_Void callback_); - [Throws] - static void uninstall(Want admin, String bundleName, number userId, boolean isKeepData, AsyncCallback_Void callback_); - [Throws] - static async void uninstall(Want admin, String bundleName, optional number userId, optional boolean isKeepData); - [Throws] - static void install(Want admin, sequence hapFilePaths, AsyncCallback_Void callback_); - [Throws] - static void install(Want admin, sequence hapFilePaths, InstallParam installParam, AsyncCallback_Void callback_); - [Throws] - static async void install(Want admin, sequence hapFilePaths, optional InstallParam installParam); - + [Throws] + void getAllowedInstallBundles(Want admin, AsyncCallback_Array_String_Void callback_); + [Throws] + void getAllowedInstallBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getAllowedInstallBundles(Want admin, optional number userId); + [Throws] + sequence getAllowedInstallBundlesSync(Want admin, optional number accountId); + [Throws] + void addDisallowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void addDisallowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void addDisallowedInstallBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void addDisallowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); + [Throws] + void removeDisallowedInstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void removeDisallowedInstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void removeDisallowedInstallBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void removeDisallowedInstallBundlesSync(Want admin, sequence appIds, optional number accountId); + [Throws] + void getDisallowedInstallBundles(Want admin, AsyncCallback_Array_String_Void callback_); + [Throws] + void getDisallowedInstallBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getDisallowedInstallBundles(Want admin, optional number userId); + [Throws] + sequence getDisallowedInstallBundlesSync(Want admin, optional number accountId); + [Throws] + void addDisallowedUninstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void addDisallowedUninstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void addDisallowedUninstallBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void addDisallowedUninstallBundlesSync(Want admin, sequence appIds, optional number accountId); + [Throws] + void removeDisallowedUninstallBundles(Want admin, sequence appIds, AsyncCallback_Void callback_); + [Throws] + void removeDisallowedUninstallBundles(Want admin, sequence appIds, number userId, AsyncCallback_Void callback_); + [Throws] + async void removeDisallowedUninstallBundles(Want admin, sequence appIds, optional number userId); + [Throws] + void removeDisallowedUninstallBundlesSync(Want admin, sequence appIds, optional number accountId); + [Throws] + void getDisallowedUninstallBundles(Want admin, AsyncCallback_Array_String_Void callback_); + [Throws] + void getDisallowedUninstallBundles(Want admin, number userId, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getDisallowedUninstallBundles(Want admin, optional number userId); + [Throws] + sequence getDisallowedUninstallBundlesSync(Want admin, optional number accountId); + [Throws] + void uninstall(Want admin, String bundleName, AsyncCallback_Void callback_); + [Throws] + void uninstall(Want admin, String bundleName, number userId, AsyncCallback_Void callback_); + [Throws] + void uninstall(Want admin, String bundleName, boolean isKeepData, AsyncCallback_Void callback_); + [Throws] + void uninstall(Want admin, String bundleName, number userId, boolean isKeepData, AsyncCallback_Void callback_); + [Throws] + async void uninstall(Want admin, String bundleName, optional number userId, optional boolean isKeepData); + [Throws] + void install(Want admin, sequence hapFilePaths, AsyncCallback_Void callback_); + [Throws] + void install(Want admin, sequence hapFilePaths, InstallParam installParam, AsyncCallback_Void callback_); + [Throws] + async void install(Want admin, sequence hapFilePaths, optional InstallParam installParam); + [Throws] + async sequence getInstalledBundleList(Want admin, number accountId); + [Throws] + void addInstallationAllowedAppDistributionTypes(Want admin, sequence appDistributionTypes); + [Throws] + void removeInstallationAllowedAppDistributionTypes(Want admin, sequence appDistributionTypes); + [Throws] + sequence getInstallationAllowedAppDistributionTypes(Want admin); + dictionary AppDistributionType { + number APP_GALLERY = 1; + number ENTERPRISE = 2; + number ENTERPRISE_NORMAL = 3; + number ENTERPRISE_MDM = 4; + number INTERNALTESTING = 5; + number CROWDTESTING = 6; }; - }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.dateTimeManager.idl b/idl/@ohos.enterprise.dateTimeManager.idl index 8468dac..ccb99c0 100644 --- a/idl/@ohos.enterprise.dateTimeManager.idl +++ b/idl/@ohos.enterprise.dateTimeManager.idl @@ -1,28 +1,22 @@ -package ohos.enterprise; +package ohos.enterprise.dateTimeManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace dateTimeManager { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setDateTime(Want admin, number time, AsyncCallback_Void callback_); + [Throws] + async void setDateTime(Want admin, number time); + [Throws] + void disallowModifyDateTime(Want admin, boolean disallow, AsyncCallback_Void callback_); + [Throws] + async void disallowModifyDateTime(Want admin, boolean disallow); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); - [GlobalScope] - interface GlobalScope_dateTimeManager_ohos_enterprise_dateTimeManager { - - [Throws] - static void setDateTime(Want admin, number time, AsyncCallback_Void callback_); - [Throws] - static async void setDateTime(Want admin, number time); - [Throws] - static void disallowModifyDateTime(Want admin, boolean disallow, AsyncCallback_Void callback_); - [Throws] - static async void disallowModifyDateTime(Want admin, boolean disallow); - [Throws] - static void isModifyDateTimeDisallowed(Want admin, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isModifyDateTimeDisallowed(Want admin); - - }; - + [Throws] + void isModifyDateTimeDisallowed(Want admin, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isModifyDateTimeDisallowed(Want admin); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.deviceControl.idl b/idl/@ohos.enterprise.deviceControl.idl index 3a92608..6267025 100644 --- a/idl/@ohos.enterprise.deviceControl.idl +++ b/idl/@ohos.enterprise.deviceControl.idl @@ -1,27 +1,21 @@ -package ohos.enterprise; +package ohos.enterprise.deviceControl; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace deviceControl { - [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_deviceControl_ohos_enterprise_deviceControl { - - [Throws] - static void resetFactory(Want admin, AsyncCallback_Void callback_); - [Throws] - static async void resetFactory(Want admin); - [Throws] - static void shutdown(Want admin); - [Throws] - static void reboot(Want admin); - [Throws] - static void lockScreen(Want admin); - [Throws] - static void operateDevice(Want admin, String operate, optional String addition); - - }; - + [Throws] + void resetFactory(Want admin, AsyncCallback_Void callback_); + [Throws] + async void resetFactory(Want admin); + [Throws] + void shutdown(Want admin); + [Throws] + void reboot(Want admin); + [Throws] + void lockScreen(Want admin); + [Throws] + void operateDevice(Want admin, String operate, optional String addition); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.deviceInfo.idl b/idl/@ohos.enterprise.deviceInfo.idl index c78486d..83c6f2e 100644 --- a/idl/@ohos.enterprise.deviceInfo.idl +++ b/idl/@ohos.enterprise.deviceInfo.idl @@ -1,28 +1,22 @@ -package ohos.enterprise; +package ohos.enterprise.deviceInfo; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace deviceInfo { - [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_deviceInfo_ohos_enterprise_deviceInfo { - - [Throws] - static void getDeviceSerial(Want admin, AsyncCallback_String_Void callback_); - [Throws] - static async String getDeviceSerial(Want admin); - [Throws] - static void getDisplayVersion(Want admin, AsyncCallback_String_Void callback_); - [Throws] - static async String getDisplayVersion(Want admin); - [Throws] - static void getDeviceName(Want admin, AsyncCallback_String_Void callback_); - [Throws] - static async String getDeviceName(Want admin); - [Throws] - static String getDeviceInfo(Want admin, String label); - - }; - + [Throws] + void getDeviceSerial(Want admin, AsyncCallback_String_Void callback_); + [Throws] + async String getDeviceSerial(Want admin); + [Throws] + void getDisplayVersion(Want admin, AsyncCallback_String_Void callback_); + [Throws] + async String getDisplayVersion(Want admin); + [Throws] + void getDeviceName(Want admin, AsyncCallback_String_Void callback_); + [Throws] + async String getDeviceName(Want admin); + [Throws] + String getDeviceInfo(Want admin, String label); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.deviceSettings.idl b/idl/@ohos.enterprise.deviceSettings.idl index 6de88fd..52ae138 100644 --- a/idl/@ohos.enterprise.deviceSettings.idl +++ b/idl/@ohos.enterprise.deviceSettings.idl @@ -1,68 +1,58 @@ -package ohos.enterprise; +package ohos.enterprise.deviceSettings; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace deviceSettings { - [Entity=Interface] interface PowerPolicy { - attribute PowerPolicyAction powerPolicyAction; attribute number delayTime; - }; dictionary PowerPolicyAction { - number NONE = 0; number AUTO_SUSPEND = 1; number FORCE_SUSPEND = 2; number HIBERNATE = 3; number SHUTDOWN = 4; - }; dictionary PowerScene { - number TIME_OUT = 0; - }; [Entity=Interface] interface CertBlob { - attribute buffer inData; attribute String alias; - }; + [Throws] + void setScreenOffTime(Want admin, number time); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getScreenOffTime(Want admin, AsyncCallback_Number_Void callback_); + [Throws] + async number getScreenOffTime(Want admin); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void installUserCertificate(Want admin, CertBlob certificate, AsyncCallback_String_Void callback_); + [Throws] + async String installUserCertificate(Want admin, CertBlob certificate); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_deviceSettings_ohos_enterprise_deviceSettings { - - [Throws] - static void setScreenOffTime(Want admin, number time); - [Throws] - static void getScreenOffTime(Want admin, AsyncCallback_Number_Void callback_); - [Throws] - static async number getScreenOffTime(Want admin); - [Throws] - static void installUserCertificate(Want admin, CertBlob certificate, AsyncCallback_String_Void callback_); - [Throws] - static async String installUserCertificate(Want admin, CertBlob certificate); - [Throws] - static void uninstallUserCertificate(Want admin, String certUri, AsyncCallback_Void callback_); - [Throws] - static async void uninstallUserCertificate(Want admin, String certUri); - [Throws] - static void setPowerPolicy(Want admin, PowerScene powerScene, PowerPolicy powerPolicy); - [Throws] - static PowerPolicy getPowerPolicy(Want admin, PowerScene powerScene); - [Throws] - static void setValue(Want admin, String item, String value); - [Throws] - static String getValue(Want admin, String item); - - }; - + [Throws] + void uninstallUserCertificate(Want admin, String certUri, AsyncCallback_Void callback_); + [Throws] + async void uninstallUserCertificate(Want admin, String certUri); + [Throws] + void setPowerPolicy(Want admin, PowerScene powerScene, PowerPolicy powerPolicy); + [Throws] + PowerPolicy getPowerPolicy(Want admin, PowerScene powerScene); + [Throws] + void setValue(Want admin, String item, String value); + [Throws] + String getValue(Want admin, String item); + [Throws] + async void setHomeWallpaper(Want admin, number fd); + [Throws] + async void setUnlockWallpaper(Want admin, number fd); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.locationManager.idl b/idl/@ohos.enterprise.locationManager.idl index 58c0345..1e4e344 100644 --- a/idl/@ohos.enterprise.locationManager.idl +++ b/idl/@ohos.enterprise.locationManager.idl @@ -1,22 +1,14 @@ -package ohos.enterprise; -import ohos.app.ability.Want as Want; +package ohos.enterprise.locationManager; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace locationManager { - dictionary LocationPolicy { - number DEFAULT_LOCATION_SERVICE = 0; number DISALLOW_LOCATION_SERVICE = 1; number FORCE_OPEN_LOCATION_SERVICE = 2; - }; - [GlobalScope] - interface GlobalScope_locationManager_ohos_enterprise_locationManager { - - [Throws] - static void setLocationPolicy(Want admin, LocationPolicy policy); - [Throws] - static LocationPolicy getLocationPolicy(Want admin); - - }; - + [Throws] + void setLocationPolicy(Want admin, LocationPolicy policy); + [Throws] + LocationPolicy getLocationPolicy(Want admin); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.networkManager.idl b/idl/@ohos.enterprise.networkManager.idl index 1c13cf5..3c19854 100644 --- a/idl/@ohos.enterprise.networkManager.idl +++ b/idl/@ohos.enterprise.networkManager.idl @@ -1,40 +1,31 @@ -package ohos.enterprise; +package ohos.enterprise.networkManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import ohos.net.connection as connection; +import ohos.app.ability.Want.default as Want; +import ohos.net.connection.default as connection; +[DefaultExport] namespace networkManager { - dictionary AddMethod { - number APPEND = 0; number INSERT = 1; - }; dictionary Direction { - number INPUT = 0; number OUTPUT = 1; number FORWARD = 2; - }; dictionary Action { - number ALLOW = 0; number DENY = 1; number REJECT = 2; - }; dictionary Protocol { - number ALL = 0; number TCP = 1; number UDP = 2; number ICMP = 3; - }; [Entity=Interface] interface AddFilterRule { - [Optional] attribute number ruleNo; [Optional] @@ -52,11 +43,9 @@ namespace networkManager { attribute Action action; [Optional] attribute Protocol protocol; - }; [Entity=Interface] interface RemoveFilterRule { - [Optional] attribute String srcAddr; [Optional] @@ -72,11 +61,9 @@ namespace networkManager { attribute Action action; [Optional] attribute Protocol protocol; - }; [Entity=Interface] interface FirewallRule { - [Optional] attribute String srcAddr; [Optional] @@ -93,11 +80,9 @@ namespace networkManager { attribute Action action; [Optional] attribute Protocol protocol; - }; [Entity=Interface] interface DomainFilterRule { - [Optional] attribute String domainName; [Optional] @@ -106,92 +91,101 @@ namespace networkManager { attribute Action action; [Optional] attribute Direction direction; - }; [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void getAllNetworkInterfaces(Want admin, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getAllNetworkInterfaces(Want admin); + [Throws] + sequence getAllNetworkInterfacesSync(Want admin); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getIpAddress(Want admin, String networkInterface, AsyncCallback_String_Void callback_); + [Throws] + async String getIpAddress(Want admin, String networkInterface); + [Throws] + String getIpAddressSync(Want admin, String networkInterface); + [Throws] + void getMac(Want admin, String networkInterface, AsyncCallback_String_Void callback_); + [Throws] + async String getMac(Want admin, String networkInterface); + [Throws] + String getMacSync(Want admin, String networkInterface); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isNetworkInterfaceDisabled(Want admin, String networkInterface, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isNetworkInterfaceDisabled(Want admin, String networkInterface); + [Throws] + boolean isNetworkInterfaceDisabledSync(Want admin, String networkInterface); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setNetworkInterfaceDisabled(Want admin, String networkInterface, boolean isDisabled, AsyncCallback_Void callback_); + [Throws] + async void setNetworkInterfaceDisabled(Want admin, String networkInterface, boolean isDisabled); + [Throws] + void setNetworkInterfaceDisabledSync(Want admin, String networkInterface, boolean isDisabled); + [Throws] + void setGlobalProxy(Want admin, connection.HttpProxy httpProxy, AsyncCallback_Void callback_); + [Throws] + async void setGlobalProxy(Want admin, connection.HttpProxy httpProxy); + [Throws] + void setGlobalProxySync(Want admin, connection.HttpProxy httpProxy); + [Throws] + void setGlobalProxyForAccount(Want admin, connection.HttpProxy httpProxy, number accountId); [Async, Synthetic] - callback AsyncCallback_connection_HttpProxy_Void = void (connection.HttpProxy result); - [GlobalScope] - interface GlobalScope_networkManager_ohos_enterprise_networkManager { - - [Throws] - static void getAllNetworkInterfaces(Want admin, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getAllNetworkInterfaces(Want admin); - [Throws] - static sequence getAllNetworkInterfacesSync(Want admin); - [Throws] - static void getIpAddress(Want admin, String networkInterface, AsyncCallback_String_Void callback_); - [Throws] - static async String getIpAddress(Want admin, String networkInterface); - [Throws] - static String getIpAddressSync(Want admin, String networkInterface); - [Throws] - static void getMac(Want admin, String networkInterface, AsyncCallback_String_Void callback_); - [Throws] - static async String getMac(Want admin, String networkInterface); - [Throws] - static String getMacSync(Want admin, String networkInterface); - [Throws] - static void isNetworkInterfaceDisabled(Want admin, String networkInterface, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isNetworkInterfaceDisabled(Want admin, String networkInterface); - [Throws] - static boolean isNetworkInterfaceDisabledSync(Want admin, String networkInterface); - [Throws] - static void setNetworkInterfaceDisabled(Want admin, String networkInterface, boolean isDisabled, AsyncCallback_Void callback_); - [Throws] - static async void setNetworkInterfaceDisabled(Want admin, String networkInterface, boolean isDisabled); - [Throws] - static void setNetworkInterfaceDisabledSync(Want admin, String networkInterface, boolean isDisabled); - [Throws] - static void setGlobalProxy(Want admin, connection.HttpProxy httpProxy, AsyncCallback_Void callback_); - [Throws] - static async void setGlobalProxy(Want admin, connection.HttpProxy httpProxy); - [Throws] - static void setGlobalProxySync(Want admin, connection.HttpProxy httpProxy); - [Throws] - static void setGlobalProxyForAccount(Want admin, connection.HttpProxy httpProxy, number accountId); - [Throws] - static void getGlobalProxy(Want admin, AsyncCallback_connection_HttpProxy_Void callback_); - [Throws] - static async connection.HttpProxy getGlobalProxy(Want admin); - [Throws] - static connection.HttpProxy getGlobalProxySync(Want admin); - [Throws] - static connection.HttpProxy getGlobalProxyForAccount(Want admin, number accountId); - [Throws] - static void addIptablesFilterRule(Want admin, AddFilterRule filterRule, AsyncCallback_Void callback_); - [Throws] - static async void addIptablesFilterRule(Want admin, AddFilterRule filterRule); - [Throws] - static void removeIptablesFilterRule(Want admin, RemoveFilterRule filterRule, AsyncCallback_Void callback_); - [Throws] - static async void removeIptablesFilterRule(Want admin, RemoveFilterRule filterRule); - [Throws] - static void listIptablesFilterRules(Want admin, AsyncCallback_String_Void callback_); - [Throws] - static async String listIptablesFilterRules(Want admin); - [Throws] - static void addFirewallRule(Want admin, FirewallRule firewallRule); - [Throws] - static void removeFirewallRule(Want admin, optional FirewallRule firewallRule); - [Throws] - static sequence getFirewallRules(Want admin); - [Throws] - static void addDomainFilterRule(Want admin, DomainFilterRule domainFilterRule); - [Throws] - static void removeDomainFilterRule(Want admin, optional DomainFilterRule domainFilterRule); - [Throws] - static sequence getDomainFilterRules(Want admin); - - }; - + callback AsyncCallback_Connection_HttpProxy_Void = void (connection.HttpProxy result); + [Throws] + void getGlobalProxy(Want admin, AsyncCallback_Connection_HttpProxy_Void callback_); + [Throws] + async connection.HttpProxy getGlobalProxy(Want admin); + [Throws] + connection.HttpProxy getGlobalProxySync(Want admin); + [Throws] + connection.HttpProxy getGlobalProxyForAccount(Want admin, number accountId); + [Throws] + void addIptablesFilterRule(Want admin, AddFilterRule filterRule, AsyncCallback_Void callback_); + [Throws] + async void addIptablesFilterRule(Want admin, AddFilterRule filterRule); + [Throws] + void removeIptablesFilterRule(Want admin, RemoveFilterRule filterRule, AsyncCallback_Void callback_); + [Throws] + async void removeIptablesFilterRule(Want admin, RemoveFilterRule filterRule); + [Throws] + void listIptablesFilterRules(Want admin, AsyncCallback_String_Void callback_); + [Throws] + async String listIptablesFilterRules(Want admin); + [Throws] + void addFirewallRule(Want admin, FirewallRule firewallRule); + [Throws] + void removeFirewallRule(Want admin, optional FirewallRule firewallRule); + [Throws] + sequence getFirewallRules(Want admin); + [Throws] + void addDomainFilterRule(Want admin, DomainFilterRule domainFilterRule); + [Throws] + void removeDomainFilterRule(Want admin, optional DomainFilterRule domainFilterRule); + [Throws] + sequence getDomainFilterRules(Want admin); + [Throws] + void turnOnMobileData(Want admin, boolean isForce); + [Throws] + void turnOffMobileData(Want admin); + [Throws] + void addApn(Want admin, record apnInfo); + [Throws] + void deleteApn(Want admin, String apnId); + [Throws] + void updateApn(Want admin, record apnInfo, String apnId); + [Throws] + void setPreferredApn(Want admin, String apnId); + [Throws] + sequence queryApn(Want admin, record apnInfo); + [Throws] + record queryApn(Want admin, String apnId); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.restrictions.idl b/idl/@ohos.enterprise.restrictions.idl index 25f5818..ce686cf 100644 --- a/idl/@ohos.enterprise.restrictions.idl +++ b/idl/@ohos.enterprise.restrictions.idl @@ -1,52 +1,52 @@ -package ohos.enterprise; +package ohos.enterprise.restrictions; +import ohos.base.AsyncCallback as AsyncCallback; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace restrictions { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setPrinterDisabled(Want admin, boolean disabled, AsyncCallback_Void callback_); + [Throws] + async void setPrinterDisabled(Want admin, boolean disabled); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); - [GlobalScope] - interface GlobalScope_restrictions_ohos_enterprise_restrictions { - - [Throws] - static void setPrinterDisabled(Want admin, boolean disabled, AsyncCallback_Void callback_); - [Throws] - static async void setPrinterDisabled(Want admin, boolean disabled); - [Throws] - static void isPrinterDisabled(Want admin, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isPrinterDisabled(Want admin); - [Throws] - static void setHdcDisabled(Want admin, boolean disabled, AsyncCallback_Void callback_); - [Throws] - static async void setHdcDisabled(Want admin, boolean disabled); - [Throws] - static void isHdcDisabled(Want admin, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isHdcDisabled(Want admin); - [Throws] - static void disableMicrophone(Want admin, boolean disable); - [Throws] - static boolean isMicrophoneDisabled(Want admin); - [Throws] - static void setFingerprintAuthDisabled(Want admin, boolean disabled); - [Throws] - static boolean isFingerprintAuthDisabled(Want admin); - [Throws] - static void setDisallowedPolicy(Want admin, String feature, boolean disallow); - [Throws] - static boolean getDisallowedPolicy(Want admin, String feature); - [Throws] - static void setDisallowedPolicyForAccount(Want admin, String feature, boolean disallow, number accountId); - [Throws] - static boolean getDisallowedPolicyForAccount(Want admin, String feature, number accountId); - [Throws] - static void addDisallowedListForAccount(Want admin, String feature, sequence list, number accountId); - [Throws] - static void removeDisallowedListForAccount(Want admin, String feature, sequence list, number accountId); - [Throws] - static sequence getDisallowedListForAccount(Want admin, String feature, number accountId); - - }; - + [Throws] + void isPrinterDisabled(Want admin, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isPrinterDisabled(Want admin); + [Throws] + void setHdcDisabled(Want admin, boolean disabled, AsyncCallback_Void callback_); + [Throws] + async void setHdcDisabled(Want admin, boolean disabled); + [Throws] + void isHdcDisabled(Want admin, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isHdcDisabled(Want admin); + [Throws] + void disableMicrophone(Want admin, boolean disable); + [Throws] + boolean isMicrophoneDisabled(Want admin); + [Throws] + void setFingerprintAuthDisabled(Want admin, boolean disabled); + [Throws] + boolean isFingerprintAuthDisabled(Want admin); + [Throws] + void setDisallowedPolicy(Want admin, String feature, boolean disallow); + [Throws] + boolean getDisallowedPolicy(Want admin, String feature); + [Throws] + void setDisallowedPolicyForAccount(Want admin, String feature, boolean disallow, number accountId); + [Throws] + boolean getDisallowedPolicyForAccount((Want or undefined) admin, String feature, number accountId); + [Throws] + void addDisallowedListForAccount(Want admin, String feature, sequence list, number accountId); + [Throws] + void removeDisallowedListForAccount(Want admin, String feature, sequence list, number accountId); + [Throws] + sequence getDisallowedListForAccount(Want admin, String feature, number accountId); + [Throws] + void setUserRestriction(Want admin, String settingsItem, boolean restricted); + [Throws] + boolean getUserRestricted(Want admin, String settingsItem); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.securityManager.idl b/idl/@ohos.enterprise.securityManager.idl index 6e4a9a9..0f72761 100644 --- a/idl/@ohos.enterprise.securityManager.idl +++ b/idl/@ohos.enterprise.securityManager.idl @@ -1,72 +1,77 @@ -package ohos.enterprise; -import ohos.app.ability.Want as Want; -import ohos.multimedia.image as image; +package ohos.enterprise.securityManager; +import ohos.app.ability.Want.default as Want; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace securityManager { - [Entity=Interface] interface DeviceEncryptionStatus { - attribute boolean isEncrypted; - }; [Entity=Interface] interface CertBlob { - attribute buffer inData; attribute String alias; - }; [Entity=Interface] + interface ApplicationInstance { + attribute String appIdentifier; + attribute number accountId; + attribute number appIndex; + }; + [Throws] + String getSecurityPatchTag(Want admin); + [Throws] + DeviceEncryptionStatus getDeviceEncryptionStatus(Want admin); + [Throws] + String getSecurityStatus(Want admin, String item); + [Throws] + async String installUserCertificate(Want admin, CertBlob certificate); + [Throws] + String installUserCertificate(Want admin, CertBlob certificate, number accountId); + [Throws] + async void uninstallUserCertificate(Want admin, String certUri); + [Throws] + sequence getUserCertificates(Want admin, number accountId); + [Throws] + void setPasswordPolicy(Want admin, PasswordPolicy policy); + [Throws] + PasswordPolicy getPasswordPolicy(Want admin); + [Throws] + PasswordPolicy getPasswordPolicy(); + [Throws] + void setAppClipboardPolicy(Want admin, number tokenId, ClipboardPolicy policy); + [Throws] + String getAppClipboardPolicy(Want admin, optional number tokenId); + [Throws] + void setAppClipboardPolicy(Want admin, String bundleName, number accountId, ClipboardPolicy policy); + [Throws] + String getAppClipboardPolicy(Want admin, String bundleName, number accountId); + [Throws] + void setPermissionManagedState(Want admin, ApplicationInstance applicationInstance, sequence permissions, PermissionManagedState managedState); + [Throws] + PermissionManagedState getPermissionManagedState(Want admin, ApplicationInstance applicationInstance, String permission); + [Throws] + void setWatermarkImage(Want admin, String bundleName, (String or image.PixelMap) source, number accountId); + [Throws] + void cancelWatermarkImage(Want admin, String bundleName, number accountId); + [Entity=Interface] interface PasswordPolicy { - [Optional] attribute String complexityRegex; [Optional] attribute number validityPeriod; [Optional] attribute String additionalDescription; - }; dictionary ClipboardPolicy { - number DEFAULT = 0; number IN_APP = 1; number LOCAL_DEVICE = 2; number CROSS_DEVICE = 3; - }; - [GlobalScope] - interface GlobalScope_securityManager_ohos_enterprise_securityManager { - - [Throws] - static String getSecurityPatchTag(Want admin); - [Throws] - static DeviceEncryptionStatus getDeviceEncryptionStatus(Want admin); - [Throws] - static String getSecurityStatus(Want admin, String item); - [Throws] - static async String installUserCertificate(Want admin, CertBlob certificate); - [Throws] - static String installUserCertificate(Want admin, CertBlob certificate, number accountId); - [Throws] - static async void uninstallUserCertificate(Want admin, String certUri); - [Throws] - static sequence getUserCertificates(Want admin, number accountId); - [Throws] - static void setPasswordPolicy(Want admin, PasswordPolicy policy); - [Throws] - static PasswordPolicy getPasswordPolicy(Want admin); - [Throws] - static PasswordPolicy getPasswordPolicy(); - [Throws] - static void setAppClipboardPolicy(Want admin, number tokenId, ClipboardPolicy policy); - [Throws] - static String getAppClipboardPolicy(Want admin, optional number tokenId); - [Throws] - static void setWatermarkImage(Want admin, String bundleName, (String or image.PixelMap) source, number accountId); - [Throws] - static void cancelWatermarkImage(Want admin, String bundleName, number accountId); - + dictionary PermissionManagedState { + number DEFAULT = 1; + number GRANTED = 0; + number DENIED = -1; }; - }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.systemManager.idl b/idl/@ohos.enterprise.systemManager.idl index fe6eb0e..bee200b 100644 --- a/idl/@ohos.enterprise.systemManager.idl +++ b/idl/@ohos.enterprise.systemManager.idl @@ -1,27 +1,22 @@ -package ohos.enterprise; -import ohos.app.ability.Want as Want; +package ohos.enterprise.systemManager; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace systemManager { - [Entity=Interface] interface SystemUpdateInfo { - attribute String versionName; attribute number firstReceivedTime; attribute String packageType; - }; dictionary PolicyType { - number DEFAULT = 0; number PROHIBIT = 1; number UPDATE_TO_SPECIFIC_VERSION = 2; number WINDOWS = 3; number POSTPONE = 4; - }; [Entity=Interface] interface OtaUpdatePolicy { - attribute PolicyType policyType; attribute String version; [Optional] @@ -32,87 +27,88 @@ namespace systemManager { attribute number installStartTime; [Optional] attribute number installEndTime; - + [Optional] + attribute boolean disableSystemOtaUpdate; }; [Entity=Interface] interface UpdatePackageInfo { - attribute String version; attribute sequence packages; [Optional] attribute PackageDescription description; - + [Optional] + attribute String authInfo; }; [Entity=Interface] interface Package { - attribute PackageType type; attribute String path; [Optional] attribute number fd; - }; dictionary PackageType { - number FIRMWARE = 1; - }; [Entity=Interface] interface PackageDescription { - [Optional] attribute NotifyDescription notify; - }; [Entity=Interface] interface NotifyDescription { - [Optional] attribute String installTips; [Optional] attribute String installTipsDetail; - }; [Entity=Interface] interface UpdateResult { - attribute String version; attribute UpdateStatus status; attribute ErrorInfo errorInfo; - }; dictionary UpdateStatus { - number NO_UPDATE_PACKAGE = -4; number UPDATE_WAITING = -3; number UPDATING = -2; number UPDATE_FAILURE = -1; number UPDATE_SUCCESS = 0; - }; [Entity=Interface] interface ErrorInfo { - attribute number code; attribute String message; - }; - [GlobalScope] - interface GlobalScope_systemManager_ohos_enterprise_systemManager { - - [Throws] - static void setNTPServer(Want admin, String server); - [Throws] - static String getNTPServer(Want admin); - [Throws] - static void setOtaUpdatePolicy(Want admin, OtaUpdatePolicy policy); - [Throws] - static OtaUpdatePolicy getOtaUpdatePolicy(Want admin); - [Throws] - static async void notifyUpdatePackages(Want admin, UpdatePackageInfo packageInfo); - [Throws] - static async UpdateResult getUpdateResult(Want admin, String version); - + [Throws] + void setNTPServer(Want admin, String server); + [Throws] + String getNTPServer(Want admin); + [Throws] + void setOtaUpdatePolicy(Want admin, OtaUpdatePolicy policy); + [Throws] + OtaUpdatePolicy getOtaUpdatePolicy(Want admin); + [Throws] + async void notifyUpdatePackages(Want admin, UpdatePackageInfo packageInfo); + [Throws] + async UpdateResult getUpdateResult(Want admin, String version); + [Throws] + async String getUpdateAuthData(Want admin); + [Throws] + void setAutoUnlockAfterReboot(Want admin, boolean isAllowed); + [Throws] + boolean getAutoUnlockAfterReboot(Want admin); + [Throws] + void setInstallLocalEnterpriseAppEnabled(Want admin, boolean isEnable); + [Throws] + boolean getInstallLocalEnterpriseAppEnabled(Want admin); + dictionary NearLinkProtocol { + number SSAP = 0; + number DATA_TRANSFER = 1; }; - + [Throws] + void addDisallowedNearLinkProtocols(Want admin, sequence protocols, number accountId); + [Throws] + void removeDisallowedNearLinkProtocols(Want admin, sequence protocols, number accountId); + [Throws] + sequence getDisallowedNearLinkProtocols(Want admin, number accountId); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.telephonyManager.idl b/idl/@ohos.enterprise.telephonyManager.idl new file mode 100644 index 0000000..1791e19 --- /dev/null +++ b/idl/@ohos.enterprise.telephonyManager.idl @@ -0,0 +1,24 @@ +package ohos.enterprise.telephonyManager; +import ohos.app.ability.Want.default as Want; +import ohos.enterprise.adminManager.default as adminManager; +[DefaultExport] +namespace telephonyManager { + [Throws] + void setSimDisabled(Want admin, number slotId); + [Throws] + void setSimEnabled(Want admin, number slotId); + [Throws] + boolean isSimDisabled(Want admin, number slotId); + [Throws] + void addOutgoingCallPolicyNumbers(Want admin, adminManager.Policy policy, sequence numbers); + [Throws] + void removeOutgoingCallPolicyNumbers(Want admin, adminManager.Policy policy, sequence numbers); + [Throws] + sequence getOutgoingCallPolicyNumbers(Want admin, adminManager.Policy policy); + [Throws] + void addIncomingCallPolicyNumbers(Want admin, adminManager.Policy policy, sequence numbers); + [Throws] + void removeIncomingCallPolicyNumbers(Want admin, adminManager.Policy policy, sequence numbers); + [Throws] + sequence getIncomingCallPolicyNumbers(Want admin, adminManager.Policy policy); +}; \ No newline at end of file diff --git a/idl/@ohos.enterprise.usbManager.idl b/idl/@ohos.enterprise.usbManager.idl index 61e57fc..041df0d 100644 --- a/idl/@ohos.enterprise.usbManager.idl +++ b/idl/@ohos.enterprise.usbManager.idl @@ -1,67 +1,53 @@ -package ohos.enterprise; +package ohos.enterprise.usbManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace usbManager { - dictionary UsbPolicy { - number READ_WRITE = 0; number READ_ONLY = 1; number DISABLED = 2; - }; [Entity=Interface] interface UsbDeviceId { - attribute number vendorId; attribute number productId; - }; dictionary Descriptor { - number INTERFACE = 0; number DEVICE = 1; - }; [Entity=Interface] interface UsbDeviceType { - attribute number baseClass; attribute number subClass; attribute number protocol; attribute Descriptor descriptor; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_usbManager_ohos_enterprise_usbManager { - - [Throws] - static void setUsbPolicy(Want admin, UsbPolicy usbPolicy, AsyncCallback_Void callback_); - [Throws] - static async void setUsbPolicy(Want admin, UsbPolicy usbPolicy); - [Throws] - static void disableUsb(Want admin, boolean disable); - [Throws] - static boolean isUsbDisabled(Want admin); - [Throws] - static void addAllowedUsbDevices(Want admin, sequence usbDeviceIds); - [Throws] - static void removeAllowedUsbDevices(Want admin, sequence usbDeviceIds); - [Throws] - static sequence getAllowedUsbDevices(Want admin); - [Throws] - static void setUsbStorageDeviceAccessPolicy(Want admin, UsbPolicy usbPolicy); - [Throws] - static UsbPolicy getUsbStorageDeviceAccessPolicy(Want admin); - [Throws] - static void addDisallowedUsbDevices(Want admin, sequence usbDevices); - [Throws] - static void removeDisallowedUsbDevices(Want admin, sequence usbDevices); - [Throws] - static sequence getDisallowedUsbDevices(Want admin); - - }; - + [Throws] + void setUsbPolicy(Want admin, UsbPolicy usbPolicy, AsyncCallback_Void callback_); + [Throws] + async void setUsbPolicy(Want admin, UsbPolicy usbPolicy); + [Throws] + void disableUsb(Want admin, boolean disable); + [Throws] + boolean isUsbDisabled(Want admin); + [Throws] + void addAllowedUsbDevices(Want admin, sequence usbDeviceIds); + [Throws] + void removeAllowedUsbDevices(Want admin, sequence usbDeviceIds); + [Throws] + sequence getAllowedUsbDevices(Want admin); + [Throws] + void setUsbStorageDeviceAccessPolicy(Want admin, UsbPolicy usbPolicy); + [Throws] + UsbPolicy getUsbStorageDeviceAccessPolicy(Want admin); + [Throws] + void addDisallowedUsbDevices(Want admin, sequence usbDevices); + [Throws] + void removeDisallowedUsbDevices(Want admin, sequence usbDevices); + [Throws] + sequence getDisallowedUsbDevices(Want admin); }; \ No newline at end of file diff --git a/idl/@ohos.enterprise.wifiManager.idl b/idl/@ohos.enterprise.wifiManager.idl index 41c0ab7..4f70c53 100644 --- a/idl/@ohos.enterprise.wifiManager.idl +++ b/idl/@ohos.enterprise.wifiManager.idl @@ -1,10 +1,9 @@ -package ohos.enterprise; +package ohos.enterprise.wifiManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace wifiManager { - dictionary WifiSecurityType { - number WIFI_SEC_TYPE_INVALID = 0; number WIFI_SEC_TYPE_OPEN = 1; number WIFI_SEC_TYPE_WEP = 2; @@ -15,27 +14,21 @@ namespace wifiManager { number WIFI_SEC_TYPE_OWE = 7; number WIFI_SEC_TYPE_WAPI_CERT = 8; number WIFI_SEC_TYPE_WAPI_PSK = 9; - }; dictionary IpType { - number STATIC = 0; number DHCP = 1; number UNKNOWN = 2; - }; [Entity=Interface] interface IpProfile { - attribute number ipAddress; attribute number gateway; attribute number prefixLength; attribute sequence dnsServers; attribute sequence domains; - }; dictionary EapMethod { - number EAP_NONE = 0; number EAP_PEAP = 1; number EAP_TLS = 2; @@ -45,10 +38,8 @@ namespace wifiManager { number EAP_AKA = 6; number EAP_AKA_PRIME = 7; number EAP_UNAUTH_TLS = 8; - }; dictionary Phase2Method { - number PHASE2_NONE = 0; number PHASE2_PAP = 1; number PHASE2_MSCHAP = 2; @@ -57,11 +48,9 @@ namespace wifiManager { number PHASE2_SIM = 5; number PHASE2_AKA = 6; number PHASE2_AKA_PRIME = 7; - }; [Entity=Interface] interface WifiEapProfile { - attribute EapMethod eapMethod; attribute Phase2Method phase2Method; attribute String identity; @@ -77,11 +66,9 @@ namespace wifiManager { attribute String realm; attribute String plmn; attribute number eapSubId; - }; [Entity=Interface] interface WifiProfile { - attribute String ssid; [Optional] attribute String bssid; @@ -105,32 +92,47 @@ namespace wifiManager { attribute IpProfile staticIp; [Optional] attribute WifiEapProfile eapProfile; - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isWifiActive(Want admin, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isWifiActive(Want admin); + [Throws] + boolean isWifiActiveSync(Want admin); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_wifiManager_ohos_enterprise_wifiManager { - - [Throws] - static void isWifiActive(Want admin, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isWifiActive(Want admin); - [Throws] - static boolean isWifiActiveSync(Want admin); - [Throws] - static void setWifiProfile(Want admin, WifiProfile profile, AsyncCallback_Void callback_); - [Throws] - static async void setWifiProfile(Want admin, WifiProfile profile); - [Throws] - static void setWifiProfileSync(Want admin, WifiProfile profile); - [Throws] - static void setWifiDisabled(Want admin, boolean disabled); - [Throws] - static boolean isWifiDisabled(Want admin); - + [Throws] + void setWifiProfile(Want admin, WifiProfile profile, AsyncCallback_Void callback_); + [Throws] + async void setWifiProfile(Want admin, WifiProfile profile); + [Throws] + void setWifiProfileSync(Want admin, WifiProfile profile); + [Throws] + void setWifiDisabled(Want admin, boolean disabled); + [Throws] + boolean isWifiDisabled(Want admin); + [Entity=Interface] + interface WifiAccessInfo { + attribute String ssid; + [Optional] + attribute String bssid; }; - + [Throws] + void addDisallowedWifiList(Want admin, sequence list); + [Throws] + void removeDisallowedWifiList(Want admin, sequence list); + [Throws] + sequence getDisallowedWifiList(Want admin); + [Throws] + void addAllowedWifiList(Want admin, sequence list); + [Throws] + void removeAllowedWifiList(Want admin, sequence list); + [Throws] + sequence getAllowedWifiList(Want admin); + [Throws] + void turnOnWifi(Want admin, boolean isForce); + [Throws] + void turnOffWifi(Want admin); }; \ No newline at end of file diff --git a/idl/@ohos.events.emitter.idl b/idl/@ohos.events.emitter.idl index e1442ee..71025c1 100644 --- a/idl/@ohos.events.emitter.idl +++ b/idl/@ohos.events.emitter.idl @@ -1,81 +1,71 @@ -package ohos.events; +package ohos.events.emitter; import ohos.base.Callback as Callback; +[DefaultExport] namespace emitter { - [Synthetic] callback Callback_EventData_Void = void (EventData parameter); + void on(InnerEvent event, Callback_EventData_Void callback_); + void on(String eventId, Callback_EventData_Void callback_); [Synthetic] callback Callback_GenericEventData_Void = void ([TypeArguments="T"] GenericEventData parameter); + [TypeParameters="T"] + void on(String eventId, Callback_GenericEventData_Void callback_); + [TypeParameters="T"] + void on(String eventId, (Callback_EventData_Void or Callback_GenericEventData_Void) callback_); + void once(InnerEvent event, Callback_EventData_Void callback_); + void once(String eventId, Callback_EventData_Void callback_); + [TypeParameters="T"] + void once(String eventId, Callback_GenericEventData_Void callback_); + void off(number eventId); + void off(String eventId); + void off(number eventId, Callback_EventData_Void callback_); + void off(String eventId, Callback_EventData_Void callback_); + [TypeParameters="T"] + void off(String eventId, Callback_GenericEventData_Void callback_); + [TypeParameters="T"] + void off(String eventId, (Callback_EventData_Void or Callback_GenericEventData_Void) callback_); + void emit(InnerEvent event, optional EventData data); + void emit(String eventId, optional EventData data); + [TypeParameters="T"] + void emit(String eventId, optional [TypeArguments="T"] GenericEventData data); + [TypeParameters="T"] + void emit(String eventId, optional (EventData or [TypeArguments="T"] GenericEventData) data); + void emit(String eventId, Options options, optional EventData data); + [TypeParameters="T"] + void emit(String eventId, Options options, optional [TypeArguments="T"] GenericEventData data); + number getListenerCount((number or String) eventId); [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface EventData { - [Optional] attribute Literal_Empty data; - + [Optional] + attribute record data; }; [Entity=Interface] interface InnerEvent { - attribute number eventId; [Optional] attribute EventPriority priority; - }; dictionary EventPriority { - number IMMEDIATE = 0; number HIGH = 1; number LOW = 2; number IDLE = 3; - }; [Entity=Interface] interface Options { - [Optional] attribute EventPriority priority; - }; [Entity=Interface, TypeParameters="T"] interface GenericEventData { - [Optional] attribute T data; - - }; - [GlobalScope] - interface GlobalScope_emitter_ohos_events_emitter { - - static void on(InnerEvent event, Callback_EventData_Void callback_); - static void on(String eventId, Callback_EventData_Void callback_); - [TypeParameters="T"] - static void on(String eventId, Callback_GenericEventData_Void callback_); - static void once(InnerEvent event, Callback_EventData_Void callback_); - static void once(String eventId, Callback_EventData_Void callback_); - [TypeParameters="T"] - static void once(String eventId, Callback_GenericEventData_Void callback_); - static void off(number eventId); - static void off(String eventId); - static void off(number eventId, Callback_EventData_Void callback_); - static void off(String eventId, Callback_EventData_Void callback_); - [TypeParameters="T"] - static void off(String eventId, Callback_GenericEventData_Void callback_); - static void emit(InnerEvent event, optional EventData data); - static void emit(String eventId, optional EventData data); - [TypeParameters="T"] - static void emit(String eventId, optional [TypeArguments="T"] GenericEventData data); - static void emit(String eventId, Options options, optional EventData data); - [TypeParameters="T"] - static void emit(String eventId, Options options, optional [TypeArguments="T"] GenericEventData data); - static number getListenerCount((number or String) eventId); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.fastbuffer.idl b/idl/@ohos.fastbuffer.idl new file mode 100644 index 0000000..39bd07e --- /dev/null +++ b/idl/@ohos.fastbuffer.idl @@ -0,0 +1,150 @@ +package ohos.fastbuffer; +[DefaultExport] +namespace fastbuffer { + typedef String BufferEncoding; + [Entity=Interface] + interface TypedArray: Int8Array_ { + }; + FastBuffer alloc(number size, optional (String or FastBuffer or number) fill, optional BufferEncoding encoding); + FastBuffer allocUninitializedFromPool(number size); + FastBuffer allocUninitialized(number size); + number byteLength((String or FastBuffer or TypedArray or buffer or SharedArrayBuffer) value, optional BufferEncoding encoding); + [Throws] + FastBuffer concat((sequence or sequence) list, optional number totalLength); + FastBuffer from(sequence array); + [Throws] + FastBuffer from((buffer or SharedArrayBuffer) arrayBuffer, optional number byteOffset, optional number length); + [Throws] + FastBuffer from((FastBuffer or buffer) buffer); + FastBuffer from(String value, optional BufferEncoding encoding); + boolean isBuffer(Object obj); + boolean isEncoding(String encoding); + [Throws] + number compare((FastBuffer or buffer) buf1, (FastBuffer or buffer) buf2); + FastBuffer transcode((FastBuffer or buffer) source, String fromEnc, String toEnc); + [Entity=Tuple, Synthetic] + interface Tuple_Number_Number { + attribute number value0; + attribute number value1; + }; + [Entity=Class] + interface FastBuffer { + attribute number length; + attribute buffer buffer; + attribute number byteOffset; + [Throws] + FastBuffer fill((String or FastBuffer or buffer or number) value, optional number offset, optional number end, optional BufferEncoding encoding); + [Throws] + number compare((FastBuffer or buffer) target, optional number targetStart, optional number targetEnd, optional number sourceStart, optional number sourceEnd); + [Throws] + number copy((FastBuffer or buffer) target, optional number targetStart, optional number sourceStart, optional number sourceEnd); + [Throws] + boolean equals((buffer or FastBuffer) otherBuffer); + boolean includes((String or number or FastBuffer or buffer) value, optional number byteOffset, optional BufferEncoding encoding); + number indexOf((String or number or FastBuffer or buffer) value, optional number byteOffset, optional BufferEncoding encoding); + sequence keys(); + sequence values(); + sequence entries(); + number lastIndexOf((String or number or FastBuffer or buffer) value, optional number byteOffset, optional BufferEncoding encoding); + [Throws] + bigint readBigInt64BE(optional number offset); + [Throws] + bigint readBigInt64LE(optional number offset); + [Throws] + bigint readBigUInt64BE(optional number offset); + [Throws] + bigint readBigUInt64LE(optional number offset); + [Throws] + number readDoubleBE(optional number offset); + [Throws] + number readDoubleLE(optional number offset); + [Throws] + number readFloatBE(optional number offset); + [Throws] + number readFloatLE(optional number offset); + [Throws] + number readInt8(optional number offset); + [Throws] + number readInt16BE(optional number offset); + [Throws] + number readInt16LE(optional number offset); + [Throws] + number readInt32BE(optional number offset); + [Throws] + number readInt32LE(optional number offset); + [Throws] + number readIntBE(number offset, number byteLength); + [Throws] + number readIntLE(number offset, number byteLength); + [Throws] + number readUInt8(optional number offset); + [Throws] + number readUInt16BE(optional number offset); + [Throws] + number readUInt16LE(optional number offset); + [Throws] + number readUInt32BE(optional number offset); + [Throws] + number readUInt32LE(optional number offset); + [Throws] + number readUIntBE(number offset, number byteLength); + [Throws] + number readUIntLE(number offset, number byteLength); + FastBuffer subarray(optional number start, optional number end); + [Throws] + FastBuffer swap16(); + [Throws] + FastBuffer swap32(); + [Throws] + FastBuffer swap64(); + Object toJSON(); + [Throws, DtsName="toString"] + String toString_(optional String encoding, optional number start, optional number end); + [Throws] + number write(String str, optional number offset, optional number length, optional String encoding); + [Throws] + number writeBigInt64BE(bigint value, optional number offset); + [Throws] + number writeBigInt64LE(bigint value, optional number offset); + [Throws] + number writeBigUInt64BE(bigint value, optional number offset); + [Throws] + number writeBigUInt64LE(bigint value, optional number offset); + [Throws] + number writeDoubleBE(number value, optional number offset); + [Throws] + number writeDoubleLE(number value, optional number offset); + [Throws] + number writeFloatBE(number value, optional number offset); + [Throws] + number writeFloatLE(number value, optional number offset); + [Throws] + number writeInt8(number value, optional number offset); + [Throws] + number writeInt16BE(number value, optional number offset); + [Throws] + number writeInt16LE(number value, optional number offset); + [Throws] + number writeInt32BE(number value, optional number offset); + [Throws] + number writeInt32LE(number value, optional number offset); + [Throws] + number writeIntBE(number value, number offset, number byteLength); + [Throws] + number writeIntLE(number value, number offset, number byteLength); + [Throws] + number writeUInt8(number value, optional number offset); + [Throws] + number writeUInt16BE(number value, optional number offset); + [Throws] + number writeUInt16LE(number value, optional number offset); + [Throws] + number writeUInt32BE(number value, optional number offset); + [Throws] + number writeUInt32LE(number value, optional number offset); + [Throws] + number writeUIntBE(number value, number offset, number byteLength); + [Throws] + number writeUIntLE(number value, number offset, number byteLength); + }; +}; \ No newline at end of file diff --git a/idl/@ohos.faultLogger.idl b/idl/@ohos.faultLogger.idl index a7ad4c4..6380928 100644 --- a/idl/@ohos.faultLogger.idl +++ b/idl/@ohos.faultLogger.idl @@ -1,10 +1,9 @@ -package ohos; +package ohos.faultLogger; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace FaultLogger { - [Deprecated] dictionary FaultType { - [Deprecated] number NO_SPECIFIC = 0; [Deprecated] @@ -13,13 +12,19 @@ namespace FaultLogger { number JS_CRASH = 3; [Deprecated] number APP_FREEZE = 4; - }; [Async, Synthetic] callback AsyncCallback_Array_FaultLogInfo_Void = void (sequence result); + [Deprecated] + void querySelfFaultLog(FaultType faultType, AsyncCallback_Array_FaultLogInfo_Void callback_); + [Deprecated] + async sequence querySelfFaultLog(FaultType faultType); + [Deprecated, Throws] + void query(FaultType faultType, AsyncCallback_Array_FaultLogInfo_Void callback_); + [Deprecated, Throws] + async sequence query(FaultType faultType); [Entity=Interface, Deprecated] interface FaultLogInfo { - [Deprecated] attribute number pid; [Deprecated] @@ -36,20 +41,5 @@ namespace FaultLogger { attribute String summary; [Deprecated] attribute String fullLog; - - }; - [GlobalScope] - interface GlobalScope_FaultLogger_ohos_faultLogger { - - [Deprecated] - static void querySelfFaultLog(FaultType faultType, AsyncCallback_Array_FaultLogInfo_Void callback_); - [Deprecated] - static async sequence querySelfFaultLog(FaultType faultType); - [Deprecated, Throws] - static void query(FaultType faultType, AsyncCallback_Array_FaultLogInfo_Void callback_); - [Deprecated, Throws] - static async sequence query(FaultType faultType); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.BackupExtensionContext.idl b/idl/@ohos.file.BackupExtensionContext.idl index fbfa464..79c90b4 100644 --- a/idl/@ohos.file.BackupExtensionContext.idl +++ b/idl/@ohos.file.BackupExtensionContext.idl @@ -1,8 +1,6 @@ -package ohos.file; -import application.ExtensionContext as ExtensionContext; -[Entity=Class] -interface BackupExtensionContext: ExtensionContext { - +package ohos.file.BackupExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +[Entity=Class, DefaultExport] +interface BackupExtensionContext: [Extends] ExtensionContext { readonly attribute String backupDir; - }; \ No newline at end of file diff --git a/idl/@ohos.file.backup.idl b/idl/@ohos.file.backup.idl index cc5542d..805526c 100644 --- a/idl/@ohos.file.backup.idl +++ b/idl/@ohos.file.backup.idl @@ -1,60 +1,58 @@ -package ohos.file; +package ohos.file.backup; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace backup { - [Entity=Interface] interface FileMeta { - attribute String bundleName; attribute String uri; - }; [Entity=Interface] interface FileData { - attribute number fd; - }; [Entity=Interface] interface IncrementalBackupTime { - attribute String bundleName; attribute number lastIncrementalTime; - }; [Entity=Interface] interface FileManifestData { - attribute number manifestFd; - }; [Entity=Interface] interface BackupParams { - [Optional] attribute String parameters; - }; [Entity=Interface] interface BackupPriority { - [Optional] attribute number priority; - }; [Entity=Interface] - interface IncrementalBackupData: IncrementalBackupTime { - - + interface IncrementalBackupData: IncrementalBackupTime, FileManifestData, BackupParams, BackupPriority { }; [Entity=Interface] - interface File: FileMeta { - - + interface File: FileMeta, FileData, FileManifestData { }; + [Throws] + String getBackupVersion(); + [Throws] + async FileData getLocalCapabilities(); [Async, Synthetic] callback AsyncCallback_FileData_Void = void (FileData result); + [Throws] + void getLocalCapabilities(AsyncCallback_FileData_Void callback_); + [Throws] + async FileData getLocalCapabilities(sequence dataList); + [Throws] + String getBackupInfo(String bundleToBackup); + [Throws] + boolean updateTimer(String bundleName, number timeout); + [Throws] + boolean updateSendRate(String bundleName, number sendRate); callback OnBackupSizeReport = void (String reportInfo); [Async, Synthetic] callback AsyncCallback_File_Void = void (File result); @@ -66,7 +64,6 @@ namespace backup { callback Callback_Undefined_Void = void (undefined parameter); [Entity=Interface] interface GeneralCallbacks { - attribute AsyncCallback_File_Void onFileReady; attribute AsyncCallback_String_Void onBundleBegin; attribute AsyncCallback_String_Void onBundleEnd; @@ -75,16 +72,14 @@ namespace backup { [Optional] attribute OnBackupSizeReport onBackupSizeReport; [Throws] - undefined onResultReport(String bundleName, String result); + void onResultReport(String bundleName, String result); [Throws] - undefined onProcess(String bundleName, String process); - + void onProcess(String bundleName, String process); }; [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Class] interface SessionBackup { - constructor(GeneralCallbacks callbacks); [Throws] async FileData getLocalCapabilities(); @@ -98,11 +93,13 @@ namespace backup { async void release(); [Throws] number cancel(String bundleName); - + [Throws] + async boolean cleanBundleTempDir(String bundleName); + [Throws] + async String getCompatibilityInfo(String bundleName, String extInfo); }; [Entity=Class] interface SessionRestore { - constructor(GeneralCallbacks callbacks); [Throws] async FileData getLocalCapabilities(); @@ -122,11 +119,13 @@ namespace backup { async void release(); [Throws] number cancel(String bundleName); - + [Throws] + async boolean cleanBundleTempDir(String bundleName); + [Throws] + async String getCompatibilityInfo(String bundleName, String extInfo); }; [Entity=Class] interface IncrementalBackupSession { - constructor(GeneralCallbacks callbacks); [Throws] async FileData getLocalCapabilities(); @@ -140,26 +139,9 @@ namespace backup { async void release(); [Throws] number cancel(String bundleName); - - }; - [GlobalScope] - interface GlobalScope_backup_ohos_file_backup { - - [Throws] - static String getBackupVersion(); - [Throws] - static async FileData getLocalCapabilities(); - [Throws] - static void getLocalCapabilities(AsyncCallback_FileData_Void callback_); - [Throws] - static async FileData getLocalCapabilities(sequence dataList); - [Throws] - static String getBackupInfo(String bundleToBackup); [Throws] - static boolean updateTimer(String bundleName, number timeout); + async boolean cleanBundleTempDir(String bundleName); [Throws] - static boolean updateSendRate(String bundleName, number sendRate); - + async String getCompatibilityInfo(String bundleName, String extInfo); }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.cloudSync.idl b/idl/@ohos.file.cloudSync.idl index b9c1642..74e1173 100644 --- a/idl/@ohos.file.cloudSync.idl +++ b/idl/@ohos.file.cloudSync.idl @@ -1,20 +1,17 @@ -package ohos.file; +package ohos.file.cloudSync; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace cloudSync { - dictionary SyncState { - number UPLOADING = 0; number UPLOAD_FAILED = 1; number DOWNLOADING = 2; number DOWNLOAD_FAILED = 3; number COMPLETED = 4; number STOPPED = 5; - }; dictionary ErrorType { - number NO_ERROR = 0; number NETWORK_UNAVAILABLE = 1; number WIFI_UNAVAILABLE = 2; @@ -23,14 +20,11 @@ namespace cloudSync { number CLOUD_STORAGE_FULL = 5; number LOCAL_STORAGE_FULL = 6; number DEVICE_TEMPERATURE_TOO_HIGH = 7; - }; [Entity=Interface] interface SyncProgress { - attribute SyncState state; attribute ErrorType error; - }; [Synthetic] callback Callback_SyncProgress_Void = void (SyncProgress pg); @@ -38,7 +32,6 @@ namespace cloudSync { callback AsyncCallback_Void = void (); [Entity=Class] interface GallerySync { - constructor(); [Throws, DtsName="on", DtsTag="0|evt|'progress'"] void onProgress(Callback_SyncProgress_Void callback_); @@ -54,41 +47,58 @@ namespace cloudSync { async void stop(); [Throws] void stop(AsyncCallback_Void callback_); - }; dictionary State { - number RUNNING = 0; number COMPLETED = 1; number FAILED = 2; number STOPPED = 3; - }; dictionary DownloadErrorType { - number NO_ERROR = 0; number UNKNOWN_ERROR = 1; number NETWORK_UNAVAILABLE = 2; number LOCAL_STORAGE_FULL = 3; number CONTENT_NOT_FOUND = 4; number FREQUENT_USER_REQUESTS = 5; - }; [Entity=Interface] interface DownloadProgress { - attribute State state; attribute number processed; attribute number size; attribute String uri; attribute DownloadErrorType error; - + }; + dictionary DownloadFileType { + number CONTENT = 0; + number THUMBNAIL = 1; + number LCD = 2; + }; + [Entity=Interface] + interface FailedFileInfo { + attribute String uri; + attribute DownloadErrorType error; + }; + [Entity=Class] + interface MultiDownloadProgress { + attribute State state; + attribute number taskId; + attribute number successfulCount; + attribute number failedCount; + attribute number totalCount; + attribute number downloadedSize; + attribute number totalSize; + attribute DownloadErrorType errType; + [Throws] + sequence getFailedFiles(); + [Throws] + sequence getSuccessfulFiles(); }; [Synthetic] callback Callback_DownloadProgress_Void = void (DownloadProgress pg); [Entity=Class] interface Download { - constructor(); [Throws, DtsName="on", DtsTag="0|evt|'progress'"] void onProgress(Callback_DownloadProgress_Void callback_); @@ -104,13 +114,11 @@ namespace cloudSync { async void stop(String uri); [Throws] void stop(String uri, AsyncCallback_Void callback_); - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Entity=Class] interface FileSync { - constructor(); constructor(String bundleName); [Throws, DtsName="on", DtsTag="0|event|'progress'"] @@ -129,30 +137,46 @@ namespace cloudSync { async number getLastSyncTime(); [Throws] void getLastSyncTime(AsyncCallback_Number_Void callback_); - }; + [Synthetic] + callback Callback_MultiDownloadProgress_Void = void (MultiDownloadProgress parameter); [Entity=Class] interface CloudFileCache { - constructor(); [Throws, DtsName="on", DtsTag="0|event|'progress'"] void onProgress(Callback_DownloadProgress_Void callback_); + [Throws, DtsName="on", DtsTag="0|event|'batchDownload'"] + void onBatchDownload(Callback_MultiDownloadProgress_Void callback_); [Throws, DtsName="off", DtsTag="0|event|'progress'"] void offProgress(optional Callback_DownloadProgress_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'batchDownload'"] + void offBatchDownload(optional Callback_MultiDownloadProgress_Void callback_); [Throws] async void start(String uri); [Throws] void start(String uri, AsyncCallback_Void callback_); [Throws] + async number startBatch(sequence uris, optional DownloadFileType fileType); + [Throws] async void stop(String uri, optional boolean needClean); [Throws] void stop(String uri, AsyncCallback_Void callback_); [Throws] + async void stopBatch(number downloadId, optional boolean needClean); + [Throws] void cleanCache(String uri); - + [Throws] + void cleanFileCache(String uri); + }; + dictionary FileState { + number INITIAL_AFTER_DOWNLOAD = 0; + number UPLOADING = 1; + number STOPPED = 2; + number TO_BE_UPLOADED = 3; + number UPLOAD_SUCCESS = 4; + number UPLOAD_FAILURE = 5; }; dictionary FileSyncState { - number UPLOADING = 0; number DOWNLOADING = 1; number COMPLETED = 2; @@ -160,44 +184,88 @@ namespace cloudSync { number TO_BE_UPLOADED = 4; number UPLOAD_SUCCESS = 5; number UPLOAD_FAILURE = 6; - }; + [Throws] + async sequence getFileSyncState(sequence uri); + [Throws] + FileState getCoreFileSyncState(String uri); [Async, Synthetic] callback AsyncCallback_Array_FileSyncState_Void = void (sequence result); + [Throws] + void getFileSyncState(sequence uri, AsyncCallback_Array_FileSyncState_Void callback_); + [Throws] + FileSyncState getFileSyncState(String uri); [Synthetic] callback Callback_ChangeData_Void = void (ChangeData parameter); + [Throws] + void registerChange(String uri, boolean recursion, Callback_ChangeData_Void callback_); + [Throws] + void unregisterChange(String uri); dictionary NotifyType { - number NOTIFY_ADDED = 0; number NOTIFY_MODIFIED = 1; number NOTIFY_DELETED = 2; number NOTIFY_RENAMED = 3; - }; [Entity=Interface] interface ChangeData { - attribute NotifyType type; attribute sequence isDirectory; attribute sequence uris; - }; - [GlobalScope] - interface GlobalScope_cloudSync_ohos_file_cloudSync { - - [Throws] - static async sequence getFileSyncState(sequence uri); + [Throws] + async void optimizeStorage(); + [Synthetic] + callback Callback_OptimizeSpaceProgress_Void = void (OptimizeSpaceProgress parameter); + [Throws] + async void startOptimizeSpace(OptimizeSpaceParam optimizePara, optional Callback_OptimizeSpaceProgress_Void callback_); + [Throws] + void stopOptimizeSpace(); + dictionary OptimizeState { + number RUNNING = 0; + number COMPLETED = 1; + number FAILED = 2; + number STOPPED = 3; + }; + [Entity=Interface] + interface OptimizeSpaceProgress { + attribute OptimizeState state; + attribute number progress; + }; + [Entity=Interface] + interface OptimizeSpaceParam { + attribute number totalSize; + attribute number agingDays; + }; + [Entity=Interface] + interface HistoryVersion { + attribute number editedTime; + attribute number fileSize; + attribute String versionId; + attribute String originalFileName; + attribute String sha256; + attribute boolean autoResolved; + }; + [Entity=Interface] + interface VersionDownloadProgress { + attribute State state; + attribute number progress; + attribute DownloadErrorType errType; + }; + [Synthetic] + callback Callback_VersionDownloadProgress_Void = void (VersionDownloadProgress parameter); + [Entity=Class] + interface FileVersion { + constructor(); [Throws] - static void getFileSyncState(sequence uri, AsyncCallback_Array_FileSyncState_Void callback_); + async sequence getHistoryVersionList(String uri, number versionNumLimit); [Throws] - static FileSyncState getFileSyncState(String uri); + async String downloadHistoryVersion(String uri, String versionId, Callback_VersionDownloadProgress_Void callback_); [Throws] - static void registerChange(String uri, boolean recursion, Callback_ChangeData_Void callback_); + async void replaceFileWithHistoryVersion(String originalUri, String versionUri); [Throws] - static void unregisterChange(String uri); + async boolean isFileConflict(String uri); [Throws] - static async void optimizeStorage(); - + async void clearFileConflict(String uri); }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.cloudSyncManager.idl b/idl/@ohos.file.cloudSyncManager.idl index 3e09ca8..a997925 100644 --- a/idl/@ohos.file.cloudSyncManager.idl +++ b/idl/@ohos.file.cloudSyncManager.idl @@ -1,50 +1,86 @@ -package ohos.file; +package ohos.file.cloudSyncManager; import ohos.base.AsyncCallback as AsyncCallback; +import ohos.base.Callback as Callback; +[DefaultExport] namespace cloudSyncManager { - + [Throws] + async void changeAppCloudSwitch(String accountId, String bundleName, boolean status); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void changeAppCloudSwitch(String accountId, String bundleName, boolean status, AsyncCallback_Void callback_); + [Throws] + async void notifyDataChange(String accountId, String bundleName); + [Throws] + void notifyDataChange(String accountId, String bundleName, AsyncCallback_Void callback_); + [Throws] + async void enableCloud(String accountId, record switches); + [Throws] + void enableCloud(String accountId, record switches, AsyncCallback_Void callback_); + [Throws] + async void disableCloud(String accountId); + [Throws] + void disableCloud(String accountId, AsyncCallback_Void callback_); dictionary Action { - number RETAIN_DATA = 0; number CLEAR_DATA = 1; - }; + [Throws] + async void clean(String accountId, record appActions); + [Throws] + void clean(String accountId, record appActions, AsyncCallback_Void callback_); + [Throws] + async void notifyDataChange(number userId, ExtraData extraData); + [Throws] + void notifyDataChange(number userId, ExtraData extraData, AsyncCallback_Void callback_); [Entity=Interface] interface ExtraData { - attribute String eventId; attribute String extraData; - }; - [GlobalScope] - interface GlobalScope_cloudSyncManager_ohos_file_cloudSyncManager { - - [Throws] - static async void changeAppCloudSwitch(String accountId, String bundleName, boolean status); - [Throws] - static void changeAppCloudSwitch(String accountId, String bundleName, boolean status, AsyncCallback_Void callback_); - [Throws] - static async void notifyDataChange(String accountId, String bundleName); - [Throws] - static void notifyDataChange(String accountId, String bundleName, AsyncCallback_Void callback_); - [Throws] - static async void enableCloud(String accountId, record switches); - [Throws] - static void enableCloud(String accountId, record switches, AsyncCallback_Void callback_); - [Throws] - static async void disableCloud(String accountId); - [Throws] - static void disableCloud(String accountId, AsyncCallback_Void callback_); - [Throws] - static async void clean(String accountId, record appActions); + dictionary DownloadStopReason { + number NO_STOP = 0; + number NETWORK_UNAVAILABLE = 1; + number LOCAL_STORAGE_FULL = 2; + number TEMPERATURE_LIMIT = 3; + number USER_STOPPED = 4; + number APP_UNLOAD = 5; + number OTHER_REASON = 6; + }; + dictionary DownloadState { + number RUNNING = 0; + number COMPLETED = 1; + number STOPPED = 2; + }; + [Entity=Interface] + interface CloudFileInfo { + attribute number cloudFileCount; + attribute number cloudFileTotalSize; + attribute number localFileCount; + attribute number localFileTotalSize; + attribute number bothFileCount; + attribute number bothFileTotalSize; + }; + [Entity=Class] + interface DownloadProgress { + attribute DownloadState state; + attribute number successfulCount; + attribute number failedCount; + attribute number totalCount; + attribute number downloadedSize; + attribute number totalSize; + attribute DownloadStopReason stopReason; + }; + [Synthetic] + callback Callback_DownloadProgress_Void = void (DownloadProgress parameter); + [Entity=Class] + interface DowngradeDownload { + constructor(String bundleName); [Throws] - static void clean(String accountId, record appActions, AsyncCallback_Void callback_); + async CloudFileInfo getCloudFileInfo(); [Throws] - static async void notifyDataChange(number userId, ExtraData extraData); + async void startDownload(Callback_DownloadProgress_Void callback_); [Throws] - static void notifyDataChange(number userId, ExtraData extraData, AsyncCallback_Void callback_); - + async void stopDownload(); }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.environment.idl b/idl/@ohos.file.environment.idl index 4330ae2..9a9eca5 100644 --- a/idl/@ohos.file.environment.idl +++ b/idl/@ohos.file.environment.idl @@ -1,31 +1,25 @@ -package ohos.file; +package ohos.file.environment; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace Environment { - + [Throws] + async String getStorageDataDir(); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_Environment_ohos_file_environment { - - [Throws] - static async String getStorageDataDir(); - [Throws] - static void getStorageDataDir(AsyncCallback_String_Void callback_); - [Throws] - static async String getUserDataDir(); - [Throws] - static void getUserDataDir(AsyncCallback_String_Void callback_); - [Throws] - static String getUserDownloadDir(); - [Throws] - static String getUserDesktopDir(); - [Throws] - static String getUserDocumentDir(); - [Throws] - static String getExternalStorageDir(); - [Throws] - static String getUserHomeDir(); - - }; - + [Throws] + void getStorageDataDir(AsyncCallback_String_Void callback_); + [Throws] + async String getUserDataDir(); + [Throws] + void getUserDataDir(AsyncCallback_String_Void callback_); + [Throws] + String getUserDownloadDir(); + [Throws] + String getUserDesktopDir(); + [Throws] + String getUserDocumentDir(); + [Throws] + String getExternalStorageDir(); + [Throws] + String getUserHomeDir(); }; \ No newline at end of file diff --git a/idl/@ohos.file.fileAccess.idl b/idl/@ohos.file.fileAccess.idl index beaf13e..a853031 100644 --- a/idl/@ohos.file.fileAccess.idl +++ b/idl/@ohos.file.fileAccess.idl @@ -1,16 +1,23 @@ -package ohos.file; +package ohos.file.fileAccess; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import application.Context as Context; +import ohos.app.ability.Want.default as Want; +import application.Context.default as Context; import ohos.file.fs.Filter as Filter; +[DefaultExport] namespace fileAccess { - [Async, Synthetic] callback AsyncCallback_Array_Want_Void = void (sequence result); + [Throws] + void getFileAccessAbilityInfo(AsyncCallback_Array_Want_Void callback_); + [Throws] + async sequence getFileAccessAbilityInfo(); + [Throws] + FileAccessHelper createFileAccessHelper(Context context); + [Throws] + FileAccessHelper createFileAccessHelper(Context context, sequence wants); [Entity=Interface] interface FileInfo { - attribute String uri; attribute String relativePath; attribute String fileName; @@ -22,25 +29,19 @@ namespace fileAccess { FileIterator listFile(optional Filter filter); [Throws] FileIterator scanFile(optional Filter filter); - }; [Entity=Literal, Synthetic] interface Literal_FileInfo_value_Boolean_done { - attribute FileInfo value; attribute boolean done; - }; [Entity=Interface] interface FileIterator { - [Throws] Literal_FileInfo_value_Boolean_done next(); - }; [Entity=Interface] interface RootInfo { - attribute number deviceType; attribute String uri; attribute String relativePath; @@ -50,49 +51,37 @@ namespace fileAccess { FileIterator listFile(optional Filter filter); [Throws] FileIterator scanFile(optional Filter filter); - }; [Entity=Literal, Synthetic] interface Literal_RootInfo_value_Boolean_done { - attribute RootInfo value; attribute boolean done; - }; [Entity=Interface] interface RootIterator { - [Throws] Literal_RootInfo_value_Boolean_done next(); - }; [Entity=Interface] interface CopyResult { - attribute String sourceUri; attribute String destUri; attribute number errCode; attribute String errMsg; - }; dictionary OPENFLAGS { - number READ = 0; number WRITE = 1; number WRITE_READ = 2; - }; dictionary FileKey { - String DISPLAY_NAME = "display_name"; String DATE_ADDED = "date_added"; String DATE_MODIFIED = "date_modified"; String RELATIVE_PATH = "relative_path"; String FILE_SIZE = "size"; - }; dictionary NotifyType { - number NOTIFY_ADD = 0; number NOTIFY_DELETE = 1; number NOTIFY_MOVED_TO = 2; @@ -100,24 +89,20 @@ namespace fileAccess { number NOTIFY_MOVE_SELF = 4; number NOTIFY_DEVICE_ONLINE = 5; number NOTIFY_DEVICE_OFFLINE = 6; - }; [Entity=Interface] interface NotifyMessage { - attribute NotifyType type; attribute sequence uris; - }; [Entity=Interface] interface MoveResult { - attribute String sourceUri; attribute String destUri; attribute number errCode; attribute String errMsg; - }; + const String DEVICES_URI = "file://docs"; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] @@ -136,7 +121,6 @@ namespace fileAccess { callback AsyncCallback_Array_MoveResult_Void = void (sequence result); [Entity=Interface] interface FileAccessHelper { - [Throws] async number openFile(String uri, OPENFLAGS flags); [Throws] @@ -196,21 +180,5 @@ namespace fileAccess { async String moveFile(String sourceUri, String destUri, String fileName); [Throws] void moveFile(String sourceUri, String destUri, String fileName, AsyncCallback_String_Void callback_); - }; - [GlobalScope] - interface GlobalScope_fileAccess_ohos_file_fileAccess { - - const String DEVICES_URI = "file://docs"; - [Throws] - static void getFileAccessAbilityInfo(AsyncCallback_Array_Want_Void callback_); - [Throws] - static async sequence getFileAccessAbilityInfo(); - [Throws] - static FileAccessHelper createFileAccessHelper(Context context); - [Throws] - static FileAccessHelper createFileAccessHelper(Context context, sequence wants); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.fileExtensionInfo.idl b/idl/@ohos.file.fileExtensionInfo.idl index 605aa60..045668a 100644 --- a/idl/@ohos.file.fileExtensionInfo.idl +++ b/idl/@ohos.file.fileExtensionInfo.idl @@ -1,8 +1,7 @@ -package ohos.file; +package ohos.file.fileExtensionInfo; +[DefaultExport] namespace fileExtensionInfo { - dictionary DeviceType { - number DEVICE_LOCAL_DISK = 1; number DEVICE_SHARED_DISK = 2; number DEVICE_SHARED_TERMINAL = 3; @@ -10,31 +9,15 @@ namespace fileExtensionInfo { number DEVICE_EXTERNAL_MTP = 5; number DEVICE_EXTERNAL_USB = 6; number DEVICE_EXTERNAL_CLOUD = 7; - }; namespace DeviceFlag { - - [GlobalScope] - interface GlobalScope_fileExtensionInfo.DeviceFlag_ohos_file_fileExtensionInfo { - - const number SUPPORTS_READ = 1; - const number SUPPORTS_WRITE = 2; - - }; - + const number SUPPORTS_READ = 1; + const number SUPPORTS_WRITE = 2; }; namespace DocumentFlag { - - [GlobalScope] - interface GlobalScope_fileExtensionInfo.DocumentFlag_ohos_file_fileExtensionInfo { - - const number REPRESENTS_FILE = 1; - const number REPRESENTS_DIR = 2; - const number SUPPORTS_READ = 4; - const number SUPPORTS_WRITE = 8; - - }; - + const number REPRESENTS_FILE = 1; + const number REPRESENTS_DIR = 2; + const number SUPPORTS_READ = 4; + const number SUPPORTS_WRITE = 8; }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.fileuri.idl b/idl/@ohos.file.fileuri.idl index 1bf1fe1..e452629 100644 --- a/idl/@ohos.file.fileuri.idl +++ b/idl/@ohos.file.fileuri.idl @@ -1,24 +1,16 @@ -package ohos.file; -import ohos.uri as uri; +package ohos.file.fileuri; +import ohos.uri.default as uri; +[DefaultExport] namespace fileUri { - [Entity=Class] - interface FileUri: uri.URI { - + interface FileUri: [Extends] uri.URI { constructor(String uriOrPath); readonly attribute String name; [Throws] String getFullDirectoryUri(); [Throws] boolean isRemoteUri(); - }; - [GlobalScope] - interface GlobalScope_fileUri_ohos_file_fileuri { - - [Throws] - static String getUriFromPath(String path); - - }; - + [Throws] + String getUriFromPath(String path); }; \ No newline at end of file diff --git a/idl/@ohos.file.fs.idl b/idl/@ohos.file.fs.idl index 2d71894..111453d 100644 --- a/idl/@ohos.file.fs.idl +++ b/idl/@ohos.file.fs.idl @@ -1,78 +1,291 @@ package ohos.file.fs; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.util.stream as stream; +import ohos.util.stream.default as stream; +[DefaultExport] namespace fileIo { - namespace OpenMode { - - [GlobalScope] - interface GlobalScope_fileIo.OpenMode_ohos_file_fs { - - const number READ_ONLY = 0; - const number WRITE_ONLY = 1; - const number READ_WRITE = 2; - const number CREATE = 64; - const number TRUNC = 512; - const number APPEND = 1024; - const number NONBLOCK = 2048; - const number DIR = 65536; - const number NOFOLLOW = 131072; - const number SYNC = 1052672; - - }; - + const number READ_ONLY = 0; + const number WRITE_ONLY = 1; + const number READ_WRITE = 2; + const number CREATE = 64; + const number TRUNC = 512; + const number APPEND = 1024; + const number NONBLOCK = 2048; + const number DIR = 65536; + const number NOFOLLOW = 131072; + const number SYNC = 1052672; }; - }; +[Throws] +async boolean access(String path, optional AccessModeType mode); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); +[Throws] +void access(String path, AsyncCallback_Boolean_Void callback_); +[Throws] +async boolean access(String path, AccessModeType mode, AccessFlagType flag); +[Throws] +boolean accessSync(String path, optional AccessModeType mode); +[Throws] +boolean accessSync(String path, AccessModeType mode, AccessFlagType flag); +[Throws] +async void close((number or File) file); [Async, Synthetic] callback AsyncCallback_Void = void (); +[Throws] +void close((number or File) file, AsyncCallback_Void callback_); +[Throws] +void closeSync((number or File) file); +[Throws] +async void copy(String srcUri, String destUri, optional CopyOptions options); +[Throws] +void copy(String srcUri, String destUri, AsyncCallback_Void callback_); +[Throws] +void copy(String srcUri, String destUri, CopyOptions options, AsyncCallback_Void callback_); +[Throws] +async void copyDir(String src, String dest, optional number mode); +[Throws] +void copyDir(String src, String dest, AsyncCallback_Void callback_); +[Throws] +void copyDir(String src, String dest, AsyncCallback_Void callback_); +[Throws] +void copyDir(String src, String dest, number mode, AsyncCallback_Void callback_); +[Throws] +void copyDir(String src, String dest, number mode, AsyncCallback_Void callback_); +[Throws] +void copyDirSync(String src, String dest, optional number mode); +[Throws] +async void copyFile((String or number) src, (String or number) dest, optional number mode); +[Throws] +void copyFile((String or number) src, (String or number) dest, AsyncCallback_Void callback_); +[Throws] +void copyFile((String or number) src, (String or number) dest, number mode, AsyncCallback_Void callback_); +[Throws] +void copyFileSync((String or number) src, (String or number) dest, optional number mode); +[Throws] +async Stream createStream(String path, String mode); [Async, Synthetic] callback AsyncCallback_Stream_Void = void (Stream result); +[Throws] +void createStream(String path, String mode, AsyncCallback_Stream_Void callback_); +[Throws] +Stream createStreamSync(String path, String mode); +[Throws] +async RandomAccessFile createRandomAccessFile((String or File) file, optional number mode, optional RandomAccessFileOptions options); [Async, Synthetic] callback AsyncCallback_RandomAccessFile_Void = void (RandomAccessFile result); +[Throws] +void createRandomAccessFile((String or File) file, AsyncCallback_RandomAccessFile_Void callback_); +[Throws] +void createRandomAccessFile((String or File) file, number mode, AsyncCallback_RandomAccessFile_Void callback_); +[Throws] +RandomAccessFile createRandomAccessFileSync((String or File) file, optional number mode, optional RandomAccessFileOptions options); +[Throws] +ReadStream createReadStream(String path, optional ReadStreamOptions options); +[Throws] +WriteStream createWriteStream(String path, optional WriteStreamOptions options); +[Throws] +Watcher createWatcher(String path, number events, WatchEventListener listener); +[Throws] +File dup(number fd); +[Throws] +async void fdatasync(number fd); +[Throws] +void fdatasync(number fd, AsyncCallback_Void callback_); +[Throws] +void fdatasyncSync(number fd); +[Throws] +async Stream fdopenStream(number fd, String mode); +[Throws] +void fdopenStream(number fd, String mode, AsyncCallback_Stream_Void callback_); +[Throws] +Stream fdopenStreamSync(number fd, String mode); +[Throws] +async void fsync(number fd); +[Throws] +void fsync(number fd, AsyncCallback_Void callback_); +[Throws] +void fsyncSync(number fd); +[Throws] +async sequence listFile(String path, optional ListFileOptions options); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); +[Throws] +void listFile(String path, AsyncCallback_Array_String_Void callback_); +[Throws] +void listFile(String path, ListFileOptions options, AsyncCallback_Array_String_Void callback_); +[Throws] +sequence listFileSync(String path, optional ListFileOptions options); +[Throws] +number lseek(number fd, number offset, optional WhenceType whence); +[Throws] +async Stat lstat(String path); [Async, Synthetic] callback AsyncCallback_Stat_Void = void (Stat result); +[Throws] +void lstat(String path, AsyncCallback_Stat_Void callback_); +[Throws] +Stat lstatSync(String path); +[Throws] +async void mkdir(String path); +[Throws] +async void mkdir(String path, boolean recursion); +[Throws] +void mkdir(String path, AsyncCallback_Void callback_); +[Throws] +void mkdir(String path, boolean recursion, AsyncCallback_Void callback_); +[Throws] +void mkdirSync(String path); +[Throws] +void mkdirSync(String path, boolean recursion); +[Throws] +async String mkdtemp(String prefix); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); +[Throws] +void mkdtemp(String prefix, AsyncCallback_String_Void callback_); +[Throws] +String mkdtempSync(String prefix); +[Throws] +async void moveDir(String src, String dest, optional number mode); +[Throws] +void moveDir(String src, String dest, AsyncCallback_Void callback_); +[Throws] +void moveDir(String src, String dest, AsyncCallback_Void callback_); +[Throws] +void moveDir(String src, String dest, number mode, AsyncCallback_Void callback_); +[Throws] +void moveDir(String src, String dest, number mode, AsyncCallback_Void callback_); +[Throws] +void moveDirSync(String src, String dest, optional number mode); +[Throws] +async void moveFile(String src, String dest, optional number mode); +[Throws] +void moveFile(String src, String dest, AsyncCallback_Void callback_); +[Throws] +void moveFile(String src, String dest, number mode, AsyncCallback_Void callback_); +[Throws] +void moveFileSync(String src, String dest, optional number mode); +[Throws] +async File open(String path, optional number mode); [Async, Synthetic] callback AsyncCallback_File_Void = void (File result); +[Throws] +void open(String path, AsyncCallback_File_Void callback_); +[Throws] +void open(String path, number mode, AsyncCallback_File_Void callback_); +[Throws] +File openSync(String path, optional number mode); +[Throws] +async number read(number fd, buffer buffer, optional ReadOptions options); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); +[Throws] +void read(number fd, buffer buffer, AsyncCallback_Number_Void callback_); +[Throws] +void read(number fd, buffer buffer, ReadOptions options, AsyncCallback_Number_Void callback_); +[Throws] +number readSync(number fd, buffer buffer, optional ReadOptions options); +[Throws] +async ReaderIterator readLines(String filePath, optional Options options); [Async, Synthetic] callback AsyncCallback_ReaderIterator_Void = void (ReaderIterator result); +[Throws] +void readLines(String filePath, AsyncCallback_ReaderIterator_Void callback_); +[Throws] +void readLines(String filePath, Options options, AsyncCallback_ReaderIterator_Void callback_); +[Throws] +ReaderIterator readLinesSync(String filePath, optional Options options); +[Throws] +async String readText(String filePath, optional ReadTextOptions options); +[Throws] +void readText(String filePath, AsyncCallback_String_Void callback_); +[Throws] +void readText(String filePath, ReadTextOptions options, AsyncCallback_String_Void callback_); +[Throws] +String readTextSync(String filePath, optional ReadTextOptions options); +[Throws] +async void rename(String oldPath, String newPath); +[Throws] +void rename(String oldPath, String newPath, AsyncCallback_Void callback_); +[Throws] +void renameSync(String oldPath, String newPath); +[Throws] +async void rmdir(String path); +[Throws] +void rmdir(String path, AsyncCallback_Void callback_); +[Throws] +void rmdirSync(String path); +[Throws] +async Stat stat((String or number) file); +[Throws] +void stat((String or number) file, AsyncCallback_Stat_Void callback_); +[Throws] +Stat statSync((String or number) file); +[Throws] +async void symlink(String target, String srcPath); +[Throws] +void symlink(String target, String srcPath, AsyncCallback_Void callback_); +[Throws] +void symlinkSync(String target, String srcPath); +[Throws] +async void truncate((String or number) file, optional number len); +[Throws] +void truncate((String or number) file, AsyncCallback_Void callback_); +[Throws] +void truncate((String or number) file, number len, AsyncCallback_Void callback_); +[Throws] +void truncateSync((String or number) file, optional number len); +[Throws] +async void unlink(String path); +[Throws] +void unlink(String path, AsyncCallback_Void callback_); +[Throws] +void unlinkSync(String path); +[Throws] +void utimes(String path, number mtime); +[Throws] +async number write(number fd, (buffer or String) buffer, optional WriteOptions options); +[Throws] +void write(number fd, (buffer or String) buffer, AsyncCallback_Number_Void callback_); +[Throws] +void write(number fd, (buffer or String) buffer, WriteOptions options, AsyncCallback_Number_Void callback_); +[Throws] +number writeSync(number fd, (buffer or String) buffer, optional WriteOptions options); +[Throws] +async void connectDfs(String networkId, DfsListeners listeners); +[Throws] +async void disconnectDfs(String networkId); +[Throws] +async void setxattr(String path, String key, String value); +[Throws] +void setxattrSync(String path, String key, String value); +[Throws] +async String getxattr(String path, String key); +[Throws] +String getxattrSync(String path, String key); [Entity=Interface] interface Progress { - readonly attribute number processedSize; readonly attribute number totalSize; - }; [Entity=Class] interface TaskSignal { - [Throws] void cancel(); [Throws] async String onCancel(); - }; [Entity=Interface] interface CopyOptions { - [Optional] attribute ProgressListener progressListener; [Optional] attribute TaskSignal copySignal; - }; callback ProgressListener = void (Progress progress); [Entity=Interface] interface File { - readonly attribute number fd; readonly attribute String path; readonly attribute String name; @@ -88,11 +301,9 @@ interface File { void tryLock(optional boolean exclusive); [Throws] void unlock(); - }; [Entity=Interface] interface RandomAccessFile { - readonly attribute number fd; readonly attribute number filePointer; [Throws] @@ -119,11 +330,9 @@ interface RandomAccessFile { ReadStream getReadStream(); [Throws] WriteStream getWriteStream(); - }; [Entity=Class] -interface ReadStream: stream.Readable { - +interface ReadStream: [Extends] stream.Readable { constructor(); readonly attribute number bytesRead; readonly attribute String path; @@ -131,11 +340,9 @@ interface ReadStream: stream.Readable { number seek(number offset, optional WhenceType whence); [Throws] void close(); - }; [Entity=Class] -interface WriteStream: stream.Writable { - +interface WriteStream: [Extends] stream.Writable { constructor(); readonly attribute number bytesWritten; readonly attribute String path; @@ -143,11 +350,9 @@ interface WriteStream: stream.Writable { number seek(number offset, optional WhenceType whence); [Throws] void close(); - }; [Entity=Class] interface AtomicFile { - constructor(String path); [Throws] File getBaseFile(); @@ -163,11 +368,9 @@ interface AtomicFile { void failWrite(); [Throws] void delete(); - }; [Entity=Interface] interface Stat { - readonly attribute bigint ino; readonly attribute number mode; readonly attribute number uid; @@ -197,11 +400,9 @@ interface Stat { boolean isSocket(); [Throws] boolean isSymbolicLink(); - }; [Entity=Interface] interface Stream { - [Throws] async void close(); [Throws] @@ -230,49 +431,37 @@ interface Stream { void read(buffer buffer, ReadOptions options, AsyncCallback_Number_Void callback_); [Throws] number readSync(buffer buffer, optional ReadOptions options); - }; [Entity=Interface] interface WatchEventListener { - [CallSignature] void invoke(WatchEvent event); - }; [Entity=Interface] interface WatchEvent { - readonly attribute String fileName; readonly attribute number event; readonly attribute number cookie; - }; [Entity=Interface] interface Watcher { - [Throws] void start(); [Throws] void stop(); - }; [Entity=Interface] interface ReaderIteratorResult { - attribute boolean done; attribute String value; - }; [Entity=Interface] interface ReaderIterator { - [Throws] ReaderIteratorResult next(); - }; [Entity=Interface] interface Filter { - [Optional] attribute sequence suffix; [Optional] @@ -285,347 +474,85 @@ interface Filter { attribute number lastModifiedAfter; [Optional] attribute boolean excludeMedia; - }; [Entity=Interface] interface ConflictFiles { - attribute String srcFile; attribute String destFile; - }; [Entity=Interface] interface Options { - [Optional] attribute String encoding; - }; [Entity=Interface] interface ReadOptions { - [Optional] attribute number offset; [Optional] attribute number length; - }; [Entity=Interface] interface ReadTextOptions: ReadOptions { - [Optional] attribute String encoding; - }; [Entity=Interface] interface WriteOptions: Options { - [Optional] attribute number offset; [Optional] attribute number length; - }; [Entity=Interface] interface ListFileOptions { - [Optional] attribute boolean recursion; [Optional] attribute number listNum; [Optional] attribute Filter filter; - }; [Entity=Interface] interface RandomAccessFileOptions { - [Optional] attribute number start; [Optional] attribute number end; - }; [Entity=Interface] interface ReadStreamOptions { - [Optional] attribute number start; [Optional] attribute number end; - }; [Entity=Interface] interface WriteStreamOptions { - [Optional] attribute number mode; [Optional] attribute number start; - }; [Entity=Interface] interface DfsListeners { - void onStatus(String networkId, number status); - }; dictionary WhenceType { - number SEEK_SET = 0; number SEEK_CUR = 1; number SEEK_END = 2; - }; dictionary LocationType { - number LOCAL = 1; number CLOUD = 2; - }; dictionary AccessModeType { - number EXIST = 0; number WRITE = 2; number READ = 4; number READ_WRITE = 6; - }; dictionary AccessFlagType { - number LOCAL = 0; - -}; -[GlobalScope] -interface GlobalScope_ohos_file_fs { - - [Throws] - static async boolean access(String path, optional AccessModeType mode); - [Throws] - static void access(String path, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean access(String path, AccessModeType mode, AccessFlagType flag); - [Throws] - static boolean accessSync(String path, optional AccessModeType mode); - [Throws] - static boolean accessSync(String path, AccessModeType mode, AccessFlagType flag); - [Throws] - static async void close((number or File) file); - [Throws] - static void close((number or File) file, AsyncCallback_Void callback_); - [Throws] - static void closeSync((number or File) file); - [Throws] - static async void copy(String srcUri, String destUri, optional CopyOptions options); - [Throws] - static void copy(String srcUri, String destUri, AsyncCallback_Void callback_); - [Throws] - static void copy(String srcUri, String destUri, CopyOptions options, AsyncCallback_Void callback_); - [Throws] - static async void copyDir(String src, String dest, optional number mode); - [Throws] - static void copyDir(String src, String dest, AsyncCallback_Void callback_); - [Throws] - static void copyDir(String src, String dest, AsyncCallback_Void callback_); - [Throws] - static void copyDir(String src, String dest, number mode, AsyncCallback_Void callback_); - [Throws] - static void copyDir(String src, String dest, number mode, AsyncCallback_Void callback_); - [Throws] - static void copyDirSync(String src, String dest, optional number mode); - [Throws] - static async void copyFile((String or number) src, (String or number) dest, optional number mode); - [Throws] - static void copyFile((String or number) src, (String or number) dest, AsyncCallback_Void callback_); - [Throws] - static void copyFile((String or number) src, (String or number) dest, number mode, AsyncCallback_Void callback_); - [Throws] - static void copyFileSync((String or number) src, (String or number) dest, optional number mode); - [Throws] - static async Stream createStream(String path, String mode); - [Throws] - static void createStream(String path, String mode, AsyncCallback_Stream_Void callback_); - [Throws] - static Stream createStreamSync(String path, String mode); - [Throws] - static async RandomAccessFile createRandomAccessFile((String or File) file, optional number mode, optional RandomAccessFileOptions options); - [Throws] - static void createRandomAccessFile((String or File) file, AsyncCallback_RandomAccessFile_Void callback_); - [Throws] - static void createRandomAccessFile((String or File) file, number mode, AsyncCallback_RandomAccessFile_Void callback_); - [Throws] - static RandomAccessFile createRandomAccessFileSync((String or File) file, optional number mode, optional RandomAccessFileOptions options); - [Throws] - static ReadStream createReadStream(String path, optional ReadStreamOptions options); - [Throws] - static WriteStream createWriteStream(String path, optional WriteStreamOptions options); - [Throws] - static Watcher createWatcher(String path, number events, WatchEventListener listener); - [Throws] - static File dup(number fd); - [Throws] - static async void fdatasync(number fd); - [Throws] - static void fdatasync(number fd, AsyncCallback_Void callback_); - [Throws] - static void fdatasyncSync(number fd); - [Throws] - static async Stream fdopenStream(number fd, String mode); - [Throws] - static void fdopenStream(number fd, String mode, AsyncCallback_Stream_Void callback_); - [Throws] - static Stream fdopenStreamSync(number fd, String mode); - [Throws] - static async void fsync(number fd); - [Throws] - static void fsync(number fd, AsyncCallback_Void callback_); - [Throws] - static void fsyncSync(number fd); - [Throws] - static async sequence listFile(String path, optional ListFileOptions options); - [Throws] - static void listFile(String path, AsyncCallback_Array_String_Void callback_); - [Throws] - static void listFile(String path, ListFileOptions options, AsyncCallback_Array_String_Void callback_); - [Throws] - static sequence listFileSync(String path, optional ListFileOptions options); - [Throws] - static number lseek(number fd, number offset, optional WhenceType whence); - [Throws] - static async Stat lstat(String path); - [Throws] - static void lstat(String path, AsyncCallback_Stat_Void callback_); - [Throws] - static Stat lstatSync(String path); - [Throws] - static async void mkdir(String path); - [Throws] - static async void mkdir(String path, boolean recursion); - [Throws] - static void mkdir(String path, AsyncCallback_Void callback_); - [Throws] - static void mkdir(String path, boolean recursion, AsyncCallback_Void callback_); - [Throws] - static void mkdirSync(String path); - [Throws] - static void mkdirSync(String path, boolean recursion); - [Throws] - static async String mkdtemp(String prefix); - [Throws] - static void mkdtemp(String prefix, AsyncCallback_String_Void callback_); - [Throws] - static String mkdtempSync(String prefix); - [Throws] - static async void moveDir(String src, String dest, optional number mode); - [Throws] - static void moveDir(String src, String dest, AsyncCallback_Void callback_); - [Throws] - static void moveDir(String src, String dest, AsyncCallback_Void callback_); - [Throws] - static void moveDir(String src, String dest, number mode, AsyncCallback_Void callback_); - [Throws] - static void moveDir(String src, String dest, number mode, AsyncCallback_Void callback_); - [Throws] - static void moveDirSync(String src, String dest, optional number mode); - [Throws] - static async void moveFile(String src, String dest, optional number mode); - [Throws] - static void moveFile(String src, String dest, AsyncCallback_Void callback_); - [Throws] - static void moveFile(String src, String dest, number mode, AsyncCallback_Void callback_); - [Throws] - static void moveFileSync(String src, String dest, optional number mode); - [Throws] - static async File open(String path, optional number mode); - [Throws] - static void open(String path, AsyncCallback_File_Void callback_); - [Throws] - static void open(String path, number mode, AsyncCallback_File_Void callback_); - [Throws] - static File openSync(String path, optional number mode); - [Throws] - static async number read(number fd, buffer buffer, optional ReadOptions options); - [Throws] - static void read(number fd, buffer buffer, AsyncCallback_Number_Void callback_); - [Throws] - static void read(number fd, buffer buffer, ReadOptions options, AsyncCallback_Number_Void callback_); - [Throws] - static number readSync(number fd, buffer buffer, optional ReadOptions options); - [Throws] - static async ReaderIterator readLines(String filePath, optional Options options); - [Throws] - static void readLines(String filePath, AsyncCallback_ReaderIterator_Void callback_); - [Throws] - static void readLines(String filePath, Options options, AsyncCallback_ReaderIterator_Void callback_); - [Throws] - static ReaderIterator readLinesSync(String filePath, optional Options options); - [Throws] - static async String readText(String filePath, optional ReadTextOptions options); - [Throws] - static void readText(String filePath, AsyncCallback_String_Void callback_); - [Throws] - static void readText(String filePath, ReadTextOptions options, AsyncCallback_String_Void callback_); - [Throws] - static String readTextSync(String filePath, optional ReadTextOptions options); - [Throws] - static async void rename(String oldPath, String newPath); - [Throws] - static void rename(String oldPath, String newPath, AsyncCallback_Void callback_); - [Throws] - static void renameSync(String oldPath, String newPath); - [Throws] - static async void rmdir(String path); - [Throws] - static void rmdir(String path, AsyncCallback_Void callback_); - [Throws] - static void rmdirSync(String path); - [Throws] - static async Stat stat((String or number) file); - [Throws] - static void stat((String or number) file, AsyncCallback_Stat_Void callback_); - [Throws] - static Stat statSync((String or number) file); - [Throws] - static async void symlink(String target, String srcPath); - [Throws] - static void symlink(String target, String srcPath, AsyncCallback_Void callback_); - [Throws] - static void symlinkSync(String target, String srcPath); - [Throws] - static async void truncate((String or number) file, optional number len); - [Throws] - static void truncate((String or number) file, AsyncCallback_Void callback_); - [Throws] - static void truncate((String or number) file, number len, AsyncCallback_Void callback_); - [Throws] - static void truncateSync((String or number) file, optional number len); - [Throws] - static async void unlink(String path); - [Throws] - static void unlink(String path, AsyncCallback_Void callback_); - [Throws] - static void unlinkSync(String path); - [Throws] - static void utimes(String path, number mtime); - [Throws] - static async number write(number fd, (buffer or String) buffer, optional WriteOptions options); - [Throws] - static void write(number fd, (buffer or String) buffer, AsyncCallback_Number_Void callback_); - [Throws] - static void write(number fd, (buffer or String) buffer, WriteOptions options, AsyncCallback_Number_Void callback_); - [Throws] - static number writeSync(number fd, (buffer or String) buffer, optional WriteOptions options); - [Throws] - static async void connectDfs(String networkId, DfsListeners listeners); - [Throws] - static async void disconnectDfs(String networkId); - [Throws] - static async void setxattr(String path, String key, String value); - [Throws] - static void setxattrSync(String path, String key, String value); - [Throws] - static async String getxattr(String path, String key); - [Throws] - static String getxattrSync(String path, String key); - }; \ No newline at end of file diff --git a/idl/@ohos.file.hash.idl b/idl/@ohos.file.hash.idl index 897a88b..862041b 100644 --- a/idl/@ohos.file.hash.idl +++ b/idl/@ohos.file.hash.idl @@ -1,29 +1,21 @@ -package ohos.file; +package ohos.file.hash; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.util.stream as stream; +import ohos.util.stream.default as stream; +[DefaultExport] namespace hash { - + [Throws] + async String hash(String path, String algorithm); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void hash(String path, String algorithm, AsyncCallback_String_Void callback_); [Entity=Class] - interface HashStream: stream.Transform { - + interface HashStream: [Extends] stream.Transform { [Throws] String digest(); [Throws] void update(buffer data); - }; - [GlobalScope] - interface GlobalScope_hash_ohos_file_hash { - - [Throws] - static async String hash(String path, String algorithm); - [Throws] - static void hash(String path, String algorithm, AsyncCallback_String_Void callback_); - [Throws] - static HashStream createHash(String algorithm); - - }; - + [Throws] + HashStream createHash(String algorithm); }; \ No newline at end of file diff --git a/idl/@ohos.file.keyManager.idl b/idl/@ohos.file.keyManager.idl new file mode 100644 index 0000000..6e61b1b --- /dev/null +++ b/idl/@ohos.file.keyManager.idl @@ -0,0 +1,6 @@ +package ohos.file.keyManager; +[DefaultExport] +namespace keyManager { + [Throws] + void deactivateUserKey(number userId); +}; \ No newline at end of file diff --git a/idl/@ohos.file.photoAccessHelper.idl b/idl/@ohos.file.photoAccessHelper.idl index 35f1f91..f305438 100644 --- a/idl/@ohos.file.photoAccessHelper.idl +++ b/idl/@ohos.file.photoAccessHelper.idl @@ -1,46 +1,43 @@ -package ohos.file; +package ohos.file.photoAccessHelper; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; -import ohos.multimedia.image as image; -import ohos.data.dataSharePredicates as dataSharePredicates; +import application.Context.default as Context; +import ohos.multimedia.image.default as image; +import ohos.data.dataSharePredicates.default as dataSharePredicates; import ohos.arkui.theme.CustomColors as CustomColors; +[DefaultExport] namespace photoAccessHelper { - + [Throws] + PhotoAccessHelper getPhotoAccessHelper(Context context); + [Throws] + PhotoAccessHelper getPhotoAccessHelper(Context context, number userId); + dictionary SupportedImageFormat { + String AVFILE_FORMAT_JPG = "jpg"; + }; dictionary PhotoType { - number IMAGE = 1; number VIDEO = 2; - }; dictionary PhotoSubtype { - number DEFAULT = 0; number SCREENSHOT = 1; number MOVING_PHOTO = 3; number BURST = 4; - }; dictionary DynamicRangeType { - number SDR = 0; number HDR = 1; - }; dictionary ThumbnailVisibility { - number INVISIBLE = 0; number VISIBLE = 1; - }; dictionary PositionType { - number LOCAL = 1; number CLOUD = 2; - + number LOCAL_AND_CLOUD = 3; }; dictionary AnalysisType { - number ANALYSIS_AESTHETICS_SCORE = 0; number ANALYSIS_LABEL = 1; number ANALYSIS_OCR = 2; @@ -57,10 +54,9 @@ namespace photoAccessHelper { number ANALYSIS_VIDEO_LABEL = 13; number ANALYSIS_HIGHLIGHT = 14; number ANALYSIS_MULTI_CROP = 15; - + number ANALYSIS_SEARCH_INDEX = 16; }; dictionary RecommendationType { - number QR_OR_BAR_CODE = 1; number QR_CODE = 2; number BAR_CODE = 3; @@ -71,70 +67,51 @@ namespace photoAccessHelper { number DRIVER_LICENSE = 8; number DRIVING_LICENSE = 9; number FEATURED_SINGLE_PORTRAIT = 10; - + number COLOR_STYLE_PHOTO = 12; }; dictionary DeliveryMode { - number FAST_MODE = 0; number HIGH_QUALITY_MODE = 1; number BALANCE_MODE = 2; - }; dictionary CompatibleMode { - number ORIGINAL_FORMAT_MODE = 0; number COMPATIBLE_FORMAT_MODE = 1; - }; [Entity=Interface] interface MediaAssetProgressHandler { - void onProgress(number progress); - }; dictionary SourceMode { - number ORIGINAL_MODE = 0; number EDITED_MODE = 1; - }; dictionary PhotoPermissionType { - number TEMPORARY_READ_IMAGEVIDEO = 0; number PERSISTENT_READ_IMAGEVIDEO = 1; - }; dictionary HideSensitiveType { - number HIDE_LOCATION_AND_SHOOTING_PARAM = 0; number HIDE_LOCATION_ONLY = 1; number HIDE_SHOOTING_PARAM_ONLY = 2; number NO_HIDE_SENSITIVE_TYPE = 3; - }; dictionary AuthorizationMode { - number SHORT_TIME_AUTHORIZATION = 0; - }; dictionary WatermarkType { - number DEFAULT = 0; number BRAND_COMMON = 1; number COMMON = 2; number BRAND = 3; - }; dictionary CompleteButtonText { - number TEXT_DONE = 0; number TEXT_SEND = 1; number TEXT_ADD = 2; - }; [Entity=Interface] interface RequestOptions { - attribute DeliveryMode deliveryMode; [Optional] attribute SourceMode sourceMode; @@ -142,28 +119,20 @@ namespace photoAccessHelper { attribute CompatibleMode compatibleMode; [Optional] attribute MediaAssetProgressHandler mediaAssetProgressHandler; - }; [Entity=Interface, TypeParameters="T"] interface MediaAssetDataHandler { - void onDataPrepared(T data, optional record map); - }; [Entity=Interface, TypeParameters="T"] interface QuickImageDataHandler { - void onDataPrepared(T data, image.ImageSource imageSource, record map); - }; [Entity=Interface] interface PhotoProxy { - - }; [Entity=Class] interface MediaAssetManager { - [Throws] static async String requestImage(Context context, PhotoAsset asset, RequestOptions requestOptions, [TypeArguments="image.ImageSource"] MediaAssetDataHandler dataHandler); [Throws] @@ -178,7 +147,6 @@ namespace photoAccessHelper { static async String requestVideoFile(Context context, PhotoAsset asset, RequestOptions requestOptions, String fileUri, [TypeArguments="boolean"] MediaAssetDataHandler dataHandler); [Throws] static async MovingPhoto loadMovingPhoto(Context context, String imageFileUri, String videoFileUri); - }; typedef (number or String or boolean) MemberType; [Async, Synthetic] @@ -186,14 +154,13 @@ namespace photoAccessHelper { [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); [Entity=Interface] interface PhotoAsset { - readonly attribute String uri; readonly attribute PhotoType photoType; readonly attribute String displayName; @@ -218,11 +185,13 @@ namespace photoAccessHelper { [Deprecated, Throws] async void close(number fd); [Throws] - void getThumbnail(AsyncCallback_image_PixelMap_Void callback_); + void getThumbnail(AsyncCallback_Image_PixelMap_Void callback_); [Throws] - void getThumbnail(image.Size size, AsyncCallback_image_PixelMap_Void callback_); + void getThumbnail(image.Size size, AsyncCallback_Image_PixelMap_Void callback_); [Throws] async image.PixelMap getThumbnail(optional image.Size size); + [Throws] + async buffer getThumbnailData(ThumbnailType type); [Deprecated, Throws] void setFavorite(boolean favoriteState, AsyncCallback_Void callback_); [Deprecated, Throws] @@ -238,10 +207,10 @@ namespace photoAccessHelper { [Throws] void getExif(AsyncCallback_String_Void callback_); [Throws] - async String getAnalysisData(AnalysisType analysisType); - [Throws] async String getExif(); [Throws] + async String getAnalysisData(AnalysisType analysisType); + [Throws] void setPending(boolean pendingState, AsyncCallback_Void callback_); [Throws] async void setPending(boolean pendingState); @@ -258,29 +227,29 @@ namespace photoAccessHelper { [Throws] async PhotoAsset clone(String title); [Throws] + async PhotoAsset convertImageFormat(String title, SupportedImageFormat imageFormat); + [Throws] void requestSource(AsyncCallback_Number_Void callback_); [Throws] async number requestSource(); [Throws] - undefined commitEditedAsset(String editData, String uri, AsyncCallback_Void callback_); + void commitEditedAsset(String editData, String uri, AsyncCallback_Void callback_); [Throws] async void commitEditedAsset(String editData, String uri); [Throws] - undefined revertToOriginal(AsyncCallback_Void callback_); + void revertToOriginal(AsyncCallback_Void callback_); [Throws] async void revertToOriginal(); [Throws] - String requestPhoto(AsyncCallback_image_PixelMap_Void callback_); + String requestPhoto(AsyncCallback_Image_PixelMap_Void callback_); [Throws] - String requestPhoto(RequestPhotoOptions options, AsyncCallback_image_PixelMap_Void callback_); + String requestPhoto(RequestPhotoOptions options, AsyncCallback_Image_PixelMap_Void callback_); [Throws] void cancelPhotoRequest(String requestId); [Throws] async image.PixelMap getKeyFrameThumbnail(number beginFrameTimeMs, ThumbnailType type); - }; dictionary PhotoKeys { - String URI = "uri"; String PHOTO_TYPE = "media_type"; String DISPLAY_NAME = "display_name"; @@ -319,73 +288,79 @@ namespace photoAccessHelper { String CE_AVAILABLE = "ce_available"; String SUPPORTED_WATERMARK_TYPE = "supported_watermark_type"; String THUMBNAIL_VISIBLE = "thumbnail_visible"; - + String IS_CE_AUTO = "is_auto"; + String OWNER_ALBUM_ID = "owner_album_id"; + String IS_RECENT_SHOW = "is_recent_show"; + String MEDIA_SUFFIX = "media_suffix"; + String SUM_SIZE = "sum(size)"; + String EXIF_ROTATE = "exif_rotate"; }; dictionary AlbumKeys { - String URI = "uri"; String ALBUM_NAME = "album_name"; String ALBUM_LPATH = "lpath"; - + String BUNDLE_NAME = "bundle_name"; + String DATE_MODIFIED = "date_modified"; + String COVER_URI_SOURCE = "cover_uri_source"; }; dictionary HiddenPhotosDisplayMode { - number ASSETS_MODE = 0; number ALBUMS_MODE = 1; - }; [Entity=Interface] interface FetchOptions { - attribute sequence fetchColumns; attribute dataSharePredicates.DataSharePredicates predicates; - }; [Entity=Interface] interface PhotoCreateOptions { - [Optional] attribute PhotoSubtype subtype; [Optional] attribute String cameraShotKey; - + [Optional] + attribute number userId; }; [Entity=Interface] interface PhotoCreationConfig { - [Optional] attribute String title; attribute String fileNameExtension; attribute PhotoType photoType; [Optional] attribute PhotoSubtype subtype; - }; [Entity=Interface] interface CreateOptions { - [Optional] attribute String title; [Optional] attribute PhotoSubtype subtype; - }; [Entity=Interface] interface RequestPhotoOptions { - [Optional] attribute image.Size size; [Optional] attribute RequestPhotoType requestPhotoType; - + }; + [Entity=Interface] + interface PhotoCreationSource { + [Optional] + attribute String bundleName; + [Optional] + attribute String appName; + [Optional] + attribute String appId; + [Optional] + attribute number tokenId; }; [Async, Synthetic] - callback AsyncCallback_T_Void = void (any result); + callback AsyncCallback_T_Void = void (T result); [Async, Synthetic] callback AsyncCallback_Array_T_Void = void (sequence result); [Entity=Interface, TypeParameters="T"] interface FetchResult { - [Throws] number getCount(); [Throws] @@ -412,17 +387,14 @@ namespace photoAccessHelper { async sequence getAllObjects(); [Throws] void close(); - }; dictionary AlbumType { - number USER = 0; number SYSTEM = 1024; + number SOURCE = 2048; number SMART = 4096; - }; dictionary AlbumSubtype { - number USER_GENERIC = 1; number FAVORITE = 1025; number VIDEO = 1026; @@ -442,20 +414,20 @@ namespace photoAccessHelper { number HIGHLIGHT = 4104; number HIGHLIGHT_SUGGESTIONS = 4105; number ANY = 2147483647; - }; dictionary RequestPhotoType { - number REQUEST_ALL_THUMBNAILS = 0; number REQUEST_FAST_THUMBNAIL = 1; number REQUEST_QUALITY_THUMBNAIL = 2; - + }; + dictionary CoverUriSource { + number DEFAULT_COVER = 0; + number MANUAL_COVER = 1; }; [Async, Synthetic] callback AsyncCallback_FetchResult_Void = void ([TypeArguments="PhotoAsset"] FetchResult result); [Entity=Interface] interface AbsAlbum { - readonly attribute AlbumType albumType; readonly attribute AlbumSubtype albumSubtype; attribute String albumName; @@ -464,21 +436,30 @@ namespace photoAccessHelper { readonly attribute String coverUri; [Optional] readonly attribute String lpath; + [Optional] + readonly attribute CoverUriSource coverUriSource; [Throws] void getAssets(FetchOptions options, AsyncCallback_FetchResult_Void callback_); [Throws] async ([TypeArguments="PhotoAsset"] FetchResult) getAssets(FetchOptions options); [Throws] sequence getSharedPhotoAssets(FetchOptions options); - + }; + dictionary NotifyChangeType { + number NOTIFY_CHANGE_ADD = 0; + number NOTIFY_CHANGE_UPDATE = 1; + number NOTIFY_CHANGE_REMOVE = 2; }; [Entity=Interface] interface Album: AbsAlbum { - [Optional] readonly attribute number imageCount; [Optional] readonly attribute number videoCount; + [Optional] + readonly attribute number dateAdded; + [Optional] + readonly attribute number dateModified; [Throws] void commitModify(AsyncCallback_Void callback_); [Throws] @@ -505,7 +486,14 @@ namespace photoAccessHelper { async void setCoverUri(String uri); [Throws] async String getFaceId(); - + }; + [Entity=Interface] + interface AlbumOrder { + attribute number albumId; + attribute number albumOrder; + attribute number orderSection; + attribute number orderType; + attribute number orderStatus; }; [Async, Synthetic] callback AsyncCallback_PhotoAsset_Void = void (PhotoAsset result); @@ -513,9 +501,12 @@ namespace photoAccessHelper { callback AsyncCallback_Album_Void = void (Album result); [Synthetic] callback Callback_ChangeData_Void = void (ChangeData parameter); + [Synthetic] + callback Callback_PhotoAssetChangeInfos_Void = void (PhotoAssetChangeInfos parameter); + [Synthetic] + callback Callback_AlbumChangeInfos_Void = void (AlbumChangeInfos parameter); [Entity=Interface] interface PhotoAccessHelper { - [Throws] void getAssets(FetchOptions options, AsyncCallback_FetchResult_Void callback_); [Throws] @@ -593,10 +584,16 @@ namespace photoAccessHelper { [Throws] async void saveFormInfo(FormInfo info); [Throws] + async void saveGalleryFormInfo(GalleryFormInfo info); + [Throws] void removeFormInfo(FormInfo info, AsyncCallback_Void callback_); [Throws] async void removeFormInfo(FormInfo info); [Throws] + async void removeGalleryFormInfo(GalleryFormInfo info); + [Throws] + async void updateGalleryFormInfo(GalleryFormInfo info); + [Throws] async void applyChanges(MediaChangeRequest mediaChangeRequest); [Throws] async String getIndexConstructProgress(); @@ -614,53 +611,192 @@ namespace photoAccessHelper { sequence getSharedPhotoAssets(FetchOptions options); [Throws] async sequence getSupportedPhotoFormats(PhotoType photoType); - + [Throws] + async number startAssetAnalysis(AnalysisType type, optional sequence assetUris); + [Throws] + async record getAlbumsByIds(sequence albumIds); + [Throws] + async sequence createAssetsForAppWithAlbum(PhotoCreationSource source, String albumUri, boolean isAuthorized, sequence photoCreationConfigs); + [Throws, DtsName="on", DtsTag="'photoChange'"] + void onPhotoChange(Callback_PhotoAssetChangeInfos_Void callback_); + [Throws, DtsName="on", DtsTag="'hiddenPhotoChange'"] + void onHiddenPhotoChange(Callback_PhotoAssetChangeInfos_Void callback_); + [Throws, DtsName="on", DtsTag="'trashedPhotoChange'"] + void onTrashedPhotoChange(Callback_PhotoAssetChangeInfos_Void callback_); + [Throws, DtsName="on", DtsTag="'photoAlbumChange'"] + void onPhotoAlbumChange(Callback_AlbumChangeInfos_Void callback_); + [Throws, DtsName="on", DtsTag="'hiddenAlbumChange'"] + void onHiddenAlbumChange(Callback_AlbumChangeInfos_Void callback_); + [Throws, DtsName="on", DtsTag="'trashedAlbumChange'"] + void onTrashedAlbumChange(Callback_AlbumChangeInfos_Void callback_); + [Throws, DtsName="off", DtsTag="'photoChange'"] + void offPhotoChange(optional Callback_PhotoAssetChangeInfos_Void callback_); + [Throws, DtsName="off", DtsTag="'hiddenPhotoChange'"] + void offHiddenPhotoChange(optional Callback_PhotoAssetChangeInfos_Void callback_); + [Throws, DtsName="off", DtsTag="'trashedPhotoChange'"] + void offTrashedPhotoChange(optional Callback_PhotoAssetChangeInfos_Void callback_); + [Throws, DtsName="off", DtsTag="'photoAlbumChange'"] + void offPhotoAlbumChange(optional Callback_AlbumChangeInfos_Void callback_); + [Throws, DtsName="off", DtsTag="'hiddenAlbumChange'"] + void offHiddenAlbumChange(optional Callback_AlbumChangeInfos_Void callback_); + [Throws, DtsName="off", DtsTag="'trashedAlbumChange'"] + void offTrashedAlbumChange(optional Callback_AlbumChangeInfos_Void callback_); + [Throws] + async String getPhotoPickerComponentDefaultAlbumName(); + [Throws] + async ([TypeArguments="Album"] FetchResult) getPhotoAlbums(optional FetchOptions options); + [Throws] + async ([TypeArguments="AlbumOrder"] FetchResult) getPhotoAlbumOrder(number orderStyle, optional FetchOptions options); + [Throws] + async void setPhotoAlbumOrder(number orderStyle, sequence albumOrders); + async RecentPhotoInfo getRecentPhotoInfo(optional RecentPhotoOptions options); + }; + [Entity=Class] + interface RecentPhotoOptions { + [Optional] + attribute number period; + [Optional] + attribute photoAccessHelper.PhotoViewMIMETypes MIMEType; + [Optional] + attribute PhotoSource photoSource; + }; + [Entity=Class] + interface RecentPhotoInfo { + [Optional] + attribute number dateTaken; + [Optional] + attribute String identifier; + }; + dictionary PhotoSource { + number ALL = 0; + number CAMERA = 1; + number SCREENSHOT = 2; + }; + dictionary ThumbnailChangeStatus { + number THUMBNAIL_NOT_EXISTS = 0; + number THUMBNAIL_ADD = 1; + number THUMBNAIL_UPDATE = 2; + number THUMBNAIL_NOT_CHANGE = 3; + }; + dictionary StrongAssociationType { + number NORMAL = 0; + number CLOUD_ENHANCEMENT = 1; + }; + [Entity=Interface] + interface PhotoAssetChangeInfos { + attribute NotifyChangeType type; + attribute (sequence or undefined) assetChangeDatas; + attribute boolean isForRecheck; + }; + [Entity=Interface] + interface PhotoAssetChangeData { + attribute (PhotoAssetChangeInfo or undefined) assetBeforeChange; + attribute (PhotoAssetChangeInfo or undefined) assetAfterChange; + attribute boolean isContentChanged; + attribute boolean isDeleted; + attribute ThumbnailChangeStatus thumbnailChangeStatus; + attribute number version; + }; + [Entity=Interface] + interface PhotoAssetChangeInfo { + attribute String uri; + attribute PhotoType mediaType; + attribute String albumUri; + attribute number fileId; + attribute String dateDay; + attribute boolean isFavorite; + attribute boolean isHidden; + attribute StrongAssociationType strongAssociation; + attribute ThumbnailVisibility thumbnailVisible; + attribute number dateTrashedMs; + attribute number dateAddedMs; + attribute number dateTakenMs; + }; + [Entity=Interface] + interface AlbumChangeInfos { + attribute NotifyChangeType type; + attribute (sequence or undefined) albumChangeDatas; + attribute boolean isForRecheck; + }; + [Entity=Interface] + interface AlbumChangeData { + attribute (AlbumChangeInfo or undefined) albumBeforeChange; + attribute (AlbumChangeInfo or undefined) albumAfterChange; + attribute number version; + }; + [Entity=Interface] + interface AlbumChangeInfo { + attribute AlbumType albumType; + attribute AlbumSubtype albumSubtype; + attribute String albumName; + attribute String albumUri; + attribute number imageCount; + attribute number videoCount; + attribute number count; + attribute String coverUri; + attribute number hiddenCount; + attribute String hiddenCoverUri; + attribute boolean isCoverChanged; + attribute boolean isHiddenCoverChanged; + [Optional] + attribute PhotoAssetChangeInfo coverInfo; + [Optional] + attribute PhotoAssetChangeInfo hiddenCoverInfo; + }; + [Entity=Interface] + interface GalleryFormInfo { + attribute String formId; + [Optional] + attribute sequence assetUris; }; [Entity=Interface] interface FormInfo { - attribute String formId; attribute String uri; - }; dictionary NotifyType { - number NOTIFY_ADD = 0; number NOTIFY_UPDATE = 1; number NOTIFY_REMOVE = 2; number NOTIFY_ALBUM_ADD_ASSET = 3; number NOTIFY_ALBUM_REMOVE_ASSET = 4; - }; dictionary DefaultChangeUri { - String DEFAULT_PHOTO_URI = "file://media/Photo"; String DEFAULT_ALBUM_URI = "file://media/PhotoAlbum"; String DEFAULT_HIDDEN_ALBUM_URI = "file://media/HiddenAlbum"; - }; [Entity=Interface] interface ChangeData { - attribute NotifyType type; attribute sequence uris; attribute sequence extraUris; attribute sequence sharedPhotoAssets; attribute sequence sharedAlbumAssets; attribute sequence sharedExtraPhotoAssets; - }; dictionary PhotoViewMIMETypes { - String IMAGE_TYPE = "image/*"; String VIDEO_TYPE = "video/*"; String IMAGE_VIDEO_TYPE = "*/*"; String MOVING_PHOTO_IMAGE_TYPE = "image/movingPhoto"; - + }; + dictionary FilterOperator { + number EQUAL_TO = 0; + number NOT_EQUAL_TO = 1; + number MORE_THAN = 2; + number LESS_THAN = 3; + number MORE_THAN_OR_EQUAL_TO = 4; + number LESS_THAN_OR_EQUAL_TO = 5; + number BETWEEN = 6; + }; + dictionary SingleSelectionMode { + number BROWSER_MODE = 0; + number SELECT_MODE = 1; + number BROWSER_AND_SELECT_MODE = 2; }; [Entity=Class] interface BaseSelectOptions { - [Optional] attribute PhotoViewMIMETypes MIMEType; [Optional] @@ -675,11 +811,44 @@ namespace photoAccessHelper { attribute sequence preselectedUris; [Optional] attribute boolean isPreviewForSingleSelectionSupported; - + [Optional] + attribute SingleSelectionMode singleSelectionMode; + [Optional] + attribute MimeTypeFilter mimeTypeFilter; + [Optional] + attribute FileSizeFilter fileSizeFilter; + [Optional] + attribute VideoDurationFilter videoDurationFilter; + [Optional] + attribute sequence combinedMediaTypeFilter; + [Optional] + attribute sequence photoViewMimeTypeFileSizeFilters; + }; + [Entity=Class] + interface MimeTypeFilter { + attribute sequence mimeTypeArray; + }; + [Entity=Class] + interface FileSizeFilter { + attribute FilterOperator filterOperator; + attribute number fileSize; + [Optional] + attribute number extraFileSize; + }; + [Entity=Class] + interface VideoDurationFilter { + attribute FilterOperator filterOperator; + attribute number videoDuration; + [Optional] + attribute number extraVideoDuration; }; [Entity=Class] - interface PhotoSelectOptions: BaseSelectOptions { - + interface PhotoViewMimeTypeFileSizeFilter { + attribute PhotoViewMIMETypes photoViewMimeType; + attribute FileSizeFilter sizeFilter; + }; + [Entity=Class] + interface PhotoSelectOptions: [Extends] BaseSelectOptions { [Optional] attribute boolean isEditSupported; [Optional] @@ -690,69 +859,56 @@ namespace photoAccessHelper { attribute CustomColors themeColor; [Optional] attribute CompleteButtonText completeButtonText; - + [Optional] + attribute number userId; }; [Entity=Class] interface RecommendationOptions { - [Optional] attribute RecommendationType recommendationType; [Optional] attribute TextContextInfo textContextInfo; - }; [Entity=Interface] interface TextContextInfo { - [Optional] attribute String text; - }; [Entity=Class] interface PhotoSelectResult { - attribute sequence photoUris; attribute boolean isOriginalPhoto; - }; [Async, Synthetic] callback AsyncCallback_PhotoSelectResult_Void = void (PhotoSelectResult result); [Entity=Class] interface PhotoViewPicker { - [Throws] async PhotoSelectResult select(optional PhotoSelectOptions option); [Throws] void select(PhotoSelectOptions option, AsyncCallback_PhotoSelectResult_Void callback_); [Throws] void select(AsyncCallback_PhotoSelectResult_Void callback_); - }; [Entity=Class] interface MediaAssetEditData { - constructor(String compatibleFormat, String formatVersion); attribute String compatibleFormat; attribute String formatVersion; attribute String data; - }; dictionary ResourceType { - number IMAGE_RESOURCE = 1; number VIDEO_RESOURCE = 2; number PHOTO_PROXY = 3; number PRIVATE_MOVING_PHOTO_RESOURCE = 4; - + number PRIVATE_MOVING_PHOTO_METADATA = 5; }; dictionary ImageFileType { - number JPEG = 1; number HEIF = 2; - }; dictionary MovingPhotoEffectMode { - number DEFAULT = 0; number BOUNCE_PLAY = 1; number LOOP_PLAY = 2; @@ -760,23 +916,17 @@ namespace photoAccessHelper { number MULTI_EXPOSURE = 4; number CINEMA_GRAPH = 5; number IMAGE_ONLY = 10; - }; dictionary VideoEnhancementType { - number QUALITY_ENHANCEMENT_LOCAL = 0; number QUALITY_ENHANCEMENT_CLOUD = 1; number QUALITY_ENHANCEMENT_LOCAL_AND_CLOUD = 2; - }; [Entity=Interface] interface MediaChangeRequest { - - }; [Entity=Class] - interface MediaAssetChangeRequest { - + interface MediaAssetChangeRequest: MediaChangeRequest { constructor(PhotoAsset asset); [Throws] static MediaAssetChangeRequest createImageAssetRequest(Context context, String fileUri); @@ -830,11 +980,11 @@ namespace photoAccessHelper { void setSupportedWatermarkType(WatermarkType watermarkType); [Throws] static async void deleteLocalAssetsPermanently(Context context, sequence assets); - + [Throws] + static async void deleteLocalAssetsPermanentlyWithUri(Context context, sequence assetUris); }; [Entity=Class] - interface MediaAssetsChangeRequest { - + interface MediaAssetsChangeRequest: MediaChangeRequest { constructor(sequence assets); [Throws] void setFavorite(boolean favoriteState); @@ -842,17 +992,19 @@ namespace photoAccessHelper { void setHidden(boolean hiddenState); [Throws] void setUserComment(String userComment); - + [Throws] + void setIsRecentShow(boolean isRencentShow); }; [Entity=Class] - interface MediaAlbumChangeRequest { - + interface MediaAlbumChangeRequest: MediaChangeRequest { constructor(Album album); [Throws] static MediaAlbumChangeRequest createAlbumRequest(Context context, String name); [Throws] static async void deleteAlbums(Context context, sequence albums); [Throws] + static async void deleteAlbumsWithUri(Context context, sequence albumUris); + [Throws] Album getAlbum(); [Throws] void setCoverUri(String coverUri); @@ -865,10 +1017,16 @@ namespace photoAccessHelper { [Throws] void moveAssets(sequence assets, Album targetAlbum); [Throws] + void moveAssetsWithUri(sequence assetUris, Album targetAlbum); + [Throws] void recoverAssets(sequence assets); [Throws] + void recoverAssetsWithUri(sequence assetUris); + [Throws] void deleteAssets(sequence assets); [Throws] + void deleteAssetsWithUri(sequence assetUris); + [Throws] void setIsMe(); [Throws] void setDisplayLevel(number displayLevel); @@ -880,11 +1038,11 @@ namespace photoAccessHelper { void placeBefore(Album album); [Throws] void dismiss(); - + [Throws] + void resetCoverUri(); }; [Entity=Interface] interface SharedPhotoAsset { - attribute number fileId; attribute String uri; attribute String data; @@ -921,11 +1079,9 @@ namespace photoAccessHelper { [Optional] attribute number thumbnailModifiedMs; attribute ThumbnailVisibility thumbnailVisible; - }; [Entity=Interface] interface SharedAlbumAsset { - attribute number albumId; attribute AlbumType albumType; attribute AlbumSubtype albumSubType; @@ -934,11 +1090,9 @@ namespace photoAccessHelper { attribute number count; attribute number imageCount; attribute number videoCount; - }; [Entity=Interface] interface MovingPhoto { - [Throws] async void requestContent(String imageFileUri, String videoFileUri); [Throws] @@ -947,16 +1101,14 @@ namespace photoAccessHelper { async buffer requestContent(ResourceType resourceType); [Throws] String getUri(); - + [Throws] + async boolean isVideoReady(); }; dictionary HighlightAlbumInfoType { - number COVER_INFO = 0; number PLAY_INFO = 1; - }; dictionary HighlightUserActionType { - number INSERTED_PIC_COUNT = 0; number REMOVED_PIC_COUNT = 1; number SHARED_SCREENSHOT_COUNT = 2; @@ -967,17 +1119,25 @@ namespace photoAccessHelper { number RENDER_VIEWED_DURATION = 101; number ART_LAYOUT_VIEWED_TIMES = 102; number ART_LAYOUT_VIEWED_DURATION = 103; - }; dictionary ThumbnailType { - number LCD = 1; number THM = 2; - + }; + [Entity=Class] + interface MediaAnalysisAlbumChangeRequest: [Extends] MediaAlbumChangeRequest { + constructor(Album album); + [Throws] + void setOrderPosition(sequence assets, sequence position); + }; + [Entity=Class] + interface AnalysisAlbum { + constructor(Album album); + [Throws] + async sequence getOrderPosition(sequence assets); }; [Entity=Class] interface HighlightAlbum { - constructor(Album album); [Throws] async String getHighlightAlbumInfo(HighlightAlbumInfoType type); @@ -985,10 +1145,12 @@ namespace photoAccessHelper { async buffer getHighlightResource(String resourceUri); [Throws] async void setHighlightUserActionData(HighlightUserActionType type, number actionData); - + [Throws] + async void setSubTitle(String subTitle); + [Throws] + static async number deleteHighlightAlbums(Context context, sequence albums); }; dictionary CloudEnhancementTaskStage { - number TASK_STAGE_EXCEPTION = -1; number TASK_STAGE_PREPARING = 0; number TASK_STAGE_UPLOADING = 1; @@ -996,11 +1158,9 @@ namespace photoAccessHelper { number TASK_STAGE_DOWNLOADING = 3; number TASK_STAGE_FAILED = 4; number TASK_STAGE_COMPLETED = 5; - }; [Entity=Interface] interface CloudEnhancementTaskState { - readonly attribute CloudEnhancementTaskStage taskStage; [Optional] readonly attribute number transferredFileSize; @@ -1010,15 +1170,13 @@ namespace photoAccessHelper { readonly attribute number expectedDuration; [Optional] readonly attribute number statusCode; - }; [Entity=Class] interface CloudEnhancement { - [Throws] static CloudEnhancement getCloudEnhancementInstance(Context context); [Throws] - async void submitCloudEnhancementTasks(sequence photoAssets, boolean hasCloudWatermark); + async void submitCloudEnhancementTasks(sequence photoAssets, boolean hasCloudWatermark, optional number triggerMode); [Throws] async void prioritizeCloudEnhancementTask(PhotoAsset photoAsset); [Throws] @@ -1031,25 +1189,19 @@ namespace photoAccessHelper { async void syncCloudEnhancementTaskStatus(); [Throws] async PhotoAsset getCloudEnhancementPair(PhotoAsset asset); - }; dictionary CloudEnhancementState { - number UNAVAILABLE = 0; number AVAILABLE = 1; number EXECUTING = 2; number COMPLETED = 3; - }; dictionary CloudMediaAssetTaskStatus { - number DOWNLOADING = 0; number PAUSED = 1; number IDLE = 2; - }; dictionary CloudMediaTaskPauseCause { - number NO_PAUSE = 0; number TEMPERATURE_LIMIT = 1; number ROM_LIMIT = 2; @@ -1060,30 +1212,22 @@ namespace photoAccessHelper { number FREQUENT_USER_REQUESTS = 7; number CLOUD_ERROR = 8; number USER_PAUSED = 9; - }; [Entity=Interface] interface CloudMediaAssetStatus { - readonly attribute CloudMediaAssetTaskStatus taskStatus; readonly attribute String taskInfo; readonly attribute CloudMediaTaskPauseCause errorCode; - }; dictionary CloudMediaDownloadType { - number DOWNLOAD_FORCE = 0; number DOWNLOAD_GENTLE = 1; - }; dictionary CloudMediaRetainType { - number RETAIN_FORCE = 0; - }; [Entity=Class] interface CloudMediaAssetManager { - [Throws] static CloudMediaAssetManager getCloudMediaAssetManagerInstance(Context context); [Throws] @@ -1096,14 +1240,28 @@ namespace photoAccessHelper { async void retainCloudMediaAsset(CloudMediaRetainType retainType); [Throws] async CloudMediaAssetStatus getCloudMediaAssetStatus(); - }; - [GlobalScope] - interface GlobalScope_photoAccessHelper_ohos_file_photoAccessHelper { - + [Entity=Interface] + interface PhotoAssetCustomRecord { + readonly attribute number fileId; + readonly attribute number shareCount; + readonly attribute number lcdJumpCount; + }; + [Entity=Class] + interface PhotoAssetCustomRecordManager { + [Throws] + static PhotoAssetCustomRecordManager getCustomRecordManagerInstance(Context context); + [Throws] + async void createCustomRecords(sequence customRecords); + [Throws] + async ([TypeArguments="PhotoAssetCustomRecord"] FetchResult) getCustomRecords(FetchOptions optionCheck); + [Throws] + async sequence setCustomRecords(sequence customRecords); + [Throws] + async void removeCustomRecords(FetchOptions optionCheck); + [Throws] + async sequence addShareCount(sequence ids); [Throws] - static PhotoAccessHelper getPhotoAccessHelper(Context context); - + async sequence addLcdJumpCount(sequence ids); }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.picker.idl b/idl/@ohos.file.picker.idl index 6dc02b6..d21d4d6 100644 --- a/idl/@ohos.file.picker.idl +++ b/idl/@ohos.file.picker.idl @@ -1,44 +1,38 @@ -package ohos.file; +package ohos.file.picker; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; +import application.Context.default as Context; +import ohos.window.default as window; +import ohos.arkui.theme.CustomColors as CustomColors; +[DefaultExport] namespace picker { - [Deprecated] dictionary PhotoViewMIMETypes { - [Deprecated] String IMAGE_TYPE = "image/*"; [Deprecated] String VIDEO_TYPE = "video/*"; [Deprecated] String IMAGE_VIDEO_TYPE = "*/*"; - }; [Entity=Class, Deprecated] interface PhotoSelectOptions { - [Optional, Deprecated] attribute PhotoViewMIMETypes MIMEType; [Optional, Deprecated] attribute number maxSelectNumber; - }; [Entity=Class, Deprecated] interface PhotoSelectResult { - [Deprecated] attribute sequence photoUris; [Deprecated] attribute boolean isOriginalPhoto; - }; [Entity=Class, Deprecated] interface PhotoSaveOptions { - [Optional, Deprecated] attribute sequence newFileNames; - }; [Async, Synthetic] callback AsyncCallback_PhotoSelectResult_Void = void (PhotoSelectResult result); @@ -46,8 +40,9 @@ namespace picker { callback AsyncCallback_Array_String_Void = void (sequence result); [Entity=Class, Deprecated] interface PhotoViewPicker { - + [Deprecated] constructor(); + [Deprecated] constructor(Context context); [Deprecated] async PhotoSelectResult select(optional PhotoSelectOptions option); @@ -61,33 +56,25 @@ namespace picker { void save(PhotoSaveOptions option, AsyncCallback_Array_String_Void callback_); [Deprecated] void save(AsyncCallback_Array_String_Void callback_); - }; dictionary DocumentSelectMode { - number FILE = 0; number FOLDER = 1; number MIXED = 2; - }; dictionary DocumentPickerMode { - number DEFAULT = 0; number DOWNLOAD = 1; - }; dictionary MergeTypeMode { - number DEFAULT = 0; number AUDIO = 1; number VIDEO = 2; number DOCUMENT = 3; number PICTURE = 4; - }; [Entity=Class] interface DocumentSelectOptions { - [Optional] attribute String defaultFilePathUri; [Optional] @@ -104,11 +91,13 @@ namespace picker { attribute sequence multiUriArray; [Optional] attribute MergeTypeMode mergeMode; - + [Optional] + attribute boolean isEncryptionSupported; + [Optional] + attribute CustomColors themeColor; }; [Entity=Class] interface DocumentSaveOptions { - [Optional] attribute sequence newFileNames; [Optional] @@ -117,11 +106,11 @@ namespace picker { attribute sequence fileSuffixChoices; [Optional] attribute DocumentPickerMode pickerMode; - + [Optional] + attribute CustomColors themeColor; }; [Entity=Class] interface DocumentViewPicker { - constructor(); constructor(Context context); constructor(Context context, window.Window window); @@ -132,25 +121,19 @@ namespace picker { void save(DocumentSaveOptions option, AsyncCallback_Array_String_Void callback_); void save(AsyncCallback_Array_String_Void callback_); number getSelectedIndex(); - }; [Entity=Class] interface AudioSelectOptions { - [Optional] attribute number maxSelectNumber; - }; [Entity=Class] interface AudioSaveOptions { - [Optional] attribute sequence newFileNames; - }; [Entity=Class] interface AudioViewPicker { - constructor(); constructor(Context context); async sequence select(optional AudioSelectOptions option); @@ -159,7 +142,5 @@ namespace picker { async sequence save(optional AudioSaveOptions option); void save(AudioSaveOptions option, AsyncCallback_Array_String_Void callback_); void save(AsyncCallback_Array_String_Void callback_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.file.recent.idl b/idl/@ohos.file.recent.idl index 103fe46..df3e81c 100644 --- a/idl/@ohos.file.recent.idl +++ b/idl/@ohos.file.recent.idl @@ -1,9 +1,8 @@ -package ohos.file; +package ohos.file.recent; +[DefaultExport] namespace recent { - [Entity=Interface] interface FileInfo { - readonly attribute String uri; readonly attribute String srcPath; readonly attribute String fileName; @@ -11,18 +10,11 @@ namespace recent { readonly attribute number size; readonly attribute number mtime; readonly attribute number ctime; - }; - [GlobalScope] - interface GlobalScope_recent_ohos_file_recent { - - [Throws] - static sequence listFile(); - [Throws] - static void add(String uri); - [Throws] - static void remove(String uri); - - }; - + [Throws] + sequence listFile(); + [Throws] + void add(String uri); + [Throws] + void remove(String uri); }; \ No newline at end of file diff --git a/idl/@ohos.file.securityLabel.idl b/idl/@ohos.file.securityLabel.idl index 8cd5752..f63946d 100644 --- a/idl/@ohos.file.securityLabel.idl +++ b/idl/@ohos.file.securityLabel.idl @@ -1,28 +1,22 @@ -package ohos.file; +package ohos.file.securityLabel; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace securityLabel { - typedef String DataLevel; + [Throws] + async void setSecurityLabel(String path, DataLevel type); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setSecurityLabel(String path, DataLevel type, AsyncCallback_Void callback_); + [Throws] + void setSecurityLabelSync(String path, DataLevel type); + [Throws] + async String getSecurityLabel(String path); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_securityLabel_ohos_file_securityLabel { - - [Throws] - static async void setSecurityLabel(String path, DataLevel type); - [Throws] - static void setSecurityLabel(String path, DataLevel type, AsyncCallback_Void callback_); - [Throws] - static void setSecurityLabelSync(String path, DataLevel type); - [Throws] - static async String getSecurityLabel(String path); - [Throws] - static void getSecurityLabel(String path, AsyncCallback_String_Void callback_); - [Throws] - static String getSecurityLabelSync(String path); - - }; - + [Throws] + void getSecurityLabel(String path, AsyncCallback_String_Void callback_); + [Throws] + String getSecurityLabelSync(String path); }; \ No newline at end of file diff --git a/idl/@ohos.file.statvfs.idl b/idl/@ohos.file.statvfs.idl index f1d5467..fcb2f27 100644 --- a/idl/@ohos.file.statvfs.idl +++ b/idl/@ohos.file.statvfs.idl @@ -1,25 +1,19 @@ package ohos.file.statvfs; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace statfs { - + [Throws] + async number getFreeSize(String path); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); - [GlobalScope] - interface GlobalScope_statfs_ohos_file_statvfs { - - [Throws] - static async number getFreeSize(String path); - [Throws] - static void getFreeSize(String path, AsyncCallback_Number_Void callback_); - [Throws] - static number getFreeSizeSync(String path); - [Throws] - static async number getTotalSize(String path); - [Throws] - static void getTotalSize(String path, AsyncCallback_Number_Void callback_); - [Throws] - static number getTotalSizeSync(String path); - - }; - + [Throws] + void getFreeSize(String path, AsyncCallback_Number_Void callback_); + [Throws] + number getFreeSizeSync(String path); + [Throws] + async number getTotalSize(String path); + [Throws] + void getTotalSize(String path, AsyncCallback_Number_Void callback_); + [Throws] + number getTotalSizeSync(String path); }; \ No newline at end of file diff --git a/idl/@ohos.file.storageStatistics.idl b/idl/@ohos.file.storageStatistics.idl index 1067a67..1c0aa94 100644 --- a/idl/@ohos.file.storageStatistics.idl +++ b/idl/@ohos.file.storageStatistics.idl @@ -1,77 +1,67 @@ -package ohos.file; +package ohos.file.storageStatistics; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace storageStatistics { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getTotalSizeOfVolume(String volumeUuid, AsyncCallback_Number_Void callback_); + [Throws] + async number getTotalSizeOfVolume(String volumeUuid); + [Throws] + void getFreeSizeOfVolume(String volumeUuid, AsyncCallback_Number_Void callback_); + [Throws] + async number getFreeSizeOfVolume(String volumeUuid); [Entity=Interface] interface BundleStats { - attribute number appSize; attribute number cacheSize; attribute number dataSize; - }; [Async, Synthetic] callback AsyncCallback_BundleStats_Void = void (BundleStats result); + [Throws] + void getBundleStats(String packageName, AsyncCallback_BundleStats_Void callback_, optional number index); + [Throws] + async BundleStats getBundleStats(String packageName, optional number index); + [Throws] + void getCurrentBundleStats(AsyncCallback_BundleStats_Void callback_); + [Throws] + async BundleStats getCurrentBundleStats(); + [Throws] + void getSystemSize(AsyncCallback_Number_Void callback_); + [Throws] + async number getSystemSize(); [Entity=Interface] interface StorageStats { - attribute number total; attribute number audio; attribute number video; attribute number image; attribute number file; attribute number app; - }; + [Throws] + async StorageStats getUserStorageStats(); [Async, Synthetic] callback AsyncCallback_StorageStats_Void = void (StorageStats result); - [GlobalScope] - interface GlobalScope_storageStatistics_ohos_file_storageStatistics { - - [Throws] - static void getTotalSizeOfVolume(String volumeUuid, AsyncCallback_Number_Void callback_); - [Throws] - static async number getTotalSizeOfVolume(String volumeUuid); - [Throws] - static void getFreeSizeOfVolume(String volumeUuid, AsyncCallback_Number_Void callback_); - [Throws] - static async number getFreeSizeOfVolume(String volumeUuid); - [Throws] - static void getBundleStats(String packageName, AsyncCallback_BundleStats_Void callback_, optional number index); - [Throws] - static async BundleStats getBundleStats(String packageName, optional number index); - [Throws] - static void getCurrentBundleStats(AsyncCallback_BundleStats_Void callback_); - [Throws] - static async BundleStats getCurrentBundleStats(); - [Throws] - static void getSystemSize(AsyncCallback_Number_Void callback_); - [Throws] - static async number getSystemSize(); - [Throws] - static async StorageStats getUserStorageStats(); - [Throws] - static void getUserStorageStats(AsyncCallback_StorageStats_Void callback_); - [Throws] - static async StorageStats getUserStorageStats(number userId); - [Throws] - static void getUserStorageStats(number userId, AsyncCallback_StorageStats_Void callback_); - [Throws] - static void getTotalSize(AsyncCallback_Number_Void callback_); - [Throws] - static async number getTotalSize(); - [Throws] - static number getTotalSizeSync(); - [Throws] - static void getFreeSize(AsyncCallback_Number_Void callback_); - [Throws] - static async number getFreeSize(); - [Throws] - static number getFreeSizeSync(); - - }; - + [Throws] + void getUserStorageStats(AsyncCallback_StorageStats_Void callback_); + [Throws] + async StorageStats getUserStorageStats(number userId); + [Throws] + void getUserStorageStats(number userId, AsyncCallback_StorageStats_Void callback_); + [Throws] + void getTotalSize(AsyncCallback_Number_Void callback_); + [Throws] + async number getTotalSize(); + [Throws] + number getTotalSizeSync(); + [Throws] + void getFreeSize(AsyncCallback_Number_Void callback_); + [Throws] + async number getFreeSize(); + [Throws] + number getFreeSizeSync(); }; \ No newline at end of file diff --git a/idl/@ohos.file.trash.idl b/idl/@ohos.file.trash.idl index 17652a8..e7c460d 100644 --- a/idl/@ohos.file.trash.idl +++ b/idl/@ohos.file.trash.idl @@ -1,9 +1,8 @@ -package ohos.file; +package ohos.file.trash; +[DefaultExport] namespace trash { - [Entity=Interface] interface FileInfo { - readonly attribute String uri; readonly attribute String srcPath; readonly attribute String fileName; @@ -11,18 +10,11 @@ namespace trash { readonly attribute number size; readonly attribute number mtime; readonly attribute number ctime; - }; - [GlobalScope] - interface GlobalScope_trash_ohos_file_trash { - - [Throws] - static sequence listFile(); - [Throws] - static void recover(String uri); - [Throws] - static void completelyDelete(String uri); - - }; - + [Throws] + sequence listFile(); + [Throws] + void recover(String uri); + [Throws] + void completelyDelete(String uri); }; \ No newline at end of file diff --git a/idl/@ohos.file.volumeManager.idl b/idl/@ohos.file.volumeManager.idl index 01a3a3c..badcc8f 100644 --- a/idl/@ohos.file.volumeManager.idl +++ b/idl/@ohos.file.volumeManager.idl @@ -1,11 +1,10 @@ -package ohos.file; +package ohos.file.volumeManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace volumeManager { - [Entity=Interface] interface Volume { - attribute String id; attribute String uuid; attribute String diskId; @@ -14,50 +13,43 @@ namespace volumeManager { attribute number state; attribute String path; attribute String fsType; - }; [Async, Synthetic] callback AsyncCallback_Array_Volume_Void = void (sequence result); + [Throws] + void getAllVolumes(AsyncCallback_Array_Volume_Void callback_); + [Throws] + async sequence getAllVolumes(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void mount(String volumeId, AsyncCallback_Void callback_); + [Throws] + async void mount(String volumeId); + [Throws] + void unmount(String volumeId, AsyncCallback_Void callback_); + [Throws] + async void unmount(String volumeId); [Async, Synthetic] callback AsyncCallback_Volume_Void = void (Volume result); - [GlobalScope] - interface GlobalScope_volumeManager_ohos_file_volumeManager { - - [Throws] - static void getAllVolumes(AsyncCallback_Array_Volume_Void callback_); - [Throws] - static async sequence getAllVolumes(); - [Throws] - static void mount(String volumeId, AsyncCallback_Void callback_); - [Throws] - static async void mount(String volumeId); - [Throws] - static void unmount(String volumeId, AsyncCallback_Void callback_); - [Throws] - static async void unmount(String volumeId); - [Throws] - static void getVolumeByUuid(String uuid, AsyncCallback_Volume_Void callback_); - [Throws] - static async Volume getVolumeByUuid(String uuid); - [Throws] - static void getVolumeById(String volumeId, AsyncCallback_Volume_Void callback_); - [Throws] - static async Volume getVolumeById(String volumeId); - [Throws] - static void setVolumeDescription(String uuid, String description, AsyncCallback_Void callback_); - [Throws] - static async void setVolumeDescription(String uuid, String description); - [Throws] - static void format(String volumeId, String fsType, AsyncCallback_Void callback_); - [Throws] - static async void format(String volumeId, String fsType); - [Throws] - static void partition(String diskId, number type, AsyncCallback_Void callback_); - [Throws] - static async void partition(String diskId, number type); - - }; - + [Throws] + void getVolumeByUuid(String uuid, AsyncCallback_Volume_Void callback_); + [Throws] + async Volume getVolumeByUuid(String uuid); + [Throws] + void getVolumeById(String volumeId, AsyncCallback_Volume_Void callback_); + [Throws] + async Volume getVolumeById(String volumeId); + [Throws] + void setVolumeDescription(String uuid, String description, AsyncCallback_Void callback_); + [Throws] + async void setVolumeDescription(String uuid, String description); + [Throws] + void format(String volumeId, String fsType, AsyncCallback_Void callback_); + [Throws] + async void format(String volumeId, String fsType); + [Throws] + void partition(String diskId, number type, AsyncCallback_Void callback_); + [Throws] + async void partition(String diskId, number type); }; \ No newline at end of file diff --git a/idl/@ohos.fileio.idl b/idl/@ohos.fileio.idl index 3b44514..5024365 100644 --- a/idl/@ohos.fileio.idl +++ b/idl/@ohos.fileio.idl @@ -1,48 +1,224 @@ -package ohos; +package ohos.fileio; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace fileIO { - - }; +[Deprecated, Throws] +async void access(String path, optional number mode); [Async, Synthetic] callback AsyncCallback_Void = void (); +[Deprecated, Throws] +void access(String path, AsyncCallback_Void callback_); +[Deprecated, Throws] +void access(String path, number mode, AsyncCallback_Void callback_); +[Deprecated, Throws] +void accessSync(String path, optional number mode); +[Deprecated, Throws] +async void close(number fd); +[Deprecated, Throws] +void close(number fd, AsyncCallback_Void callback_); +[Deprecated, Throws] +void closeSync(number fd); +[Deprecated, Throws] +async void copyFile((String or number) src, (String or number) dest, optional number mode); +[Deprecated, Throws] +void copyFile((String or number) src, (String or number) dest, AsyncCallback_Void callback_); +[Deprecated, Throws] +void copyFile((String or number) src, (String or number) dest, number mode, AsyncCallback_Void callback_); +[Deprecated, Throws] +void copyFileSync((String or number) src, (String or number) dest, optional number mode); +[Deprecated, Throws] +async Stream createStream(String path, String mode); [Async, Synthetic] callback AsyncCallback_Stream_Void = void (Stream result); +[Deprecated, Throws] +void createStream(String path, String mode, AsyncCallback_Stream_Void callback_); +[Deprecated, Throws] +Stream createStreamSync(String path, String mode); +[Deprecated, Throws] +async void chown(String path, number uid, number gid); +[Deprecated, Throws] +void chown(String path, number uid, number gid, AsyncCallback_Void callback_); +[Deprecated, Throws] +void chownSync(String path, number uid, number gid); +[Deprecated, Throws] +async void chmod(String path, number mode); +[Deprecated, Throws] +void chmod(String path, number mode, AsyncCallback_Void callback_); +[Deprecated, Throws] +void chmodSync(String path, number mode); +[Deprecated, Throws] +async void ftruncate(number fd, optional number len); +[Deprecated, Throws] +void ftruncate(number fd, AsyncCallback_Void callback_); +[Deprecated, Throws] +void ftruncate(number fd, number len, AsyncCallback_Void callback_); +[Deprecated, Throws] +void ftruncateSync(number fd, optional number len); +[Deprecated, Throws] +async void fsync(number fd); +[Deprecated, Throws] +void fsync(number fd, AsyncCallback_Void callback_); +[Deprecated, Throws] +void fsyncSync(number fd); +[Deprecated, Throws] +async Stat fstat(number fd); [Async, Synthetic] callback AsyncCallback_Stat_Void = void (Stat result); +[Deprecated, Throws] +void fstat(number fd, AsyncCallback_Stat_Void callback_); +[Deprecated, Throws] +Stat fstatSync(number fd); +[Deprecated, Throws] +async void fdatasync(number fd); +[Deprecated, Throws] +void fdatasync(number fd, AsyncCallback_Void callback_); +[Deprecated, Throws] +void fdatasyncSync(number fd); +[Deprecated, Throws] +async void fchown(number fd, number uid, number gid); +[Deprecated, Throws] +void fchown(number fd, number uid, number gid, AsyncCallback_Void callback_); +[Deprecated, Throws] +void fchownSync(number fd, number uid, number gid); +[Deprecated, Throws] +async void fchmod(number fd, number mode); +[Deprecated, Throws] +void fchmod(number fd, number mode, AsyncCallback_Void callback_); +[Deprecated, Throws] +void fchmodSync(number fd, number mode); +[Deprecated, Throws] +async Stream fdopenStream(number fd, String mode); +[Deprecated, Throws] +void fdopenStream(number fd, String mode, AsyncCallback_Stream_Void callback_); +[Deprecated, Throws] +Stream fdopenStreamSync(number fd, String mode); +[Deprecated, Throws] +async String hash(String path, String algorithm); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); +[Deprecated, Throws] +void hash(String path, String algorithm, AsyncCallback_String_Void callback_); +[Deprecated, Throws] +async void lchown(String path, number uid, number gid); +[Deprecated, Throws] +void lchown(String path, number uid, number gid, AsyncCallback_Void callback_); +[Deprecated, Throws] +void lchownSync(String path, number uid, number gid); +[Deprecated, Throws] +async Stat lstat(String path); +[Deprecated, Throws] +void lstat(String path, AsyncCallback_Stat_Void callback_); +[Deprecated, Throws] +Stat lstatSync(String path); +[Deprecated, Throws] +async void mkdir(String path, optional number mode); +[Deprecated, Throws] +void mkdir(String path, AsyncCallback_Void callback_); +[Deprecated, Throws] +void mkdir(String path, number mode, AsyncCallback_Void callback_); +[Deprecated, Throws] +void mkdirSync(String path, optional number mode); +[Deprecated, Throws] +async String mkdtemp(String prefix); +[Deprecated, Throws] +void mkdtemp(String prefix, AsyncCallback_String_Void callback_); +[Deprecated, Throws] +String mkdtempSync(String prefix); +[Deprecated, Throws] +async number open(String path, optional number flags, optional number mode); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); +[Deprecated, Throws] +void open(String path, AsyncCallback_Number_Void callback_); +[Deprecated, Throws] +void open(String path, number flags, AsyncCallback_Number_Void callback_); +[Deprecated, Throws] +void open(String path, number flags, number mode, AsyncCallback_Number_Void callback_); +[Deprecated, Throws] +number openSync(String path, optional number flags, optional number mode); +[Deprecated, Throws] +async Dir opendir(String path); [Async, Synthetic] callback AsyncCallback_Dir_Void = void (Dir result); +[Deprecated, Throws] +void opendir(String path, AsyncCallback_Dir_Void callback_); +[Deprecated, Throws] +Dir opendirSync(String path); [Entity=Literal, Synthetic] interface Literal_Number_length_position_String_encoding { - [Optional] attribute number position; [Optional] attribute number length; [Optional] attribute String encoding; - }; +[Deprecated, Throws] +async String readText(String filePath, optional Literal_Number_length_position_String_encoding options); +[Deprecated, Throws] +void readText(String filePath, Literal_Number_length_position_String_encoding options, AsyncCallback_String_Void callback_); +[Deprecated, Throws] +String readTextSync(String filePath, optional Literal_Number_length_position_String_encoding options); [Entity=Literal, Synthetic] interface Literal_Number_length_offset_position { - [Optional] attribute number offset; [Optional] attribute number length; [Optional] attribute number position; - }; +[Deprecated, Throws] +async ReadOut read(number fd, buffer buffer, optional Literal_Number_length_offset_position options); [Async, Synthetic] callback AsyncCallback_ReadOut_Void = void (ReadOut result); +[Deprecated, Throws] +void read(number fd, buffer buffer, AsyncCallback_ReadOut_Void callback_); +[Deprecated, Throws] +void read(number fd, buffer buffer, Literal_Number_length_offset_position options, AsyncCallback_ReadOut_Void callback_); +[Deprecated, Throws] +number readSync(number fd, buffer buffer, optional Literal_Number_length_offset_position options); +[Deprecated, Throws] +async void rename(String oldPath, String newPath); +[Deprecated, Throws] +void rename(String oldPath, String newPath, AsyncCallback_Void callback_); +[Deprecated, Throws] +void renameSync(String oldPath, String newPath); +[Deprecated, Throws] +async void rmdir(String path); +[Deprecated, Throws] +void rmdir(String path, AsyncCallback_Void callback_); +[Deprecated, Throws] +void rmdirSync(String path); +[Deprecated, Throws] +async Stat stat(String path); +[Deprecated, Throws] +void stat(String path, AsyncCallback_Stat_Void callback_); +[Deprecated, Throws] +Stat statSync(String path); +[Deprecated, Throws] +async void symlink(String target, String srcPath); +[Deprecated, Throws] +void symlink(String target, String srcPath, AsyncCallback_Void callback_); +[Deprecated, Throws] +void symlinkSync(String target, String srcPath); +[Deprecated, Throws] +async void truncate(String path, optional number len); +[Deprecated, Throws] +void truncate(String path, AsyncCallback_Void callback_); +[Deprecated, Throws] +void truncate(String path, number len, AsyncCallback_Void callback_); +[Deprecated, Throws] +void truncateSync(String path, optional number len); +[Deprecated, Throws] +async void unlink(String path); +[Deprecated, Throws] +void unlink(String path, AsyncCallback_Void callback_); +[Deprecated, Throws] +void unlinkSync(String path); [Entity=Literal, Synthetic] interface Literal_Number_length_offset_position_String_encoding { - [Optional] attribute number offset; [Optional] @@ -51,13 +227,21 @@ interface Literal_Number_length_offset_position_String_encoding { attribute number position; [Optional] attribute String encoding; - }; +[Deprecated, Throws] +async number write(number fd, (buffer or String) buffer, optional Literal_Number_length_offset_position_String_encoding options); +[Deprecated, Throws] +void write(number fd, (buffer or String) buffer, AsyncCallback_Number_Void callback_); +[Deprecated, Throws] +void write(number fd, (buffer or String) buffer, Literal_Number_length_offset_position_String_encoding options, AsyncCallback_Number_Void callback_); +[Deprecated, Throws] +number writeSync(number fd, (buffer or String) buffer, optional Literal_Number_length_offset_position_String_encoding options); +[Deprecated, Throws] +Watcher createWatcher(String filename, number events, AsyncCallback_Number_Void callback_); [Async, Synthetic] callback AsyncCallback_Dirent_Void = void (Dirent result); [Entity=Interface, Deprecated] interface Dir { - [Deprecated, Throws] async Dirent read(); [Deprecated, Throws] @@ -70,11 +254,9 @@ interface Dir { void close(AsyncCallback_Void callback_); [Deprecated, Throws] void closeSync(); - }; [Entity=Interface, Deprecated] interface Dirent { - [Deprecated] readonly attribute String name; [Deprecated] @@ -91,11 +273,9 @@ interface Dirent { boolean isSocket(); [Deprecated] boolean isSymbolicLink(); - }; [Entity=Interface, Deprecated] interface Stat { - [Deprecated] readonly attribute number dev; [Deprecated] @@ -134,11 +314,9 @@ interface Stat { boolean isSocket(); [Deprecated] boolean isSymbolicLink(); - }; [Entity=Interface, Deprecated] interface Stream { - [Deprecated, Throws] async void close(); [Deprecated, Throws] @@ -167,222 +345,20 @@ interface Stream { void read(buffer buffer, Literal_Number_length_offset_position options, AsyncCallback_ReadOut_Void callback_); [Deprecated, Throws] number readSync(buffer buffer, optional Literal_Number_length_offset_position options); - }; [Entity=Interface, Deprecated] interface ReadOut { - [Deprecated] attribute number bytesRead; [Deprecated] attribute number offset; [Deprecated] attribute buffer buffer; - }; [Entity=Interface, Deprecated] interface Watcher { - [Deprecated, Throws] async void stop(); [Deprecated, Throws] void stop(AsyncCallback_Void callback_); - -}; -[GlobalScope] -interface GlobalScope_ohos_fileio { - - [Deprecated, Throws] - static async void access(String path, optional number mode); - [Deprecated, Throws] - static void access(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void access(String path, number mode, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void accessSync(String path, optional number mode); - [Deprecated, Throws] - static async void close(number fd); - [Deprecated, Throws] - static void close(number fd, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void closeSync(number fd); - [Deprecated, Throws] - static async void copyFile((String or number) src, (String or number) dest, optional number mode); - [Deprecated, Throws] - static void copyFile((String or number) src, (String or number) dest, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void copyFile((String or number) src, (String or number) dest, number mode, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void copyFileSync((String or number) src, (String or number) dest, optional number mode); - [Deprecated, Throws] - static async Stream createStream(String path, String mode); - [Deprecated, Throws] - static void createStream(String path, String mode, AsyncCallback_Stream_Void callback_); - [Deprecated, Throws] - static Stream createStreamSync(String path, String mode); - [Deprecated, Throws] - static async void chown(String path, number uid, number gid); - [Deprecated, Throws] - static void chown(String path, number uid, number gid, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void chownSync(String path, number uid, number gid); - [Deprecated, Throws] - static async void chmod(String path, number mode); - [Deprecated, Throws] - static void chmod(String path, number mode, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void chmodSync(String path, number mode); - [Deprecated, Throws] - static async void ftruncate(number fd, optional number len); - [Deprecated, Throws] - static void ftruncate(number fd, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void ftruncate(number fd, number len, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void ftruncateSync(number fd, optional number len); - [Deprecated, Throws] - static async void fsync(number fd); - [Deprecated, Throws] - static void fsync(number fd, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void fsyncSync(number fd); - [Deprecated, Throws] - static async Stat fstat(number fd); - [Deprecated, Throws] - static void fstat(number fd, AsyncCallback_Stat_Void callback_); - [Deprecated, Throws] - static Stat fstatSync(number fd); - [Deprecated, Throws] - static async void fdatasync(number fd); - [Deprecated, Throws] - static void fdatasync(number fd, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void fdatasyncSync(number fd); - [Deprecated, Throws] - static async void fchown(number fd, number uid, number gid); - [Deprecated, Throws] - static void fchown(number fd, number uid, number gid, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void fchownSync(number fd, number uid, number gid); - [Deprecated, Throws] - static async void fchmod(number fd, number mode); - [Deprecated, Throws] - static void fchmod(number fd, number mode, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void fchmodSync(number fd, number mode); - [Deprecated, Throws] - static async Stream fdopenStream(number fd, String mode); - [Deprecated, Throws] - static void fdopenStream(number fd, String mode, AsyncCallback_Stream_Void callback_); - [Deprecated, Throws] - static Stream fdopenStreamSync(number fd, String mode); - [Deprecated, Throws] - static async String hash(String path, String algorithm); - [Deprecated, Throws] - static void hash(String path, String algorithm, AsyncCallback_String_Void callback_); - [Deprecated, Throws] - static async void lchown(String path, number uid, number gid); - [Deprecated, Throws] - static void lchown(String path, number uid, number gid, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void lchownSync(String path, number uid, number gid); - [Deprecated, Throws] - static async Stat lstat(String path); - [Deprecated, Throws] - static void lstat(String path, AsyncCallback_Stat_Void callback_); - [Deprecated, Throws] - static Stat lstatSync(String path); - [Deprecated, Throws] - static async void mkdir(String path, optional number mode); - [Deprecated, Throws] - static void mkdir(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void mkdir(String path, number mode, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void mkdirSync(String path, optional number mode); - [Deprecated, Throws] - static async String mkdtemp(String prefix); - [Deprecated, Throws] - static void mkdtemp(String prefix, AsyncCallback_String_Void callback_); - [Deprecated, Throws] - static String mkdtempSync(String prefix); - [Deprecated, Throws] - static async number open(String path, optional number flags, optional number mode); - [Deprecated, Throws] - static void open(String path, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void open(String path, number flags, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void open(String path, number flags, number mode, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static number openSync(String path, optional number flags, optional number mode); - [Deprecated, Throws] - static async Dir opendir(String path); - [Deprecated, Throws] - static void opendir(String path, AsyncCallback_Dir_Void callback_); - [Deprecated, Throws] - static Dir opendirSync(String path); - [Deprecated, Throws] - static async String readText(String filePath, optional Literal_Number_length_position_String_encoding options); - [Deprecated, Throws] - static void readText(String filePath, Literal_Number_length_position_String_encoding options, AsyncCallback_String_Void callback_); - [Deprecated, Throws] - static String readTextSync(String filePath, optional Literal_Number_length_position_String_encoding options); - [Deprecated, Throws] - static async ReadOut read(number fd, buffer buffer, optional Literal_Number_length_offset_position options); - [Deprecated, Throws] - static void read(number fd, buffer buffer, AsyncCallback_ReadOut_Void callback_); - [Deprecated, Throws] - static void read(number fd, buffer buffer, Literal_Number_length_offset_position options, AsyncCallback_ReadOut_Void callback_); - [Deprecated, Throws] - static number readSync(number fd, buffer buffer, optional Literal_Number_length_offset_position options); - [Deprecated, Throws] - static async void rename(String oldPath, String newPath); - [Deprecated, Throws] - static void rename(String oldPath, String newPath, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void renameSync(String oldPath, String newPath); - [Deprecated, Throws] - static async void rmdir(String path); - [Deprecated, Throws] - static void rmdir(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void rmdirSync(String path); - [Deprecated, Throws] - static async Stat stat(String path); - [Deprecated, Throws] - static void stat(String path, AsyncCallback_Stat_Void callback_); - [Deprecated, Throws] - static Stat statSync(String path); - [Deprecated, Throws] - static async void symlink(String target, String srcPath); - [Deprecated, Throws] - static void symlink(String target, String srcPath, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void symlinkSync(String target, String srcPath); - [Deprecated, Throws] - static async void truncate(String path, optional number len); - [Deprecated, Throws] - static void truncate(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void truncate(String path, number len, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void truncateSync(String path, optional number len); - [Deprecated, Throws] - static async void unlink(String path); - [Deprecated, Throws] - static void unlink(String path, AsyncCallback_Void callback_); - [Deprecated, Throws] - static void unlinkSync(String path); - [Deprecated, Throws] - static async number write(number fd, (buffer or String) buffer, optional Literal_Number_length_offset_position_String_encoding options); - [Deprecated, Throws] - static void write(number fd, (buffer or String) buffer, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void write(number fd, (buffer or String) buffer, Literal_Number_length_offset_position_String_encoding options, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static number writeSync(number fd, (buffer or String) buffer, optional Literal_Number_length_offset_position_String_encoding options); - [Deprecated, Throws] - static Watcher createWatcher(String filename, number events, AsyncCallback_Number_Void callback_); - }; \ No newline at end of file diff --git a/idl/@ohos.filemanagement.userFileManager.idl b/idl/@ohos.filemanagement.userFileManager.idl index dcff828..8e404a1 100644 --- a/idl/@ohos.filemanagement.userFileManager.idl +++ b/idl/@ohos.filemanagement.userFileManager.idl @@ -1,31 +1,26 @@ -package ohos.filemanagement; +package ohos.filemanagement.userFileManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; -import ohos.multimedia.image as image; -import ohos.data.dataSharePredicates as dataSharePredicates; +import application.Context.default as Context; +import ohos.multimedia.image.default as image; +import ohos.data.dataSharePredicates.default as dataSharePredicates; +[DefaultExport] namespace userFileManager { - + UserFileManager getUserFileMgr(Context context); dictionary FileType { - number IMAGE = 1; number VIDEO = 2; number AUDIO = 3; - }; dictionary PhotoSubType { - number DEFAULT = 0; number SCREENSHOT = 1; number CAMERA = 2; - }; dictionary PositionType { - number LOCAL = 1; number CLOUD = 2; number BOTH = 3; - }; typedef (number or String or boolean) MemberType; typedef String ChangeEvent; @@ -34,12 +29,11 @@ namespace userFileManager { [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Entity=Interface] interface FileAsset { - readonly attribute String uri; readonly attribute FileType fileType; attribute String displayName; @@ -51,8 +45,8 @@ namespace userFileManager { async number open(String mode); void close(number fd, AsyncCallback_Void callback_); async void close(number fd); - void getThumbnail(AsyncCallback_image_PixelMap_Void callback_); - void getThumbnail(image.Size size, AsyncCallback_image_PixelMap_Void callback_); + void getThumbnail(AsyncCallback_Image_PixelMap_Void callback_); + void getThumbnail(image.Size size, AsyncCallback_Image_PixelMap_Void callback_); async image.PixelMap getThumbnail(optional image.Size size); void favorite(boolean isFavorite, AsyncCallback_Void callback_); async void favorite(boolean isFavorite); @@ -68,10 +62,8 @@ namespace userFileManager { void getExif(AsyncCallback_String_Void callback_); [Throws] async String getExif(); - }; dictionary AudioKey { - number URI = 0; number DISPLAY_NAME = 1; number DATE_ADDED = 2; @@ -81,10 +73,8 @@ namespace userFileManager { number AUDIOALBUM = 6; number DURATION = 7; number FAVORITE = 8; - }; dictionary ImageVideoKey { - number URI = 0; number FILE_TYPE = 1; number DISPLAY_NAME = 2; @@ -102,46 +92,36 @@ namespace userFileManager { number HIDDEN = 14; number USER_COMMENT = 15; number CAMERA_SHOT_KEY = 16; - }; dictionary AlbumKey { - number URI = 0; number FILE_TYPE = 1; number ALBUM_NAME = 2; number DATE_ADDED = 3; number DATE_MODIFIED = 4; - }; [Entity=Interface] interface FetchOptions { - attribute sequence fetchColumns; attribute dataSharePredicates.DataSharePredicates predicates; - }; [Entity=Interface] interface AlbumFetchOptions { - attribute dataSharePredicates.DataSharePredicates predicates; - }; [Entity=Interface] interface PhotoCreateOptions { - [Optional] attribute PhotoSubType subType; [Optional] attribute String cameraShotKey; - }; [Async, Synthetic] - callback AsyncCallback_T_Void = void (any result); + callback AsyncCallback_T_Void = void (T result); [Async, Synthetic] callback AsyncCallback_Array_T_Void = void (sequence result); [Entity=Interface, TypeParameters="T"] interface FetchResult { - number getCount(); boolean isAfterLast(); void close(); @@ -157,16 +137,12 @@ namespace userFileManager { async T getPositionObject(number index); void getAllObject(AsyncCallback_Array_T_Void callback_); async sequence getAllObject(); - }; dictionary AlbumType { - number USER = 0; number SYSTEM = 1024; - }; dictionary AlbumSubType { - number USER_GENERIC = 1; number FAVORITE = 1025; number VIDEO = 1026; @@ -175,13 +151,11 @@ namespace userFileManager { number SCREENSHOT = 1029; number CAMERA = 1030; number ANY = 2147483647; - }; [Async, Synthetic] callback AsyncCallback_FetchResult_Void = void ([TypeArguments="FileAsset"] FetchResult result); [Entity=Interface] interface AbsAlbum { - readonly attribute AlbumType albumType; readonly attribute AlbumSubType albumSubType; attribute String albumName; @@ -193,11 +167,9 @@ namespace userFileManager { void getPhotoAssets(FetchOptions options, AsyncCallback_FetchResult_Void callback_); [Throws] async ([TypeArguments="FileAsset"] FetchResult) getPhotoAssets(FetchOptions options); - }; [Entity=Interface] interface Album: AbsAlbum { - void commitModify(AsyncCallback_Void callback_); async void commitModify(); [Throws] @@ -216,7 +188,6 @@ namespace userFileManager { void deletePhotoAssets(sequence assets, AsyncCallback_Void callback_); [Throws] async void deletePhotoAssets(sequence assets); - }; [Async, Synthetic] callback AsyncCallback_FileAsset_Void = void (FileAsset result); @@ -230,7 +201,6 @@ namespace userFileManager { callback AsyncCallback_Array_PeerInfo_Void = void (sequence result); [Entity=Interface] interface UserFileManager { - [Throws] void getPhotoAssets(FetchOptions options, AsyncCallback_FetchResult_Void callback_); [Throws] @@ -280,9 +250,9 @@ namespace userFileManager { [Throws] async number getPhotoIndex(String photoUri, String albumUri, FetchOptions options); void on(ChangeEvent type, Callback_Void callback_); - void off(ChangeEvent type, optional Callback_Void callback_); [Throws] void on(String uri, boolean forSubUri, Callback_ChangeData_Void callback_); + void off(ChangeEvent type, optional Callback_Void callback_); [Throws] void off(String uri, optional Callback_ChangeData_Void callback_); void getActivePeers(AsyncCallback_Array_PeerInfo_Void callback_); @@ -291,60 +261,40 @@ namespace userFileManager { async sequence getAllPeers(); void release(AsyncCallback_Void callback_); async void release(); - }; dictionary NotifyType { - number NOTIFY_ADD = 0; number NOTIFY_UPDATE = 1; number NOTIFY_REMOVE = 2; number NOTIFY_ALBUM_ADD_ASSET = 3; number NOTIFY_ALBUM_REMOVE_ASSET = 4; - }; dictionary DefaultChangeUri { - number DEFAULT_PHOTO_URI = 0; number DEFAULT_ALBUM_URI = 1; number DEFAULT_AUDIO_URI = 2; - }; [Entity=Interface] interface ChangeData { - attribute NotifyType type; attribute sequence uris; attribute sequence subUris; - }; [Entity=Interface] interface PeerInfo { - readonly attribute String deviceName; readonly attribute String networkId; readonly attribute boolean isOnline; - }; dictionary PrivateAlbumType { - number TYPE_FAVORITE = 0; number TYPE_TRASH = 1; - }; [Entity=Interface] interface PrivateAlbum: AbsAlbum { - void delete(String uri, AsyncCallback_Void callback_); async void delete(String uri); void recover(String uri, AsyncCallback_Void callback_); async void recover(String uri); - - }; - [GlobalScope] - interface GlobalScope_userFileManager_ohos_filemanagement_userFileManager { - - static UserFileManager getUserFileMgr(Context context); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.fileshare.idl b/idl/@ohos.fileshare.idl index e00d250..0758432 100644 --- a/idl/@ohos.fileshare.idl +++ b/idl/@ohos.fileshare.idl @@ -1,73 +1,63 @@ -package ohos; +package ohos.fileshare; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.ability.wantConstant as wantConstant; +import ohos.ability.wantConstant.default as wantConstant; +import ohos.base.AsyncCallback as AsyncCallback; +import ohos.base.Callback as Callback; +import ohos.app.ability.wantConstant.default as wantConstant; +[DefaultExport] namespace fileShare { - dictionary OperationMode { - number READ_MODE = 1; number WRITE_MODE = 2; - + number CREATE_MODE = 4; + number DELETE_MODE = 8; + number RENAME_MODE = 16; }; dictionary PolicyErrorCode { - number PERSISTENCE_FORBIDDEN = 1; number INVALID_MODE = 2; number INVALID_PATH = 3; number PERMISSION_NOT_PERSISTED = 4; - }; [Entity=Literal] interface PolicyErrorResult { - attribute String uri; attribute PolicyErrorCode code; attribute String message; - }; [Entity=Interface] interface PolicyInfo { - attribute String uri; attribute number operationMode; - }; [Entity=Interface] interface PathPolicyInfo { - attribute String path; attribute OperationMode operationMode; - }; dictionary PolicyType { - number TEMPORARY_TYPE = 0; number PERSISTENT_TYPE = 1; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_fileShare_ohos_fileshare { - - [Throws] - static void grantUriPermission(String uri, String bundleName, wantConstant.Flags flag, AsyncCallback_Void callback_); - [Throws] - static async void grantUriPermission(String uri, String bundleName, wantConstant.Flags flag); - [Throws] - static async void persistPermission(sequence policies); - [Throws] - static async void revokePermission(sequence policies); - [Throws] - static async void activatePermission(sequence policies); - [Throws] - static async void deactivatePermission(sequence policies); - [Throws] - static async sequence checkPersistentPermission(sequence policies); - [Throws] - static async sequence checkPathPermission(number tokenID, sequence policies, PolicyType policyType); - - }; - + [Throws] + void grantUriPermission(String uri, String bundleName, wantConstant.Flags flag, AsyncCallback_Void callback_); + [Throws] + async void grantUriPermission(String uri, String bundleName, wantConstant.Flags flag); + [Throws] + async void grantUriPermission(sequence policies, String targetBundleName, number appCloneIndex); + [Throws] + async void persistPermission(sequence policies); + [Throws] + async void revokePermission(sequence policies); + [Throws] + async void activatePermission(sequence policies); + [Throws] + async void deactivatePermission(sequence policies); + [Throws] + async sequence checkPersistentPermission(sequence policies); + [Throws] + async sequence checkPathPermission(number tokenID, sequence policies, PolicyType policyType); }; \ No newline at end of file diff --git a/idl/@ohos.font.idl b/idl/@ohos.font.idl index 1296ff4..6f06d55 100644 --- a/idl/@ohos.font.idl +++ b/idl/@ohos.font.idl @@ -1,16 +1,14 @@ -package ohos; +package ohos.font; +import resource.Resource as Resource; +[DefaultExport] namespace font { - [Entity=Interface] interface FontOptions { - attribute (String or Resource) familyName; attribute (String or Resource) familySrc; - }; [Entity=Interface] interface FontInfo { - attribute String path; attribute String postScriptName; attribute String fullName; @@ -21,60 +19,44 @@ namespace font { attribute boolean italic; attribute boolean monoSpace; attribute boolean symbolic; - }; [Entity=Interface] interface UIFontConfig { - attribute sequence fontDir; attribute sequence generic; attribute sequence fallbackGroups; - }; [Entity=Interface] interface UIFontGenericInfo { - attribute String family; attribute sequence alias; attribute sequence adjust; - }; [Entity=Interface] interface UIFontAliasInfo { - attribute String name; attribute number weight; - }; [Entity=Interface] interface UIFontAdjustInfo { - attribute number weight; attribute number to; - }; [Entity=Interface] interface UIFontFallbackGroupInfo { - attribute String fontSetName; attribute sequence fallback; - }; [Entity=Interface] interface UIFontFallbackInfo { - attribute String language; attribute String family; - }; - [GlobalScope] - interface GlobalScope_font_ohos_font { - - static void registerFont(FontOptions options); - static sequence getSystemFontList(); - static FontInfo getFontByName(String fontName); - static UIFontConfig getUIFontConfig(); - - }; - + [Deprecated] + void registerFont(FontOptions options); + [Deprecated] + sequence getSystemFontList(); + [Deprecated] + FontInfo getFontByName(String fontName); + UIFontConfig getUIFontConfig(); }; \ No newline at end of file diff --git a/idl/@ohos.fontManager.idl b/idl/@ohos.fontManager.idl new file mode 100644 index 0000000..e057e39 --- /dev/null +++ b/idl/@ohos.fontManager.idl @@ -0,0 +1,8 @@ +package ohos.fontManager; +[DefaultExport] +namespace fontManager { + [Throws] + async number installFont(String path); + [Throws] + async number uninstallFont(String fullName); +}; \ No newline at end of file diff --git a/idl/@ohos.geoLocationManager.idl b/idl/@ohos.geoLocationManager.idl index c8b523d..fc8cbc1 100644 --- a/idl/@ohos.geoLocationManager.idl +++ b/idl/@ohos.geoLocationManager.idl @@ -1,55 +1,179 @@ -package ohos; +package ohos.geoLocationManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.WantAgent as WantAgent; +import ohos.wantAgent.WantAgent as WantAgent; +import ohos.app.ability.wantAgent.WantAgent as WantAgent; import notification.notificationRequest.NotificationRequest as NotificationRequest; +[DefaultExport] namespace geoLocationManager { - [Synthetic] callback Callback_Location_Void = void (Location parameter); + [Throws, DtsName="on", DtsTag="'locationChange'"] + void onLocationChange((LocationRequest or ContinuousLocationRequest) request, Callback_Location_Void callback_); + [Throws, DtsName="off", DtsTag="'locationChange'"] + void offLocationChange(optional Callback_Location_Void callback_); [Synthetic] callback Callback_LocationError_Void = void (LocationError parameter); + [Throws, DtsName="on", DtsTag="'locationError'"] + void onLocationError(Callback_LocationError_Void callback_); + [Throws, DtsName="off", DtsTag="'locationError'"] + void offLocationError(optional Callback_LocationError_Void callback_); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="on", DtsTag="'locationEnabledChange'"] + void onLocationEnabledChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'locationEnabledChange'"] + void offLocationEnabledChange(optional Callback_Boolean_Void callback_); [Synthetic] callback Callback_Array_Location_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'cachedGnssLocationsChange'"] + void onCachedGnssLocationsChange(CachedGnssLocationsRequest request, Callback_Array_Location_Void callback_); + [Throws, DtsName="off", DtsTag="'cachedGnssLocationsChange'"] + void offCachedGnssLocationsChange(optional Callback_Array_Location_Void callback_); [Synthetic] callback Callback_SatelliteStatusInfo_Void = void (SatelliteStatusInfo parameter); + [Throws, DtsName="on", DtsTag="'satelliteStatusChange'"] + void onSatelliteStatusChange(Callback_SatelliteStatusInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'satelliteStatusChange'"] + void offSatelliteStatusChange(optional Callback_SatelliteStatusInfo_Void callback_); [Synthetic] callback Callback_String_Void = void (String parameter); + [Throws, DtsName="on", DtsTag="'nmeaMessage'"] + void onNmeaMessage(Callback_String_Void callback_); + [Throws, DtsName="off", DtsTag="'nmeaMessage'"] + void offNmeaMessage(optional Callback_String_Void callback_); + [Throws, DtsName="on", DtsTag="'gnssFenceStatusChange'"] + void onGnssFenceStatusChange(GeofenceRequest request, WantAgent want); + [Throws, DtsName="off", DtsTag="'gnssFenceStatusChange'"] + void offGnssFenceStatusChange(GeofenceRequest request, WantAgent want); [Synthetic] callback Callback_CountryCode_Void = void (CountryCode parameter); + [Throws, DtsName="on", DtsTag="'countryCodeChange'"] + void onCountryCodeChange(Callback_CountryCode_Void callback_); + [Throws, DtsName="off", DtsTag="'countryCodeChange'"] + void offCountryCodeChange(optional Callback_CountryCode_Void callback_); [Synthetic] callback Callback_Array_LocatingRequiredData_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'locatingRequiredDataChange'"] + void onLocatingRequiredDataChange(LocatingRequiredDataConfig config, Callback_Array_LocatingRequiredData_Void callback_); + [Throws, DtsName="off", DtsTag="'locatingRequiredDataChange'"] + void offLocatingRequiredDataChange(optional Callback_Array_LocatingRequiredData_Void callback_); [Synthetic] callback Callback_LocationIconStatus_Void = void (LocationIconStatus parameter); + [Throws, DtsName="on", DtsTag="'locationIconStatusChange'"] + void onLocationIconStatusChange(Callback_LocationIconStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'locationIconStatusChange'"] + void offLocationIconStatusChange(optional Callback_LocationIconStatus_Void callback_); + [Synthetic] + callback Callback_BluetoothScanResult_Void = void (BluetoothScanResult parameter); + [Throws, DtsName="on", DtsTag="'bluetoothScanResultChange'"] + void onBluetoothScanResultChange(Callback_BluetoothScanResult_Void callback_); + [Throws, DtsName="off", DtsTag="'bluetoothScanResultChange'"] + void offBluetoothScanResultChange(optional Callback_BluetoothScanResult_Void callback_); [Async, Synthetic] callback AsyncCallback_Location_Void = void (Location result); + [Throws] + void getCurrentLocation((CurrentLocationRequest or SingleLocationRequest) request, AsyncCallback_Location_Void callback_); + [Throws] + void getCurrentLocation(AsyncCallback_Location_Void callback_); + [Throws] + async Location getCurrentLocation(optional (CurrentLocationRequest or SingleLocationRequest) request); + [Throws] + Location getLastLocation(); + [Throws] + boolean isLocationEnabled(); + [Throws] + boolean isLocationEnabledByUserId(number userId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enableLocation(AsyncCallback_Void callback_); + [Throws] + async void enableLocation(); + [Throws] + async void enableLocationByUserId(number userId); + [Throws] + void disableLocation(); + [Throws] + void disableLocationByUserId(number userId); + [Throws] + void setLocationSwitchIgnored(boolean isIgnored); [Async, Synthetic] callback AsyncCallback_Array_GeoAddress_Void = void (sequence result); + [Throws] + void getAddressesFromLocation(ReverseGeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); + [Throws] + async sequence getAddressesFromLocation(ReverseGeoCodeRequest request); + [Throws] + void getAddressesFromLocationName(GeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); + [Throws] + async sequence getAddressesFromLocationName(GeoCodeRequest request); + [Throws] + boolean isGeocoderAvailable(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getCachedGnssLocationsSize(AsyncCallback_Number_Void callback_); + [Throws] + async number getCachedGnssLocationsSize(); + [Throws] + void flushCachedGnssLocations(AsyncCallback_Void callback_); + [Throws] + async void flushCachedGnssLocations(); + [Throws] + void sendCommand(LocationCommand command, AsyncCallback_Void callback_); + [Throws] + async void sendCommand(LocationCommand command); [Async, Synthetic] callback AsyncCallback_CountryCode_Void = void (CountryCode result); + [Throws] + void getCountryCode(AsyncCallback_CountryCode_Void callback_); + [Throws] + async CountryCode getCountryCode(); + [Throws] + void enableLocationMock(); + [Throws] + void disableLocationMock(); + [Throws] + void setMockedLocations(LocationMockConfig config); + [Throws] + void enableReverseGeocodingMock(); + [Throws] + void disableReverseGeocodingMock(); + [Throws] + void setReverseGeocodingMockInfo(sequence mockInfos); + [Throws] + boolean isLocationPrivacyConfirmed(LocationPrivacyType type); + [Throws] + void setLocationPrivacyConfirmStatus(LocationPrivacyType type, boolean isConfirmed); + [Throws] + async sequence getLocatingRequiredData(LocatingRequiredDataConfig config); + [Throws] + async number addGnssGeofence(GnssGeofenceRequest fenceRequest); + [Throws] + async void removeGnssGeofence(number geofenceId); + [Throws] + sequence getGeofenceSupportedCoordTypes(); + [Throws] + LocationIconStatus getLocationIconStatus(); + [Throws] + String getCurrentWifiBssidForLocating(); + number getDistanceBetweenLocations(Location location1, Location location2); + boolean isPoiServiceSupported(); + [Throws] + async PoiInfo getPoiInfo(); [Entity=Interface] interface ReverseGeocodingMockInfo { - attribute ReverseGeoCodeRequest location; attribute GeoAddress geoAddress; - }; [Entity=Interface] interface LocationMockConfig { - attribute number timeInterval; attribute sequence locations; - }; [Entity=Interface] interface SatelliteStatusInfo { - attribute number satellitesNumber; attribute sequence satelliteIds; attribute sequence carrierToNoiseDensitys; @@ -60,48 +184,38 @@ namespace geoLocationManager { attribute sequence satelliteConstellation; [Optional] attribute sequence satelliteAdditionalInfo; - }; [Entity=Interface] interface CachedGnssLocationsRequest { - attribute number reportingPeriodSec; attribute boolean wakeUpCacheQueueFull; - }; [Async, Synthetic] callback AsyncCallback_GeofenceTransition_Void = void (GeofenceTransition result); [Entity=Interface] interface GnssGeofenceRequest { - attribute Geofence geofence; attribute sequence monitorTransitionEvents; [Optional] attribute sequence notifications; attribute AsyncCallback_GeofenceTransition_Void geofenceTransitionCallback; - }; [Entity=Interface] interface GeofenceRequest { - attribute LocationRequestScenario scenario; attribute Geofence geofence; - }; [Entity=Interface] interface Geofence { - attribute number latitude; attribute number longitude; [Optional] attribute CoordinateSystemType coordinateSystemType; attribute number radius; attribute number expiration; - }; [Entity=Interface] interface ReverseGeoCodeRequest { - [Optional] attribute String locale; [Optional] @@ -110,11 +224,9 @@ namespace geoLocationManager { attribute number longitude; [Optional] attribute number maxItems; - }; [Entity=Interface] interface GeoCodeRequest { - [Optional] attribute String locale; [Optional] @@ -130,11 +242,9 @@ namespace geoLocationManager { attribute number maxLatitude; [Optional] attribute number maxLongitude; - }; [Entity=Interface] interface GeoAddress { - [Optional] attribute number latitude; [Optional] @@ -173,11 +283,9 @@ namespace geoLocationManager { attribute number descriptionsSize; [Optional] attribute boolean isFromMock; - }; [Entity=Interface] interface LocationRequest { - [Optional] attribute LocationRequestPriority priority; [Optional] @@ -188,11 +296,9 @@ namespace geoLocationManager { attribute number distanceInterval; [Optional] attribute number maxAccuracy; - }; [Entity=Interface] interface CurrentLocationRequest { - [Optional] attribute LocationRequestPriority priority; [Optional] @@ -201,34 +307,30 @@ namespace geoLocationManager { attribute number maxAccuracy; [Optional] attribute number timeoutMs; - }; [Entity=Interface] interface GeofenceTransition { - attribute number geofenceId; attribute GeofenceTransitionEvent transitionEvent; - }; [Entity=Interface] interface ContinuousLocationRequest { - attribute number interval; attribute (UserActivityScenario or PowerConsumptionScenario) locationScenario; [Optional] attribute SportsType sportsType; - + [Optional] + attribute boolean needPoi; }; [Entity=Interface] interface SingleLocationRequest { - attribute LocatingPriority locatingPriority; attribute number locatingTimeoutMs; - + [Optional] + attribute boolean needPoi; }; [Entity=Interface] interface Location { - attribute number latitude; attribute number longitude; attribute number altitude; @@ -255,86 +357,95 @@ namespace geoLocationManager { attribute number uncertaintyOfTimeSinceBoot; [Optional] attribute LocationSourceType sourceType; - + [Optional] + attribute PoiInfo poi; }; [Entity=Interface] interface LocatingRequiredDataConfig { - attribute LocatingRequiredDataType type; attribute boolean needStartScan; [Optional] attribute number scanInterval; [Optional] attribute number scanTimeout; - }; [Entity=Interface] interface LocatingRequiredData { - [Optional] attribute WifiScanInfo wifiData; [Optional] attribute BluetoothScanInfo bluetoothData; - }; [Entity=Interface] interface WifiScanInfo { - attribute String ssid; attribute String bssid; attribute number rssi; attribute number frequency; attribute number timestamp; - }; [Entity=Interface] interface BluetoothScanInfo { - attribute String deviceName; attribute String macAddress; attribute number rssi; attribute number timestamp; - + }; + [Entity=Interface] + interface BluetoothScanResult { + attribute String deviceId; + attribute number rssi; + [Optional] + attribute buffer data; + attribute String deviceName; + attribute boolean connectable; + }; + [Entity=Interface] + interface Poi { + attribute String id; + attribute number confidence; + attribute String name; + attribute number latitude; + attribute number longitude; + attribute String administrativeArea; + attribute String subAdministrativeArea; + attribute String locality; + attribute String subLocality; + attribute String address; + }; + [Entity=Interface] + interface PoiInfo { + attribute sequence poiArray; + attribute number timestamp; }; dictionary LocationSourceType { - number GNSS = 1; number NETWORK = 2; number INDOOR = 3; number RTK = 4; - }; dictionary CoordinateSystemType { - number WGS84 = 1; number GCJ02 = 2; - }; dictionary LocationIconStatus { - number LOCATING_NOT_STARTED = 0; number LOCATING_STARTED = 1; number HD_LOCATING_STARTED = 2; - }; dictionary LocationError { - number LOCATING_FAILED_DEFAULT = -1; number LOCATING_FAILED_LOCATION_PERMISSION_DENIED = -2; number LOCATING_FAILED_BACKGROUND_PERMISSION_DENIED = -3; number LOCATING_FAILED_LOCATION_SWITCH_OFF = -4; number LOCATING_FAILED_INTERNET_ACCESS_FAILURE = -5; - }; dictionary GeofenceTransitionEvent { - number GEOFENCE_TRANSITION_EVENT_ENTER = 1; number GEOFENCE_TRANSITION_EVENT_EXIT = 2; number GEOFENCE_TRANSITION_EVENT_DWELL = 4; - }; dictionary SatelliteConstellationCategory { - number CONSTELLATION_CATEGORY_UNKNOWN = 0; number CONSTELLATION_CATEGORY_GPS = 1; number CONSTELLATION_CATEGORY_SBAS = 2; @@ -343,220 +454,71 @@ namespace geoLocationManager { number CONSTELLATION_CATEGORY_BEIDOU = 5; number CONSTELLATION_CATEGORY_GALILEO = 6; number CONSTELLATION_CATEGORY_IRNSS = 7; - }; dictionary SatelliteAdditionalInfo { - number SATELLITES_ADDITIONAL_INFO_NULL = 0; number SATELLITES_ADDITIONAL_INFO_EPHEMERIS_DATA_EXIST = 1; number SATELLITES_ADDITIONAL_INFO_ALMANAC_DATA_EXIST = 2; number SATELLITES_ADDITIONAL_INFO_USED_IN_FIX = 4; number SATELLITES_ADDITIONAL_INFO_CARRIER_FREQUENCY_EXIST = 8; - }; dictionary UserActivityScenario { - number NAVIGATION = 1025; number SPORT = 1026; number TRANSPORT = 1027; number DAILY_LIFE_SERVICE = 1028; - }; dictionary LocatingPriority { - number PRIORITY_ACCURACY = 1281; number PRIORITY_LOCATING_SPEED = 1282; - }; dictionary LocationRequestPriority { - number UNSET = 512; number ACCURACY = 513; number LOW_POWER = 514; number FIRST_FIX = 515; - }; dictionary LocationRequestScenario { - number UNSET = 768; number NAVIGATION = 769; number TRAJECTORY_TRACKING = 770; number CAR_HAILING = 771; number DAILY_LIFE_SERVICE = 772; number NO_POWER = 773; - }; dictionary PowerConsumptionScenario { - number HIGH_POWER_CONSUMPTION = 1537; number LOW_POWER_CONSUMPTION = 1538; number NO_POWER_CONSUMPTION = 1539; - }; dictionary LocationPrivacyType { - number OTHERS = 0; number STARTUP = 1; number CORE_LOCATION = 2; - }; dictionary SportsType { - number RUNNING = 1; number WALKING = 2; number CYCLING = 3; - }; [Entity=Interface] interface LocationCommand { - attribute LocationRequestScenario scenario; attribute String command; - }; [Entity=Interface] interface CountryCode { - attribute String country; attribute CountryCodeType type; - }; dictionary CountryCodeType { - number COUNTRY_CODE_FROM_LOCALE = 1; number COUNTRY_CODE_FROM_SIM = 2; number COUNTRY_CODE_FROM_LOCATION = 3; number COUNTRY_CODE_FROM_NETWORK = 4; - }; dictionary LocatingRequiredDataType { - number WIFI = 1; number BLUETOOTH = 2; - - }; - [GlobalScope] - interface GlobalScope_geoLocationManager_ohos_geoLocationManager { - - [Throws, DtsName="on", DtsTag="'locationChange'"] - static void onLocationChange((LocationRequest or ContinuousLocationRequest) request, Callback_Location_Void callback_); - [Throws, DtsName="off", DtsTag="'locationChange'"] - static void offLocationChange(optional Callback_Location_Void callback_); - [Throws, DtsName="on", DtsTag="'locationError'"] - static void onLocationError(Callback_LocationError_Void callback_); - [Throws, DtsName="off", DtsTag="'locationError'"] - static void offLocationError(optional Callback_LocationError_Void callback_); - [Throws, DtsName="on", DtsTag="'locationEnabledChange'"] - static void onLocationEnabledChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'locationEnabledChange'"] - static void offLocationEnabledChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'cachedGnssLocationsChange'"] - static void onCachedGnssLocationsChange(CachedGnssLocationsRequest request, Callback_Array_Location_Void callback_); - [Throws, DtsName="off", DtsTag="'cachedGnssLocationsChange'"] - static void offCachedGnssLocationsChange(optional Callback_Array_Location_Void callback_); - [Throws, DtsName="on", DtsTag="'satelliteStatusChange'"] - static void onSatelliteStatusChange(Callback_SatelliteStatusInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'satelliteStatusChange'"] - static void offSatelliteStatusChange(optional Callback_SatelliteStatusInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'nmeaMessage'"] - static void onNmeaMessage(Callback_String_Void callback_); - [Throws, DtsName="off", DtsTag="'nmeaMessage'"] - static void offNmeaMessage(optional Callback_String_Void callback_); - [Throws, DtsName="on", DtsTag="'gnssFenceStatusChange'"] - static void onGnssFenceStatusChange(GeofenceRequest request, WantAgent want); - [Throws, DtsName="off", DtsTag="'gnssFenceStatusChange'"] - static void offGnssFenceStatusChange(GeofenceRequest request, WantAgent want); - [Throws, DtsName="on", DtsTag="'countryCodeChange'"] - static void onCountryCodeChange(Callback_CountryCode_Void callback_); - [Throws, DtsName="off", DtsTag="'countryCodeChange'"] - static void offCountryCodeChange(optional Callback_CountryCode_Void callback_); - [Throws, DtsName="on", DtsTag="'locatingRequiredDataChange'"] - static void onLocatingRequiredDataChange(LocatingRequiredDataConfig config, Callback_Array_LocatingRequiredData_Void callback_); - [Throws, DtsName="off", DtsTag="'locatingRequiredDataChange'"] - static void offLocatingRequiredDataChange(optional Callback_Array_LocatingRequiredData_Void callback_); - [Throws, DtsName="on", DtsTag="'locationIconStatusChange'"] - static void onLocationIconStatusChange(Callback_LocationIconStatus_Void callback_); - [Throws, DtsName="off", DtsTag="'locationIconStatusChange'"] - static void offLocationIconStatusChange(optional Callback_LocationIconStatus_Void callback_); - [Throws] - static void getCurrentLocation((CurrentLocationRequest or SingleLocationRequest) request, AsyncCallback_Location_Void callback_); - [Throws] - static void getCurrentLocation(AsyncCallback_Location_Void callback_); - [Throws] - static async Location getCurrentLocation(optional (CurrentLocationRequest or SingleLocationRequest) request); - [Throws] - static Location getLastLocation(); - [Throws] - static boolean isLocationEnabled(); - [Throws] - static boolean isLocationEnabledByUserId(number userId); - [Throws] - static void enableLocation(AsyncCallback_Void callback_); - [Throws] - static async void enableLocation(); - [Throws] - static async void enableLocationByUserId(number userId); - [Throws] - static void disableLocation(); - [Throws] - static void disableLocationByUserId(number userId); - [Throws] - static void setLocationSwitchIgnored(boolean isIgnored); - [Throws] - static void getAddressesFromLocation(ReverseGeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); - [Throws] - static async sequence getAddressesFromLocation(ReverseGeoCodeRequest request); - [Throws] - static void getAddressesFromLocationName(GeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); - [Throws] - static async sequence getAddressesFromLocationName(GeoCodeRequest request); - [Throws] - static boolean isGeocoderAvailable(); - [Throws] - static void getCachedGnssLocationsSize(AsyncCallback_Number_Void callback_); - [Throws] - static async number getCachedGnssLocationsSize(); - [Throws] - static void flushCachedGnssLocations(AsyncCallback_Void callback_); - [Throws] - static async void flushCachedGnssLocations(); - [Throws] - static void sendCommand(LocationCommand command, AsyncCallback_Void callback_); - [Throws] - static async void sendCommand(LocationCommand command); - [Throws] - static void getCountryCode(AsyncCallback_CountryCode_Void callback_); - [Throws] - static async CountryCode getCountryCode(); - [Throws] - static void enableLocationMock(); - [Throws] - static void disableLocationMock(); - [Throws] - static void setMockedLocations(LocationMockConfig config); - [Throws] - static void enableReverseGeocodingMock(); - [Throws] - static void disableReverseGeocodingMock(); - [Throws] - static void setReverseGeocodingMockInfo(sequence mockInfos); - [Throws] - static boolean isLocationPrivacyConfirmed(LocationPrivacyType type); - [Throws] - static void setLocationPrivacyConfirmStatus(LocationPrivacyType type, boolean isConfirmed); - [Throws] - static async sequence getLocatingRequiredData(LocatingRequiredDataConfig config); - [Throws] - static async number addGnssGeofence(GnssGeofenceRequest fenceRequest); - [Throws] - static async void removeGnssGeofence(number geofenceId); - [Throws] - static sequence getGeofenceSupportedCoordTypes(); - [Throws] - static LocationIconStatus getLocationIconStatus(); - [Throws] - static String getCurrentWifiBssidForLocating(); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.geolocation.idl b/idl/@ohos.geolocation.idl index 0b21649..97669a6 100644 --- a/idl/@ohos.geolocation.idl +++ b/idl/@ohos.geolocation.idl @@ -1,30 +1,95 @@ -package ohos; +package ohos.geolocation; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.WantAgent as WantAgent; +import ohos.wantAgent.WantAgent as WantAgent; +[DefaultExport] namespace geolocation { - [Synthetic] callback Callback_Location_Void = void (Location parameter); + [Deprecated, DtsName="on", DtsTag="'locationChange'"] + void onLocationChange(LocationRequest request, Callback_Location_Void callback_); + [Deprecated, DtsName="off", DtsTag="'locationChange'"] + void offLocationChange(optional Callback_Location_Void callback_); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Deprecated, DtsName="on", DtsTag="'locationServiceState'"] + void onLocationServiceState(Callback_Boolean_Void callback_); + [Deprecated, DtsName="off", DtsTag="'locationServiceState'"] + void offLocationServiceState(optional Callback_Boolean_Void callback_); [Synthetic] callback Callback_Array_Location_Void = void (sequence parameter); + [Deprecated, DtsName="on", DtsTag="'cachedGnssLocationsReporting'"] + void onCachedGnssLocationsReporting(CachedGnssLocationsRequest request, Callback_Array_Location_Void callback_); + [Deprecated, DtsName="off", DtsTag="'cachedGnssLocationsReporting'"] + void offCachedGnssLocationsReporting(optional Callback_Array_Location_Void callback_); [Synthetic] callback Callback_SatelliteStatusInfo_Void = void (SatelliteStatusInfo parameter); + [Deprecated, DtsName="on", DtsTag="'gnssStatusChange'"] + void onGnssStatusChange(Callback_SatelliteStatusInfo_Void callback_); + [Deprecated, DtsName="off", DtsTag="'gnssStatusChange'"] + void offGnssStatusChange(optional Callback_SatelliteStatusInfo_Void callback_); [Synthetic] callback Callback_String_Void = void (String parameter); + [Deprecated, DtsName="on", DtsTag="'nmeaMessageChange'"] + void onNmeaMessageChange(Callback_String_Void callback_); + [Deprecated, DtsName="off", DtsTag="'nmeaMessageChange'"] + void offNmeaMessageChange(optional Callback_String_Void callback_); + [Deprecated, DtsName="on", DtsTag="'fenceStatusChange'"] + void onFenceStatusChange(GeofenceRequest request, WantAgent want); + [Deprecated, DtsName="off", DtsTag="'fenceStatusChange'"] + void offFenceStatusChange(GeofenceRequest request, WantAgent want); [Async, Synthetic] callback AsyncCallback_Location_Void = void (Location result); + [Deprecated] + void getCurrentLocation(CurrentLocationRequest request, AsyncCallback_Location_Void callback_); + [Deprecated] + void getCurrentLocation(AsyncCallback_Location_Void callback_); + [Deprecated] + async Location getCurrentLocation(optional CurrentLocationRequest request); + [Deprecated] + void getLastLocation(AsyncCallback_Location_Void callback_); + [Deprecated] + async Location getLastLocation(); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isLocationEnabled(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isLocationEnabled(); + [Deprecated] + void requestEnableLocation(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean requestEnableLocation(); [Async, Synthetic] callback AsyncCallback_Array_GeoAddress_Void = void (sequence result); + [Deprecated] + void getAddressesFromLocation(ReverseGeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); + [Deprecated] + async sequence getAddressesFromLocation(ReverseGeoCodeRequest request); + [Deprecated] + void getAddressesFromLocationName(GeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); + [Deprecated] + async sequence getAddressesFromLocationName(GeoCodeRequest request); + [Deprecated] + void isGeoServiceAvailable(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isGeoServiceAvailable(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void getCachedGnssLocationsSize(AsyncCallback_Number_Void callback_); + [Deprecated] + async number getCachedGnssLocationsSize(); + [Deprecated] + void flushCachedGnssLocations(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean flushCachedGnssLocations(); + [Deprecated] + void sendCommand(LocationCommand command, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean sendCommand(LocationCommand command); [Entity=Interface, Deprecated] interface SatelliteStatusInfo { - [Deprecated] attribute number satellitesNumber; [Deprecated] @@ -37,31 +102,25 @@ namespace geolocation { attribute sequence azimuths; [Deprecated] attribute sequence carrierFrequencies; - }; [Entity=Interface, Deprecated] interface CachedGnssLocationsRequest { - [Deprecated] attribute number reportingPeriodSec; [Deprecated] attribute boolean wakeUpCacheQueueFull; - }; [Entity=Interface, Deprecated] interface GeofenceRequest { - [Deprecated] attribute LocationRequestPriority priority; [Deprecated] attribute LocationRequestScenario scenario; [Deprecated] attribute Geofence geofence; - }; [Entity=Interface, Deprecated] interface Geofence { - [Deprecated] attribute number latitude; [Deprecated] @@ -70,11 +129,9 @@ namespace geolocation { attribute number radius; [Deprecated] attribute number expiration; - }; [Entity=Interface, Deprecated] interface ReverseGeoCodeRequest { - [Optional, Deprecated] attribute String locale; [Deprecated] @@ -83,11 +140,9 @@ namespace geolocation { attribute number longitude; [Optional, Deprecated] attribute number maxItems; - }; [Entity=Interface, Deprecated] interface GeoCodeRequest { - [Optional, Deprecated] attribute String locale; [Deprecated] @@ -102,11 +157,9 @@ namespace geolocation { attribute number maxLatitude; [Optional, Deprecated] attribute number maxLongitude; - }; [Entity=Interface, Deprecated] interface GeoAddress { - [Optional, Deprecated] attribute number latitude; [Optional, Deprecated] @@ -143,11 +196,9 @@ namespace geolocation { attribute sequence descriptions; [Optional, Deprecated] attribute number descriptionsSize; - }; [Entity=Interface, Deprecated] interface LocationRequest { - [Optional, Deprecated] attribute LocationRequestPriority priority; [Optional, Deprecated] @@ -158,11 +209,9 @@ namespace geolocation { attribute number distanceInterval; [Optional, Deprecated] attribute number maxAccuracy; - }; [Entity=Interface, Deprecated] interface CurrentLocationRequest { - [Optional, Deprecated] attribute LocationRequestPriority priority; [Optional, Deprecated] @@ -171,11 +220,9 @@ namespace geolocation { attribute number maxAccuracy; [Optional, Deprecated] attribute number timeoutMs; - }; [Entity=Interface, Deprecated] interface Location { - [Deprecated] attribute number latitude; [Deprecated] @@ -196,11 +243,9 @@ namespace geolocation { attribute sequence additions; [Optional, Deprecated] attribute number additionSize; - }; [Deprecated] dictionary LocationRequestPriority { - [Deprecated] number UNSET = 512; [Deprecated] @@ -209,11 +254,9 @@ namespace geolocation { number LOW_POWER = 514; [Deprecated] number FIRST_FIX = 515; - }; [Deprecated] dictionary LocationRequestScenario { - [Deprecated] number UNSET = 768; [Deprecated] @@ -226,11 +269,9 @@ namespace geolocation { number DAILY_LIFE_SERVICE = 772; [Deprecated] number NO_POWER = 773; - }; [Deprecated] dictionary GeoLocationErrorCode { - [Deprecated] number INPUT_PARAMS_ERROR = 0; [Deprecated] @@ -245,98 +286,21 @@ namespace geolocation { number LAST_KNOWN_LOCATION_ERROR = 5; [Deprecated] number LOCATION_REQUEST_TIMEOUT_ERROR = 6; - }; [Deprecated] dictionary LocationPrivacyType { - [Deprecated] number OTHERS = 0; [Deprecated] number STARTUP = 1; [Deprecated] number CORE_LOCATION = 2; - }; [Entity=Interface, Deprecated] interface LocationCommand { - [Deprecated] attribute LocationRequestScenario scenario; [Deprecated] attribute String command; - - }; - [GlobalScope] - interface GlobalScope_geolocation_ohos_geolocation { - - [Deprecated, DtsName="on", DtsTag="'locationChange'"] - static void onLocationChange(LocationRequest request, Callback_Location_Void callback_); - [Deprecated, DtsName="off", DtsTag="'locationChange'"] - static void offLocationChange(optional Callback_Location_Void callback_); - [Deprecated, DtsName="on", DtsTag="'locationServiceState'"] - static void onLocationServiceState(Callback_Boolean_Void callback_); - [Deprecated, DtsName="off", DtsTag="'locationServiceState'"] - static void offLocationServiceState(optional Callback_Boolean_Void callback_); - [Deprecated, DtsName="on", DtsTag="'cachedGnssLocationsReporting'"] - static void onCachedGnssLocationsReporting(CachedGnssLocationsRequest request, Callback_Array_Location_Void callback_); - [Deprecated, DtsName="off", DtsTag="'cachedGnssLocationsReporting'"] - static void offCachedGnssLocationsReporting(optional Callback_Array_Location_Void callback_); - [Deprecated, DtsName="on", DtsTag="'gnssStatusChange'"] - static void onGnssStatusChange(Callback_SatelliteStatusInfo_Void callback_); - [Deprecated, DtsName="off", DtsTag="'gnssStatusChange'"] - static void offGnssStatusChange(optional Callback_SatelliteStatusInfo_Void callback_); - [Deprecated, DtsName="on", DtsTag="'nmeaMessageChange'"] - static void onNmeaMessageChange(Callback_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'nmeaMessageChange'"] - static void offNmeaMessageChange(optional Callback_String_Void callback_); - [Deprecated, DtsName="on", DtsTag="'fenceStatusChange'"] - static void onFenceStatusChange(GeofenceRequest request, WantAgent want); - [Deprecated, DtsName="off", DtsTag="'fenceStatusChange'"] - static void offFenceStatusChange(GeofenceRequest request, WantAgent want); - [Deprecated] - static void getCurrentLocation(CurrentLocationRequest request, AsyncCallback_Location_Void callback_); - [Deprecated] - static void getCurrentLocation(AsyncCallback_Location_Void callback_); - [Deprecated] - static async Location getCurrentLocation(optional CurrentLocationRequest request); - [Deprecated] - static void getLastLocation(AsyncCallback_Location_Void callback_); - [Deprecated] - static async Location getLastLocation(); - [Deprecated] - static void isLocationEnabled(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isLocationEnabled(); - [Deprecated] - static void requestEnableLocation(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean requestEnableLocation(); - [Deprecated] - static void getAddressesFromLocation(ReverseGeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); - [Deprecated] - static async sequence getAddressesFromLocation(ReverseGeoCodeRequest request); - [Deprecated] - static void getAddressesFromLocationName(GeoCodeRequest request, AsyncCallback_Array_GeoAddress_Void callback_); - [Deprecated] - static async sequence getAddressesFromLocationName(GeoCodeRequest request); - [Deprecated] - static void isGeoServiceAvailable(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isGeoServiceAvailable(); - [Deprecated] - static void getCachedGnssLocationsSize(AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getCachedGnssLocationsSize(); - [Deprecated] - static void flushCachedGnssLocations(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean flushCachedGnssLocations(); - [Deprecated] - static void sendCommand(LocationCommand command, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean sendCommand(LocationCommand command); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.graphics.colorSpaceManager.idl b/idl/@ohos.graphics.colorSpaceManager.idl index 57bff03..e718e79 100644 --- a/idl/@ohos.graphics.colorSpaceManager.idl +++ b/idl/@ohos.graphics.colorSpaceManager.idl @@ -1,8 +1,7 @@ -package ohos.graphics; +package ohos.graphics.colorSpaceManager; +[DefaultExport] namespace colorSpaceManager { - dictionary ColorSpace { - number UNKNOWN = 0; number ADOBE_RGB_1998 = 1; number DCI_P3 = 2; @@ -33,12 +32,12 @@ namespace colorSpaceManager { number DISPLAY_P3_SRGB = 3; number DISPLAY_P3_HLG = 11; number DISPLAY_P3_PQ = 12; + number H_LOG = 26; + number DISPLAY_BT2020_SRGB = 27; number CUSTOM = 5; - }; [Entity=Interface] interface ColorSpacePrimaries { - attribute number redX; attribute number redY; attribute number greenX; @@ -47,27 +46,18 @@ namespace colorSpaceManager { attribute number blueY; attribute number whitePointX; attribute number whitePointY; - }; [Entity=Interface] interface ColorSpaceManager { - [Throws] ColorSpace getColorSpaceName(); [Throws] sequence getWhitePoint(); [Throws] number getGamma(); - }; - [GlobalScope] - interface GlobalScope_colorSpaceManager_ohos_graphics_colorSpaceManager { - - [Throws] - static ColorSpaceManager create(ColorSpace colorSpaceName); - [Throws] - static ColorSpaceManager create(ColorSpacePrimaries primaries, number gamma); - - }; - + [Throws] + ColorSpaceManager create(ColorSpace colorSpaceName); + [Throws] + ColorSpaceManager create(ColorSpacePrimaries primaries, number gamma); }; \ No newline at end of file diff --git a/idl/@ohos.graphics.common2D.idl b/idl/@ohos.graphics.common2D.idl index 48d2107..07ebf5e 100644 --- a/idl/@ohos.graphics.common2D.idl +++ b/idl/@ohos.graphics.common2D.idl @@ -1,36 +1,34 @@ -package ohos.graphics; +package ohos.graphics.common2D; +[DefaultExport] namespace common2D { - [Entity=Interface] interface Color { - attribute number alpha; attribute number red; attribute number green; attribute number blue; - }; [Entity=Interface] interface Rect { - attribute number left; attribute number top; attribute number right; attribute number bottom; - }; [Entity=Interface] interface Point { - attribute number x; attribute number y; - }; [Entity=Interface] interface Point3d: Point { - attribute number z; - }; - + [Entity=Interface] + interface Color4f { + attribute number alpha; + attribute number red; + attribute number green; + attribute number blue; + }; }; \ No newline at end of file diff --git a/idl/@ohos.graphics.displaySync.idl b/idl/@ohos.graphics.displaySync.idl index be2947a..93c1e71 100644 --- a/idl/@ohos.graphics.displaySync.idl +++ b/idl/@ohos.graphics.displaySync.idl @@ -1,19 +1,16 @@ -package ohos.graphics; +package ohos.graphics.displaySync; import ohos.base.Callback as Callback; +[DefaultExport] namespace displaySync { - [Entity=Interface] interface IntervalInfo { - attribute number timestamp; attribute number targetTimestamp; - }; [Synthetic] callback Callback_IntervalInfo_Void = void (IntervalInfo parameter); [Entity=Interface] interface DisplaySync { - [Throws] void setExpectedFrameRateRange(ExpectedFrameRateRange rateRange); [DtsName="on", DtsTag="'frame'"] @@ -22,13 +19,6 @@ namespace displaySync { void offFrame(optional Callback_IntervalInfo_Void callback_); void start(); void stop(); - }; - [GlobalScope] - interface GlobalScope_displaySync_ohos_graphics_displaySync { - - static DisplaySync create(); - - }; - + DisplaySync create(); }; \ No newline at end of file diff --git a/idl/@ohos.graphics.drawing.idl b/idl/@ohos.graphics.drawing.idl index dffce4e..70c0f88 100644 --- a/idl/@ohos.graphics.drawing.idl +++ b/idl/@ohos.graphics.drawing.idl @@ -1,11 +1,11 @@ -package ohos.graphics; -import ohos.multimedia.image as image; -import ohos.graphics.common2D as common2D; -import Resource as Resource; +package ohos.graphics.drawing; +import ohos.multimedia.image.default as image; +import ohos.graphics.common2D.default as common2D; +import ohos.graphics.colorSpaceManager.default as colorSpaceManager; +import resource.Resource as Resource; +[DefaultExport] namespace drawing { - dictionary BlendMode { - number CLEAR = 0; number SRC = 1; number DST = 2; @@ -35,32 +35,25 @@ namespace drawing { number SATURATION = 26; number COLOR = 27; number LUMINOSITY = 28; - }; dictionary PathDirection { - number CLOCKWISE = 0; number COUNTER_CLOCKWISE = 1; - }; dictionary PathFillType { - number WINDING = 0; number EVEN_ODD = 1; number INVERSE_WINDING = 2; number INVERSE_EVEN_ODD = 3; - }; dictionary PathMeasureMatrixFlags { - number GET_POSITION_MATRIX = 0; number GET_TANGENT_MATRIX = 1; number GET_POSITION_AND_TANGENT_MATRIX = 2; - }; [Entity=Class] interface RoundRect { - + constructor(RoundRect roundRect); constructor(common2D.Rect rect, number xRadii, number yRadii); [Throws] void setCorner(CornerPos pos, number x, number y); @@ -68,19 +61,15 @@ namespace drawing { common2D.Point getCorner(CornerPos pos); [Throws] void offset(number dx, number dy); - }; dictionary PathOp { - number DIFFERENCE = 0; number INTERSECT = 1; number UNION = 2; number XOR = 3; number REVERSE_DIFFERENCE = 4; - }; dictionary PathIteratorVerb { - number MOVE = 0; number LINE = 1; number QUAD = 2; @@ -88,23 +77,20 @@ namespace drawing { number CUBIC = 4; number CLOSE = 5; number DONE = 6; - }; [Entity=Class] interface PathIterator { - constructor(Path path); [Throws] PathIteratorVerb next(sequence points, optional number offset); PathIteratorVerb peek(); boolean hasNext(); - }; [Entity=Class] interface Path { - constructor(); constructor(Path path); + void set(Path src); [Throws] void moveTo(number x, number y); [Throws] @@ -147,55 +133,61 @@ namespace drawing { void transform(Matrix matrix); [Throws] boolean contains(number x, number y); + void setLastPoint(number x, number y); [Throws] void setFillType(PathFillType pathFillType); + PathFillType getFillType(); common2D.Rect getBounds(); void close(); [Throws] Path offset(number dx, number dy); void reset(); + void rewind(); + boolean isEmpty(); + boolean isRect((common2D.Rect or undefined) rect); number getLength(boolean forceClosed); [Throws] boolean getPositionAndTangent(boolean forceClosed, number distance, common2D.Point position, common2D.Point tangent); + boolean getSegment(boolean forceClosed, number start, number stop, boolean startWithMoveTo, Path dst); boolean isClosed(); [Throws] boolean getMatrix(boolean forceClosed, number distance, Matrix matrix, PathMeasureMatrixFlags flags); [Throws] boolean buildFromSvgString(String str); PathIterator getPathIterator(); - + [Throws] + sequence approximate(number acceptableError); + [Throws] + boolean interpolate(Path other, number weight, Path interpolatedPath); + boolean isInterpolate(Path other); }; dictionary PointMode { - number POINTS = 0; number LINES = 1; number POLYGON = 2; - }; dictionary FilterMode { - number FILTER_MODE_NEAREST = 0; number FILTER_MODE_LINEAR = 1; - }; dictionary ShadowFlag { - number NONE = 0; number TRANSPARENT_OCCLUDER = 1; number GEOMETRIC_ONLY = 2; number ALL = 3; - }; [Entity=Class] interface SamplingOptions { - constructor(); constructor(FilterMode filterMode); - + }; + [Entity=Interface] + interface FontFeature { + attribute String name; + attribute number value; }; [Entity=Class] interface Canvas { - constructor(image.PixelMap pixelmap); [Throws] void drawRect(common2D.Rect rect); @@ -208,9 +200,7 @@ namespace drawing { [Throws] void drawBackground(Brush brush); [Throws] - void drawShadow(Path path, common2D.Point3d planeParams, common2D.Point3d devLightPos, number lightRadius, common2D.Color ambientColor, common2D.Color spotColor, ShadowFlag flag); - [Throws] - void drawShadow(Path path, common2D.Point3d planeParams, common2D.Point3d devLightPos, number lightRadius, number ambientColor, number spotColor, ShadowFlag flag); + void drawShadow(Path path, common2D.Point3d planeParams, common2D.Point3d devLightPos, number lightRadius, (common2D.Color or number) ambientColor, (common2D.Color or number) spotColor, ShadowFlag flag); [Throws] void drawCircle(number x, number y, number radius); [Throws] @@ -233,7 +223,6 @@ namespace drawing { void drawOval(common2D.Rect oval); [Throws] void drawArc(common2D.Rect arc, number startAngle, number sweepAngle); - [Throws] void drawArcWithCenter(common2D.Rect arc, number startAngle, number sweepAngle, boolean useCenter); [Throws] void drawPoint(number x, number y); @@ -246,6 +235,8 @@ namespace drawing { [Throws] void drawSingleCharacter(String text, Font font, number x, number y); [Throws] + void drawSingleCharacterWithFeatures(String text, Font font, number x, number y, sequence features); + [Throws] void drawTextBlob(TextBlob blob, number x, number y); [Throws] void drawPixelMapMesh(image.PixelMap pixelmap, number meshWidth, number meshHeight, sequence vertices, number vertOffset, sequence colors, number colorOffset); @@ -260,10 +251,7 @@ namespace drawing { number save(); [Throws] number saveLayer(optional (common2D.Rect or undefined) rect, optional (Brush or undefined) brush); - [Throws] - void clear(common2D.Color color); - [Throws] - void clear(number color); + void clear((common2D.Color or number) color); void restore(); [Throws] void restoreToCount(number count); @@ -294,37 +282,27 @@ namespace drawing { [Throws] void setMatrix(Matrix matrix); void resetMatrix(); - [Throws] boolean quickRejectPath(Path path); - [Throws] boolean quickRejectRect(common2D.Rect rect); - }; dictionary ClipOp { - number DIFFERENCE = 0; number INTERSECT = 1; - }; [Entity=Interface] interface TextBlobRunBuffer { - attribute number glyph; attribute number positionX; attribute number positionY; - }; dictionary TextEncoding { - number TEXT_ENCODING_UTF8 = 0; number TEXT_ENCODING_UTF16 = 1; number TEXT_ENCODING_UTF32 = 2; number TEXT_ENCODING_GLYPH_ID = 3; - }; [Entity=Class] interface TextBlob { - [Throws] static TextBlob makeFromString(String text, Font font, optional TextEncoding encoding); [Throws] @@ -333,36 +311,36 @@ namespace drawing { static TextBlob makeFromRunBuffer(sequence pos, Font font, optional common2D.Rect bounds); common2D.Rect bounds(); number uniqueID(); - + }; + [Entity=Class] + interface TypefaceArguments { + constructor(); + [Throws] + void addVariation(String axis, number value); }; [Entity=Class] interface Typeface { - String getFamilyName(); + Typeface makeFromCurrent(TypefaceArguments typefaceArguments); [Throws] static Typeface makeFromFile(String filePath); - [Throws] static Typeface makeFromRawFile(Resource rawfile); - + static Typeface makeFromFileWithArguments(String filePath, TypefaceArguments typefaceArguments); + static Typeface makeFromRawFileWithArguments(Resource rawfile, TypefaceArguments typefaceArguments); }; dictionary FontEdging { - number ALIAS = 0; number ANTI_ALIAS = 1; number SUBPIXEL_ANTI_ALIAS = 2; - }; dictionary FontHinting { - number NONE = 0; number SLIGHT = 1; number NORMAL = 2; number FULL = 3; - }; [Entity=Class] interface Font { - [Throws] void enableSubpixel(boolean isSubpixel); [Throws] @@ -379,6 +357,8 @@ namespace drawing { [Throws] number measureSingleCharacter(String text); [Throws] + number measureSingleCharacterWithFeatures(String text, sequence features); + [Throws] number measureText(String text, TextEncoding encoding); [Throws] void setScaleX(number scaleX); @@ -410,29 +390,23 @@ namespace drawing { number getScaleX(); FontHinting getHinting(); FontEdging getEdging(); - [Throws] Path createPathForGlyph(number index); - [Throws] sequence getBounds(sequence glyphs); [Throws] Path getTextPath(String text, number byteLength, number x, number y); [Throws] void setThemeFontFollowed(boolean followed); boolean isThemeFontFollowed(); - }; dictionary FontMetricsFlags { - number UNDERLINE_THICKNESS_VALID = 1; number UNDERLINE_POSITION_VALID = 2; number STRIKETHROUGH_THICKNESS_VALID = 4; number STRIKETHROUGH_POSITION_VALID = 8; number BOUNDS_INVALID = 16; - }; [Entity=Interface] interface FontMetrics { - [Optional] attribute FontMetricsFlags flags; attribute number top; @@ -460,58 +434,43 @@ namespace drawing { attribute number strikethroughThickness; [Optional] attribute number strikethroughPosition; - }; [Entity=Class] interface Lattice { - [Throws] static Lattice createImageLattice(sequence xDivs, sequence yDivs, number fXCount, number fYCount, optional (common2D.Rect or undefined) fBounds, optional (sequence or undefined) fRectTypes, optional (sequence or undefined) fColors); [Throws] static Lattice createImageLattice(sequence xDivs, sequence yDivs, number fXCount, number fYCount, optional (common2D.Rect or undefined) fBounds, optional (sequence or undefined) fRectTypes, optional (sequence or undefined) fColors); - }; dictionary RectType { - number DEFAULT = 0; number TRANSPARENT = 1; number FIXEDCOLOR = 2; - }; [Entity=Class] interface MaskFilter { - [Throws] static MaskFilter createBlurMaskFilter(BlurType blurType, number sigma); - }; dictionary PathDashStyle { - number TRANSLATE = 0; number ROTATE = 1; number MORPH = 2; - }; [Entity=Class] interface PathEffect { - [Throws] static PathEffect createDashPathEffect(sequence intervals, number phase); [Throws] static PathEffect createCornerPathEffect(number radius); - [Throws] static PathEffect createDiscretePathEffect(number segLength, number dev, optional number seedAssist); - [Throws] static PathEffect createComposePathEffect(PathEffect outer, PathEffect inner); [Throws] static PathEffect createPathDashEffect(Path path, number advance, number phase, PathDashStyle style); - [Throws] static PathEffect createSumPathEffect(PathEffect firstPathEffect, PathEffect secondPathEffect); - }; [Entity=Class] interface ShaderEffect { - [Throws] static ShaderEffect createColorShader(number color); [Throws] @@ -522,32 +481,26 @@ namespace drawing { static ShaderEffect createSweepGradient(common2D.Point centerPt, sequence colors, TileMode mode, number startAngle, number endAngle, optional (sequence or undefined) pos, optional (Matrix or undefined) matrix); [Throws] static ShaderEffect createConicalGradient(common2D.Point startPt, number startRadius, common2D.Point endPt, number endRadius, sequence colors, TileMode mode, optional (sequence or undefined) pos, optional (Matrix or undefined) matrix); - + [Throws] + static ShaderEffect createImageShader(image.PixelMap pixelmap, TileMode tileX, TileMode tileY, SamplingOptions samplingOptions, optional (Matrix or undefined) matrix); + [Throws] + static ShaderEffect createComposeShader(ShaderEffect dstShaderEffect, ShaderEffect srcShaderEffect, BlendMode blendMode); }; dictionary TileMode { - number CLAMP = 0; number REPEAT = 1; number MIRROR = 2; number DECAL = 3; - }; [Entity=Class] interface ShadowLayer { - [Throws] - static ShadowLayer create(number blurRadius, number x, number y, common2D.Color color); - [Throws] - static ShadowLayer create(number blurRadius, number x, number y, number color); - + static ShadowLayer create(number blurRadius, number x, number y, (common2D.Color or number) color); }; [Entity=Class] interface ColorFilter { - - [Throws] - static ColorFilter createBlendModeColorFilter(common2D.Color color, BlendMode mode); [Throws] - static ColorFilter createBlendModeColorFilter(number color, BlendMode mode); + static ColorFilter createBlendModeColorFilter((common2D.Color or number) color, BlendMode mode); [Throws] static ColorFilter createComposeColorFilter(ColorFilter outer, ColorFilter inner); static ColorFilter createLinearToSRGBGamma(); @@ -555,42 +508,39 @@ namespace drawing { static ColorFilter createLumaColorFilter(); [Throws] static ColorFilter createMatrixColorFilter(sequence matrix); - + static ColorFilter createLightingColorFilter((common2D.Color or number) mutColor, (common2D.Color or number) addColor); }; [Entity=Class] interface ImageFilter { - [Throws] static ImageFilter createBlurImageFilter(number sigmaX, number sigmaY, TileMode tileMode, optional (ImageFilter or undefined) imageFilter); [Throws] static ImageFilter createFromColorFilter(ColorFilter colorFilter, optional (ImageFilter or undefined) imageFilter); - + static ImageFilter createOffsetImageFilter(number dx, number dy, optional (ImageFilter or undefined) input); + static ImageFilter createFromImage(image.PixelMap pixelmap, optional (common2D.Rect or undefined) srcRect, optional (common2D.Rect or undefined) dstRect); + [Throws] + static ImageFilter createBlendImageFilter(BlendMode mode, ImageFilter background, ImageFilter foreground); + static ImageFilter createComposeImageFilter(ImageFilter cOuter, ImageFilter cInner); + static ImageFilter createFromShaderEffect(ShaderEffect shader); }; dictionary JoinStyle { - number MITER_JOIN = 0; number ROUND_JOIN = 1; number BEVEL_JOIN = 2; - }; dictionary CapStyle { - number FLAT_CAP = 0; number SQUARE_CAP = 1; number ROUND_CAP = 2; - }; dictionary BlurType { - number NORMAL = 0; number SOLID = 1; number OUTER = 2; number INNER = 3; - }; [Entity=Class] interface Pen { - constructor(); constructor(Pen pen); [Throws] @@ -602,9 +552,10 @@ namespace drawing { void setColor(common2D.Color color); [Throws] void setColor(number alpha, number red, number green, number blue); - [Throws] void setColor(number color); + void setColor4f(common2D.Color4f color4f, (colorSpaceManager.ColorSpaceManager or undefined) colorSpace); common2D.Color getColor(); + common2D.Color4f getColor4f(); number getHexColor(); [Throws] void setStrokeWidth(number width); @@ -639,11 +590,9 @@ namespace drawing { void reset(); [Throws] boolean getFillPath(Path src, Path dst); - }; [Entity=Class] interface Brush { - constructor(); constructor(Brush brush); [Throws] @@ -652,7 +601,9 @@ namespace drawing { void setColor(number alpha, number red, number green, number blue); [Throws] void setColor(number color); + void setColor4f(common2D.Color4f color4f, (colorSpaceManager.ColorSpaceManager or undefined) colorSpace); common2D.Color getColor(); + common2D.Color4f getColor4f(); number getHexColor(); [Throws] void setAntiAlias(boolean aa); @@ -674,20 +625,24 @@ namespace drawing { [Throws] void setBlendMode(BlendMode mode); void reset(); - }; [Entity=Class] interface Matrix { - constructor(); + constructor(Matrix matrix); + boolean isAffine(); + boolean rectStaysRect(); [Throws] void setRotation(number degree, number px, number py); [Throws] void setScale(number sx, number sy, number px, number py); [Throws] void setTranslation(number dx, number dy); - [Throws] - void setMatrix(sequence values); + void setSkew(number kx, number ky, number px, number py); + void setSinCos(number sinValue, number cosValue, number px, number py); + void setMatrix((sequence or Matrix) matrix); + void setConcat(Matrix matrixA, Matrix matrixB); + void postConcat(Matrix matrix); [Throws] void preConcat(Matrix matrix); [Throws] @@ -705,13 +660,16 @@ namespace drawing { void postTranslate(number dx, number dy); [Throws] void preRotate(number degree, number px, number py); + void postSkew(number kx, number ky, number px, number py); [Throws] void preScale(number sx, number sy, number px, number py); [Throws] void preTranslate(number dx, number dy); + void preSkew(number kx, number ky, number px, number py); void reset(); [Throws] sequence mapPoints(sequence src); + number mapRadius(number radius); sequence getAll(); [Throws] boolean mapRect(common2D.Rect dst, common2D.Rect src); @@ -719,63 +677,86 @@ namespace drawing { boolean setRectToRect(common2D.Rect src, common2D.Rect dst, ScaleToFit scaleToFit); [Throws] boolean setPolyToPoly(sequence src, sequence dst, number count); - }; dictionary ScaleToFit { - number FILL_SCALE_TO_FIT = 0; number START_SCALE_TO_FIT = 1; number CENTER_SCALE_TO_FIT = 2; number END_SCALE_TO_FIT = 3; - }; [Entity=Class] interface Region { - + constructor(); + constructor(Region region); + constructor(number left, number top, number right, number bottom); + boolean isEqual(Region other); + boolean isComplex(); + boolean isEmpty(); + common2D.Rect getBounds(); + Path getBoundaryPath(); [Throws] boolean isPointContained(number x, number y); [Throws] boolean isRegionContained(Region other); [Throws] boolean op(Region region, RegionOp regionOp); + void offset(number dx, number dy); [Throws] boolean quickReject(number left, number top, number right, number bottom); + boolean quickRejectRegion(Region region); [Throws] boolean setPath(Path path, Region clip); [Throws] boolean setRect(number left, number top, number right, number bottom); - + void setRegion(Region region); + void setEmpty(); }; dictionary RegionOp { - number DIFFERENCE = 0; number INTERSECT = 1; number UNION = 2; number XOR = 3; number REVERSE_DIFFERENCE = 4; number REPLACE = 5; - }; dictionary CornerPos { - number TOP_LEFT_POS = 0; number TOP_RIGHT_POS = 1; number BOTTOM_RIGHT_POS = 2; number BOTTOM_LEFT_POS = 3; - }; dictionary SrcRectConstraint { - number STRICT = 0; number FAST = 1; - }; [Entity=Class] interface Tool { - [Throws] static common2D.Color makeColorFromResourceColor(ResourceColor resourceColor); - }; - + [Entity=Class] + interface RectUtils { + static common2D.Rect makeEmpty(); + static common2D.Rect makeLtrb(number left, number top, number right, number bottom); + static common2D.Rect makeCopy(common2D.Rect src); + static number getWidth(common2D.Rect rect); + static number getHeight(common2D.Rect rect); + static number centerX(common2D.Rect rect); + static number centerY(common2D.Rect rect); + static boolean contains(common2D.Rect rect, common2D.Rect other); + static boolean contains(common2D.Rect rect, number left, number top, number right, number bottom); + static boolean contains(common2D.Rect rect, number x, number y); + static void inset(common2D.Rect rect, number left, number top, number right, number bottom); + static boolean intersect(common2D.Rect rect, common2D.Rect other); + static boolean isIntersect(common2D.Rect rect, common2D.Rect other); + static void union(common2D.Rect rect, common2D.Rect other); + static boolean isEmpty(common2D.Rect rect); + static void offset(common2D.Rect rect, number dx, number dy); + static void offsetTo(common2D.Rect rect, number newLeft, number newTop); + static void setRect(common2D.Rect rect, common2D.Rect other); + static void setLtrb(common2D.Rect rect, number left, number top, number right, number bottom); + static void setEmpty(common2D.Rect rect); + static void sort(common2D.Rect rect); + static boolean isEqual(common2D.Rect rect, common2D.Rect other); + }; }; \ No newline at end of file diff --git a/idl/@ohos.graphics.hdrCapability.idl b/idl/@ohos.graphics.hdrCapability.idl index 7caf4f0..462037d 100644 --- a/idl/@ohos.graphics.hdrCapability.idl +++ b/idl/@ohos.graphics.hdrCapability.idl @@ -1,9 +1,8 @@ -package ohos.graphics; +package ohos.graphics.hdrCapability; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace hdrCapability { - dictionary HDRFormat { - number NONE = 0; number VIDEO_HLG = 1; number VIDEO_HDR10 = 2; @@ -12,7 +11,5 @@ namespace hdrCapability { number IMAGE_HDR_VIVID_SINGLE = 5; number IMAGE_HDR_ISO_DUAL = 6; number IMAGE_HDR_ISO_SINGLE = 7; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.graphics.text.idl b/idl/@ohos.graphics.text.idl index 3cb806c..c4be2b5 100644 --- a/idl/@ohos.graphics.text.idl +++ b/idl/@ohos.graphics.text.idl @@ -1,42 +1,40 @@ -package ohos.graphics; -import ohos.graphics.drawing as drawing; -import ohos.graphics.common2D as common2D; +package ohos.graphics.text; +import ohos.graphics.drawing.default as drawing; +import ohos.graphics.common2D.default as common2D; +import resource.Resource as Resource; +[DefaultExport] namespace text { - dictionary TextAlign { - number LEFT = 0; number RIGHT = 1; number CENTER = 2; number JUSTIFY = 3; number START = 4; number END = 5; - + }; + dictionary TextVerticalAlign { + number BASELINE = 0; + number BOTTOM = 1; + number CENTER = 2; + number TOP = 3; }; dictionary TextDirection { - number RTL = 0; number LTR = 1; - }; dictionary BreakStrategy { - number GREEDY = 0; number HIGH_QUALITY = 1; number BALANCED = 2; - }; dictionary WordBreak { - number NORMAL = 0; number BREAK_ALL = 1; number BREAK_WORD = 2; number BREAK_HYPHEN = 3; - }; [Entity=Interface] interface Decoration { - [Optional] attribute TextDecorationType textDecoration; [Optional] @@ -45,27 +43,21 @@ namespace text { attribute TextDecorationStyle decorationStyle; [Optional] attribute number decorationThicknessScale; - }; dictionary TextDecorationType { - number NONE = 0; number UNDERLINE = 1; number OVERLINE = 2; number LINE_THROUGH = 3; - }; dictionary TextDecorationStyle { - number SOLID = 0; number DOUBLE = 1; number DOTTED = 2; number DASHED = 3; number WAVY = 4; - }; dictionary FontWeight { - number W100 = 0; number W200 = 1; number W300 = 2; @@ -75,17 +67,13 @@ namespace text { number W700 = 6; number W800 = 7; number W900 = 8; - }; dictionary FontStyle { - number NORMAL = 0; number ITALIC = 1; number OBLIQUE = 2; - }; dictionary FontWidth { - number ULTRA_CONDENSED = 1; number EXTRA_CONDENSED = 2; number CONDENSED = 3; @@ -95,67 +83,56 @@ namespace text { number EXPANDED = 7; number EXTRA_EXPANDED = 8; number ULTRA_EXPANDED = 9; - }; dictionary TextHeightBehavior { - number ALL = 0; number DISABLE_FIRST_ASCENT = 1; number DISABLE_LAST_ASCENT = 2; number DISABLE_ALL = 3; - }; dictionary TextBaseline { - number ALPHABETIC = 0; number IDEOGRAPHIC = 1; - }; dictionary EllipsisMode { - number START = 0; number MIDDLE = 1; number END = 2; - }; [Entity=Interface] interface TextShadow { - [Optional] attribute common2D.Color color; [Optional] attribute common2D.Point point; [Optional] attribute number blurRadius; - }; [Entity=Interface] interface RectStyle { - attribute common2D.Color color; attribute number leftTopRadius; attribute number rightTopRadius; attribute number rightBottomRadius; attribute number leftBottomRadius; - }; [Entity=Interface] interface FontFeature { - attribute String name; attribute number value; - }; [Entity=Interface] interface FontVariation { - attribute String axis; attribute number value; - + }; + dictionary TextBadgeType { + number TEXT_BADGE_NONE = 0; + number TEXT_SUPERSCRIPT = 1; + number TEXT_SUBSCRIPT = 2; }; [Entity=Interface] interface TextStyle { - [Optional] attribute Decoration decoration; [Optional] @@ -196,21 +173,21 @@ namespace text { attribute RectStyle backgroundRect; [Optional] attribute sequence fontVariations; - + [Optional] + attribute TextBadgeType badgeType; }; [Entity=Class] interface FontCollection { - static FontCollection getGlobalInstance(); void loadFontSync(String name, (String or Resource) path); [Throws] async void loadFont(String name, (String or Resource) path); + void unloadFontSync(String name); + async void unloadFont(String name); void clearCaches(); - }; [Entity=Interface] interface StrutStyle { - [Optional] attribute sequence fontFamilies; [Optional] @@ -233,11 +210,9 @@ namespace text { attribute boolean heightOverride; [Optional] attribute boolean halfLeading; - }; [Entity=Interface] interface ParagraphStyle { - [Optional] attribute TextStyle textStyle; [Optional] @@ -256,47 +231,44 @@ namespace text { attribute TextHeightBehavior textHeightBehavior; [Optional] attribute TextTab tab; - + [Optional] + attribute boolean trailingSpaceOptimized; + [Optional] + attribute boolean autoSpace; + [Optional] + attribute TextVerticalAlign verticalAlign; }; dictionary PlaceholderAlignment { - number OFFSET_AT_BASELINE = 0; number ABOVE_BASELINE = 1; number BELOW_BASELINE = 2; number TOP_OF_ROW_BOX = 3; number BOTTOM_OF_ROW_BOX = 4; number CENTER_OF_ROW_BOX = 5; - + number FOLLOW_PARAGRAPH = 6; }; [Entity=Interface] interface PlaceholderSpan { - attribute number width; attribute number height; attribute PlaceholderAlignment align; attribute TextBaseline baseline; attribute number baselineOffset; - }; [Entity=Interface] interface Range { - attribute number start; attribute number end; - }; dictionary SystemFontType { - number ALL = 1; number GENERIC = 2; number STYLISH = 4; number INSTALLED = 8; number CUSTOMIZED = 16; - }; [Entity=Interface] interface FontDescriptor { - [Optional] attribute String path; [Optional] @@ -317,11 +289,9 @@ namespace text { attribute boolean monoSpace; [Optional] attribute boolean symbolic; - }; [Entity=Class] interface Paragraph { - void layoutSync(number width); [Throws] async void layout(number width); @@ -347,56 +317,44 @@ namespace text { Range getActualTextRange(number lineNumber, boolean includeSpaces); sequence getLineMetrics(); (LineMetrics or undefined) getLineMetrics(number lineNumber); - + void updateColor(common2D.Color color); + void updateDecoration(Decoration decoration); }; [Entity=Class] interface LineTypeset { - [Throws] number getLineBreak(number startIndex, number width); [Throws] TextLine createLine(number startIndex, number count); - }; [Entity=Interface] interface TextBox { - attribute common2D.Rect rect; attribute TextDirection direction; - }; [Entity=Interface] interface PositionWithAffinity { - attribute number position; attribute Affinity affinity; - }; dictionary RectWidthStyle { - number TIGHT = 0; number MAX = 1; - }; dictionary RectHeightStyle { - number TIGHT = 0; number MAX = 1; number INCLUDE_LINE_SPACE_MIDDLE = 2; number INCLUDE_LINE_SPACE_TOP = 3; number INCLUDE_LINE_SPACE_BOTTOM = 4; number STRUT = 5; - }; dictionary Affinity { - number UPSTREAM = 0; number DOWNSTREAM = 1; - }; [Entity=Class] interface ParagraphBuilder { - constructor(ParagraphStyle paragraphStyle, FontCollection fontCollection); void pushStyle(TextStyle textStyle); void popStyle(); @@ -405,70 +363,54 @@ namespace text { Paragraph build(); LineTypeset buildLineTypeset(); void addSymbol(number symbolId); - }; [Entity=Interface] interface TypographicBounds { - attribute number ascent; attribute number descent; attribute number leading; attribute number width; - }; callback CaretOffsetsCallback = boolean (number offset, number index, boolean leadingEdge); [Entity=Class] interface TextLine { - number getGlyphCount(); Range getTextRange(); sequence getGlyphRuns(); void paint(drawing.Canvas canvas, number x, number y); - [Throws] TextLine createTruncatedLine(number width, EllipsisMode ellipsisMode, String ellipsis); TypographicBounds getTypographicBounds(); common2D.Rect getImageBounds(); number getTrailingSpaceWidth(); - [Throws] number getStringIndexForPosition(common2D.Point point); - [Throws] number getOffsetForStringIndex(number index); - [Throws] void enumerateCaretOffsets(CaretOffsetsCallback callback_); - [Throws] number getAlignmentOffset(number alignmentFactor, number alignmentWidth); - }; [Entity=Class] interface Run { - number getGlyphCount(); sequence getGlyphs(); - [Throws] sequence getGlyphs(Range range); sequence getPositions(); - [Throws] sequence getPositions(Range range); sequence getOffsets(); drawing.Font getFont(); void paint(drawing.Canvas canvas, number x, number y); - [Throws] sequence getStringIndices(optional Range range); Range getStringRange(); TypographicBounds getTypographicBounds(); common2D.Rect getImageBounds(); - + TextDirection getTextDirection(); + sequence getAdvances(Range range); }; [Entity=Interface] interface RunMetrics { - attribute TextStyle textStyle; attribute drawing.FontMetrics fontMetrics; - }; [Entity=Interface] interface LineMetrics { - attribute number startIndex; attribute number endIndex; attribute number ascent; @@ -480,25 +422,27 @@ namespace text { attribute number lineNumber; attribute number topHeight; attribute record runMetrics; - }; + [Throws] + async sequence getSystemFontFullNamesByType(SystemFontType fontType); + [Throws] + async FontDescriptor getFontDescriptorByFullName(String fullName, SystemFontType fontType); + [Throws] + async sequence matchFontDescriptors(FontDescriptor desc); [Entity=Interface] interface TextTab { - attribute TextAlign alignment; attribute number location; - }; - [GlobalScope] - interface GlobalScope_text_ohos_graphics_text { - - [Throws] - static async sequence getSystemFontFullNamesByType(SystemFontType fontType); - [Throws] - static async FontDescriptor getFontDescriptorByFullName(String fullName, SystemFontType fontType); - [Throws] - static async sequence matchFontDescriptors(FontDescriptor desc); - + dictionary TextHighContrast { + number TEXT_FOLLOW_SYSTEM_HIGH_CONTRAST = 0; + number TEXT_APP_DISABLE_HIGH_CONTRAST = 1; + number TEXT_APP_ENABLE_HIGH_CONTRAST = 2; + }; + void setTextHighContrast(TextHighContrast action); + dictionary TextUndefinedGlyphDisplay { + number USE_DEFAULT = 0; + number USE_TOFU = 1; }; - + void setTextUndefinedGlyphDisplay(TextUndefinedGlyphDisplay noGlyphShow); }; \ No newline at end of file diff --git a/idl/@ohos.graphics.uiEffect.idl b/idl/@ohos.graphics.uiEffect.idl index 9681976..352e851 100644 --- a/idl/@ohos.graphics.uiEffect.idl +++ b/idl/@ohos.graphics.uiEffect.idl @@ -1,10 +1,16 @@ -package ohos.graphics; +package ohos.graphics.uiEffect; import ohos.base.AsyncCallback as AsyncCallback; +import ohos.graphics.common2D.default as common2D; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace uiEffect { - + [Entity=Tuple, Synthetic] + interface Tuple_Number_Number { + attribute number value0; + attribute number value1; + }; [Entity=Interface] interface Filter { - Filter pixelStretch(sequence stretchSizes, TileMode tileMode); Filter blur(number blurRadius); [Throws] @@ -13,47 +19,60 @@ namespace uiEffect { Filter flyInFlyOutEffect(number degree, FlyMode flyMode); [Throws] Filter distort(number distortionK); - + [Throws] + Filter radiusGradientBlur(number value, LinearGradientBlurOptions options); + [Throws] + Filter bezierWarp(sequence controlPoints); + [Throws] + Filter contentLight(common2D.Point3d lightPosition, common2D.Color lightColor, number lightIntensity, optional Mask displacementMap); + [Throws] + Filter colorGradient(sequence colors, sequence positions, sequence strengths, optional Mask alphaMask); + [Throws] + Filter edgeLight(number alpha, optional Color color, optional Mask mask, optional boolean bloom); + [Throws] + Filter displacementDistort(Mask displacementMap, optional Tuple_Number_Number factor); + [Throws] + Filter maskDispersion(Mask dispersionMap, number alpha, optional Tuple_Number_Number rFactor, optional Tuple_Number_Number gFactor, optional Tuple_Number_Number bFactor); + [Throws] + Filter hdrBrightnessRatio(number ratio); + [Throws] + Filter variableRadiusBlur(number radius, Mask radiusMap); + [Throws] + Filter directionLight(common2D.Point3d direction, Color color, number intensity, optional Mask mask, optional number factor); + [Throws] + Filter maskTransition(Mask alphaMask, optional number factor, optional boolean inverse); }; dictionary TileMode { - number CLAMP = 0; number REPEAT = 1; number MIRROR = 2; number DECAL = 3; - }; dictionary WaterRippleMode { - number SMALL2MEDIUM_RECV = 0; number SMALL2MEDIUM_SEND = 1; number SMALL2SMALL = 2; - + number MINI_RECV = 3; }; dictionary FlyMode { - number BOTTOM = 0; number TOP = 1; - }; [Entity=Interface] interface VisualEffect { - VisualEffect backgroundColorBlender(BrightnessBlender blender); - + [Throws] + VisualEffect borderLight(common2D.Point3d lightPosition, common2D.Color lightColor, number lightIntensity, number borderWidth); }; - typedef BrightnessBlender Blender; + typedef (BrightnessBlender or HdrBrightnessBlender) Blender; [Entity=Tuple, Synthetic] interface Tuple_Number_Number_Number { - attribute number value0; attribute number value1; attribute number value2; - }; [Entity=Interface] interface BrightnessBlender { - attribute number cubicRate; attribute number quadraticRate; attribute number linearRate; @@ -62,21 +81,42 @@ namespace uiEffect { attribute Tuple_Number_Number_Number positiveCoefficient; attribute Tuple_Number_Number_Number negativeCoefficient; attribute number fraction; - }; - [GlobalScope] - interface GlobalScope_uiEffect_ohos_graphics_uiEffect { - - static Filter createFilter(); - static VisualEffect createEffect(); - static BrightnessBlender createBrightnessBlender(BrightnessBlenderParam param); - + [Entity=Interface] + interface HdrBrightnessBlender: BrightnessBlender { + }; + [Entity=Interface] + interface Color { + attribute number red; + attribute number green; + attribute number blue; + attribute number alpha; + }; + [Entity=Class] + interface Mask { + [Throws] + static Mask createRippleMask(common2D.Point center, number radius, number width, optional number offset); + [Throws] + static Mask createPixelMapMask(image.PixelMap pixelMap, common2D.Rect srcRect, common2D.Rect dstRect, optional Color fillColor); + [Throws] + static Mask createRadialGradientMask(common2D.Point center, number radiusX, number radiusY, sequence values); + [Throws] + static Mask createWaveGradientMask(common2D.Point center, number width, number propagationRadius, number blurRadius, optional number turbulenceStrength); }; - + Filter createFilter(); + VisualEffect createEffect(); + BrightnessBlender createBrightnessBlender(BrightnessBlenderParam param); + [Throws] + HdrBrightnessBlender createHdrBrightnessBlender(BrightnessBlenderParam param); +}; +[Entity=Tuple, Synthetic] +interface Tuple_Number_Number_Number { + attribute number value0; + attribute number value1; + attribute number value2; }; [Entity=Interface] interface BrightnessBlenderParam { - attribute number cubicRate; attribute number quadraticRate; attribute number linearRate; @@ -85,5 +125,4 @@ interface BrightnessBlenderParam { attribute Tuple_Number_Number_Number positiveCoefficient; attribute Tuple_Number_Number_Number negativeCoefficient; attribute number fraction; - }; \ No newline at end of file diff --git a/idl/@ohos.hiAppEvent.idl b/idl/@ohos.hiAppEvent.idl index 445f719..841d72e 100644 --- a/idl/@ohos.hiAppEvent.idl +++ b/idl/@ohos.hiAppEvent.idl @@ -1,10 +1,9 @@ -package ohos; +package ohos.hiAppEvent; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace hiAppEvent { - [Deprecated] dictionary EventType { - [Deprecated] number FAULT = 1; [Deprecated] @@ -13,37 +12,24 @@ namespace hiAppEvent { number SECURITY = 3; [Deprecated] number BEHAVIOR = 4; - }; namespace Event { - - }; namespace Param { - - }; + [Deprecated] + async void write(String eventName, EventType eventType, Object keyValues); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void write(String eventName, EventType eventType, Object keyValues, AsyncCallback_Void callback_); + [Deprecated] + boolean configure(ConfigOption config); [Entity=Interface, Deprecated] interface ConfigOption { - [Optional, Deprecated] attribute boolean disable; [Optional, Deprecated] attribute String maxStorage; - - }; - [GlobalScope] - interface GlobalScope_hiAppEvent_ohos_hiAppEvent { - - [Deprecated] - static async void write(String eventName, EventType eventType, Object keyValues); - [Deprecated] - static void write(String eventName, EventType eventType, Object keyValues, AsyncCallback_Void callback_); - [Deprecated] - static boolean configure(ConfigOption config); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.hiSysEvent.idl b/idl/@ohos.hiSysEvent.idl index f6acd4d..4711733 100644 --- a/idl/@ohos.hiSysEvent.idl +++ b/idl/@ohos.hiSysEvent.idl @@ -1,43 +1,39 @@ -package ohos; +package ohos.hiSysEvent; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace hiSysEvent { - dictionary EventType { - number FAULT = 1; number STATISTIC = 2; number SECURITY = 3; number BEHAVIOR = 4; - }; [Entity=Interface] interface SysEventInfo { - attribute String domain; attribute String name; attribute EventType eventType; [Optional] attribute Object params; - }; + [Throws] + async void write(SysEventInfo info); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void write(SysEventInfo info, AsyncCallback_Void callback_); dictionary RuleType { - number WHOLE_WORD = 1; number PREFIX = 2; number REGULAR = 3; - }; [Entity=Interface] interface WatchRule { - attribute String domain; attribute String name; [Optional] attribute String tag; attribute RuleType ruleType; - }; [Synthetic] callback Callback_SysEventInfo_Void = void (SysEventInfo info); @@ -45,15 +41,12 @@ namespace hiSysEvent { callback Callback_Void = void (); [Entity=Interface] interface Watcher { - attribute sequence rules; attribute Callback_SysEventInfo_Void onEvent; attribute Callback_Void onServiceDied; - }; [Entity=Interface] interface QueryArg { - attribute number beginTime; attribute number endTime; attribute number maxEvents; @@ -61,16 +54,13 @@ namespace hiSysEvent { attribute number fromSeq; [Optional] attribute number toSeq; - }; [Entity=Interface] interface QueryRule { - attribute String domain; attribute sequence names; [Optional] attribute String condition; - }; [Synthetic] callback Callback_Array_SysEventInfo_Void = void (sequence infos); @@ -78,31 +68,19 @@ namespace hiSysEvent { callback Callback_Number_Number_Void = void (number reason, number total); [Entity=Interface] interface Querier { - attribute Callback_Array_SysEventInfo_Void onQuery; attribute Callback_Number_Number_Void onComplete; - }; - [GlobalScope] - interface GlobalScope_hiSysEvent_ohos_hiSysEvent { - - [Throws] - static async void write(SysEventInfo info); - [Throws] - static void write(SysEventInfo info, AsyncCallback_Void callback_); - [Throws] - static void addWatcher(Watcher watcher); - [Throws] - static void removeWatcher(Watcher watcher); - [Throws] - static void query(QueryArg queryArg, sequence rules, Querier querier); - [Throws] - static number exportSysEvents(QueryArg queryArg, sequence rules); - [Throws] - static number subscribe(sequence rules); - [Throws] - static void unsubscribe(); - - }; - + [Throws] + void addWatcher(Watcher watcher); + [Throws] + void removeWatcher(Watcher watcher); + [Throws] + void query(QueryArg queryArg, sequence rules, Querier querier); + [Throws] + number exportSysEvents(QueryArg queryArg, sequence rules); + [Throws] + number subscribe(sequence rules); + [Throws] + void unsubscribe(); }; \ No newline at end of file diff --git a/idl/@ohos.hiTraceChain.idl b/idl/@ohos.hiTraceChain.idl index 9cc63fd..1e7fbd8 100644 --- a/idl/@ohos.hiTraceChain.idl +++ b/idl/@ohos.hiTraceChain.idl @@ -1,8 +1,7 @@ -package ohos; +package ohos.hiTraceChain; +[DefaultExport] namespace hiTraceChain { - dictionary HiTraceFlag { - number DEFAULT = 0; number INCLUDE_ASYNC = 1; number DONOT_CREATE_SPAN = 2; @@ -11,28 +10,22 @@ namespace hiTraceChain { number DISABLE_LOG = 16; number FAILURE_TRIGGER = 32; number D2D_TP_INFO = 64; - }; dictionary HiTraceTracepointType { - number CS = 0; number CR = 1; number SS = 2; number SR = 3; number GENERAL = 4; - }; dictionary HiTraceCommunicationMode { - number DEFAULT = 0; number THREAD = 1; number PROCESS = 2; number DEVICE = 3; - }; [Entity=Interface] interface HiTraceId { - attribute bigint chainId; [Optional] attribute number spanId; @@ -40,22 +33,15 @@ namespace hiTraceChain { attribute number parentSpanId; [Optional] attribute number flags; - }; - [GlobalScope] - interface GlobalScope_hiTraceChain_ohos_hiTraceChain { - - static HiTraceId begin(String name, optional number flags); - static void end(HiTraceId id); - static HiTraceId getId(); - static void setId(HiTraceId id); - static void clearId(); - static HiTraceId createSpan(); - static void tracepoint(HiTraceCommunicationMode mode, HiTraceTracepointType type, HiTraceId id, optional String msg); - static boolean isValid(HiTraceId id); - static boolean isFlagEnabled(HiTraceId id, HiTraceFlag flag); - static void enableFlag(HiTraceId id, HiTraceFlag flag); - - }; - + HiTraceId begin(String name, optional number flags); + void end(HiTraceId id); + HiTraceId getId(); + void setId(HiTraceId id); + void clearId(); + HiTraceId createSpan(); + void tracepoint(HiTraceCommunicationMode mode, HiTraceTracepointType type, HiTraceId id, optional String msg); + boolean isValid(HiTraceId id); + boolean isFlagEnabled(HiTraceId id, HiTraceFlag flag); + void enableFlag(HiTraceId id, HiTraceFlag flag); }; \ No newline at end of file diff --git a/idl/@ohos.hiTraceMeter.idl b/idl/@ohos.hiTraceMeter.idl index 728ada6..d1d3c45 100644 --- a/idl/@ohos.hiTraceMeter.idl +++ b/idl/@ohos.hiTraceMeter.idl @@ -1,13 +1,20 @@ -package ohos; +package ohos.hiTraceMeter; +[DefaultExport] namespace hiTraceMeter { - - [GlobalScope] - interface GlobalScope_hiTraceMeter_ohos_hiTraceMeter { - - static void startTrace(String name, number taskId); - static void finishTrace(String name, number taskId); - static void traceByValue(String name, number count); - + dictionary HiTraceOutputLevel { + number DEBUG = 0; + number INFO = 1; + number CRITICAL = 2; + number COMMERCIAL = 3; + number MAX = 3; }; - + void startTrace(String name, number taskId); + void finishTrace(String name, number taskId); + void traceByValue(String name, number count); + void startSyncTrace(HiTraceOutputLevel level, String name, optional String customArgs); + void finishSyncTrace(HiTraceOutputLevel level); + void startAsyncTrace(HiTraceOutputLevel level, String name, number taskId, String customCategory, optional String customArgs); + void finishAsyncTrace(HiTraceOutputLevel level, String name, number taskId); + void traceByValue(HiTraceOutputLevel level, String name, number count); + boolean isTraceEnabled(); }; \ No newline at end of file diff --git a/idl/@ohos.hichecker.idl b/idl/@ohos.hichecker.idl index 0c337bd..609c708 100644 --- a/idl/@ohos.hichecker.idl +++ b/idl/@ohos.hichecker.idl @@ -1,23 +1,22 @@ -package ohos; +package ohos.hichecker; +[DefaultExport] namespace hichecker { - - [GlobalScope] - interface GlobalScope_hichecker_ohos_hichecker { - - [Deprecated] - static void addRule(bigint rule); - [Deprecated] - static void removeRule(bigint rule); - static bigint getRule(); - [Deprecated] - static boolean contains(bigint rule); - [Throws] - static void addCheckRule(bigint rule); - [Throws] - static void removeCheckRule(bigint rule); - [Throws] - static boolean containsCheckRule(bigint rule); - - }; - + const number RULE_CAUTION_PRINT_LOG = 9223372036854776000; + const number RULE_CAUTION_TRIGGER_CRASH = 4611686018427388000; + const number RULE_THREAD_CHECK_SLOW_PROCESS = 1; + const number RULE_CHECK_ABILITY_CONNECTION_LEAK = 8589934592; + const number RULE_CHECK_ARKUI_PERFORMANCE = 17179869184; + [Deprecated] + void addRule(bigint rule); + [Deprecated] + void removeRule(bigint rule); + bigint getRule(); + [Deprecated] + boolean contains(bigint rule); + [Throws] + void addCheckRule(bigint rule); + [Throws] + void removeCheckRule(bigint rule); + [Throws] + boolean containsCheckRule(bigint rule); }; \ No newline at end of file diff --git a/idl/@ohos.hidebug.idl b/idl/@ohos.hidebug.idl index 7988dc9..4d7004d 100644 --- a/idl/@ohos.hidebug.idl +++ b/idl/@ohos.hidebug.idl @@ -1,24 +1,44 @@ -package ohos; +package ohos.hidebug; +[DefaultExport] namespace hidebug { - + bigint getNativeHeapSize(); + bigint getNativeHeapAllocatedSize(); + bigint getNativeHeapFreeSize(); + bigint getVss(); + bigint getPss(); + bigint getSharedDirty(); + bigint getPrivateDirty(); + number getCpuUsage(); + [Deprecated] + void startProfiling(String filename); + [Deprecated] + void stopProfiling(); + [Deprecated] + void dumpHeapData(String filename); + [Throws] + void startJsCpuProfiling(String filename); + void stopJsCpuProfiling(); + [Throws] + void dumpJsHeapData(String filename); + [Throws] + void getServiceDump(number serviceid, number fd, sequence args); + [Throws] + number getSystemCpuUsage(); [Entity=Interface] interface ThreadCpuUsage { - attribute number threadId; attribute number cpuUsage; - }; + sequence getAppThreadCpuUsage(); [Entity=Interface] interface SystemMemInfo { - attribute bigint totalMem; attribute bigint freeMem; attribute bigint availableMem; - }; + SystemMemInfo getSystemMemInfo(); [Entity=Interface] interface NativeMemInfo { - attribute bigint pss; attribute bigint vss; attribute bigint rss; @@ -26,84 +46,64 @@ namespace hidebug { attribute bigint privateDirty; attribute bigint sharedClean; attribute bigint privateClean; - }; + NativeMemInfo getAppNativeMemInfo(); [Entity=Interface] interface MemoryLimit { - attribute bigint rssLimit; attribute bigint vssLimit; attribute bigint vmHeapLimit; attribute bigint vmTotalHeapSize; - }; + MemoryLimit getAppMemoryLimit(); + async NativeMemInfo getAppNativeMemInfoAsync(); + NativeMemInfo getAppNativeMemInfoWithCache(optional boolean forceRefresh); [Entity=Interface] interface VMMemoryInfo { - attribute bigint totalHeap; attribute bigint heapUsed; attribute bigint allArraySize; - }; + VMMemoryInfo getAppVMMemoryInfo(); dictionary TraceFlag { - number MAIN_THREAD = 1; number ALL_THREADS = 2; - }; namespace tags { - - }; + [Throws] + String startAppTraceCapture(sequence tags, TraceFlag flag, number limitSize); + [Throws] + void stopAppTraceCapture(); typedef record GcStats; - [GlobalScope] - interface GlobalScope_hidebug_ohos_hidebug { - - static bigint getNativeHeapSize(); - static bigint getNativeHeapAllocatedSize(); - static bigint getNativeHeapFreeSize(); - static bigint getVss(); - static bigint getPss(); - static bigint getSharedDirty(); - static bigint getPrivateDirty(); - static number getCpuUsage(); - [Deprecated] - static void startProfiling(String filename); - [Deprecated] - static void stopProfiling(); - [Deprecated] - static void dumpHeapData(String filename); - [Throws] - static void startJsCpuProfiling(String filename); - static void stopJsCpuProfiling(); - [Throws] - static void dumpJsHeapData(String filename); - [Throws] - static void getServiceDump(number serviceid, number fd, sequence args); - [Throws] - static number getSystemCpuUsage(); - static sequence getAppThreadCpuUsage(); - static SystemMemInfo getSystemMemInfo(); - static NativeMemInfo getAppNativeMemInfo(); - static MemoryLimit getAppMemoryLimit(); - static VMMemoryInfo getAppVMMemoryInfo(); - [Throws] - static String startAppTraceCapture(sequence tags, TraceFlag flag, number limitSize); - [Throws] - static void stopAppTraceCapture(); - static GcStats getVMRuntimeStats(); - [Throws] - static number getVMRuntimeStat(String item); - [Throws] - static void setAppResourceLimit(String type, number value, boolean enableDebugLog); - static boolean isDebugState(); - [Throws] - static async number getGraphicsMemory(); - [Throws] - static number getGraphicsMemorySync(); - [Throws] - static async String dumpJsRawHeapData(optional boolean needGC); - + GcStats getVMRuntimeStats(); + [Throws] + number getVMRuntimeStat(String item); + [Throws] + void setAppResourceLimit(String type, i32 value, boolean enableDebugLog); + boolean isDebugState(); + [Throws] + async number getGraphicsMemory(); + [Throws] + number getGraphicsMemorySync(); + [Throws] + async String dumpJsRawHeapData(optional boolean needGC); + [Entity=Interface] + interface GwpAsanOptions { + [Optional] + attribute boolean alwaysEnabled; + [Optional] + attribute number sampleRate; + [Optional] + attribute number maxSimutaneousAllocations; + }; + [Throws] + void enableGwpAsanGrayscale(optional GwpAsanOptions options, optional number duration); + void disableGwpAsanGrayscale(); + number getGwpAsanGrayscaleState(); + dictionary JsRawHeapTrimLevel { + number TRIM_LEVEL_1 = 0; + number TRIM_LEVEL_2 = 1; }; - + void setJsRawHeapTrimLevel(JsRawHeapTrimLevel level); }; \ No newline at end of file diff --git a/idl/@ohos.hilog.idl b/idl/@ohos.hilog.idl index 9cb39ea..663a211 100644 --- a/idl/@ohos.hilog.idl +++ b/idl/@ohos.hilog.idl @@ -1,26 +1,24 @@ -package ohos; +package ohos.hilog; +[DefaultExport] namespace hilog { - + typedef ((Object or record or sequence) or undefined) RecordData; + void debug(number domain, String tag, String format, sequence... args); + void debug(number domain, String tag, String format, sequence... args); + void info(number domain, String tag, String format, sequence... args); + void info(number domain, String tag, String format, sequence... args); + void warn(number domain, String tag, String format, sequence... args); + void warn(number domain, String tag, String format, sequence... args); + void error(number domain, String tag, String format, sequence... args); + void error(number domain, String tag, String format, sequence... args); + void fatal(number domain, String tag, String format, sequence... args); + void fatal(number domain, String tag, String format, sequence... args); + boolean isLoggable(number domain, String tag, LogLevel level); + void setMinLogLevel(LogLevel level); dictionary LogLevel { - number DEBUG = 3; number INFO = 4; number WARN = 5; number ERROR = 6; number FATAL = 7; - }; - [GlobalScope] - interface GlobalScope_hilog_ohos_hilog { - - static void debug(number domain, String tag, String format, sequence... args); - static void info(number domain, String tag, String format, sequence... args); - static void warn(number domain, String tag, String format, sequence... args); - static void error(number domain, String tag, String format, sequence... args); - static void fatal(number domain, String tag, String format, sequence... args); - static boolean isLoggable(number domain, String tag, LogLevel level); - static void setMinLogLevel(LogLevel level); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.hiviewdfx.hiAppEvent.idl b/idl/@ohos.hiviewdfx.hiAppEvent.idl index e01ea64..7782ff7 100644 --- a/idl/@ohos.hiviewdfx.hiAppEvent.idl +++ b/idl/@ohos.hiviewdfx.hiAppEvent.idl @@ -1,96 +1,84 @@ -package ohos.hiviewdfx; +package ohos.hiviewdfx.hiAppEvent; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace hiAppEvent { - dictionary EventType { - number FAULT = 1; number STATISTIC = 2; number SECURITY = 3; number BEHAVIOR = 4; - }; namespace domain { - - }; namespace event { - - }; namespace param { - - }; + [Throws] + void configure(ConfigOption config); [Entity=Interface] interface ConfigOption { - [Optional] attribute boolean disable; [Optional] attribute String maxStorage; - }; [Entity=Interface] interface AppEventInfo { - attribute String domain; attribute String name; attribute EventType eventType; attribute Object params; - }; + [Throws] + async void write(AppEventInfo info); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void write(AppEventInfo info, AsyncCallback_Void callback_); typedef (number or String or boolean or sequence) ParamType; + [Throws] + async void setEventParam(record params, String domain, optional String name); + [Throws] + async void setEventConfig(String name, record config); [Entity=Interface] interface AppEventPackage { - attribute number packageId; attribute number row; attribute number size; attribute sequence data; attribute sequence appEventInfos; - }; [Entity=Class] interface AppEventPackageHolder { - constructor(String watcherName); [Throws] void setSize(number size); [Throws] void setRow(number size); AppEventPackage takeNext(); - }; [Entity=Interface] interface TriggerCondition { - [Optional] attribute number row; [Optional] attribute number size; [Optional] attribute number timeOut; - }; [Entity=Interface] interface AppEventFilter { - attribute String domain; [Optional] attribute sequence eventTypes; [Optional] attribute sequence names; - }; [Entity=Interface] interface AppEventGroup { - attribute String name; attribute sequence appEventInfos; - }; [Synthetic] callback Callback_Number_Number_AppEventPackageHolder_Void = void (number curRow, number curSize, AppEventPackageHolder holder); @@ -98,7 +86,6 @@ namespace hiAppEvent { callback Callback_String_Array_AppEventGroup_Void = void (String domain, sequence appEventGroups); [Entity=Interface] interface Watcher { - attribute String name; [Optional] attribute TriggerCondition triggerCondition; @@ -108,22 +95,31 @@ namespace hiAppEvent { attribute Callback_Number_Number_AppEventPackageHolder_Void onTrigger; [Optional] attribute Callback_String_Array_AppEventGroup_Void onReceive; - }; + [Throws] + AppEventPackageHolder addWatcher(Watcher watcher); + [Throws] + void removeWatcher(Watcher watcher); + void clearData(); + [Throws] + void setUserId(String name, String value); + [Throws] + String getUserId(String name); + [Throws] + void setUserProperty(String name, String value); + [Throws] + String getUserProperty(String name); [Entity=Interface] interface AppEventReportConfig { - [Optional] attribute String domain; [Optional] attribute String name; [Optional] attribute boolean isRealTime; - }; [Entity=Interface] interface Processor { - attribute String name; [Optional] attribute boolean debugMode; @@ -149,39 +145,13 @@ namespace hiAppEvent { attribute number configId; [Optional] attribute record customConfigs; - - }; - [GlobalScope] - interface GlobalScope_hiAppEvent_ohos_hiviewdfx_hiAppEvent { - - [Throws] - static void configure(ConfigOption config); - [Throws] - static async void write(AppEventInfo info); - [Throws] - static void write(AppEventInfo info, AsyncCallback_Void callback_); - [Throws] - static async void setEventParam(record params, String domain, optional String name); - [Throws] - static async void setEventConfig(String name, record config); - [Throws] - static AppEventPackageHolder addWatcher(Watcher watcher); - [Throws] - static void removeWatcher(Watcher watcher); - static void clearData(); - [Throws] - static void setUserId(String name, String value); - [Throws] - static String getUserId(String name); - [Throws] - static void setUserProperty(String name, String value); - [Throws] - static String getUserProperty(String name); - [Throws] - static number addProcessor(Processor processor); - [Throws] - static void removeProcessor(number id); - + [Optional] + attribute String configName; }; - + [Throws] + number addProcessor(Processor processor); + [Throws] + async number addProcessorFromConfig(String processorName, optional String configName); + [Throws] + void removeProcessor(number id); }; \ No newline at end of file diff --git a/idl/@ohos.hiviewdfx.jsLeakWatcher.idl b/idl/@ohos.hiviewdfx.jsLeakWatcher.idl index 72e0e9f..a3525c9 100644 --- a/idl/@ohos.hiviewdfx.jsLeakWatcher.idl +++ b/idl/@ohos.hiviewdfx.jsLeakWatcher.idl @@ -1,15 +1,13 @@ -package ohos.hiviewdfx; +package ohos.hiviewdfx.jsLeakWatcher; +[DefaultExport] namespace jsLeakWatcher { - - [GlobalScope] - interface GlobalScope_jsLeakWatcher_ohos_hiviewdfx_jsLeakWatcher { - - static void enable(boolean isEnable); - static void watch(Object obj, String msg); - static String check(); - [Throws] - static sequence dump(String filePath); - - }; - + void enable(boolean isEnable); + void watch(Object obj, String msg); + String check(); + [Throws] + sequence dump(String filePath); + [Synthetic] + callback Callback_Array_String_Void = void (sequence parameter); + [Throws] + void enableLeakWatcher(boolean isEnabled, sequence configs, Callback_Array_String_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.i18n.idl b/idl/@ohos.i18n.idl index 9003d5b..c5f4aff 100644 --- a/idl/@ohos.i18n.idl +++ b/idl/@ohos.i18n.idl @@ -1,10 +1,20 @@ -package ohos; +package ohos.i18n; import ohos.base.BusinessError as BusinessError; +import ohos.intl.default as intl; +[DefaultExport] namespace i18n { - + [Deprecated] + String getDisplayCountry(String country, String locale, optional boolean sentenceCase); + [Deprecated] + String getDisplayLanguage(String language, String locale, optional boolean sentenceCase); + [Deprecated] + String getSystemLanguage(); + [Deprecated] + String getSystemRegion(); + [Deprecated] + String getSystemLocale(); [Entity=Class] interface System { - [Throws] static String getDisplayCountry(String country, String locale, optional boolean sentenceCase); [Throws] @@ -20,8 +30,10 @@ namespace i18n { static String getSystemRegion(); [Throws] static void setSystemRegion(String region); + [Deprecated] static String getSystemLocale(); - [Throws] + static Intl.Locale getSystemLocaleInstance(); + [Deprecated, Throws] static void setSystemLocale(String locale); static boolean is24HourClock(); [Throws] @@ -48,10 +60,38 @@ namespace i18n { [Throws] static void setFirstDayOfWeek(WeekDay type); static WeekDay getFirstDayOfWeek(); - + [Throws] + static record getSystemCollations(); + [Throws] + static String getUsingCollation(); + [Throws] + static void setSystemCollation(String identifier); + [Throws] + static record getSystemMeasurements(); + [Throws] + static String getUsingMeasurement(); + [Throws] + static void setSystemMeasurement(String identifier); + [Throws] + static String getUsingNumberingSystem(); + [Throws] + static void setSystemNumberingSystem(String identifier); + [Throws] + static record getSystemNumberingSystems(); + [Throws] + static record getSystemNumberPatterns(); + [Throws] + static void setSystemNumberPattern(String pattern); + [Throws] + static String getUsingNumberPattern(); + [Throws] + static record getSystemNumericalDatePatterns(); + [Throws] + static void setSystemNumericalDatePattern(String identifier); + [Throws] + static String getUsingNumericalDatePattern(); }; dictionary WeekDay { - number MON = 1; number TUE = 2; number WED = 3; @@ -59,25 +99,19 @@ namespace i18n { number FRI = 5; number SAT = 6; number SUN = 7; - }; dictionary TemperatureType { - number CELSIUS = 1; number FAHRENHEIT = 2; number KELVIN = 3; - }; [Entity=Interface, Deprecated] interface Util { - [Deprecated] String unitConvert(UnitInfo fromUnit, UnitInfo toUnit, number value, String locale, optional String style); - }; [Entity=Class] interface I18NUtil { - static String unitConvert(UnitInfo fromUnit, UnitInfo toUnit, number value, String locale, optional String style); static String getDateOrder(String locale); [Throws] @@ -88,37 +122,32 @@ namespace i18n { static String getThreeLetterLanguage(String locale); [Throws] static String getThreeLetterRegion(String locale); - [Throws] + [Deprecated, Throws] static String getUnicodeWrappedFilePath(String path, optional String delimiter, optional intl.Locale locale); - + [Throws] + static String getUnicodeWrappedFilePath(String path, optional String delimiter, optional Intl.Locale locale); }; [Entity=Interface] interface UnitInfo { - attribute String unit; attribute String measureSystem; - }; [Entity=Interface] interface PhoneNumberFormatOptions { - [Optional] attribute String type; - }; [Entity=Class] interface PhoneNumberFormat { - constructor(String country, optional PhoneNumberFormatOptions options); - boolean isValidNumber(String number_); - String format(String number_); - String getLocationName(String number_, String locale); - + boolean isValidNumber(String phoneNumber); + String format(String phoneNumber); + String getLocationName(String phoneNumber, String locale); }; + Calendar getCalendar(String locale, optional String type); [Entity=Class] interface Calendar { - - void setTime(Date date); + void setTime(date date); void setTime(number time); void set(number year, number month, number date, optional number hour, optional number minute, optional number second); void setTimeZone(String timezone); @@ -129,17 +158,17 @@ namespace i18n { void setMinimalDaysInFirstWeek(number value); number get(String field); String getDisplayName(String locale); - boolean isWeekend(optional Date date); + boolean isWeekend(optional date date); [Throws] void add(String field, number amount); number getTimeInMillis(); [Throws] - number compareDays(Date date); - + number compareDays(date date); }; + boolean isRTL(String locale); + BreakIterator getLineInstance(String locale); [Entity=Class] interface BreakIterator { - number current(); number first(); number last(); @@ -149,56 +178,62 @@ namespace i18n { number following(number offset); String getLineBreakText(); boolean isBoundary(number offset); - }; + IndexUtil getInstance(optional String locale); [Entity=Class] interface IndexUtil { - sequence getIndexList(); void addLocale(String locale); String getIndex(String text); - }; [Entity=Class, Deprecated] interface Character { - [Deprecated] - boolean isDigit(String char); + boolean isDigit(String ch); [Deprecated] - boolean isSpaceChar(String char); + boolean isSpaceChar(String ch); [Deprecated] - boolean isWhitespace(String char); + boolean isWhitespace(String ch); [Deprecated] - boolean isRTL(String char); + boolean isRTL(String ch); [Deprecated] - boolean isIdeograph(String char); + boolean isIdeograph(String ch); [Deprecated] - boolean isLetter(String char); + boolean isLetter(String ch); [Deprecated] - boolean isLowerCase(String char); + boolean isLowerCase(String ch); [Deprecated] - boolean isUpperCase(String char); + boolean isUpperCase(String ch); [Deprecated] - String getType(String char); - + String getType(String ch); }; [Entity=Class] interface Unicode { - - static boolean isDigit(String char); - static boolean isSpaceChar(String char); - static boolean isWhitespace(String char); - static boolean isRTL(String char); - static boolean isIdeograph(String char); - static boolean isLetter(String char); - static boolean isLowerCase(String char); - static boolean isUpperCase(String char); - static String getType(String char); - - }; + static boolean isDigit(String ch); + static boolean isSpaceChar(String ch); + static boolean isWhitespace(String ch); + static boolean isRTL(String ch); + static boolean isIdeograph(String ch); + static boolean isLetter(String ch); + static boolean isLowerCase(String ch); + static boolean isUpperCase(String ch); + static String getType(String ch); + }; + [Deprecated] + boolean is24HourClock(); + [Deprecated] + boolean set24HourClock(boolean option); + [Deprecated] + boolean addPreferredLanguage(String language, optional number index); + [Deprecated] + boolean removePreferredLanguage(number index); + [Deprecated] + sequence getPreferredLanguageList(); + [Deprecated] + String getFirstPreferredLanguage(); + TimeZone getTimeZone(optional String zoneID); [Entity=Class] interface TimeZone { - String getID(); String getDisplayName(optional String locale, optional boolean isDST); number getRawOffset(); @@ -209,64 +244,61 @@ namespace i18n { static TimeZone getTimezoneFromCity(String cityID); [Throws] static sequence getTimezonesByLocation(number longitude, number latitude); - + ZoneRules getZoneRules(); + }; + [Entity=Class] + interface ZoneRules { + ZoneOffsetTransition nextTransition(optional number date); + }; + [Entity=Class] + interface ZoneOffsetTransition { + number getMilliseconds(); + number getOffsetAfter(); + number getOffsetBefore(); }; [Entity=Class] interface Transliterator { - static sequence getAvailableIDs(); static Transliterator getInstance(String id); String transform(String text); - }; dictionary NormalizerMode { - number NFC = 1; number NFD = 2; number NFKC = 3; number NFKD = 4; - }; [Entity=Class] interface Normalizer { - [Throws] static Normalizer getInstance(NormalizerMode mode); [Throws] String normalize(String text); - }; dictionary SuggestionType { - number SUGGESTION_TYPE_NONE = 0; number SUGGESTION_TYPE_RELATED = 1; number SUGGESTION_TYPE_SIM = 2; - }; [Entity=Interface] interface SortOptions { - [Optional] attribute String locale; [Optional] attribute boolean isUseLocalName; [Optional] attribute boolean isSuggestedFirst; - }; [Entity=Interface] interface LocaleItem { - attribute String id; attribute SuggestionType suggestionType; attribute String displayName; [Optional] attribute String localName; - }; [Entity=Interface] interface TimeZoneCityItem { - attribute String zoneId; attribute String cityId; attribute String cityDisplayName; @@ -274,11 +306,9 @@ namespace i18n { attribute String zoneDisplayName; [Optional] attribute number rawOffset; - }; [Entity=Class] interface SystemLocaleManager { - constructor(); [Throws] sequence getLanguageInfoArray(sequence languages, optional SortOptions options); @@ -286,77 +316,70 @@ namespace i18n { sequence getRegionInfoArray(sequence regions, optional SortOptions options); [Throws] static sequence getTimeZoneCityItemArray(); - }; [Entity=Interface] interface HolidayInfoItem { - attribute String baseName; attribute number year; attribute number month; attribute number day; [Optional] attribute sequence localNames; - }; [Entity=Interface] interface HolidayLocalName { - attribute String language; attribute String name; - }; [Entity=Class] interface HolidayManager { - constructor(String icsPath); [Throws] - boolean isHoliday(optional Date date); + boolean isHoliday(optional date date); [Throws] sequence getHolidayInfoItemArray(optional number year); - }; [Entity=Interface] interface EntityInfoItem { - attribute number begin; attribute number end; attribute String type; - }; [Entity=Class] interface EntityRecognizer { - constructor(optional String locale); [Throws] sequence findEntityInfo(String text); - }; + [Deprecated, Throws] + SimpleDateTimeFormat getSimpleDateTimeFormatByPattern(String pattern, optional intl.Locale locale); + [Throws] + SimpleDateTimeFormat getSimpleDateTimeFormatByPattern(String pattern, optional Intl.Locale locale); + [Deprecated, Throws] + SimpleDateTimeFormat getSimpleDateTimeFormatBySkeleton(String skeleton, optional intl.Locale locale); + [Throws] + SimpleDateTimeFormat getSimpleDateTimeFormatBySkeleton(String skeleton, optional Intl.Locale locale); [Entity=Class] interface SimpleDateTimeFormat { - - [Throws] - String format(Date date); - + String format(date date); }; + [Deprecated, Throws] + SimpleNumberFormat getSimpleNumberFormatBySkeleton(String skeleton, optional intl.Locale locale); + [Throws] + SimpleNumberFormat getSimpleNumberFormatBySkeleton(String skeleton, optional Intl.Locale locale); [Entity=Class] interface SimpleNumberFormat { - - [Throws] String format(number value); - }; [Entity=Class] interface StyledNumberFormat { - + [Deprecated] constructor((intl.NumberFormat or SimpleNumberFormat) numberFormat, optional StyledNumberFormatOptions options); - [Throws] + constructor((Intl.NumberFormat or SimpleNumberFormat) numberFormat, optional StyledNumberFormatOptions options); StyledString format(number value); - }; [Entity=Interface] interface StyledNumberFormatOptions { - [Optional] attribute TextStyle integer; [Optional] @@ -365,45 +388,5 @@ namespace i18n { attribute TextStyle fraction; [Optional] attribute TextStyle unit; - - }; - [GlobalScope] - interface GlobalScope_i18n_ohos_i18n { - - [Deprecated] - static String getDisplayCountry(String country, String locale, optional boolean sentenceCase); - [Deprecated] - static String getDisplayLanguage(String language, String locale, optional boolean sentenceCase); - [Deprecated] - static String getSystemLanguage(); - [Deprecated] - static String getSystemRegion(); - [Deprecated] - static String getSystemLocale(); - static Calendar getCalendar(String locale, optional String type); - static boolean isRTL(String locale); - static BreakIterator getLineInstance(String locale); - static IndexUtil getInstance(optional String locale); - [Deprecated] - static boolean is24HourClock(); - [Deprecated] - static boolean set24HourClock(boolean option); - [Deprecated] - static boolean addPreferredLanguage(String language, optional number index); - [Deprecated] - static boolean removePreferredLanguage(number index); - [Deprecated] - static sequence getPreferredLanguageList(); - [Deprecated] - static String getFirstPreferredLanguage(); - static TimeZone getTimeZone(optional String zoneID); - [Throws] - static SimpleDateTimeFormat getSimpleDateTimeFormatByPattern(String pattern, optional intl.Locale locale); - [Throws] - static SimpleDateTimeFormat getSimpleDateTimeFormatBySkeleton(String skeleton, optional intl.Locale locale); - [Throws] - static SimpleNumberFormat getSimpleNumberFormatBySkeleton(String skeleton, optional intl.Locale locale); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.identifier.oaid.idl b/idl/@ohos.identifier.oaid.idl index c765606..f917181 100644 --- a/idl/@ohos.identifier.oaid.idl +++ b/idl/@ohos.identifier.oaid.idl @@ -1,19 +1,13 @@ package ohos.identifier.oaid; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace identifier { - [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_identifier_ohos_identifier_oaid { - - [Throws] - static void getOAID(AsyncCallback_String_Void callback_); - [Throws] - static async String getOAID(); - [Throws] - static void resetOAID(); - - }; - + [Throws] + void getOAID(AsyncCallback_String_Void callback_); + [Throws] + async String getOAID(); + [Throws] + void resetOAID(); }; \ No newline at end of file diff --git a/idl/@ohos.inputMethod.Panel.idl b/idl/@ohos.inputMethod.Panel.idl index 5e0a106..2ea15d8 100644 --- a/idl/@ohos.inputMethod.Panel.idl +++ b/idl/@ohos.inputMethod.Panel.idl @@ -1,22 +1,16 @@ package ohos.inputMethod.Panel; [Entity=Interface] interface PanelInfo { - attribute PanelType type; [Optional] attribute PanelFlag flag; - }; dictionary PanelFlag { - number FLAG_FIXED = 0; number FLAG_FLOATING = 1; number FLAG_CANDIDATE = 2; - }; dictionary PanelType { - number SOFT_KEYBOARD = 0; number STATUS_BAR = 1; - }; \ No newline at end of file diff --git a/idl/@ohos.inputMethod.idl b/idl/@ohos.inputMethod.idl index ea78b42..5373e89 100644 --- a/idl/@ohos.inputMethod.idl +++ b/idl/@ohos.inputMethod.idl @@ -1,13 +1,42 @@ -package ohos; +package ohos.inputMethod; import ohos.base.Callback as Callback; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.ElementName as ElementName; -import ohos.InputMethodSubtype as InputMethodSubtype; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.InputMethodSubtype.default as InputMethodSubtype; import ohos.inputMethod.Panel.PanelInfo as PanelInfo; +[DefaultExport] namespace inputMethod { - + [Deprecated] + InputMethodSetting getInputMethodSetting(); + [Deprecated] + InputMethodController getInputMethodController(); + [Throws] + InputMethodSetting getSetting(); + [Throws] + InputMethodController getController(); + [Throws] + InputMethodProperty getDefaultInputMethod(); + [Throws] + ElementName getSystemInputMethodConfigAbility(); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void switchInputMethod(InputMethodProperty target, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean switchInputMethod(InputMethodProperty target); + InputMethodProperty getCurrentInputMethod(); + [Throws] + void switchCurrentInputMethodSubtype(InputMethodSubtype target, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean switchCurrentInputMethodSubtype(InputMethodSubtype target); + InputMethodSubtype getCurrentInputMethodSubtype(); + [Throws] + void switchCurrentInputMethodAndSubtype(InputMethodProperty inputMethodProperty, InputMethodSubtype inputMethodSubtype, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean switchCurrentInputMethodAndSubtype(InputMethodProperty inputMethodProperty, InputMethodSubtype inputMethodSubtype); + [Throws] + async void switchInputMethod(String bundleName, optional String subtypeId); + void setSimpleKeyboardEnabled(boolean enable); [Synthetic] callback Callback_InputMethodProperty_InputMethodSubtype_Void = void (InputMethodProperty inputMethodProperty, InputMethodSubtype inputMethodSubtype); [Synthetic] @@ -20,17 +49,16 @@ namespace inputMethod { callback AsyncCallback_Void = void (); [Entity=Interface] interface InputMethodSetting { - [DtsName="on", DtsTag="'imeChange'"] void onImeChange(Callback_InputMethodProperty_InputMethodSubtype_Void callback_); - [DtsName="off", DtsTag="'imeChange'"] - void offImeChange(optional Callback_InputMethodProperty_InputMethodSubtype_Void callback_); [Throws, DtsName="on", DtsTag="'imeShow'"] void onImeShow(Callback_Array_InputWindowInfo_Void callback_); - [DtsName="off", DtsTag="'imeShow'"] - void offImeShow(optional Callback_Array_InputWindowInfo_Void callback_); [Throws, DtsName="on", DtsTag="'imeHide'"] void onImeHide(Callback_Array_InputWindowInfo_Void callback_); + [DtsName="off", DtsTag="'imeChange'"] + void offImeChange(optional Callback_InputMethodProperty_InputMethodSubtype_Void callback_); + [DtsName="off", DtsTag="'imeShow'"] + void offImeShow(optional Callback_Array_InputWindowInfo_Void callback_); [DtsName="off", DtsTag="'imeHide'"] void offImeHide(optional Callback_Array_InputWindowInfo_Void callback_); [Throws] @@ -59,9 +87,9 @@ namespace inputMethod { void listInputMethod(AsyncCallback_Array_InputMethodProperty_Void callback_); [Deprecated] async sequence listInputMethod(); - [Throws] + [Deprecated, Throws] void showOptionalInputMethods(AsyncCallback_Boolean_Void callback_); - [Throws] + [Deprecated, Throws] async boolean showOptionalInputMethods(); [Deprecated] void displayOptionalInputMethod(AsyncCallback_Void callback_); @@ -69,7 +97,8 @@ namespace inputMethod { async void displayOptionalInputMethod(); [Throws] async EnabledState getInputMethodState(); - + [Throws] + async void enableInputMethod(String bundleName, String extensionName, EnabledState enabledState); }; [Synthetic] callback Callback_Range_Void = void (Range parameter); @@ -91,9 +120,10 @@ namespace inputMethod { callback Callback_Number_String = String (number length); [Synthetic] callback Callback_Number = number (); + [Synthetic] + callback Callback_Void = void (); [Entity=Interface] interface InputMethodController { - [Throws] void attach(boolean showKeyboard, TextConfig textConfig, AsyncCallback_Void callback_); [Throws] @@ -101,6 +131,8 @@ namespace inputMethod { [Throws] async void attach(boolean showKeyboard, TextConfig textConfig, RequestKeyboardReason requestKeyboardReason); [Throws] + async void discardTypingText(); + [Throws] void showTextInput(AsyncCallback_Void callback_); [Throws] async void showTextInput(); @@ -152,57 +184,63 @@ namespace inputMethod { void recvMessage(optional MessageHandler msgHandler); [Throws, DtsName="on", DtsTag="'selectByRange'"] void onSelectByRange(Callback_Range_Void callback_); - [DtsName="off", DtsTag="'selectByRange'"] - void offSelectByRange(optional Callback_Range_Void callback_); [Throws, DtsName="on", DtsTag="'selectByMovement'"] void onSelectByMovement(Callback_Movement_Void callback_); - [DtsName="off", DtsTag="'selectByMovement'"] - void offSelectByMovement(optional Callback_Movement_Void callback_); [Throws, DtsName="on", DtsTag="'insertText'"] void onInsertText(Callback_String_Void callback_); - [DtsName="off", DtsTag="'insertText'"] - void offInsertText(optional Callback_String_Void callback_); [Throws, DtsName="on", DtsTag="'deleteLeft'"] void onDeleteLeft(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'deleteLeft'"] - void offDeleteLeft(optional Callback_Number_Void callback_); [Throws, DtsName="on", DtsTag="'deleteRight'"] void onDeleteRight(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'deleteRight'"] - void offDeleteRight(optional Callback_Number_Void callback_); [Throws, DtsName="on", DtsTag="'sendKeyboardStatus'"] void onSendKeyboardStatus(Callback_KeyboardStatus_Void callback_); - [DtsName="off", DtsTag="'sendKeyboardStatus'"] - void offSendKeyboardStatus(optional Callback_KeyboardStatus_Void callback_); [Throws, DtsName="on", DtsTag="'sendFunctionKey'"] void onSendFunctionKey(Callback_FunctionKey_Void callback_); - [DtsName="off", DtsTag="'sendFunctionKey'"] - void offSendFunctionKey(optional Callback_FunctionKey_Void callback_); [Throws, DtsName="on", DtsTag="'moveCursor'"] void onMoveCursor(Callback_Direction_Void callback_); - [DtsName="off", DtsTag="'moveCursor'"] - void offMoveCursor(optional Callback_Direction_Void callback_); [Throws, DtsName="on", DtsTag="'handleExtendAction'"] void onHandleExtendAction(Callback_ExtendAction_Void callback_); - [DtsName="off", DtsTag="'handleExtendAction'"] - void offHandleExtendAction(optional Callback_ExtendAction_Void callback_); [Throws, DtsName="on", DtsTag="'getLeftTextOfCursor'"] void onGetLeftTextOfCursor(Callback_Number_String callback_); - [DtsName="off", DtsTag="'getLeftTextOfCursor'"] - void offGetLeftTextOfCursor(optional Callback_Number_String callback_); [Throws, DtsName="on", DtsTag="'getRightTextOfCursor'"] void onGetRightTextOfCursor(Callback_Number_String callback_); - [DtsName="off", DtsTag="'getRightTextOfCursor'"] - void offGetRightTextOfCursor(optional Callback_Number_String callback_); [Throws, DtsName="on", DtsTag="'getTextIndexAtCursor'"] void onGetTextIndexAtCursor(Callback_Number callback_); + [Throws, DtsName="on", DtsTag="'setPreviewText'"] + void onSetPreviewText(SetPreviewTextCallback callback_); + [Throws, DtsName="on", DtsTag="'finishTextPreview'"] + void onFinishTextPreview(Callback_Void callback_); + [DtsName="off", DtsTag="'selectByRange'"] + void offSelectByRange(optional Callback_Range_Void callback_); + [DtsName="off", DtsTag="'selectByMovement'"] + void offSelectByMovement(optional Callback_Movement_Void callback_); + [DtsName="off", DtsTag="'insertText'"] + void offInsertText(optional Callback_String_Void callback_); + [DtsName="off", DtsTag="'deleteLeft'"] + void offDeleteLeft(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'deleteRight'"] + void offDeleteRight(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'sendKeyboardStatus'"] + void offSendKeyboardStatus(optional Callback_KeyboardStatus_Void callback_); + [DtsName="off", DtsTag="'sendFunctionKey'"] + void offSendFunctionKey(optional Callback_FunctionKey_Void callback_); + [DtsName="off", DtsTag="'moveCursor'"] + void offMoveCursor(optional Callback_Direction_Void callback_); + [DtsName="off", DtsTag="'handleExtendAction'"] + void offHandleExtendAction(optional Callback_ExtendAction_Void callback_); + [DtsName="off", DtsTag="'getLeftTextOfCursor'"] + void offGetLeftTextOfCursor(optional Callback_Number_String callback_); + [DtsName="off", DtsTag="'getRightTextOfCursor'"] + void offGetRightTextOfCursor(optional Callback_Number_String callback_); [DtsName="off", DtsTag="'getTextIndexAtCursor'"] void offGetTextIndexAtCursor(optional Callback_Number callback_); - + [DtsName="off", DtsTag="'setPreviewText'"] + void offSetPreviewText(optional SetPreviewTextCallback callback_); + [DtsName="off", DtsTag="'finishTextPreview'"] + void offFinishTextPreview(optional Callback_Void callback_); }; [Entity=Interface] interface InputMethodProperty { - [Deprecated] readonly attribute String packageName; [Deprecated] @@ -218,32 +256,26 @@ namespace inputMethod { [Optional] readonly attribute number iconId; [Optional] + readonly attribute EnabledState enabledState; + [Optional] attribute Object extra; - }; dictionary Direction { - number CURSOR_UP = 1; number CURSOR_DOWN = 2; number CURSOR_LEFT = 3; number CURSOR_RIGHT = 4; - }; [Entity=Interface] interface Range { - attribute number start; attribute number end; - }; [Entity=Interface] interface Movement { - attribute Direction direction; - }; dictionary TextInputType { - number NONE = -1; number TEXT = 0; number MULTILINE = 1; @@ -254,10 +286,13 @@ namespace inputMethod { number URL = 6; number VISIBLE_PASSWORD = 7; number NUMBER_PASSWORD = 8; - + number SCREEN_LOCK_PASSWORD = 9; + number USER_NAME = 10; + number NEW_PASSWORD = 11; + number NUMBER_DECIMAL = 12; + number ONE_TIME_CODE = 13; }; dictionary EnterKeyType { - number UNSPECIFIED = 0; number NONE = 1; number GO = 2; @@ -267,40 +302,34 @@ namespace inputMethod { number DONE = 6; number PREVIOUS = 7; number NEWLINE = 8; - }; dictionary KeyboardStatus { - number NONE = 0; number HIDE = 1; number SHOW = 2; - }; [Entity=Interface] interface InputAttribute { - attribute TextInputType textInputType; attribute EnterKeyType enterKeyType; - + [Optional] + attribute String placeholder; + [Optional] + attribute String abilityName; }; [Entity=Interface] interface FunctionKey { - attribute EnterKeyType enterKeyType; - }; [Entity=Interface] interface CursorInfo { - attribute number left; attribute number top; attribute number width; attribute number height; - }; [Entity=Interface] interface TextConfig { - attribute InputAttribute inputAttribute; [Optional] attribute CursorInfo cursorInfo; @@ -308,80 +337,46 @@ namespace inputMethod { attribute Range selection; [Optional] attribute number windowId; - + [Optional] + attribute boolean newEditBox; + [Optional] + attribute CapitalizeMode capitalizeMode; }; dictionary ExtendAction { - number SELECT_ALL = 0; number CUT = 3; number COPY = 4; number PASTE = 5; - }; [Entity=Interface] interface InputWindowInfo { - attribute String name; attribute number left; attribute number top; attribute number width; attribute number height; - }; [Entity=Interface] interface MessageHandler { - void onMessage(String msgId, optional buffer msgParam); void onTerminated(); - }; dictionary EnabledState { - number DISABLED = 0; number BASIC_MODE = 1; number FULL_EXPERIENCE_MODE = 2; - }; dictionary RequestKeyboardReason { - number NONE = 0; number MOUSE = 1; number TOUCH = 2; number OTHER = 20; - }; - [GlobalScope] - interface GlobalScope_inputMethod_ohos_inputMethod { - - [Deprecated] - static InputMethodSetting getInputMethodSetting(); - [Deprecated] - static InputMethodController getInputMethodController(); - [Throws] - static InputMethodSetting getSetting(); - [Throws] - static InputMethodController getController(); - [Throws] - static InputMethodProperty getDefaultInputMethod(); - [Throws] - static ElementName getSystemInputMethodConfigAbility(); - [Throws] - static void switchInputMethod(InputMethodProperty target, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean switchInputMethod(InputMethodProperty target); - static InputMethodProperty getCurrentInputMethod(); - [Throws] - static void switchCurrentInputMethodSubtype(InputMethodSubtype target, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean switchCurrentInputMethodSubtype(InputMethodSubtype target); - static InputMethodSubtype getCurrentInputMethodSubtype(); - [Throws] - static void switchCurrentInputMethodAndSubtype(InputMethodProperty inputMethodProperty, InputMethodSubtype inputMethodSubtype, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean switchCurrentInputMethodAndSubtype(InputMethodProperty inputMethodProperty, InputMethodSubtype inputMethodSubtype); - [Throws] - static async void switchInputMethod(String bundleName, optional String subtypeId); - + callback SetPreviewTextCallback = void (String text, Range range); + dictionary CapitalizeMode { + number NONE = 0; + number SENTENCES = 1; + number WORDS = 2; + number CHARACTERS = 3; }; - }; \ No newline at end of file diff --git a/idl/@ohos.inputMethodEngine.idl b/idl/@ohos.inputMethodEngine.idl index 9bca4b6..0437467 100644 --- a/idl/@ohos.inputMethodEngine.idl +++ b/idl/@ohos.inputMethodEngine.idl @@ -1,19 +1,29 @@ -package ohos; +package ohos.inputMethodEngine; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; import ohos.multimodalInput.keyEvent.KeyEvent as InputKeyEvent; -import ohos.InputMethodSubtype as InputMethodSubtype; -import application.BaseContext as BaseContext; -import ohos.window as window; +import ohos.InputMethodSubtype.default as InputMethodSubtype; +import application.BaseContext.default as BaseContext; +import ohos.window.default as window; +[DefaultExport] namespace inputMethodEngine { - + const number PATTERN_USER_NAME = 10; + const number PATTERN_NEW_PASSWORD = 11; + const number PATTERN_NUMBER_DECIMAL = 12; + const number PATTERN_ONE_TIME_CODE = 13; + InputMethodAbility getInputMethodAbility(); + [Deprecated] + InputMethodEngine getInputMethodEngine(); + KeyboardDelegate getKeyboardDelegate(); + [Deprecated] + KeyboardDelegate createKeyboardDelegate(); typedef (number or String or boolean) CommandDataType; callback SizeUpdateCallback = void (window.Size size, KeyboardArea keyboardArea); + callback SizeChangeCallback = void (window.Size size, optional KeyboardArea keyboardArea); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface KeyboardController { - [Throws] void hide(AsyncCallback_Void callback_); [Throws] @@ -26,7 +36,6 @@ namespace inputMethodEngine { void exitCurrentInputType(AsyncCallback_Void callback_); [Throws] async void exitCurrentInputType(); - }; [Synthetic] callback Callback_KeyboardController_TextInputClient_Void = void (KeyboardController kbController, TextInputClient textInputClient); @@ -34,14 +43,12 @@ namespace inputMethodEngine { callback Callback_Void = void (); [Entity=Interface] interface InputMethodEngine { - [DtsName="on", DtsTag="'inputStart'"] void onInputStart(Callback_KeyboardController_TextInputClient_Void callback_); + void on(String type, Callback_Void callback_); [DtsName="off", DtsTag="'inputStart'"] void offInputStart(optional Callback_KeyboardController_TextInputClient_Void callback_); - void on(String type, Callback_Void callback_); void off(String type, optional Callback_Void callback_); - }; [Synthetic] callback Callback_KeyboardController_InputClient_Void = void (KeyboardController kbController, InputClient inputClient); @@ -57,33 +64,40 @@ namespace inputMethodEngine { callback AsyncCallback_Panel_Void = void (Panel result); [Entity=Interface] interface InputMethodAbility { - [DtsName="on", DtsTag="'inputStart'"] void onInputStart(Callback_KeyboardController_InputClient_Void callback_); - [DtsName="off", DtsTag="'inputStart'"] - void offInputStart(optional Callback_KeyboardController_InputClient_Void callback_); [DtsName="on", DtsTag="'inputStop'"] void onInputStop(Callback_Void callback_); - [DtsName="off", DtsTag="'inputStop'"] - void offInputStop(Callback_Void callback_); [DtsName="on", DtsTag="'setCallingWindow'"] void onSetCallingWindow(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'setCallingWindow'"] - void offSetCallingWindow(Callback_Number_Void callback_); void on(String type, Callback_Void callback_); - void off(String type, optional Callback_Void callback_); [DtsName="on", DtsTag="'setSubtype'"] void onSetSubtype(Callback_InputMethodSubtype_Void callback_); - [DtsName="off", DtsTag="'setSubtype'"] - void offSetSubtype(optional Callback_InputMethodSubtype_Void callback_); [DtsName="on", DtsTag="'securityModeChange'"] void onSecurityModeChange(Callback_SecurityMode_Void callback_); - [DtsName="off", DtsTag="'securityModeChange'"] - void offSecurityModeChange(optional Callback_SecurityMode_Void callback_); [Throws, DtsName="on", DtsTag="'privateCommand'"] void onPrivateCommand(Callback_Map_String_CommandDataType_Void callback_); + [Throws, DtsName="on", DtsTag="'callingDisplayDidChange'"] + void onCallingDisplayDidChange(Callback_Number_Void callback_); + [DtsName="on", DtsTag="'discardTypingText'"] + void onDiscardTypingText(Callback_Void callback_); + [DtsName="off", DtsTag="'inputStart'"] + void offInputStart(optional Callback_KeyboardController_InputClient_Void callback_); + [DtsName="off", DtsTag="'inputStop'"] + void offInputStop(Callback_Void callback_); + [DtsName="off", DtsTag="'setCallingWindow'"] + void offSetCallingWindow(Callback_Number_Void callback_); + void off(String type, optional Callback_Void callback_); + [DtsName="off", DtsTag="'setSubtype'"] + void offSetSubtype(optional Callback_InputMethodSubtype_Void callback_); + [DtsName="off", DtsTag="'securityModeChange'"] + void offSecurityModeChange(optional Callback_SecurityMode_Void callback_); [Throws, DtsName="off", DtsTag="'privateCommand'"] void offPrivateCommand(optional Callback_Map_String_CommandDataType_Void callback_); + [DtsName="off", DtsTag="'callingDisplayDidChange'"] + void offCallingDisplayDidChange(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'discardTypingText'"] + void offDiscardTypingText(optional Callback_Void callback_); [Throws] SecurityMode getSecurityMode(); [Throws] @@ -94,7 +108,6 @@ namespace inputMethodEngine { void destroyPanel(Panel panel, AsyncCallback_Void callback_); [Throws] async void destroyPanel(Panel panel); - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); @@ -104,7 +117,6 @@ namespace inputMethodEngine { callback AsyncCallback_EditorAttribute_Void = void (EditorAttribute result); [Entity=Interface, Deprecated] interface TextInputClient { - [Deprecated] void sendKeyFunction(number action, AsyncCallback_Boolean_Void callback_); [Deprecated] @@ -133,13 +145,13 @@ namespace inputMethodEngine { void getEditorAttribute(AsyncCallback_EditorAttribute_Void callback_); [Deprecated] async EditorAttribute getEditorAttribute(); - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Synthetic] + callback Callback_AttachOptions_Void = void (AttachOptions parameter); [Entity=Interface] interface InputClient { - [Throws] void sendKeyFunction(number action, AsyncCallback_Boolean_Void callback_); [Throws] @@ -224,7 +236,12 @@ namespace inputMethodEngine { async void sendMessage(String msgId, optional buffer msgParam); [Throws] void recvMessage(optional MessageHandler msgHandler); - + [Throws] + AttachOptions getAttachOptions(); + [Throws, DtsName="on", DtsTag="'attachOptionsDidChange'"] + void onAttachOptionsDidChange(Callback_AttachOptions_Void callback_); + [DtsName="off", DtsTag="'attachOptionsDidChange'"] + void offAttachOptionsDidChange(optional Callback_AttachOptions_Void callback_); }; [Synthetic] callback Callback_KeyEvent_Boolean = boolean (KeyEvent event); @@ -240,44 +257,58 @@ namespace inputMethodEngine { callback Callback_EditorAttribute_Void = void (EditorAttribute attr); [Entity=Interface] interface KeyboardDelegate { - void on(String type, Callback_KeyEvent_Boolean callback_); - void off(String type, optional Callback_KeyEvent_Boolean callback_); [DtsName="on", DtsTag="'keyEvent'"] void onKeyEvent(Callback_InputKeyEvent_Boolean callback_); - [DtsName="off", DtsTag="'keyEvent'"] - void offKeyEvent(optional Callback_InputKeyEvent_Boolean callback_); [DtsName="on", DtsTag="'cursorContextChange'"] void onCursorContextChange(Callback_Number_Number_Number_Void callback_); - [DtsName="off", DtsTag="'cursorContextChange'"] - void offCursorContextChange(optional Callback_Number_Number_Number_Void callback_); [DtsName="on", DtsTag="'selectionChange'"] void onSelectionChange(Callback_Number_Number_Number_Number_Void callback_); - [DtsName="off", DtsTag="'selectionChange'"] - void offSelectionChange(optional Callback_Number_Number_Number_Number_Void callback_); [DtsName="on", DtsTag="'textChange'"] void onTextChange(Callback_String_Void callback_); - [DtsName="off", DtsTag="'textChange'"] - void offTextChange(optional Callback_String_Void callback_); [DtsName="on", DtsTag="'editorAttributeChanged'"] void onEditorAttributeChanged(Callback_EditorAttribute_Void callback_); + void off(String type, optional Callback_KeyEvent_Boolean callback_); + [DtsName="off", DtsTag="'keyEvent'"] + void offKeyEvent(optional Callback_InputKeyEvent_Boolean callback_); + [DtsName="off", DtsTag="'cursorContextChange'"] + void offCursorContextChange(optional Callback_Number_Number_Number_Void callback_); + [DtsName="off", DtsTag="'selectionChange'"] + void offSelectionChange(optional Callback_Number_Number_Number_Number_Void callback_); + [DtsName="off", DtsTag="'textChange'"] + void offTextChange(optional Callback_String_Void callback_); [DtsName="off", DtsTag="'editorAttributeChanged'"] void offEditorAttributeChanged(optional Callback_EditorAttribute_Void callback_); - }; dictionary ImmersiveMode { - number NONE_IMMERSIVE = 0; number IMMERSIVE = 1; number LIGHT_IMMERSIVE = 2; number DARK_IMMERSIVE = 3; - }; - [Synthetic] - callback Callback_window_Size_Void = void (window.Size parameter); + dictionary GradientMode { + number NONE = 0; + number LINEAR_GRADIENT = 1; + }; + dictionary FluidLightMode { + number NONE = 0; + number BACKGROUND_FLUID_LIGHT = 1; + }; + [Entity=Interface] + interface ImmersiveEffect { + attribute number gradientHeight; + attribute GradientMode gradientMode; + [Optional] + attribute FluidLightMode fluidLightMode; + }; + dictionary RequestKeyboardReason { + number NONE = 0; + number MOUSE = 1; + number TOUCH = 2; + number OTHER = 20; + }; [Entity=Interface] interface Panel { - [Throws] void setUiContent(String path, AsyncCallback_Void callback_); [Throws] @@ -304,12 +335,20 @@ namespace inputMethodEngine { async void hide(); [DtsName="on", DtsTag="'show'"] void onShow(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'show'"] - void offShow(optional Callback_Void callback_); [DtsName="on", DtsTag="'hide'"] void onHide(Callback_Void callback_); + [DtsName="on", DtsTag="'sizeChange'"] + void onSizeChange(SizeChangeCallback callback_); + [DtsName="on", DtsTag="'sizeUpdate'"] + void onSizeUpdate(SizeUpdateCallback callback_); + [Throws, DtsName="off", DtsTag="'show'"] + void offShow(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'hide'"] void offHide(optional Callback_Void callback_); + [DtsName="off", DtsTag="'sizeChange'"] + void offSizeChange(optional SizeChangeCallback callback_); + [DtsName="off", DtsTag="'sizeUpdate'"] + void offSizeUpdate(optional SizeUpdateCallback callback_); [Throws] void changeFlag(PanelFlag flag); [Throws] @@ -320,22 +359,16 @@ namespace inputMethodEngine { void adjustPanelRect(PanelFlag flag, EnhancedPanelRect rect); [Throws] void updateRegion(sequence inputRegion); - [DtsName="on", DtsTag="'sizeChange'"] - void onSizeChange(Callback_window_Size_Void callback_); - [DtsName="off", DtsTag="'sizeChange'"] - void offSizeChange(optional Callback_window_Size_Void callback_); - [Throws, DtsName="on", DtsTag="'sizeUpdate'"] - void onSizeUpdate(SizeUpdateCallback callback_); - [DtsName="off", DtsTag="'sizeUpdate'"] - void offSizeUpdate(optional SizeUpdateCallback callback_); [Throws] void setImmersiveMode(ImmersiveMode mode); ImmersiveMode getImmersiveMode(); - + [Throws] + void setImmersiveEffect(ImmersiveEffect effect); + [Throws] + async void setKeepScreenOn(boolean isKeepScreenOn); }; [Entity=Interface] interface EditorAttribute { - readonly attribute number inputPattern; readonly attribute number enterKeyType; attribute boolean isTextPreviewSupported; @@ -343,95 +376,83 @@ namespace inputMethodEngine { readonly attribute String bundleName; [Optional] readonly attribute ImmersiveMode immersiveMode; - + [Optional] + readonly attribute number windowId; + [Optional] + readonly attribute number displayId; + [Optional] + readonly attribute String placeholder; + [Optional] + readonly attribute String abilityName; + [Optional] + readonly attribute CapitalizeMode capitalizeMode; + [Optional] + readonly attribute GradientMode gradientMode; + [Optional] + readonly attribute FluidLightMode fluidLightMode; }; [Entity=Interface] interface KeyEvent { - readonly attribute number keyCode; readonly attribute number keyAction; - }; dictionary PanelFlag { - number FLG_FIXED = 0; number FLG_FLOATING = 1; number FLAG_CANDIDATE = 2; - }; dictionary PanelType { - number SOFT_KEYBOARD = 0; number STATUS_BAR = 1; - }; [Entity=Interface] interface PanelInfo { - attribute PanelType type; [Optional] attribute PanelFlag flag; - }; dictionary Direction { - number CURSOR_UP = 1; number CURSOR_DOWN = 2; number CURSOR_LEFT = 3; number CURSOR_RIGHT = 4; - }; dictionary SecurityMode { - number BASIC = 0; number FULL = 1; - }; [Entity=Interface] interface Range { - attribute number start; attribute number end; - }; [Entity=Interface] interface Movement { - attribute Direction direction; - }; dictionary ExtendAction { - number SELECT_ALL = 0; number CUT = 3; number COPY = 4; number PASTE = 5; - }; [Entity=Interface] interface WindowInfo { - attribute window.Rect rect; attribute window.WindowStatusType status; - }; [Entity=Interface] interface PanelRect { - attribute window.Rect landscapeRect; attribute window.Rect portraitRect; - }; [Entity=Interface] interface MessageHandler { - void onMessage(String msgId, optional buffer msgParam); void onTerminated(); - }; [Entity=Interface] interface EnhancedPanelRect { - [Optional] attribute window.Rect landscapeRect; [Optional] @@ -446,27 +467,25 @@ namespace inputMethodEngine { attribute sequence portraitInputRegion; [Optional] attribute boolean fullScreenMode; - }; [Entity=Interface] interface KeyboardArea { - attribute number top; attribute number bottom; attribute number left; attribute number right; - }; - [GlobalScope] - interface GlobalScope_inputMethodEngine_ohos_inputMethodEngine { - - static InputMethodAbility getInputMethodAbility(); - [Deprecated] - static InputMethodEngine getInputMethodEngine(); - static KeyboardDelegate getKeyboardDelegate(); - [Deprecated] - static KeyboardDelegate createKeyboardDelegate(); - + [Entity=Interface] + interface AttachOptions { + [Optional] + attribute RequestKeyboardReason requestKeyboardReason; + [Optional] + attribute boolean isSimpleKeyboardEnabled; + }; + dictionary CapitalizeMode { + number NONE = 0; + number SENTENCES = 1; + number WORDS = 2; + number CHARACTERS = 3; }; - }; \ No newline at end of file diff --git a/idl/@ohos.intl.idl b/idl/@ohos.intl.idl index 15b8ca9..2563289 100644 --- a/idl/@ohos.intl.idl +++ b/idl/@ohos.intl.idl @@ -1,100 +1,110 @@ -package ohos; +package ohos.intl; +[DefaultExport] namespace intl { - - [Entity=Interface] + [Entity=Interface, Deprecated] interface LocaleOptions { - - [Optional] + [Optional, Deprecated] attribute String calendar; - [Optional] + [Optional, Deprecated] attribute String collation; - [Optional] + [Optional, Deprecated] attribute String hourCycle; - [Optional] + [Optional, Deprecated] attribute String numberingSystem; - [Optional] + [Optional, Deprecated] attribute boolean numeric; - [Optional] + [Optional, Deprecated] attribute String caseFirst; - }; - [Entity=Class] + [Entity=Class, Deprecated] interface Locale { - + [Deprecated] constructor(); + [Deprecated] constructor(String locale, optional LocaleOptions options); + [Deprecated] attribute String language; + [Deprecated] attribute String script; + [Deprecated] attribute String region; + [Deprecated] attribute String baseName; + [Deprecated] attribute String caseFirst; + [Deprecated] attribute String calendar; + [Deprecated] attribute String collation; + [Deprecated] attribute String hourCycle; + [Deprecated] attribute String numberingSystem; + [Deprecated] attribute boolean numeric; - [DtsName="toString"] + [Deprecated, DtsName="toString"] String toString_(); + [Deprecated] Locale maximize(); + [Deprecated] Locale minimize(); - }; - [Entity=Interface] + [Entity=Interface, Deprecated] interface DateTimeOptions { - - [Optional] + [Optional, Deprecated] attribute String locale; - [Optional] + [Optional, Deprecated] attribute String dateStyle; - [Optional] + [Optional, Deprecated] attribute String timeStyle; - [Optional] + [Optional, Deprecated] attribute String hourCycle; - [Optional] + [Optional, Deprecated] attribute String timeZone; - [Optional] + [Optional, Deprecated] attribute String numberingSystem; - [Optional] + [Optional, Deprecated] attribute boolean hour12; - [Optional] + [Optional, Deprecated] attribute String weekday; - [Optional] + [Optional, Deprecated] attribute String era; - [Optional] + [Optional, Deprecated] attribute String year; - [Optional] + [Optional, Deprecated] attribute String month; - [Optional] + [Optional, Deprecated] attribute String day; - [Optional] + [Optional, Deprecated] attribute String hour; - [Optional] + [Optional, Deprecated] attribute String minute; - [Optional] + [Optional, Deprecated] attribute String second; - [Optional] + [Optional, Deprecated] attribute String timeZoneName; - [Optional] + [Optional, Deprecated] attribute String dayPeriod; - [Optional] + [Optional, Deprecated] attribute String localeMatcher; - [Optional] + [Optional, Deprecated] attribute String formatMatcher; - }; - [Entity=Class] + [Entity=Class, Deprecated] interface DateTimeFormat { - + [Deprecated] constructor(); + [Deprecated] constructor((String or sequence) locale, optional DateTimeOptions options); - String format(Date date); - String formatRange(Date startDate, Date endDate); + [Deprecated] + String format(date date); + [Deprecated] + String formatRange(date startDate, date endDate); + [Deprecated] DateTimeOptions resolvedOptions(); - }; [Entity=Interface] interface NumberOptions { - [Optional] attribute String locale; [Optional] @@ -139,21 +149,17 @@ namespace intl { attribute number roundingIncrement; [Optional] attribute String roundingMode; - }; [Entity=Class] interface NumberFormat { - constructor(); constructor((String or sequence) locale, optional NumberOptions options); - String format(number number_); + String format(number num); String formatRange(number startRange, number endRange); NumberOptions resolvedOptions(); - }; [Entity=Interface] interface CollatorOptions { - [Optional] attribute String localeMatcher; [Optional] @@ -168,73 +174,71 @@ namespace intl { attribute boolean numeric; [Optional] attribute String caseFirst; - }; [Entity=Class] interface Collator { - constructor(); constructor((String or sequence) locale, optional CollatorOptions options); number compare(String first, String second); CollatorOptions resolvedOptions(); - }; - [Entity=Interface] + [Entity=Interface, Deprecated] interface PluralRulesOptions { - - [Optional] + [Optional, Deprecated] attribute String localeMatcher; - [Optional] + [Optional, Deprecated] attribute String type; - [Optional] + [Optional, Deprecated] attribute number minimumIntegerDigits; - [Optional] + [Optional, Deprecated] attribute number minimumFractionDigits; - [Optional] + [Optional, Deprecated] attribute number maximumFractionDigits; - [Optional] + [Optional, Deprecated] attribute number minimumSignificantDigits; - [Optional] + [Optional, Deprecated] attribute number maximumSignificantDigits; - }; - [Entity=Class] + [Entity=Class, Deprecated] interface PluralRules { - + [Deprecated] constructor(); + [Deprecated] constructor((String or sequence) locale, optional PluralRulesOptions options); + [Deprecated] String select(number n); - }; - [Entity=Interface] + [Entity=Interface, Deprecated] interface RelativeTimeFormatInputOptions { - - [Optional] + [Optional, Deprecated] attribute String localeMatcher; - [Optional] + [Optional, Deprecated] attribute String numeric; - [Optional] + [Optional, Deprecated] attribute String style; - }; - [Entity=Interface] + [Entity=Interface, Deprecated] interface RelativeTimeFormatResolvedOptions { - + [Deprecated] attribute String locale; + [Deprecated] attribute String style; + [Deprecated] attribute String numeric; + [Deprecated] attribute String numberingSystem; - }; - [Entity=Class] + [Entity=Class, Deprecated] interface RelativeTimeFormat { - + [Deprecated] constructor(); + [Deprecated] constructor((String or sequence) locale, optional RelativeTimeFormatInputOptions options); + [Deprecated] String format(number value, String unit); + [Deprecated] sequence formatToParts(number value, String unit); + [Deprecated] RelativeTimeFormatResolvedOptions resolvedOptions(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.logLibrary.idl b/idl/@ohos.logLibrary.idl index b0e8063..397ba25 100644 --- a/idl/@ohos.logLibrary.idl +++ b/idl/@ohos.logLibrary.idl @@ -1,33 +1,25 @@ -package ohos; +package ohos.logLibrary; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace logLibrary { - [Entity=Interface] interface LogEntry { - attribute String name; attribute number mtime; attribute number size; - }; + [Throws] + sequence list(String logType); + [Throws] + async void copy(String logType, String logName, String dest); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_logLibrary_ohos_logLibrary { - - [Throws] - static sequence list(String logType); - [Throws] - static async void copy(String logType, String logName, String dest); - [Throws] - static void copy(String logType, String logName, String dest, AsyncCallback_Void callback_); - [Throws] - static async void move(String logType, String logName, String dest); - [Throws] - static void move(String logType, String logName, String dest, AsyncCallback_Void callback_); - [Throws] - static void remove(String logType, String logName); - - }; - + [Throws] + void copy(String logType, String logName, String dest, AsyncCallback_Void callback_); + [Throws] + async void move(String logType, String logName, String dest); + [Throws] + void move(String logType, String logName, String dest, AsyncCallback_Void callback_); + [Throws] + void remove(String logType, String logName); }; \ No newline at end of file diff --git a/idl/@ohos.matrix4.idl b/idl/@ohos.matrix4.idl index 0909892..6f7e817 100644 --- a/idl/@ohos.matrix4.idl +++ b/idl/@ohos.matrix4.idl @@ -1,20 +1,17 @@ -package ohos; +package ohos.matrix4; +[DefaultExport] namespace matrix4 { - [Entity=Interface] interface TranslateOption { - [Optional] attribute number x; [Optional] attribute number y; [Optional] attribute number z; - }; [Entity=Interface] interface ScaleOption { - [Optional] attribute number x; [Optional] @@ -25,11 +22,9 @@ namespace matrix4 { attribute number centerX; [Optional] attribute number centerY; - }; [Entity=Interface] interface RotateOption { - [Optional] attribute number x; [Optional] @@ -42,18 +37,14 @@ namespace matrix4 { attribute number centerY; [Optional] attribute number angle; - }; [Entity=Interface] interface Point { - attribute number x; attribute number y; - }; [Entity=Interface] interface PolyToPolyOptions { - attribute sequence src; [Optional] attribute number srcIndex; @@ -62,18 +53,14 @@ namespace matrix4 { attribute number dstIndex; [Optional] attribute number pointCount; - }; [Entity=Tuple, Synthetic] interface Tuple_Number_Number { - attribute number value0; attribute number value1; - }; [Entity=Interface] interface Matrix4Transit { - Matrix4Transit copy(); Matrix4Transit invert(); Matrix4Transit combine(Matrix4Transit options); @@ -83,11 +70,9 @@ namespace matrix4 { Matrix4Transit rotate(RotateOption options); Tuple_Number_Number transformPoint(Tuple_Number_Number options); Matrix4Transit setPolyToPoly(PolyToPolyOptions options); - }; [Entity=Tuple, Synthetic] interface init_options { - attribute number value0; attribute number value1; attribute number value2; @@ -104,28 +89,21 @@ namespace matrix4 { attribute number value13; attribute number value14; attribute number value15; - }; - [GlobalScope] - interface GlobalScope_matrix4_ohos_matrix4 { - - static Matrix4Transit init(init_options options); - static Matrix4Transit identity(); - [Deprecated] - static Matrix4Transit copy(); - [Deprecated] - static Matrix4Transit invert(); - [Deprecated] - static Matrix4Transit combine(Matrix4Transit options); - [Deprecated] - static Matrix4Transit translate(TranslateOption options); - [Deprecated] - static Matrix4Transit scale(ScaleOption options); - [Deprecated] - static Matrix4Transit rotate(RotateOption options); - [Deprecated] - static Tuple_Number_Number transformPoint(Tuple_Number_Number options); - - }; - + Matrix4Transit init(init_options options); + Matrix4Transit identity(); + [Deprecated] + Matrix4Transit copy(); + [Deprecated] + Matrix4Transit invert(); + [Deprecated] + Matrix4Transit combine(Matrix4Transit options); + [Deprecated] + Matrix4Transit translate(TranslateOption options); + [Deprecated] + Matrix4Transit scale(ScaleOption options); + [Deprecated] + Matrix4Transit rotate(RotateOption options); + [Deprecated] + Tuple_Number_Number transformPoint(Tuple_Number_Number options); }; \ No newline at end of file diff --git a/idl/@ohos.measure.idl b/idl/@ohos.measure.idl index 6d8ce6b..6b56a06 100644 --- a/idl/@ohos.measure.idl +++ b/idl/@ohos.measure.idl @@ -1,7 +1,14 @@ package ohos.measure; +import arkui.component.enums.FontStyle as FontStyle; +import arkui.component.enums.FontWeight as FontWeight; +import arkui.component.enums.TextAlign as TextAlign; +import arkui.component.enums.TextOverflow as TextOverflow; +import arkui.component.enums.TextCase as TextCase; +import arkui.component.enums.WordBreak as WordBreak; +import arkui.component.units.SizeOptions as SizeOptions; +import resource.Resource as Resource; [Entity=Interface] interface MeasureOptions { - attribute (String or Resource) textContent; [Optional] attribute (number or String or Resource) constraintWidth; @@ -31,12 +38,11 @@ interface MeasureOptions { attribute (number or String) textIndent; [Optional] attribute WordBreak wordBreak; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface MeasureText { - + [Deprecated] static number measureText(MeasureOptions options); + [Deprecated] static SizeOptions measureTextSize(MeasureOptions options); - }; \ No newline at end of file diff --git a/idl/@ohos.mediaquery.idl b/idl/@ohos.mediaquery.idl index 7d6faa4..9edb547 100644 --- a/idl/@ohos.mediaquery.idl +++ b/idl/@ohos.mediaquery.idl @@ -1,30 +1,22 @@ -package ohos; +package ohos.mediaquery; import ohos.base.Callback as Callback; +import ohos.base.Callback as Callback; +[DefaultExport] namespace mediaquery { - [Entity=Interface] interface MediaQueryResult { - readonly attribute boolean matches; readonly attribute String media; - }; [Synthetic] callback Callback_MediaQueryResult_Void = void (MediaQueryResult parameter); [Entity=Interface] interface MediaQueryListener: MediaQueryResult { - [DtsName="on", DtsTag="'change'"] void onChange(Callback_MediaQueryResult_Void callback_); [DtsName="off", DtsTag="'change'"] void offChange(optional Callback_MediaQueryResult_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_mediaquery_ohos_mediaquery { - - static MediaQueryListener matchMediaSync(String condition); - }; - + [Deprecated] + MediaQueryListener matchMediaSync(String condition); }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.audio.idl b/idl/@ohos.multimedia.audio.idl index af480e0..7a475cc 100644 --- a/idl/@ohos.multimedia.audio.idl +++ b/idl/@ohos.multimedia.audio.idl @@ -1,11 +1,10 @@ -package ohos.multimedia; +package ohos.multimedia.audio; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace audio { - dictionary AudioErrors { - number ERROR_INVALID_PARAM = 6800101; number ERROR_NO_MEMORY = 6800102; number ERROR_ILLEGAL_STATE = 6800103; @@ -13,16 +12,23 @@ namespace audio { number ERROR_TIMEOUT = 6800105; number ERROR_STREAM_LIMIT = 6800201; number ERROR_SYSTEM = 6800301; - }; + AudioManager getAudioManager(); [Async, Synthetic] callback AsyncCallback_AudioCapturer_Void = void (AudioCapturer result); + void createAudioCapturer(AudioCapturerOptions options, AsyncCallback_AudioCapturer_Void callback_); + async AudioCapturer createAudioCapturer(AudioCapturerOptions options); [Async, Synthetic] callback AsyncCallback_AudioRenderer_Void = void (AudioRenderer result); + void createAudioRenderer(AudioRendererOptions options, AsyncCallback_AudioRenderer_Void callback_); + async AudioRenderer createAudioRenderer(AudioRendererOptions options); [Async, Synthetic] callback AsyncCallback_TonePlayer_Void = void (TonePlayer result); + void createTonePlayer(AudioRendererInfo options, AsyncCallback_TonePlayer_Void callback_); + async TonePlayer createTonePlayer(AudioRendererInfo options); + [Throws] + async AudioLoopback createAudioLoopback(AudioLoopbackMode mode); dictionary AudioState { - number STATE_INVALID = -1; number STATE_NEW = 0; number STATE_PREPARED = 1; @@ -30,22 +36,30 @@ namespace audio { number STATE_STOPPED = 3; number STATE_RELEASED = 4; number STATE_PAUSED = 5; - + }; + dictionary AudioLoopbackMode { + number HARDWARE = 0; + }; + dictionary AudioLoopbackStatus { + number UNAVAILABLE_DEVICE = -2; + number UNAVAILABLE_SCENE = -1; + number AVAILABLE_IDLE = 0; + number AVAILABLE_RUNNING = 1; }; dictionary AudioVolumeType { - number VOICE_CALL = 0; number RINGTONE = 2; number MEDIA = 3; number ALARM = 4; number ACCESSIBILITY = 5; + number SYSTEM = 6; number VOICE_ASSISTANT = 9; number ULTRASONIC = 10; + number NOTIFICATION = 11; + number NAVIGATION = 12; number ALL = 100; - }; dictionary DeviceFlag { - number NONE_DEVICES_FLAG = 0; number OUTPUT_DEVICES_FLAG = 1; number INPUT_DEVICES_FLAG = 2; @@ -53,26 +67,20 @@ namespace audio { number DISTRIBUTED_OUTPUT_DEVICES_FLAG = 4; number DISTRIBUTED_INPUT_DEVICES_FLAG = 8; number ALL_DISTRIBUTED_DEVICES_FLAG = 12; - }; dictionary DeviceUsage { - number MEDIA_OUTPUT_DEVICES = 1; number MEDIA_INPUT_DEVICES = 2; number ALL_MEDIA_DEVICES = 3; number CALL_OUTPUT_DEVICES = 4; number CALL_INPUT_DEVICES = 8; number ALL_CALL_DEVICES = 12; - }; dictionary DeviceRole { - number INPUT_DEVICE = 1; number OUTPUT_DEVICE = 2; - }; dictionary DeviceType { - number INVALID = 0; number EARPIECE = 1; number SPEAKER = 2; @@ -85,48 +93,42 @@ namespace audio { number DISPLAY_PORT = 23; number REMOTE_CAST = 24; number USB_DEVICE = 25; + number ACCESSORY = 26; + number HDMI = 27; + number LINE_DIGITAL = 28; + number REMOTE_DAUDIO = 29; + number HEARING_AID = 30; + number NEARLINK = 31; number DEFAULT = 1000; - }; [Deprecated] dictionary ActiveDeviceType { - [Deprecated] number SPEAKER = 2; [Deprecated] number BLUETOOTH_SCO = 7; - }; dictionary CommunicationDeviceType { - number SPEAKER = 2; - }; dictionary AudioRingMode { - number RINGER_MODE_SILENT = 0; number RINGER_MODE_VIBRATE = 1; number RINGER_MODE_NORMAL = 2; - }; dictionary PolicyType { - number EDM = 0; number PRIVACY = 1; - }; dictionary AudioSampleFormat { - number SAMPLE_FORMAT_INVALID = -1; number SAMPLE_FORMAT_U8 = 0; number SAMPLE_FORMAT_S16LE = 1; number SAMPLE_FORMAT_S24LE = 2; number SAMPLE_FORMAT_S32LE = 3; number SAMPLE_FORMAT_F32LE = 4; - }; dictionary AudioChannel { - number CHANNEL_1 = 1; number CHANNEL_2 = 2; number CHANNEL_3 = 3; @@ -140,10 +142,8 @@ namespace audio { number CHANNEL_12 = 12; number CHANNEL_14 = 14; number CHANNEL_16 = 16; - }; dictionary AudioSamplingRate { - number SAMPLE_RATE_8000 = 8000; number SAMPLE_RATE_11025 = 11025; number SAMPLE_RATE_12000 = 12000; @@ -158,17 +158,13 @@ namespace audio { number SAMPLE_RATE_96000 = 96000; number SAMPLE_RATE_176400 = 176400; number SAMPLE_RATE_192000 = 192000; - }; dictionary AudioEncodingType { - number ENCODING_TYPE_INVALID = -1; number ENCODING_TYPE_RAW = 0; - }; [Deprecated] dictionary ContentType { - [Deprecated] number CONTENT_TYPE_UNKNOWN = 0; [Deprecated] @@ -181,10 +177,8 @@ namespace audio { number CONTENT_TYPE_SONIFICATION = 4; [Deprecated] number CONTENT_TYPE_RINGTONE = 5; - }; dictionary StreamUsage { - number STREAM_USAGE_UNKNOWN = 0; [Deprecated] number STREAM_USAGE_MEDIA = 1; @@ -208,144 +202,111 @@ namespace audio { number STREAM_USAGE_ULTRASONIC = 16; number STREAM_USAGE_VIDEO_COMMUNICATION = 17; number STREAM_USAGE_VOICE_CALL_ASSISTANT = 21; - }; dictionary InterruptRequestType { - number INTERRUPT_REQUEST_TYPE_DEFAULT = 0; - }; dictionary VolumeFlag { - number FLAG_SHOW_SYSTEM_UI = 1; - }; [Entity=Interface] interface AudioStreamInfo { - attribute AudioSamplingRate samplingRate; attribute AudioChannel channels; attribute AudioSampleFormat sampleFormat; attribute AudioEncodingType encodingType; [Optional] attribute AudioChannelLayout channelLayout; - }; [Entity=Interface] interface AudioRendererInfo { - [Optional, Deprecated] attribute ContentType content; attribute StreamUsage usage; attribute number rendererFlags; - + [Optional] + attribute AudioVolumeMode volumeMode; }; [Entity=Interface] interface AudioRendererFilter { - [Optional] attribute number uid; [Optional] attribute AudioRendererInfo rendererInfo; [Optional] attribute number rendererId; - }; [Entity=Interface] interface AudioCapturerFilter { - [Optional] attribute number uid; [Optional] attribute AudioCapturerInfo capturerInfo; - }; [Entity=Interface] interface AudioRendererOptions { - attribute AudioStreamInfo streamInfo; attribute AudioRendererInfo rendererInfo; [Optional] attribute AudioPrivacyType privacyType; - }; dictionary AudioPrivacyType { - number PRIVACY_TYPE_PUBLIC = 0; number PRIVACY_TYPE_PRIVATE = 1; - }; dictionary InterruptMode { - number SHARE_MODE = 0; number INDEPENDENT_MODE = 1; - }; dictionary AudioRendererRate { - number RENDER_RATE_NORMAL = 0; number RENDER_RATE_DOUBLE = 1; number RENDER_RATE_HALF = 2; - }; dictionary InterruptType { - number INTERRUPT_TYPE_BEGIN = 1; number INTERRUPT_TYPE_END = 2; - }; dictionary InterruptHint { - number INTERRUPT_HINT_NONE = 0; number INTERRUPT_HINT_RESUME = 1; number INTERRUPT_HINT_PAUSE = 2; number INTERRUPT_HINT_STOP = 3; number INTERRUPT_HINT_DUCK = 4; number INTERRUPT_HINT_UNDUCK = 5; - + number INTERRUPT_HINT_MUTE = 6; + number INTERRUPT_HINT_UNMUTE = 7; }; dictionary InterruptForceType { - number INTERRUPT_FORCE = 0; number INTERRUPT_SHARE = 1; - }; [Entity=Interface] interface InterruptEvent { - attribute InterruptType eventType; attribute InterruptForceType forceType; attribute InterruptHint hintType; - }; [Deprecated] dictionary InterruptActionType { - [Deprecated] number TYPE_ACTIVATED = 0; [Deprecated] number TYPE_INTERRUPT = 1; - }; dictionary DeviceChangeType { - number CONNECT = 0; number DISCONNECT = 1; - }; dictionary AudioScene { - number AUDIO_SCENE_DEFAULT = 0; number AUDIO_SCENE_RINGING = 1; number AUDIO_SCENE_PHONE_CALL = 2; number AUDIO_SCENE_VOICE_CHAT = 3; - }; dictionary VolumeAdjustType { - number VOLUME_UP = 0; number VOLUME_DOWN = 1; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -363,15 +324,16 @@ namespace audio { callback Callback_VolumeEvent_Void = void (VolumeEvent parameter); [Synthetic] callback Callback_AudioRingMode_Void = void (AudioRingMode parameter); - [Async, Synthetic] - callback AsyncCallback_AudioScene_Void = void (AudioScene result); + [Synthetic] + callback Callback_AudioScene_Void = void (AudioScene parameter); [Synthetic] callback Callback_DeviceChangeAction_Void = void (DeviceChangeAction parameter); [Synthetic] callback Callback_InterruptAction_Void = void (InterruptAction parameter); + [Async, Synthetic] + callback AsyncCallback_AudioScene_Void = void (AudioScene result); [Entity=Interface] interface AudioManager { - [Deprecated] void setVolume(AudioVolumeType volumeType, number volume, AsyncCallback_Void callback_); [Deprecated] @@ -444,56 +406,52 @@ namespace audio { void onVolumeChange(Callback_VolumeEvent_Void callback_); [Deprecated, DtsName="on", DtsTag="'ringerModeChange'"] void onRingerModeChange(Callback_AudioRingMode_Void callback_); + [DtsName="on", DtsTag="'audioSceneChange'"] + void onAudioSceneChange(Callback_AudioScene_Void callback_); + [Deprecated, DtsName="on", DtsTag="'deviceChange'"] + void onDeviceChange(Callback_DeviceChangeAction_Void callback_); + [Deprecated, DtsName="on", DtsTag="'interrupt'"] + void onInterrupt(AudioInterrupt interrupt, Callback_InterruptAction_Void callback_); void setAudioScene(AudioScene scene, AsyncCallback_Void callback_); async void setAudioScene(AudioScene scene); void getAudioScene(AsyncCallback_AudioScene_Void callback_); async AudioScene getAudioScene(); AudioScene getAudioSceneSync(); - [Deprecated, DtsName="on", DtsTag="'deviceChange'"] - void onDeviceChange(Callback_DeviceChangeAction_Void callback_); + [DtsName="off", DtsTag="'audioSceneChange'"] + void offAudioSceneChange(optional Callback_AudioScene_Void callback_); [Deprecated, DtsName="off", DtsTag="'deviceChange'"] void offDeviceChange(optional Callback_DeviceChangeAction_Void callback_); - [Deprecated, DtsName="on", DtsTag="'interrupt'"] - void onInterrupt(AudioInterrupt interrupt, Callback_InterruptAction_Void callback_); [Deprecated, DtsName="off", DtsTag="'interrupt'"] void offInterrupt(AudioInterrupt interrupt, optional Callback_InterruptAction_Void callback_); AudioVolumeManager getVolumeManager(); AudioStreamManager getStreamManager(); AudioRoutingManager getRoutingManager(); AudioSessionManager getSessionManager(); - [Throws] AudioSpatializationManager getSpatializationManager(); [Throws] AudioEffectManager getEffectManager(); [Throws] + AudioCollaborativeManager getCollaborativeManager(); + [Throws] async void disableSafeMediaVolume(); - }; dictionary InterruptRequestResultType { - number INTERRUPT_REQUEST_GRANT = 0; number INTERRUPT_REQUEST_REJECT = 1; - }; [Entity=Interface] interface InterruptResult { - attribute InterruptRequestResultType requestResult; attribute number interruptNode; - }; dictionary DeviceBlockStatus { - number UNBLOCKED = 0; number BLOCKED = 1; - }; [Entity=Interface] interface DeviceBlockStatusInfo { - attribute DeviceBlockStatus blockStatus; attribute AudioDeviceDescriptors devices; - }; [Synthetic] callback Callback_AudioDeviceDescriptors_Void = void (AudioDeviceDescriptors parameter); @@ -501,21 +459,32 @@ namespace audio { callback Callback_DeviceBlockStatusInfo_Void = void (DeviceBlockStatusInfo parameter); [Entity=Interface] interface AudioRoutingManager { - void getDevices(DeviceFlag deviceFlag, AsyncCallback_AudioDeviceDescriptors_Void callback_); async AudioDeviceDescriptors getDevices(DeviceFlag deviceFlag); [Throws] AudioDeviceDescriptors getDevicesSync(DeviceFlag deviceFlag); [Throws, DtsName="on", DtsTag="'deviceChange'"] void onDeviceChange(DeviceFlag deviceFlag, Callback_DeviceChangeAction_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceChange'"] - void offDeviceChange(optional Callback_DeviceChangeAction_Void callback_); - [Throws] - AudioDeviceDescriptors getAvailableDevices(DeviceUsage deviceUsage); [Throws, DtsName="on", DtsTag="'availableDeviceChange'"] void onAvailableDeviceChange(DeviceUsage deviceUsage, Callback_DeviceChangeAction_Void callback_); + [Throws, DtsName="on", DtsTag="'preferOutputDeviceChangeForRendererInfo'"] + void onPreferOutputDeviceChangeForRendererInfo(AudioRendererInfo rendererInfo, Callback_AudioDeviceDescriptors_Void callback_); + [Throws, DtsName="on", DtsTag="'preferredInputDeviceChangeForCapturerInfo'"] + void onPreferredInputDeviceChangeForCapturerInfo(AudioCapturerInfo capturerInfo, Callback_AudioDeviceDescriptors_Void callback_); + [Throws, DtsName="on", DtsTag="'micBlockStatusChanged'"] + void onMicBlockStatusChanged(Callback_DeviceBlockStatusInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceChange'"] + void offDeviceChange(optional Callback_DeviceChangeAction_Void callback_); [Throws, DtsName="off", DtsTag="'availableDeviceChange'"] void offAvailableDeviceChange(optional Callback_DeviceChangeAction_Void callback_); + [Throws, DtsName="off", DtsTag="'preferOutputDeviceChangeForRendererInfo'"] + void offPreferOutputDeviceChangeForRendererInfo(optional Callback_AudioDeviceDescriptors_Void callback_); + [Throws, DtsName="off", DtsTag="'preferredInputDeviceChangeForCapturerInfo'"] + void offPreferredInputDeviceChangeForCapturerInfo(optional Callback_AudioDeviceDescriptors_Void callback_); + [Throws, DtsName="off", DtsTag="'micBlockStatusChanged'"] + void offMicBlockStatusChanged(optional Callback_DeviceBlockStatusInfo_Void callback_); + [Throws] + AudioDeviceDescriptors getAvailableDevices(DeviceUsage deviceUsage); void setCommunicationDevice(CommunicationDeviceType deviceType, boolean active, AsyncCallback_Void callback_); async void setCommunicationDevice(CommunicationDeviceType deviceType, boolean active); void isCommunicationDeviceActive(CommunicationDeviceType deviceType, AsyncCallback_Boolean_Void callback_); @@ -538,27 +507,15 @@ namespace audio { AudioDeviceDescriptors getPreferredOutputDeviceForRendererInfoSync(AudioRendererInfo rendererInfo); [Throws] AudioDeviceDescriptors getPreferredOutputDeviceByFilter(AudioRendererFilter filter); - [Throws, DtsName="on", DtsTag="'preferOutputDeviceChangeForRendererInfo'"] - void onPreferOutputDeviceChangeForRendererInfo(AudioRendererInfo rendererInfo, Callback_AudioDeviceDescriptors_Void callback_); - [Throws, DtsName="off", DtsTag="'preferOutputDeviceChangeForRendererInfo'"] - void offPreferOutputDeviceChangeForRendererInfo(optional Callback_AudioDeviceDescriptors_Void callback_); [Throws] void getPreferredInputDeviceForCapturerInfo(AudioCapturerInfo capturerInfo, AsyncCallback_AudioDeviceDescriptors_Void callback_); [Throws] async AudioDeviceDescriptors getPreferredInputDeviceForCapturerInfo(AudioCapturerInfo capturerInfo); [Throws] AudioDeviceDescriptors getPreferredInputDeviceByFilter(AudioCapturerFilter filter); - [Throws, DtsName="on", DtsTag="'preferredInputDeviceChangeForCapturerInfo'"] - void onPreferredInputDeviceChangeForCapturerInfo(AudioCapturerInfo capturerInfo, Callback_AudioDeviceDescriptors_Void callback_); - [Throws, DtsName="off", DtsTag="'preferredInputDeviceChangeForCapturerInfo'"] - void offPreferredInputDeviceChangeForCapturerInfo(optional Callback_AudioDeviceDescriptors_Void callback_); [Throws] AudioDeviceDescriptors getPreferredInputDeviceForCapturerInfoSync(AudioCapturerInfo capturerInfo); async boolean isMicBlockDetectionSupported(); - [Throws, DtsName="on", DtsTag="'micBlockStatusChanged'"] - void onMicBlockStatusChanged(Callback_DeviceBlockStatusInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'micBlockStatusChanged'"] - void offMicBlockStatusChanged(optional Callback_DeviceBlockStatusInfo_Void callback_); [Throws] async void excludeOutputDevices(DeviceUsage usage, AudioDeviceDescriptors devices); [Throws] @@ -567,7 +524,6 @@ namespace audio { async void unexcludeOutputDevices(DeviceUsage usage); [Throws] AudioDeviceDescriptors getExcludedDevices(DeviceUsage usage); - }; [Async, Synthetic] callback AsyncCallback_AudioRendererChangeInfoArray_Void = void (AudioRendererChangeInfoArray result); @@ -581,7 +537,6 @@ namespace audio { callback Callback_AudioCapturerChangeInfoArray_Void = void (AudioCapturerChangeInfoArray parameter); [Entity=Interface] interface AudioStreamManager { - void getCurrentAudioRendererInfoArray(AsyncCallback_AudioRendererChangeInfoArray_Void callback_); async AudioRendererChangeInfoArray getCurrentAudioRendererInfoArray(); AudioRendererChangeInfoArray getCurrentAudioRendererInfoArraySync(); @@ -596,49 +551,80 @@ namespace audio { AudioEffectInfoArray getAudioEffectInfoArraySync(StreamUsage usage); [Throws, DtsName="on", DtsTag="'audioRendererChange'"] void onAudioRendererChange(Callback_AudioRendererChangeInfoArray_Void callback_); - [Throws, DtsName="off", DtsTag="'audioRendererChange'"] - void offAudioRendererChange(); [Throws, DtsName="on", DtsTag="'audioCapturerChange'"] void onAudioCapturerChange(Callback_AudioCapturerChangeInfoArray_Void callback_); + [Throws, DtsName="off", DtsTag="'audioRendererChange'"] + void offAudioRendererChange(optional Callback_AudioRendererChangeInfoArray_Void callback_); [Throws, DtsName="off", DtsTag="'audioCapturerChange'"] - void offAudioCapturerChange(); + void offAudioCapturerChange(optional Callback_AudioCapturerChangeInfoArray_Void callback_); + [Deprecated] void isActive(AudioVolumeType volumeType, AsyncCallback_Boolean_Void callback_); + [Deprecated] async boolean isActive(AudioVolumeType volumeType); - [Throws] + [Deprecated, Throws] boolean isActiveSync(AudioVolumeType volumeType); - + [Throws] + boolean isStreamActive(StreamUsage streamUsage); + [Throws] + boolean isAcousticEchoCancelerSupported(SourceType sourceType); + [Throws] + boolean isAudioLoopbackSupported(AudioLoopbackMode mode); + [Throws] + boolean isRecordingAvailable(AudioCapturerInfo capturerInfo); }; dictionary AudioConcurrencyMode { - number CONCURRENCY_DEFAULT = 0; number CONCURRENCY_MIX_WITH_OTHERS = 1; number CONCURRENCY_DUCK_OTHERS = 2; number CONCURRENCY_PAUSE_OTHERS = 3; - }; dictionary AudioSessionDeactivatedReason { - number DEACTIVATED_LOWER_PRIORITY = 0; number DEACTIVATED_TIMEOUT = 1; - + }; + dictionary AudioSessionScene { + number AUDIO_SESSION_SCENE_MEDIA = 0; + number AUDIO_SESSION_SCENE_GAME = 1; + number AUDIO_SESSION_SCENE_VOICE_COMMUNICATION = 2; + }; + dictionary AudioSessionStateChangeHint { + number AUDIO_SESSION_STATE_CHANGE_HINT_RESUME = 0; + number AUDIO_SESSION_STATE_CHANGE_HINT_PAUSE = 1; + number AUDIO_SESSION_STATE_CHANGE_HINT_STOP = 2; + number AUDIO_SESSION_STATE_CHANGE_HINT_TIME_OUT_STOP = 3; + number AUDIO_SESSION_STATE_CHANGE_HINT_DUCK = 4; + number AUDIO_SESSION_STATE_CHANGE_HINT_UNDUCK = 5; + }; + dictionary OutputDeviceChangeRecommendedAction { + number DEVICE_CHANGE_RECOMMEND_TO_CONTINUE = 0; + number DEVICE_CHANGE_RECOMMEND_TO_STOP = 1; }; [Entity=Interface] interface AudioSessionStrategy { - attribute AudioConcurrencyMode concurrencyMode; - }; [Entity=Interface] interface AudioSessionDeactivatedEvent { - attribute AudioSessionDeactivatedReason reason; - + }; + [Entity=Interface] + interface AudioSessionStateChangedEvent { + attribute AudioSessionStateChangeHint stateChangeHint; + }; + [Entity=Interface] + interface CurrentOutputDeviceChangedEvent { + attribute AudioDeviceDescriptors devices; + attribute AudioStreamDeviceChangeReason changeReason; + attribute OutputDeviceChangeRecommendedAction recommendedAction; }; [Synthetic] callback Callback_AudioSessionDeactivatedEvent_Void = void (AudioSessionDeactivatedEvent parameter); + [Synthetic] + callback Callback_AudioSessionStateChangedEvent_Void = void (AudioSessionStateChangedEvent parameter); + [Synthetic] + callback Callback_CurrentOutputDeviceChangedEvent_Void = void (CurrentOutputDeviceChangedEvent parameter); [Entity=Interface] interface AudioSessionManager { - [Throws] async void activateAudioSession(AudioSessionStrategy strategy); [Throws] @@ -646,17 +632,34 @@ namespace audio { boolean isAudioSessionActivated(); [Throws, DtsName="on", DtsTag="'audioSessionDeactivated'"] void onAudioSessionDeactivated(Callback_AudioSessionDeactivatedEvent_Void callback_); + [Throws, DtsName="on", DtsTag="'audioSessionStateChanged'"] + void onAudioSessionStateChanged(Callback_AudioSessionStateChangedEvent_Void callback_); + [Throws, DtsName="on", DtsTag="'currentOutputDeviceChanged'"] + void onCurrentOutputDeviceChanged(Callback_CurrentOutputDeviceChangedEvent_Void callback_); [Throws, DtsName="off", DtsTag="'audioSessionDeactivated'"] void offAudioSessionDeactivated(optional Callback_AudioSessionDeactivatedEvent_Void callback_); - + [Throws, DtsName="off", DtsTag="'audioSessionStateChanged'"] + void offAudioSessionStateChanged(optional Callback_AudioSessionStateChangedEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'currentOutputDeviceChanged'"] + void offCurrentOutputDeviceChanged(optional Callback_CurrentOutputDeviceChangedEvent_Void callback_); + [Throws] + void setAudioSessionScene(AudioSessionScene scene); + [Throws] + DeviceType getDefaultOutputDevice(); + [Throws] + async void setDefaultOutputDevice(DeviceType deviceType); }; + typedef sequence StreamUsageArray; [Async, Synthetic] callback AsyncCallback_VolumeGroupInfos_Void = void (VolumeGroupInfos result); [Async, Synthetic] callback AsyncCallback_AudioVolumeGroupManager_Void = void (AudioVolumeGroupManager result); + [Synthetic] + callback Callback_AudioVolumeType_Void = void (AudioVolumeType parameter); + [Synthetic] + callback Callback_StreamVolumeEvent_Void = void (StreamVolumeEvent parameter); [Entity=Interface] interface AudioVolumeManager { - void getVolumeGroupInfos(String networkId, AsyncCallback_VolumeGroupInfos_Void callback_); async VolumeGroupInfos getVolumeGroupInfos(String networkId); [Throws] @@ -665,40 +668,109 @@ namespace audio { async AudioVolumeGroupManager getVolumeGroupManager(number groupId); [Throws] AudioVolumeGroupManager getVolumeGroupManagerSync(number groupId); - [Throws, DtsName="on", DtsTag="'volumeChange'"] + [Throws] + async number getAppVolumePercentageForUid(number uid); + [Throws] + async void setAppVolumePercentageForUid(number uid, number volume); + [Throws] + async boolean isAppVolumeMutedForUid(number uid, boolean owned); + [Throws] + async void setAppVolumeMutedForUid(number uid, boolean muted); + async number getAppVolumePercentage(); + [Throws] + async void setAppVolumePercentage(number volume); + [Throws] + async void setSystemVolumeByUid(AudioVolumeType volumeType, number volume, number callingUid); + [Throws] + number getSystemVolumeByUid(AudioVolumeType volumeType, number callingUid); + [Deprecated, Throws, DtsName="on", DtsTag="'volumeChange'"] void onVolumeChange(Callback_VolumeEvent_Void callback_); - [Throws, DtsName="off", DtsTag="'volumeChange'"] + [Throws, DtsName="on", DtsTag="'appVolumeChangeForUid'"] + void onAppVolumeChangeForUid(number uid, Callback_VolumeEvent_Void callback_); + [Throws, DtsName="on", DtsTag="'appVolumeChange'"] + void onAppVolumeChange(Callback_VolumeEvent_Void callback_); + [Throws, DtsName="on", DtsTag="'activeVolumeTypeChange'"] + void onActiveVolumeTypeChange(Callback_AudioVolumeType_Void callback_); + [Throws, DtsName="on", DtsTag="'systemVolumeChange'"] + void onSystemVolumeChange(Callback_VolumeEvent_Void callback_); + [Throws, DtsName="on", DtsTag="'streamVolumeChange'"] + void onStreamVolumeChange(StreamUsage streamUsage, Callback_StreamVolumeEvent_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'volumeChange'"] void offVolumeChange(optional Callback_VolumeEvent_Void callback_); - + [Throws, DtsName="off", DtsTag="'appVolumeChangeForUid'"] + void offAppVolumeChangeForUid(optional Callback_VolumeEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'appVolumeChange'"] + void offAppVolumeChange(optional Callback_VolumeEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'activeVolumeTypeChange'"] + void offActiveVolumeTypeChange(optional Callback_AudioVolumeType_Void callback_); + [Throws, DtsName="off", DtsTag="'systemVolumeChange'"] + void offSystemVolumeChange(optional Callback_VolumeEvent_Void callback_); + [DtsName="off", DtsTag="'streamVolumeChange'"] + void offStreamVolumeChange(optional Callback_StreamVolumeEvent_Void callback_); + [Throws] + number getSystemVolume(AudioVolumeType volumeType); + [Throws] + number getMinSystemVolume(AudioVolumeType volumeType); + [Throws] + number getMaxSystemVolume(AudioVolumeType volumeType); + [Throws] + boolean isSystemMuted(AudioVolumeType volumeType); + [Throws] + number getVolumeInUnitOfDb(AudioVolumeType volumeType, number volumeLevel, DeviceType device); + [Throws] + number getVolumeByStream(StreamUsage streamUsage); + [Throws] + number getMinVolumeByStream(StreamUsage streamUsage); + [Throws] + number getMaxVolumeByStream(StreamUsage streamUsage); + [Throws] + boolean isSystemMutedForStream(StreamUsage streamUsage); + [Throws] + number getVolumeInUnitOfDbByStream(StreamUsage streamUsage, number volumeLevel, DeviceType device); + [Throws] + sequence<[TypeArguments="AudioVolumeType"] Readonly> getSupportedAudioVolumeTypes(); + [Throws] + AudioVolumeType getAudioVolumeTypeByStreamUsage(StreamUsage streamUsage); + [Throws] + StreamUsageArray getStreamUsagesByVolumeType(AudioVolumeType volumeType); + [Throws] + void forceVolumeKeyControlType(AudioVolumeType volumeType, number duration); }; [Synthetic] callback Callback_MicStateChangeEvent_Void = void (MicStateChangeEvent parameter); [Entity=Interface] interface AudioVolumeGroupManager { - void setVolume(AudioVolumeType volumeType, number volume, AsyncCallback_Void callback_); async void setVolume(AudioVolumeType volumeType, number volume); [Throws] async void setVolumeWithFlag(AudioVolumeType volumeType, number volume, number flags); [Throws] AudioVolumeType getActiveVolumeTypeSync(number uid); + [Deprecated] void getVolume(AudioVolumeType volumeType, AsyncCallback_Number_Void callback_); + [Deprecated] async number getVolume(AudioVolumeType volumeType); - [Throws] + [Deprecated, Throws] number getVolumeSync(AudioVolumeType volumeType); + [Deprecated] void getMinVolume(AudioVolumeType volumeType, AsyncCallback_Number_Void callback_); + [Deprecated] async number getMinVolume(AudioVolumeType volumeType); - [Throws] + [Deprecated, Throws] number getMinVolumeSync(AudioVolumeType volumeType); + [Deprecated] void getMaxVolume(AudioVolumeType volumeType, AsyncCallback_Number_Void callback_); + [Deprecated] async number getMaxVolume(AudioVolumeType volumeType); - [Throws] + [Deprecated, Throws] number getMaxVolumeSync(AudioVolumeType volumeType); void mute(AudioVolumeType volumeType, boolean mute, AsyncCallback_Void callback_); async void mute(AudioVolumeType volumeType, boolean mute); + [Deprecated] void isMute(AudioVolumeType volumeType, AsyncCallback_Boolean_Void callback_); + [Deprecated] async boolean isMute(AudioVolumeType volumeType); - [Throws] + [Deprecated, Throws] boolean isMuteSync(AudioVolumeType volumeType); void setRingerMode(AudioRingMode mode, AsyncCallback_Void callback_); async void setRingerMode(AudioRingMode mode); @@ -707,6 +779,12 @@ namespace audio { AudioRingMode getRingerModeSync(); [Throws, DtsName="on", DtsTag="'ringerModeChange'"] void onRingerModeChange(Callback_AudioRingMode_Void callback_); + [Throws, DtsName="on", DtsTag="'micStateChange'"] + void onMicStateChange(Callback_MicStateChangeEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'ringerModeChange'"] + void offRingerModeChange(optional Callback_AudioRingMode_Void callback_); + [Throws, DtsName="off", DtsTag="'micStateChange'"] + void offMicStateChange(optional Callback_MicStateChangeEvent_Void callback_); [Deprecated] void setMicrophoneMute(boolean mute, AsyncCallback_Void callback_); [Deprecated] @@ -720,10 +798,6 @@ namespace audio { void isMicrophoneMute(AsyncCallback_Boolean_Void callback_); async boolean isMicrophoneMute(); boolean isMicrophoneMuteSync(); - [Throws, DtsName="on", DtsTag="'micStateChange'"] - void onMicStateChange(Callback_MicStateChangeEvent_Void callback_); - [Throws, DtsName="off", DtsTag="'micStateChange'"] - void offMicStateChange(optional Callback_MicStateChangeEvent_Void callback_); boolean isVolumeUnadjustable(); [Throws] void adjustVolumeByStep(VolumeAdjustType adjustType, AsyncCallback_Void callback_); @@ -733,24 +807,21 @@ namespace audio { void adjustSystemVolumeByStep(AudioVolumeType volumeType, VolumeAdjustType adjustType, AsyncCallback_Void callback_); [Throws] async void adjustSystemVolumeByStep(AudioVolumeType volumeType, VolumeAdjustType adjustType); - [Throws] + [Deprecated, Throws] void getSystemVolumeInDb(AudioVolumeType volumeType, number volumeLevel, DeviceType device, AsyncCallback_Number_Void callback_); - [Throws] + [Deprecated, Throws] async number getSystemVolumeInDb(AudioVolumeType volumeType, number volumeLevel, DeviceType device); - [Throws] + [Deprecated, Throws] number getSystemVolumeInDbSync(AudioVolumeType volumeType, number volumeLevel, DeviceType device); [Throws] async number getMaxAmplitudeForInputDevice(AudioDeviceDescriptor inputDevice); [Throws] async number getMaxAmplitudeForOutputDevice(AudioDeviceDescriptor outputDevice); - }; [Entity=Interface] interface AudioSpatialEnabledStateForDevice { - attribute AudioDeviceDescriptor deviceDescriptor; attribute boolean enabled; - }; [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); @@ -758,7 +829,6 @@ namespace audio { callback Callback_AudioSpatialEnabledStateForDevice_Void = void (AudioSpatialEnabledStateForDevice parameter); [Entity=Interface] interface AudioSpatializationManager { - [Throws] boolean isSpatializationSupported(); [Throws] @@ -781,10 +851,22 @@ namespace audio { void onSpatializationEnabledChange(Callback_Boolean_Void callback_); [Throws, DtsName="on", DtsTag="'spatializationEnabledChangeForAnyDevice'"] void onSpatializationEnabledChangeForAnyDevice(Callback_AudioSpatialEnabledStateForDevice_Void callback_); + [Deprecated, Throws, DtsName="on", DtsTag="'headTrackingEnabledChange'"] + void onHeadTrackingEnabledChange(Callback_Boolean_Void callback_); + [Throws, DtsName="on", DtsTag="'headTrackingEnabledChangeForAnyDevice'"] + void onHeadTrackingEnabledChangeForAnyDevice(Callback_AudioSpatialEnabledStateForDevice_Void callback_); + [Throws, DtsName="on", DtsTag="'spatializationEnabledChangeForCurrentDevice'"] + void onSpatializationEnabledChangeForCurrentDevice(Callback_Boolean_Void callback_); [Deprecated, Throws, DtsName="off", DtsTag="'spatializationEnabledChange'"] void offSpatializationEnabledChange(optional Callback_Boolean_Void callback_); [Throws, DtsName="off", DtsTag="'spatializationEnabledChangeForAnyDevice'"] void offSpatializationEnabledChangeForAnyDevice(optional Callback_AudioSpatialEnabledStateForDevice_Void callback_); + [Deprecated, Throws, DtsName="off", DtsTag="'headTrackingEnabledChange'"] + void offHeadTrackingEnabledChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'headTrackingEnabledChangeForAnyDevice'"] + void offHeadTrackingEnabledChangeForAnyDevice(optional Callback_AudioSpatialEnabledStateForDevice_Void callback_); + [Throws, DtsName="off", DtsTag="'spatializationEnabledChangeForCurrentDevice'"] + void offSpatializationEnabledChangeForCurrentDevice(optional Callback_Boolean_Void callback_); [Deprecated, Throws] void setHeadTrackingEnabled(boolean enable, AsyncCallback_Void callback_); [Deprecated, Throws] @@ -795,65 +877,57 @@ namespace audio { boolean isHeadTrackingEnabled(); [Throws] boolean isHeadTrackingEnabled(AudioDeviceDescriptor deviceDescriptor); - [Deprecated, Throws, DtsName="on", DtsTag="'headTrackingEnabledChange'"] - void onHeadTrackingEnabledChange(Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'headTrackingEnabledChangeForAnyDevice'"] - void onHeadTrackingEnabledChangeForAnyDevice(Callback_AudioSpatialEnabledStateForDevice_Void callback_); - [Deprecated, Throws, DtsName="off", DtsTag="'headTrackingEnabledChange'"] - void offHeadTrackingEnabledChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'headTrackingEnabledChangeForAnyDevice'"] - void offHeadTrackingEnabledChangeForAnyDevice(optional Callback_AudioSpatialEnabledStateForDevice_Void callback_); [Throws] void updateSpatialDeviceState(AudioSpatialDeviceState spatialDeviceState); [Throws] void setSpatializationSceneType(AudioSpatializationSceneType spatializationSceneType); [Throws] AudioSpatializationSceneType getSpatializationSceneType(); - + boolean isSpatializationEnabledForCurrentDevice(); }; [Entity=Interface] interface AudioEffectManager { - [Throws] sequence getSupportedAudioEffectProperty(); [Throws] void setAudioEffectProperty(sequence propertyArray); [Throws] sequence getAudioEffectProperty(); - + }; + [Entity=Interface] + interface AudioCollaborativeManager { + [Throws] + boolean isCollaborativePlaybackSupported(); + [Throws] + async void setCollaborativePlaybackEnabledForDevice(AudioDeviceDescriptor deviceDescriptor, boolean enabled); + [Throws] + boolean isCollaborativePlaybackEnabledForDevice(AudioDeviceDescriptor deviceDescriptor); }; dictionary ConnectType { - number CONNECT_TYPE_LOCAL = 1; number CONNECT_TYPE_DISTRIBUTED = 2; - }; [Entity=Interface] interface VolumeGroupInfo { - readonly attribute String networkId; readonly attribute number groupId; readonly attribute number mappingId; readonly attribute String groupName; readonly attribute ConnectType type; - }; typedef sequence<[TypeArguments="VolumeGroupInfo"] Readonly> VolumeGroupInfos; typedef sequence<[TypeArguments="AudioRendererChangeInfo"] Readonly> AudioRendererChangeInfoArray; [Entity=Interface] interface AudioRendererChangeInfo { - readonly attribute number streamId; readonly attribute number clientUid; readonly attribute AudioRendererInfo rendererInfo; readonly attribute AudioState rendererState; readonly attribute AudioDeviceDescriptors deviceDescriptors; - }; typedef sequence<[TypeArguments="AudioCapturerChangeInfo"] Readonly> AudioCapturerChangeInfoArray; [Entity=Interface] interface AudioCapturerChangeInfo { - readonly attribute number streamId; readonly attribute number clientUid; readonly attribute AudioCapturerInfo capturerInfo; @@ -861,11 +935,9 @@ namespace audio { readonly attribute AudioDeviceDescriptors deviceDescriptors; [Optional] readonly attribute boolean muted; - }; [Entity=Interface] interface AudioDeviceDescriptor { - readonly attribute DeviceRole deviceRole; readonly attribute DeviceType deviceType; readonly attribute number id; @@ -880,22 +952,34 @@ namespace audio { readonly attribute String displayName; [Optional] readonly attribute sequence encodingTypes; - + [Optional] + readonly attribute boolean spatializationSupported; + [Optional] + readonly attribute number dmDeviceType; }; typedef sequence<[TypeArguments="AudioDeviceDescriptor"] Readonly> AudioDeviceDescriptors; + dictionary AudioVolumeMode { + number SYSTEM_GLOBAL = 0; + number APP_INDIVIDUAL = 1; + }; [Entity=Interface] interface VolumeEvent { - attribute AudioVolumeType volumeType; attribute number volume; attribute boolean updateUi; attribute number volumeGroupId; attribute String networkId; - + [Optional] + attribute AudioVolumeMode volumeMode; + }; + [Entity=Interface] + interface StreamVolumeEvent { + attribute StreamUsage streamUsage; + attribute number volume; + attribute boolean updateUi; }; [Entity=Interface, Deprecated] interface InterruptAction { - [Deprecated] attribute InterruptActionType actionType; [Optional, Deprecated] @@ -904,62 +988,54 @@ namespace audio { attribute InterruptHint hint; [Optional, Deprecated] attribute boolean activated; - }; [Entity=Interface, Deprecated] interface AudioInterrupt { - [Deprecated] attribute StreamUsage streamUsage; [Deprecated] attribute ContentType contentType; [Deprecated] attribute boolean pauseWhenDucked; - }; [Entity=Interface] interface MicStateChangeEvent { - attribute boolean mute; - }; [Entity=Interface] interface DeviceChangeAction { - attribute DeviceChangeType type; attribute AudioDeviceDescriptors deviceDescriptors; - }; dictionary ChannelBlendMode { - number MODE_DEFAULT = 0; number MODE_BLEND_LR = 1; number MODE_ALL_LEFT = 2; number MODE_ALL_RIGHT = 3; - }; dictionary AudioStreamDeviceChangeReason { - number REASON_UNKNOWN = 0; number REASON_NEW_DEVICE_AVAILABLE = 1; number REASON_OLD_DEVICE_UNAVAILABLE = 2; number REASON_OVERRODE = 3; - + number REASON_SESSION_ACTIVATED = 4; + number REASON_STREAM_PRIORITY_CHANGED = 5; }; [Entity=Interface] interface AudioStreamDeviceChangeInfo { - attribute AudioDeviceDescriptors devices; attribute AudioStreamDeviceChangeReason changeReason; - }; dictionary AudioDataCallbackResult { - number INVALID = -1; number VALID = 0; - }; callback AudioRendererWriteDataCallback = AudioDataCallbackResult (buffer data); + [Entity=Interface] + interface AudioTimestampInfo { + readonly attribute number framePos; + readonly attribute number timestamp; + }; [Async, Synthetic] callback AsyncCallback_AudioRendererInfo_Void = void (AudioRendererInfo result); [Async, Synthetic] @@ -978,7 +1054,6 @@ namespace audio { callback Callback_AudioStreamDeviceChangeInfo_Void = void (AudioStreamDeviceChangeInfo parameter); [Entity=Interface] interface AudioRenderer { - readonly attribute AudioState state; void getRendererInfo(AsyncCallback_AudioRendererInfo_Void callback_); async AudioRendererInfo getRendererInfo(); @@ -1004,6 +1079,10 @@ namespace audio { void getAudioTime(AsyncCallback_Number_Void callback_); async number getAudioTime(); number getAudioTimeSync(); + [Throws] + async AudioTimestampInfo getAudioTimestampInfo(); + [Throws] + AudioTimestampInfo getAudioTimestampInfoSync(); void drain(AsyncCallback_Void callback_); async void drain(); [Throws] @@ -1057,34 +1136,39 @@ namespace audio { boolean getSilentModeAndMixWithOthers(); [Throws] async void setDefaultOutputDevice(DeviceType deviceType); + [Throws] + async void setLoudnessGain(number loudnessGain); + number getLoudnessGain(); [Throws, DtsName="on", DtsTag="'audioInterrupt'"] void onAudioInterrupt(Callback_InterruptEvent_Void callback_); [DtsName="on", DtsTag="'markReach'"] void onMarkReach(number frame, Callback_Number_Void callback_); - [DtsName="off", DtsTag="'markReach'"] - void offMarkReach(); [DtsName="on", DtsTag="'periodReach'"] void onPeriodReach(number frame, Callback_Number_Void callback_); - [DtsName="off", DtsTag="'periodReach'"] - void offPeriodReach(); [DtsName="on", DtsTag="'stateChange'"] void onStateChange(Callback_AudioState_Void callback_); [Throws, DtsName="on", DtsTag="'outputDeviceChange'"] void onOutputDeviceChange(Callback_AudioDeviceDescriptors_Void callback_); [Throws, DtsName="on", DtsTag="'outputDeviceChangeWithInfo'"] void onOutputDeviceChangeWithInfo(Callback_AudioStreamDeviceChangeInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'writeData'"] + void onWriteData(AudioRendererWriteDataCallback callback_); + [Throws, DtsName="off", DtsTag="'audioInterrupt'"] + void offAudioInterrupt(optional Callback_InterruptEvent_Void callback_); + [DtsName="off", DtsTag="'markReach'"] + void offMarkReach(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'periodReach'"] + void offPeriodReach(optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional Callback_AudioState_Void callback_); [Throws, DtsName="off", DtsTag="'outputDeviceChange'"] void offOutputDeviceChange(optional Callback_AudioDeviceDescriptors_Void callback_); [Throws, DtsName="off", DtsTag="'outputDeviceChangeWithInfo'"] void offOutputDeviceChangeWithInfo(optional Callback_AudioStreamDeviceChangeInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'writeData'"] - void onWriteData(AudioRendererWriteDataCallback callback_); [Throws, DtsName="off", DtsTag="'writeData'"] void offWriteData(optional AudioRendererWriteDataCallback callback_); - }; dictionary SourceType { - number SOURCE_TYPE_INVALID = -1; number SOURCE_TYPE_MIC = 0; number SOURCE_TYPE_VOICE_RECOGNITION = 1; @@ -1097,37 +1181,29 @@ namespace audio { number SOURCE_TYPE_VOICE_TRANSCRIPTION = 12; number SOURCE_TYPE_CAMCORDER = 13; number SOURCE_TYPE_UNPROCESSED = 14; - + number SOURCE_TYPE_LIVE = 17; }; [Entity=Interface] interface AudioCapturerInfo { - attribute SourceType source; attribute number capturerFlags; - }; [Entity=Interface] interface AudioCapturerOptions { - attribute AudioStreamInfo streamInfo; attribute AudioCapturerInfo capturerInfo; [Optional, Deprecated] attribute AudioPlaybackCaptureConfig playbackCaptureConfig; - }; [Entity=Interface, Deprecated] interface CaptureFilterOptions { - [Deprecated] attribute sequence usages; - }; [Entity=Interface, Deprecated] interface AudioPlaybackCaptureConfig { - [Deprecated] attribute CaptureFilterOptions filterOptions; - }; [Async, Synthetic] callback AsyncCallback_AudioCapturerInfo_Void = void (AudioCapturerInfo result); @@ -1139,7 +1215,6 @@ namespace audio { callback Callback_Buffer_Void = void (buffer parameter); [Entity=Interface] interface AudioCapturer { - readonly attribute AudioState state; void getCapturerInfo(AsyncCallback_AudioCapturerInfo_Void callback_); async AudioCapturerInfo getCapturerInfo(); @@ -1159,6 +1234,10 @@ namespace audio { void getAudioTime(AsyncCallback_Number_Void callback_); async number getAudioTime(); number getAudioTimeSync(); + [Throws] + async AudioTimestampInfo getAudioTimestampInfo(); + [Throws] + AudioTimestampInfo getAudioTimestampInfoSync(); void stop(AsyncCallback_Void callback_); async void stop(); void release(AsyncCallback_Void callback_); @@ -1170,74 +1249,68 @@ namespace audio { AudioCapturerChangeInfo getCurrentAudioCapturerChangeInfo(); async number getOverflowCount(); number getOverflowCountSync(); + [Throws] + async void setWillMuteWhenInterrupted(boolean muteWhenInterrupted); [DtsName="on", DtsTag="'markReach'"] void onMarkReach(number frame, Callback_Number_Void callback_); - [DtsName="off", DtsTag="'markReach'"] - void offMarkReach(); [DtsName="on", DtsTag="'periodReach'"] void onPeriodReach(number frame, Callback_Number_Void callback_); - [DtsName="off", DtsTag="'periodReach'"] - void offPeriodReach(); [DtsName="on", DtsTag="'stateChange'"] void onStateChange(Callback_AudioState_Void callback_); [Throws, DtsName="on", DtsTag="'audioInterrupt'"] void onAudioInterrupt(Callback_InterruptEvent_Void callback_); - [Throws, DtsName="off", DtsTag="'audioInterrupt'"] - void offAudioInterrupt(); [Throws, DtsName="on", DtsTag="'inputDeviceChange'"] void onInputDeviceChange(Callback_AudioDeviceDescriptors_Void callback_); - [Throws, DtsName="off", DtsTag="'inputDeviceChange'"] - void offInputDeviceChange(optional Callback_AudioDeviceDescriptors_Void callback_); [Throws, DtsName="on", DtsTag="'audioCapturerChange'"] void onAudioCapturerChange(Callback_AudioCapturerChangeInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'audioCapturerChange'"] - void offAudioCapturerChange(optional Callback_AudioCapturerChangeInfo_Void callback_); [Throws, DtsName="on", DtsTag="'readData'"] void onReadData(Callback_Buffer_Void callback_); + [DtsName="off", DtsTag="'markReach'"] + void offMarkReach(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'periodReach'"] + void offPeriodReach(optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional Callback_AudioState_Void callback_); + [Throws, DtsName="off", DtsTag="'audioInterrupt'"] + void offAudioInterrupt(); + [Throws, DtsName="off", DtsTag="'inputDeviceChange'"] + void offInputDeviceChange(optional Callback_AudioDeviceDescriptors_Void callback_); + [Throws, DtsName="off", DtsTag="'audioCapturerChange'"] + void offAudioCapturerChange(optional Callback_AudioCapturerChangeInfo_Void callback_); [Throws, DtsName="off", DtsTag="'readData'"] void offReadData(optional Callback_Buffer_Void callback_); - + [Throws] + void setInputDeviceToAccessory(); }; dictionary AsrNoiseSuppressionMode { - number BYPASS = 0; number STANDARD = 1; number NEAR_FIELD = 2; number FAR_FIELD = 3; - }; dictionary AsrAecMode { - number BYPASS = 0; number STANDARD = 1; - }; dictionary AsrVoiceControlMode { - number AUDIO_2_VOICE_TX = 0; number AUDIO_MIX_2_VOICE_TX = 1; number AUDIO_2_VOICE_TX_EX = 2; number AUDIO_MIX_2_VOICE_TX_EX = 3; - }; dictionary AsrVoiceMuteMode { - number OUTPUT_MUTE = 0; number INPUT_MUTE = 1; number TTS_MUTE = 2; number CALL_MUTE = 3; number OUTPUT_MUTE_EX = 4; - }; dictionary AsrWhisperDetectionMode { - number BYPASS = 0; number STANDARD = 1; - }; [Entity=Interface] interface AsrProcessingController { - [Throws] boolean setAsrAecMode(AsrAecMode mode); [Throws] @@ -1256,10 +1329,10 @@ namespace audio { boolean setAsrWhisperDetectionMode(AsrWhisperDetectionMode mode); [Throws] AsrWhisperDetectionMode getAsrWhisperDetectionMode(); - }; + [Throws] + AsrProcessingController createAsrProcessingController(AudioCapturer audioCapturer); dictionary ToneType { - number TONE_TYPE_DIAL_0 = 0; number TONE_TYPE_DIAL_1 = 1; number TONE_TYPE_DIAL_2 = 2; @@ -1283,15 +1356,14 @@ namespace audio { number TONE_TYPE_COMMON_SUPERVISORY_RADIO_NOT_AVAILABLE = 104; number TONE_TYPE_COMMON_SUPERVISORY_CALL_WAITING = 106; number TONE_TYPE_COMMON_SUPERVISORY_RINGTONE = 107; + number TONE_TYPE_COMMON_SUPERVISORY_CALL_HOLDING = 108; number TONE_TYPE_COMMON_PROPRIETARY_BEEP = 200; number TONE_TYPE_COMMON_PROPRIETARY_ACK = 201; number TONE_TYPE_COMMON_PROPRIETARY_PROMPT = 203; number TONE_TYPE_COMMON_PROPRIETARY_DOUBLE_BEEP = 204; - }; [Entity=Interface] interface TonePlayer { - void load(ToneType type, AsyncCallback_Void callback_); async void load(ToneType type); void start(AsyncCallback_Void callback_); @@ -1300,44 +1372,34 @@ namespace audio { async void stop(); void release(AsyncCallback_Void callback_); async void release(); - }; typedef sequence<[TypeArguments="AudioEffectMode"] Readonly> AudioEffectInfoArray; dictionary AudioEffectMode { - number EFFECT_NONE = 0; number EFFECT_DEFAULT = 1; - }; [Entity=Interface] interface AudioSpatialDeviceState { - attribute String address; attribute boolean isSpatializationSupported; attribute boolean isHeadTrackingSupported; attribute AudioSpatialDeviceType spatialDeviceType; - }; dictionary AudioSpatialDeviceType { - number SPATIAL_DEVICE_TYPE_NONE = 0; number SPATIAL_DEVICE_TYPE_IN_EAR_HEADPHONE = 1; number SPATIAL_DEVICE_TYPE_HALF_IN_EAR_HEADPHONE = 2; number SPATIAL_DEVICE_TYPE_OVER_EAR_HEADPHONE = 3; number SPATIAL_DEVICE_TYPE_GLASSES = 4; number SPATIAL_DEVICE_TYPE_OTHERS = 5; - }; dictionary AudioSpatializationSceneType { - number DEFAULT = 0; number MUSIC = 1; number MOVIE = 2; number AUDIOBOOK = 3; - }; dictionary AudioChannelLayout { - number CH_LAYOUT_UNKNOWN = 0; number CH_LAYOUT_MONO = 4; number CH_LAYOUT_STEREO = 3; @@ -1387,35 +1449,29 @@ namespace audio { number CH_LAYOUT_AMB_ORDER3_ACN_N3D = 17592186044419; number CH_LAYOUT_AMB_ORDER3_ACN_SN3D = 17592186048515; number CH_LAYOUT_AMB_ORDER3_FUMA = 17592186044675; - }; dictionary EffectFlag { - number RENDER_EFFECT_FLAG = 0; number CAPTURE_EFFECT_FLAG = 1; - }; [Entity=Interface] interface AudioEffectProperty { - attribute String name; attribute String category; attribute EffectFlag flag; - - }; - [GlobalScope] - interface GlobalScope_audio_ohos_multimedia_audio { - - static AudioManager getAudioManager(); - static void createAudioCapturer(AudioCapturerOptions options, AsyncCallback_AudioCapturer_Void callback_); - static async AudioCapturer createAudioCapturer(AudioCapturerOptions options); - static void createAudioRenderer(AudioRendererOptions options, AsyncCallback_AudioRenderer_Void callback_); - static async AudioRenderer createAudioRenderer(AudioRendererOptions options); - static void createTonePlayer(AudioRendererInfo options, AsyncCallback_TonePlayer_Void callback_); - static async TonePlayer createTonePlayer(AudioRendererInfo options); - [Throws] - static AsrProcessingController createAsrProcessingController(AudioCapturer audioCapturer); - - }; - + }; + [Synthetic] + callback Callback_AudioLoopbackStatus_Void = void (AudioLoopbackStatus parameter); + [Entity=Interface] + interface AudioLoopback { + async AudioLoopbackStatus getStatus(); + [Throws] + async void setVolume(number volume); + [Throws, DtsName="on", DtsTag="'statusChange'"] + void onStatusChange(Callback_AudioLoopbackStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'statusChange'"] + void offStatusChange(optional Callback_AudioLoopbackStatus_Void callback_); + [Throws] + async boolean enable(boolean enable); + }; }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.audioHaptic.idl b/idl/@ohos.multimedia.audioHaptic.idl index 8e228a4..4cfdb29 100644 --- a/idl/@ohos.multimedia.audioHaptic.idl +++ b/idl/@ohos.multimedia.audioHaptic.idl @@ -1,26 +1,22 @@ -package ohos.multimedia; +package ohos.multimedia.audioHaptic; import ohos.base.Callback as Callback; -import ohos.multimedia.audio as audio; +import ohos.multimedia.audio.default as audio; +[DefaultExport] namespace audioHaptic { - + AudioHapticManager getAudioHapticManager(); dictionary AudioLatencyMode { - number AUDIO_LATENCY_MODE_NORMAL = 0; number AUDIO_LATENCY_MODE_FAST = 1; - }; [Entity=Interface] interface AudioHapticPlayerOptions { - [Optional] attribute boolean muteAudio; [Optional] attribute boolean muteHaptics; - }; [Entity=Interface] interface AudioHapticManager { - [Throws] async number registerSource(String audioUri, String hapticUri); [Throws] @@ -31,21 +27,26 @@ namespace audioHaptic { void setStreamUsage(number id, audio.StreamUsage usage); [Throws] async AudioHapticPlayer createPlayer(number id, optional AudioHapticPlayerOptions options); - + async number registerSourceFromFd(AudioHapticFileDescriptor audioFd, AudioHapticFileDescriptor hapticFd); }; dictionary AudioHapticType { - number AUDIO_HAPTIC_TYPE_AUDIO = 0; number AUDIO_HAPTIC_TYPE_HAPTIC = 1; - + }; + [Entity=Interface] + interface AudioHapticFileDescriptor { + attribute number fd; + [Optional] + attribute number length; + [Optional] + attribute number offset; }; [Synthetic] callback Callback_Void = void (); [Synthetic] - callback Callback_audio_InterruptEvent_Void = void (audio.InterruptEvent parameter); + callback Callback_Audio_InterruptEvent_Void = void (audio.InterruptEvent parameter); [Entity=Interface] interface AudioHapticPlayer { - [Throws] boolean isMuted(AudioHapticType type); [Throws] @@ -56,19 +57,25 @@ namespace audioHaptic { async void release(); [DtsName="on", DtsTag="'endOfStream'"] void onEndOfStream(Callback_Void callback_); + [DtsName="on", DtsTag="'audioInterrupt'"] + void onAudioInterrupt(Callback_Audio_InterruptEvent_Void callback_); [DtsName="off", DtsTag="'endOfStream'"] void offEndOfStream(optional Callback_Void callback_); - [DtsName="on", DtsTag="'audioInterrupt'"] - void onAudioInterrupt(Callback_audio_InterruptEvent_Void callback_); [DtsName="off", DtsTag="'audioInterrupt'"] - void offAudioInterrupt(optional Callback_audio_InterruptEvent_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_audioHaptic_ohos_multimedia_audioHaptic { - - static AudioHapticManager getAudioHapticManager(); - + void offAudioInterrupt(optional Callback_Audio_InterruptEvent_Void callback_); + [Throws] + void enableHapticsInSilentMode(boolean enable); + [Throws] + async void setVolume(number volume); + [Throws] + boolean isHapticsIntensityAdjustmentSupported(); + [Throws] + async void setHapticsIntensity(number intensity); + [Throws] + boolean isHapticsRampSupported(); + [Throws] + async void setHapticsRamp(number duration, number startIntensity, number endIntensity); + [Throws] + async void setLoop(boolean loop); }; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.avCastPickerParam.idl b/idl/@ohos.multimedia.avCastPickerParam.idl index 78b555e..d6d5a77 100644 --- a/idl/@ohos.multimedia.avCastPickerParam.idl +++ b/idl/@ohos.multimedia.avCastPickerParam.idl @@ -1,20 +1,14 @@ package ohos.multimedia.avCastPickerParam; dictionary AVCastPickerState { - number STATE_APPEARING = 0; number STATE_DISAPPEARING = 1; - }; dictionary AVCastPickerStyle { - number STYLE_PANEL = 0; number STYLE_MENU = 1; - }; dictionary AVCastPickerColorMode { - number AUTO = 0; number DARK = 1; number LIGHT = 2; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.avsession.idl b/idl/@ohos.multimedia.avsession.idl index 0439c00..09b51fe 100644 --- a/idl/@ohos.multimedia.avsession.idl +++ b/idl/@ohos.multimedia.avsession.idl @@ -1,83 +1,188 @@ -package ohos.multimedia; +package ohos.multimedia.avsession; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.WantAgent as WantAgent; +import ohos.wantAgent.WantAgent as WantAgent; import ohos.multimodalInput.keyEvent.KeyEvent as KeyEvent; -import bundleManager.ElementName as ElementName; -import ohos.multimedia.image as image; -import ohos.multimedia.audio as audio; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.multimedia.image.default as image; +import ohos.multimedia.audio.default as audio; import ohos.multimedia.avCastPickerParam.AVCastPickerState as AVCastPickerState; import ohos.multimedia.avCastPickerParam.AVCastPickerColorMode as AVCastPickerColorMode; -import ohos.multimedia.media as media; -import application.Context as Context; +import ohos.multimedia.media.default as media; +import application.BaseContext.default as Context; +import ohos.graphics.hdrCapability.default as hdrCapability; +[DefaultExport] namespace avSession { - [Async, Synthetic] callback AsyncCallback_AVSession_Void = void (AVSession result); + [Throws] + void createAVSession(Context context, String tag, AVSessionType type, AsyncCallback_AVSession_Void callback_); + [Throws] + async AVSession createAVSession(Context context, String tag, AVSessionType type); [Async, Synthetic] callback AsyncCallback_Array_Readonly_Void = void (sequence<[TypeArguments="AVSessionDescriptor"] Readonly> result); + [Throws] + void getAllSessionDescriptors(AsyncCallback_Array_Readonly_Void callback_); + [Throws] + async sequence<[TypeArguments="AVSessionDescriptor"] Readonly> getAllSessionDescriptors(); + [Throws] + void getHistoricalSessionDescriptors(number maxSize, AsyncCallback_Array_Readonly_Void callback_); + [Throws] + async sequence<[TypeArguments="AVSessionDescriptor"] Readonly> getHistoricalSessionDescriptors(optional number maxSize); + [Throws] + void getHistoricalAVQueueInfos(number maxSize, number maxAppSize, AsyncCallback_Array_Readonly_Void callback_); + [Throws] + async sequence<[TypeArguments="AVQueueInfo"] Readonly> getHistoricalAVQueueInfos(number maxSize, number maxAppSize); [Async, Synthetic] callback AsyncCallback_AVSessionController_Void = void (AVSessionController result); + [Throws] + void createController(String sessionId, AsyncCallback_AVSessionController_Void callback_); + [Throws] + async AVSessionController createController(String sessionId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void castAudio((SessionToken or String) session, sequence audioDevices, AsyncCallback_Void callback_); + [Throws] + async void castAudio((SessionToken or String) session, sequence audioDevices); + [Throws] + async void startAVPlayback(String bundleName, String assetId); + [Throws] + async sequence getDistributedSessionController(DistributedSessionType distributedSessionType); [Entity=Interface] interface SessionToken { - attribute String sessionId; [Optional] attribute number pid; [Optional] attribute number uid; - }; [Synthetic] callback Callback_AVSessionDescriptor_Void = void (AVSessionDescriptor session); + [Throws, DtsName="on", DtsTag="'sessionCreate'"] + void onSessionCreate(Callback_AVSessionDescriptor_Void callback_); + [Throws, DtsName="on", DtsTag="'sessionDestroy'"] + void onSessionDestroy(Callback_AVSessionDescriptor_Void callback_); + [Throws, DtsName="on", DtsTag="'topSessionChange'"] + void onTopSessionChange(Callback_AVSessionDescriptor_Void callback_); + [Throws, DtsName="off", DtsTag="'sessionCreate'"] + void offSessionCreate(optional Callback_AVSessionDescriptor_Void callback_); + [Throws, DtsName="off", DtsTag="'sessionDestroy'"] + void offSessionDestroy(optional Callback_AVSessionDescriptor_Void callback_); + [Throws, DtsName="off", DtsTag="'topSessionChange'"] + void offTopSessionChange(optional Callback_AVSessionDescriptor_Void callback_); [Synthetic] callback Callback_Void = void (); + [Throws, DtsName="on", DtsTag="'sessionServiceDie'"] + void onSessionServiceDie(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'sessionServiceDie'"] + void offSessionServiceDie(optional Callback_Void callback_); [Synthetic] callback Callback_Array_AVSessionController_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'distributedSessionChange'"] + void onDistributedSessionChange(DistributedSessionType distributedSessionType, Callback_Array_AVSessionController_Void callback_); + [Throws, DtsName="off", DtsTag="'distributedSessionChange'"] + void offDistributedSessionChange(DistributedSessionType distributedSessionType, optional Callback_Array_AVSessionController_Void callback_); + [Throws] + void sendSystemAVKeyEvent(KeyEvent event, AsyncCallback_Void callback_); + [Throws] + async void sendSystemAVKeyEvent(KeyEvent event); + [Throws] + void sendSystemControlCommand(AVControlCommand command, AsyncCallback_Void callback_); + [Throws] + async void sendSystemControlCommand(AVControlCommand command); dictionary ProtocolType { - number TYPE_LOCAL = 0; number TYPE_CAST_PLUS_MIRROR = 1; number TYPE_CAST_PLUS_STREAM = 2; number TYPE_DLNA = 4; - + number TYPE_CAST_PLUS_AUDIO = 8; }; dictionary DistributedSessionType { - number TYPE_SESSION_REMOTE = 0; number TYPE_SESSION_MIGRATE_IN = 1; number TYPE_SESSION_MIGRATE_OUT = 2; - }; + [Throws] + void startCastDeviceDiscovery(AsyncCallback_Void callback_); + [Throws] + void startCastDeviceDiscovery(number filter, AsyncCallback_Void callback_); + [Throws] + async void startCastDeviceDiscovery(optional number filter, optional sequence drmSchemes); + [Throws] + void stopCastDeviceDiscovery(AsyncCallback_Void callback_); + [Throws] + async void stopCastDeviceDiscovery(); + [Throws] + void setDiscoverable(boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setDiscoverable(boolean enable); [Synthetic] callback Callback_OutputDeviceInfo_Void = void (OutputDeviceInfo device); + [Throws, DtsName="on", DtsTag="'deviceAvailable'"] + void onDeviceAvailable(Callback_OutputDeviceInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceAvailable'"] + void offDeviceAvailable(optional Callback_OutputDeviceInfo_Void callback_); [Synthetic] callback Callback_String_Void = void (String deviceId); + [Throws, DtsName="on", DtsTag="'deviceOffline'"] + void onDeviceOffline(Callback_String_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceOffline'"] + void offDeviceOffline(optional Callback_String_Void callback_); [Async, Synthetic] callback AsyncCallback_AVCastController_Void = void (AVCastController result); + [Throws] + void getAVCastController(String sessionId, AsyncCallback_AVCastController_Void callback_); + [Throws] + async AVCastController getAVCastController(String sessionId); + [Throws] + void startCasting(SessionToken session, OutputDeviceInfo device, AsyncCallback_Void callback_); + [Throws] + async void startCasting(SessionToken session, OutputDeviceInfo device); + [Throws] + void stopCasting(SessionToken session, AsyncCallback_Void callback_); + [Throws] + async void stopCasting(SessionToken session); + [Throws] + async void startDeviceLogging(String url, optional number maxSize); + [Throws] + async void stopDeviceLogging(); [Synthetic] callback Callback_DeviceLogEventCode_Void = void (DeviceLogEventCode parameter); + [Throws, DtsName="on", DtsTag="'deviceLogEvent'"] + void onDeviceLogEvent(Callback_DeviceLogEventCode_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceLogEvent'"] + void offDeviceLogEvent(optional Callback_DeviceLogEventCode_Void callback_); dictionary DeviceLogEventCode { - number DEVICE_LOG_FULL = 1; number DEVICE_LOG_EXCEPTION = 2; - }; + [Entity=Interface] + interface DeviceState { + readonly attribute String deviceId; + readonly attribute number deviceState; + readonly attribute number reasonCode; + readonly attribute number radarErrorCode; + }; + [Synthetic] + callback Callback_DeviceState_Void = void (DeviceState parameter); + [Throws, DtsName="on", DtsTag="'deviceStateChanged'"] + void onDeviceStateChanged(Callback_DeviceState_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceStateChanged'"] + void offDeviceStateChanged(optional Callback_DeviceState_Void callback_); typedef String AVSessionType; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] Object indexSignature(String key); - }; [Async, Synthetic] callback AsyncCallback_OutputDeviceInfo_Void = void (OutputDeviceInfo result); [Synthetic] - callback Callback_Number_Void = void (optional number time); + callback Callback_Opt_Number_Void = void (optional number time); + [Synthetic] + callback Callback_Number_Void = void (number assetId); [Synthetic] callback Callback_LoopMode_Void = void (LoopMode mode); [Synthetic] @@ -88,9 +193,10 @@ namespace avSession { callback Callback_String_Literal_Empty_Void = void (String command, Literal_Empty args); [Synthetic] callback Callback_CastDisplayInfo_Void = void (CastDisplayInfo parameter); + [Synthetic] + callback Callback_Map_String_Object_Void = void (record parameter); [Entity=Interface] interface AVSession { - readonly attribute String sessionId; readonly attribute AVSessionType sessionType; [Throws] @@ -156,9 +262,41 @@ namespace avSession { [Throws, DtsName="on", DtsTag="'playPrevious'"] void onPlayPrevious(Callback_Void callback_); [Throws, DtsName="on", DtsTag="'fastForward'"] - void onFastForward(Callback_Number_Void callback_); + void onFastForward(Callback_Opt_Number_Void callback_); [Throws, DtsName="on", DtsTag="'rewind'"] - void onRewind(Callback_Number_Void callback_); + void onRewind(Callback_Opt_Number_Void callback_); + [Deprecated, Throws, DtsName="on", DtsTag="'playFromAssetId'"] + void onPlayFromAssetId(Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'playWithAssetId'"] + void onPlayWithAssetId(Callback_String_Void callback_); + [Throws, DtsName="on", DtsTag="'seek'"] + void onSeek(Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'setSpeed'"] + void onSetSpeed(Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'setLoopMode'"] + void onSetLoopMode(Callback_LoopMode_Void callback_); + [Throws, DtsName="on", DtsTag="'setTargetLoopMode'"] + void onSetTargetLoopMode(Callback_LoopMode_Void callback_); + [Throws, DtsName="on", DtsTag="'toggleFavorite'"] + void onToggleFavorite(Callback_String_Void callback_); + [Throws, DtsName="on", DtsTag="'handleKeyEvent'"] + void onHandleKeyEvent(Callback_KeyEvent_Void callback_); + [Throws, DtsName="on", DtsTag="'outputDeviceChange'"] + void onOutputDeviceChange(Callback_ConnectionState_OutputDeviceInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'commonCommand'"] + void onCommonCommand(Callback_String_Literal_Empty_Void callback_); + [Throws, DtsName="on", DtsTag="'skipToQueueItem'"] + void onSkipToQueueItem(Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'answer'"] + void onAnswer(Callback_Void callback_); + [Throws, DtsName="on", DtsTag="'hangUp'"] + void onHangUp(Callback_Void callback_); + [Throws, DtsName="on", DtsTag="'toggleCallMute'"] + void onToggleCallMute(Callback_Void callback_); + [Throws, DtsName="on", DtsTag="'castDisplayChange'"] + void onCastDisplayChange(Callback_CastDisplayInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'customDataChange'"] + void onCustomDataChange(Callback_Map_String_Object_Void callback_); [Throws, DtsName="off", DtsTag="'play'"] void offPlay(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'pause'"] @@ -173,58 +311,40 @@ namespace avSession { void offFastForward(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'rewind'"] void offRewind(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'playFromAssetId'"] - void onPlayFromAssetId(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'playFromAssetId'"] + [Deprecated, Throws, DtsName="off", DtsTag="'playFromAssetId'"] void offPlayFromAssetId(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'seek'"] - void onSeek(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'playWithAssetId'"] + void offPlayWithAssetId(optional Callback_String_Void callback_); [Throws, DtsName="off", DtsTag="'seek'"] void offSeek(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'setSpeed'"] - void onSetSpeed(Callback_Number_Void callback_); [Throws, DtsName="off", DtsTag="'setSpeed'"] void offSetSpeed(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'setLoopMode'"] - void onSetLoopMode(Callback_LoopMode_Void callback_); [Throws, DtsName="off", DtsTag="'setLoopMode'"] void offSetLoopMode(optional Callback_LoopMode_Void callback_); - [Throws, DtsName="on", DtsTag="'toggleFavorite'"] - void onToggleFavorite(Callback_String_Void callback_); + [Throws, DtsName="off", DtsTag="'setTargetLoopMode'"] + void offSetTargetLoopMode(optional Callback_LoopMode_Void callback_); [Throws, DtsName="off", DtsTag="'toggleFavorite'"] void offToggleFavorite(optional Callback_String_Void callback_); - [Throws, DtsName="on", DtsTag="'handleKeyEvent'"] - void onHandleKeyEvent(Callback_KeyEvent_Void callback_); [Throws, DtsName="off", DtsTag="'handleKeyEvent'"] void offHandleKeyEvent(optional Callback_KeyEvent_Void callback_); - [Throws, DtsName="on", DtsTag="'outputDeviceChange'"] - void onOutputDeviceChange(Callback_ConnectionState_OutputDeviceInfo_Void callback_); [Throws, DtsName="off", DtsTag="'outputDeviceChange'"] void offOutputDeviceChange(optional Callback_ConnectionState_OutputDeviceInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'commonCommand'"] - void onCommonCommand(Callback_String_Literal_Empty_Void callback_); [Throws, DtsName="off", DtsTag="'commonCommand'"] void offCommonCommand(optional Callback_String_Literal_Empty_Void callback_); - [Throws, DtsName="on", DtsTag="'skipToQueueItem'"] - void onSkipToQueueItem(Callback_Number_Void callback_); [Throws, DtsName="off", DtsTag="'skipToQueueItem'"] void offSkipToQueueItem(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'answer'"] - void onAnswer(Callback_Void callback_); [Throws, DtsName="off", DtsTag="'answer'"] void offAnswer(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'hangUp'"] - void onHangUp(Callback_Void callback_); [Throws, DtsName="off", DtsTag="'hangUp'"] void offHangUp(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'toggleCallMute'"] - void onToggleCallMute(Callback_Void callback_); [Throws, DtsName="off", DtsTag="'toggleCallMute'"] void offToggleCallMute(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'castDisplayChange'"] - void onCastDisplayChange(Callback_CastDisplayInfo_Void callback_); [Throws, DtsName="off", DtsTag="'castDisplayChange'"] void offCastDisplayChange(optional Callback_CastDisplayInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'customDataChange'"] + void offCustomDataChange(optional Callback_Map_String_Object_Void callback_); + [Throws] + async void sendCustomData(record data); [Throws] void stopCasting(AsyncCallback_Void callback_); [Throws] @@ -241,16 +361,13 @@ namespace avSession { void destroy(AsyncCallback_Void callback_); [Throws] async void destroy(); - }; typedef String AVCastControlCommandType; [Entity=Interface] interface AVCastControlCommand { - attribute AVCastControlCommandType command; [Optional] attribute (media.PlaybackSpeed or number or String or LoopMode) parameter; - }; [Async, Synthetic] callback AsyncCallback_AVPlaybackState_Void = void (AVPlaybackState result); @@ -268,7 +385,6 @@ namespace avSession { callback Callback_Number_Number_Void = void (number width, number height); [Entity=Interface] interface AVCastController { - [Throws] void setDisplaySurface(String surfaceId, AsyncCallback_Void callback_); [Throws] @@ -278,6 +394,14 @@ namespace avSession { [Throws] async AVPlaybackState getAVPlaybackState(); [Throws] + async sequence getSupportedDecoders(); + [Throws] + async ResolutionLevel getRecommendedResolutionLevel(DecoderType decoderType); + [Throws] + async sequence getSupportedHdrCapabilities(); + [Throws] + async sequence getSupportedPlaySpeeds(); + [Throws] void sendControlCommand(AVCastControlCommand command, AsyncCallback_Void callback_); [Throws] async void sendControlCommand(AVCastControlCommand command); @@ -300,84 +424,88 @@ namespace avSession { [Throws] async void processMediaKeyResponse(String assetId, buffer response); [Throws] + async void sendCustomData(record data); + [Throws] void release(AsyncCallback_Void callback_); [Throws] async void release(); [Throws, DtsName="on", DtsTag="'playbackStateChange'"] void onPlaybackStateChange((sequence or String) filter, Callback_AVPlaybackState_Void callback_); - [Throws, DtsName="off", DtsTag="'playbackStateChange'"] - void offPlaybackStateChange(optional Callback_AVPlaybackState_Void callback_); [Throws, DtsName="on", DtsTag="'mediaItemChange'"] void onMediaItemChange(Callback_AVQueueItem_Void callback_); - [Throws, DtsName="off", DtsTag="'mediaItemChange'"] - void offMediaItemChange(); [Throws, DtsName="on", DtsTag="'playNext'"] void onPlayNext(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'playNext'"] - void offPlayNext(); [Throws, DtsName="on", DtsTag="'playPrevious'"] void onPlayPrevious(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'playPrevious'"] - void offPlayPrevious(); [Throws, DtsName="on", DtsTag="'requestPlay'"] void onRequestPlay(Callback_AVQueueItem_Void callback_); - [Throws, DtsName="off", DtsTag="'requestPlay'"] - void offRequestPlay(optional Callback_AVQueueItem_Void callback_); [Throws, DtsName="on", DtsTag="'endOfStream'"] void onEndOfStream(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'endOfStream'"] - void offEndOfStream(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'seekDone'"] void onSeekDone(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'seekDone'"] - void offSeekDone(); [Throws, DtsName="on", DtsTag="'validCommandChange'"] - undefined onValidCommandChange(Callback_Array_AVCastControlCommandType_Void callback_); - [Throws, DtsName="off", DtsTag="'validCommandChange'"] - undefined offValidCommandChange(optional Callback_Array_AVCastControlCommandType_Void callback_); + void onValidCommandChange(Callback_Array_AVCastControlCommandType_Void callback_); [Throws, DtsName="on", DtsTag="'videoSizeChange'"] void onVideoSizeChange(Callback_Number_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'videoSizeChange'"] - void offVideoSizeChange(); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(); [Throws, DtsName="on", DtsTag="'castControlGenericError'"] void onCastControlGenericError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'castControlGenericError'"] - void offCastControlGenericError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'castControlIoError'"] void onCastControlIoError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'castControlIoError'"] - void offCastControlIoError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'castControlParsingError'"] void onCastControlParsingError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'castControlParsingError'"] - void offCastControlParsingError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'castControlDecodingError'"] void onCastControlDecodingError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'castControlDecodingError'"] - void offCastControlDecodingError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'castControlAudioRendererError'"] void onCastControlAudioRendererError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'castControlAudioRendererError'"] - void offCastControlAudioRendererError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'castControlDrmError'"] void onCastControlDrmError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'castControlDrmError'"] - void offCastControlDrmError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'keyRequest'"] void onKeyRequest(KeyRequestCallback callback_); + [Throws, DtsName="on", DtsTag="'customDataChange'"] + void onCustomDataChange(Callback_Map_String_Object_Void callback_); + [Throws, DtsName="off", DtsTag="'playbackStateChange'"] + void offPlaybackStateChange(optional Callback_AVPlaybackState_Void callback_); + [Throws, DtsName="off", DtsTag="'mediaItemChange'"] + void offMediaItemChange(); + [Throws, DtsName="off", DtsTag="'playNext'"] + void offPlayNext(); + [Throws, DtsName="off", DtsTag="'playPrevious'"] + void offPlayPrevious(); + [Throws, DtsName="off", DtsTag="'requestPlay'"] + void offRequestPlay(optional Callback_AVQueueItem_Void callback_); + [Throws, DtsName="off", DtsTag="'endOfStream'"] + void offEndOfStream(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'seekDone'"] + void offSeekDone(); + [Throws, DtsName="off", DtsTag="'validCommandChange'"] + void offValidCommandChange(optional Callback_Array_AVCastControlCommandType_Void callback_); + [Throws, DtsName="off", DtsTag="'videoSizeChange'"] + void offVideoSizeChange(); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(); + [Throws, DtsName="off", DtsTag="'castControlGenericError'"] + void offCastControlGenericError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'castControlIoError'"] + void offCastControlIoError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'castControlParsingError'"] + void offCastControlParsingError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'castControlDecodingError'"] + void offCastControlDecodingError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'castControlAudioRendererError'"] + void offCastControlAudioRendererError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'castControlDrmError'"] + void offCastControlDrmError(optional ErrorCallback callback_); [Throws, DtsName="off", DtsTag="'keyRequest'"] void offKeyRequest(optional KeyRequestCallback callback_); - + [Throws, DtsName="off", DtsTag="'customDataChange'"] + void offCustomDataChange(optional Callback_Map_String_Object_Void callback_); }; [Synthetic] callback Callback_AVCastPickerState_Void = void (AVCastPickerState parameter); [Entity=Class] interface AVCastPickerHelper { - constructor(Context context); [Throws] async void select(optional AVCastPickerOptions options); @@ -385,58 +513,60 @@ namespace avSession { void onPickerStateChange(Callback_AVCastPickerState_Void callback_); [Throws, DtsName="off", DtsTag="'pickerStateChange'"] void offPickerStateChange(optional Callback_AVCastPickerState_Void callback_); - + }; + [Entity=Interface] + interface AudioCapabilities { + readonly attribute sequence streamInfos; }; [Entity=Interface] interface AVCastPickerOptions { - [Optional] attribute AVSessionType sessionType; - }; callback KeyRequestCallback = void (String assetId, buffer requestData); dictionary CastDisplayState { - number STATE_OFF = 1; number STATE_ON = 2; - }; [Entity=Interface] interface CastDisplayInfo { - attribute number id; attribute String name; attribute CastDisplayState state; attribute number width; attribute number height; - }; dictionary ConnectionState { - number STATE_CONNECTING = 0; number STATE_CONNECTED = 1; number STATE_DISCONNECTED = 6; - }; dictionary DisplayTag { - number TAG_AUDIO_VIVID = 1; - + }; + dictionary DecoderType { + String OH_AVCODEC_MIMETYPE_VIDEO_AVC = "video/avc"; + String OH_AVCODEC_MIMETYPE_VIDEO_HEVC = "video/hevc"; + String OH_AVCODEC_MIMETYPE_AUDIO_VIVID = "audio/av3a"; + }; + dictionary ResolutionLevel { + number RESOLUTION_480P = 0; + number RESOLUTION_720P = 1; + number RESOLUTION_1080P = 2; + number RESOLUTION_2K = 3; + number RESOLUTION_4K = 4; }; [Entity=Interface] interface AVQueueInfo { - attribute String bundleName; attribute String avQueueName; attribute String avQueueId; attribute (image.PixelMap or String) avQueueImage; [Optional] attribute number lastPlayedTime; - }; [Entity=Interface] interface AVMetadata { - attribute String assetId; [Optional] attribute String title; @@ -463,7 +593,7 @@ namespace avSession { [Optional] readonly attribute image.PixelMap bundleIcon; [Optional] - attribute Date publishDate; + attribute date publishDate; [Optional] attribute String subtitle; [Optional] @@ -471,6 +601,8 @@ namespace avSession { [Optional] attribute String lyric; [Optional] + attribute String singleLyricText; + [Optional] attribute String previousAssetId; [Optional] attribute String nextAssetId; @@ -482,11 +614,9 @@ namespace avSession { attribute SkipIntervals skipIntervals; [Optional] attribute number displayTags; - }; [Entity=Interface] interface AVMediaDescription { - attribute String assetId; [Optional] attribute String title; @@ -519,6 +649,8 @@ namespace avSession { [Optional] attribute media.AVDataSrcDescriptor dataSrc; [Optional] + attribute boolean pcmSrc; + [Optional] attribute String drmScheme; [Optional] attribute number duration; @@ -530,19 +662,17 @@ namespace avSession { attribute String appName; [Optional] attribute number displayTags; - + [Optional] + attribute String launchClientData; }; [Entity=Interface] interface AVQueueItem { - attribute number itemId; [Optional] attribute AVMediaDescription description; - }; [Entity=Interface] interface AVPlaybackState { - [Optional] attribute PlaybackState state; [Optional] @@ -571,35 +701,27 @@ namespace avSession { attribute number videoHeight; [Optional] attribute Literal_Empty extras; - }; [Entity=Interface] interface PlaybackPosition { - attribute number elapsedTime; attribute number updateTime; - }; [Entity=Interface] interface CallMetadata { - [Optional] attribute String name; [Optional] attribute String phoneNumber; [Optional] attribute image.PixelMap avatar; - }; [Entity=Interface] interface AVCallState { - attribute CallState state; attribute boolean muted; - }; dictionary CallState { - number CALL_STATE_IDLE = 0; number CALL_STATE_INCOMING = 1; number CALL_STATE_ACTIVE = 2; @@ -607,25 +729,19 @@ namespace avSession { number CALL_STATE_WAITING = 4; number CALL_STATE_HOLDING = 5; number CALL_STATE_DISCONNECTING = 6; - }; dictionary AVCastCategory { - number CATEGORY_LOCAL = 0; number CATEGORY_REMOTE = 1; - }; dictionary DeviceType { - number DEVICE_TYPE_LOCAL = 0; number DEVICE_TYPE_TV = 2; number DEVICE_TYPE_SMART_SPEAKER = 3; number DEVICE_TYPE_BLUETOOTH = 10; - }; [Entity=Interface] interface DeviceInfo { - attribute AVCastCategory castCategory; attribute String deviceId; attribute String deviceName; @@ -645,37 +761,33 @@ namespace avSession { [Optional] attribute sequence supportedDrmCapabilities; [Optional] + attribute sequence supportedPullClients; + [Optional] attribute number authenticationStatus; [Optional] attribute boolean isLegacy; [Optional] attribute number mediumTypes; - + [Optional] + attribute AudioCapabilities audioCapabilities; }; [Entity=Interface] interface OutputDeviceInfo { - attribute sequence devices; - }; dictionary LoopMode { - number LOOP_MODE_SEQUENCE = 0; number LOOP_MODE_SINGLE = 1; number LOOP_MODE_LIST = 2; number LOOP_MODE_SHUFFLE = 3; number LOOP_MODE_CUSTOM = 4; - }; dictionary SkipIntervals { - number SECONDS_10 = 10; number SECONDS_15 = 15; number SECONDS_30 = 30; - }; dictionary PlaybackState { - number PLAYBACK_STATE_INITIAL = 0; number PLAYBACK_STATE_PREPARE = 1; number PLAYBACK_STATE_PLAY = 2; @@ -688,11 +800,9 @@ namespace avSession { number PLAYBACK_STATE_ERROR = 9; number PLAYBACK_STATE_IDLE = 10; number PLAYBACK_STATE_BUFFERING = 11; - }; [Entity=Interface] interface AVSessionDescriptor { - attribute String sessionId; attribute AVSessionType type; attribute String sessionTag; @@ -700,14 +810,11 @@ namespace avSession { attribute boolean isActive; attribute boolean isTopSession; attribute OutputDeviceInfo outputDevice; - }; [Entity=Literal] interface ExtraInfo { - [IndexSignature] Object indexSignature(String key); - }; [Async, Synthetic] callback AsyncCallback_AVMetadata_Void = void (AVMetadata result); @@ -743,7 +850,6 @@ namespace avSession { callback Callback_Literal_Empty_Void = void (Literal_Empty extras); [Entity=Interface] interface AVSessionController { - readonly attribute String sessionId; [Throws] void getAVPlaybackState(AsyncCallback_AVPlaybackState_Void callback_); @@ -828,66 +934,68 @@ namespace avSession { [Throws] async ExtraInfo getExtrasWithEvent(String extraEvent); [Throws, DtsName="on", DtsTag="'metadataChange'"] - undefined onMetadataChange((sequence or String) filter, Callback_AVMetadata_Void callback_); - [Throws, DtsName="off", DtsTag="'metadataChange'"] - undefined offMetadataChange(optional Callback_AVMetadata_Void callback_); + void onMetadataChange((sequence or String) filter, Callback_AVMetadata_Void callback_); [Throws, DtsName="on", DtsTag="'playbackStateChange'"] - undefined onPlaybackStateChange((sequence or String) filter, Callback_AVPlaybackState_Void callback_); - [Throws, DtsName="off", DtsTag="'playbackStateChange'"] - undefined offPlaybackStateChange(optional Callback_AVPlaybackState_Void callback_); + void onPlaybackStateChange((sequence or String) filter, Callback_AVPlaybackState_Void callback_); [Throws, DtsName="on", DtsTag="'callMetadataChange'"] void onCallMetadataChange((sequence or String) filter, Callback_CallMetadata_Void callback_); - [Throws, DtsName="off", DtsTag="'callMetadataChange'"] - void offCallMetadataChange(optional Callback_CallMetadata_Void callback_); [Throws, DtsName="on", DtsTag="'callStateChange'"] void onCallStateChange((sequence or String) filter, Callback_AVCallState_Void callback_); - [Throws, DtsName="off", DtsTag="'callStateChange'"] - void offCallStateChange(optional Callback_AVCallState_Void callback_); [Throws, DtsName="on", DtsTag="'sessionDestroy'"] - undefined onSessionDestroy(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'sessionDestroy'"] - undefined offSessionDestroy(optional Callback_Void callback_); + void onSessionDestroy(Callback_Void callback_); [Throws, DtsName="on", DtsTag="'activeStateChange'"] - undefined onActiveStateChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'activeStateChange'"] - undefined offActiveStateChange(optional Callback_Boolean_Void callback_); + void onActiveStateChange(Callback_Boolean_Void callback_); [Throws, DtsName="on", DtsTag="'validCommandChange'"] - undefined onValidCommandChange(Callback_Array_AVControlCommandType_Void callback_); - [Throws, DtsName="off", DtsTag="'validCommandChange'"] - undefined offValidCommandChange(optional Callback_Array_AVControlCommandType_Void callback_); + void onValidCommandChange(Callback_Array_AVControlCommandType_Void callback_); [Throws, DtsName="on", DtsTag="'outputDeviceChange'"] void onOutputDeviceChange(Callback_ConnectionState_OutputDeviceInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'outputDeviceChange'"] - void offOutputDeviceChange(optional Callback_ConnectionState_OutputDeviceInfo_Void callback_); [Throws, DtsName="on", DtsTag="'sessionEvent'"] void onSessionEvent(Callback_String_Literal_Empty_Void callback_); - [Throws, DtsName="off", DtsTag="'sessionEvent'"] - void offSessionEvent(optional Callback_String_Literal_Empty_Void callback_); [Throws, DtsName="on", DtsTag="'queueItemsChange'"] void onQueueItemsChange(Callback_Array_AVQueueItem_Void callback_); - [Throws, DtsName="off", DtsTag="'queueItemsChange'"] - void offQueueItemsChange(optional Callback_Array_AVQueueItem_Void callback_); [Throws, DtsName="on", DtsTag="'queueTitleChange'"] void onQueueTitleChange(Callback_String_Void callback_); - [Throws, DtsName="off", DtsTag="'queueTitleChange'"] - void offQueueTitleChange(optional Callback_String_Void callback_); [Throws, DtsName="on", DtsTag="'extrasChange'"] void onExtrasChange(Callback_Literal_Empty_Void callback_); + [Throws, DtsName="on", DtsTag="'customDataChange'"] + void onCustomDataChange(Callback_Map_String_Object_Void callback_); + [Throws, DtsName="off", DtsTag="'metadataChange'"] + void offMetadataChange(optional Callback_AVMetadata_Void callback_); + [Throws, DtsName="off", DtsTag="'playbackStateChange'"] + void offPlaybackStateChange(optional Callback_AVPlaybackState_Void callback_); + [Throws, DtsName="off", DtsTag="'callMetadataChange'"] + void offCallMetadataChange(optional Callback_CallMetadata_Void callback_); + [Throws, DtsName="off", DtsTag="'callStateChange'"] + void offCallStateChange(optional Callback_AVCallState_Void callback_); + [Throws, DtsName="off", DtsTag="'sessionDestroy'"] + void offSessionDestroy(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'activeStateChange'"] + void offActiveStateChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'validCommandChange'"] + void offValidCommandChange(optional Callback_Array_AVControlCommandType_Void callback_); + [Throws, DtsName="off", DtsTag="'outputDeviceChange'"] + void offOutputDeviceChange(optional Callback_ConnectionState_OutputDeviceInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'sessionEvent'"] + void offSessionEvent(optional Callback_String_Literal_Empty_Void callback_); + [Throws, DtsName="off", DtsTag="'queueItemsChange'"] + void offQueueItemsChange(optional Callback_Array_AVQueueItem_Void callback_); + [Throws, DtsName="off", DtsTag="'queueTitleChange'"] + void offQueueTitleChange(optional Callback_String_Void callback_); [Throws, DtsName="off", DtsTag="'extrasChange'"] void offExtrasChange(optional Callback_Literal_Empty_Void callback_); - + [Throws, DtsName="off", DtsTag="'customDataChange'"] + void offCustomDataChange(optional Callback_Map_String_Object_Void callback_); + [Throws] + async void sendCustomData(record data); }; typedef String AVControlCommandType; [Entity=Interface] interface AVControlCommand { - attribute AVControlCommandType command; [Optional] attribute (LoopMode or String or number) parameter; - }; dictionary AVSessionErrorCode { - number ERR_CODE_SERVICE_EXCEPTION = 6600101; number ERR_CODE_SESSION_NOT_EXIST = 6600102; number ERR_CODE_CONTROLLER_NOT_EXIST = 6600103; @@ -952,110 +1060,5 @@ namespace avSession { number ERR_CODE_CAST_CONTROL_DRM_DEVICE_REVOKED = 6616007; number ERR_CODE_CAST_CONTROL_DRM_LICENSE_EXPIRED = 6616008; number ERR_CODE_CAST_CONTROL_DRM_PROVIDE_KEY_RESPONSE_ERROR = 6616100; - - }; - [GlobalScope] - interface GlobalScope_avSession_ohos_multimedia_avsession { - - [Throws] - static void createAVSession(Context context, String tag, AVSessionType type, AsyncCallback_AVSession_Void callback_); - [Throws] - static async AVSession createAVSession(Context context, String tag, AVSessionType type); - [Throws] - static void getAllSessionDescriptors(AsyncCallback_Array_Readonly_Void callback_); - [Throws] - static async sequence<[TypeArguments="AVSessionDescriptor"] Readonly> getAllSessionDescriptors(); - [Throws] - static void getHistoricalSessionDescriptors(number maxSize, AsyncCallback_Array_Readonly_Void callback_); - [Throws] - static async sequence<[TypeArguments="AVSessionDescriptor"] Readonly> getHistoricalSessionDescriptors(optional number maxSize); - [Throws] - static void getHistoricalAVQueueInfos(number maxSize, number maxAppSize, AsyncCallback_Array_Readonly_Void callback_); - [Throws] - static async sequence<[TypeArguments="AVQueueInfo"] Readonly> getHistoricalAVQueueInfos(number maxSize, number maxAppSize); - [Throws] - static void createController(String sessionId, AsyncCallback_AVSessionController_Void callback_); - [Throws] - static async AVSessionController createController(String sessionId); - [Throws] - static void castAudio((SessionToken or String) session, sequence audioDevices, AsyncCallback_Void callback_); - [Throws] - static async void castAudio((SessionToken or String) session, sequence audioDevices); - [Throws] - static async void startAVPlayback(String bundleName, String assetId); - [Throws] - static async sequence getDistributedSessionController(DistributedSessionType distributedSessionType); - [Throws, DtsName="on", DtsTag="'sessionCreate'"] - static void onSessionCreate(Callback_AVSessionDescriptor_Void callback_); - [Throws, DtsName="on", DtsTag="'sessionDestroy'"] - static void onSessionDestroy(Callback_AVSessionDescriptor_Void callback_); - [Throws, DtsName="on", DtsTag="'topSessionChange'"] - static void onTopSessionChange(Callback_AVSessionDescriptor_Void callback_); - [Throws, DtsName="off", DtsTag="'sessionCreate'"] - static void offSessionCreate(optional Callback_AVSessionDescriptor_Void callback_); - [Throws, DtsName="off", DtsTag="'sessionDestroy'"] - static void offSessionDestroy(optional Callback_AVSessionDescriptor_Void callback_); - [Throws, DtsName="off", DtsTag="'topSessionChange'"] - static void offTopSessionChange(optional Callback_AVSessionDescriptor_Void callback_); - [Throws, DtsName="on", DtsTag="'sessionServiceDie'"] - static void onSessionServiceDie(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'sessionServiceDie'"] - static void offSessionServiceDie(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'distributedSessionChange'"] - static void onDistributedSessionChange(DistributedSessionType distributedSessionType, Callback_Array_AVSessionController_Void callback_); - [Throws, DtsName="off", DtsTag="'distributedSessionChange'"] - static void offDistributedSessionChange(DistributedSessionType distributedSessionType, optional Callback_Array_AVSessionController_Void callback_); - [Throws] - static void sendSystemAVKeyEvent(KeyEvent event, AsyncCallback_Void callback_); - [Throws] - static async void sendSystemAVKeyEvent(KeyEvent event); - [Throws] - static void sendSystemControlCommand(AVControlCommand command, AsyncCallback_Void callback_); - [Throws] - static async void sendSystemControlCommand(AVControlCommand command); - [Throws] - static void startCastDeviceDiscovery(AsyncCallback_Void callback_); - [Throws] - static void startCastDeviceDiscovery(number filter, AsyncCallback_Void callback_); - [Throws] - static async void startCastDeviceDiscovery(optional number filter, optional sequence drmSchemes); - [Throws] - static void stopCastDeviceDiscovery(AsyncCallback_Void callback_); - [Throws] - static async void stopCastDeviceDiscovery(); - [Throws] - static void setDiscoverable(boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setDiscoverable(boolean enable); - [Throws, DtsName="on", DtsTag="'deviceAvailable'"] - static void onDeviceAvailable(Callback_OutputDeviceInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceAvailable'"] - static void offDeviceAvailable(optional Callback_OutputDeviceInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'deviceOffline'"] - static void onDeviceOffline(Callback_String_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceOffline'"] - static void offDeviceOffline(optional Callback_String_Void callback_); - [Throws] - static void getAVCastController(String sessionId, AsyncCallback_AVCastController_Void callback_); - [Throws] - static async AVCastController getAVCastController(String sessionId); - [Throws] - static void startCasting(SessionToken session, OutputDeviceInfo device, AsyncCallback_Void callback_); - [Throws] - static async void startCasting(SessionToken session, OutputDeviceInfo device); - [Throws] - static void stopCasting(SessionToken session, AsyncCallback_Void callback_); - [Throws] - static async void stopCasting(SessionToken session); - [Throws] - static async void startDeviceLogging(String url, optional number maxSize); - [Throws] - static async void stopDeviceLogging(); - [Throws, DtsName="on", DtsTag="'deviceLogEvent'"] - static void onDeviceLogEvent(Callback_DeviceLogEventCode_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceLogEvent'"] - static void offDeviceLogEvent(optional Callback_DeviceLogEventCode_Void callback_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.camera.idl b/idl/@ohos.multimedia.camera.idl index d220186..086870e 100644 --- a/idl/@ohos.multimedia.camera.idl +++ b/idl/@ohos.multimedia.camera.idl @@ -1,60 +1,61 @@ -package ohos.multimedia; +package ohos.multimedia.camera; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; -import ohos.multimedia.image as image; -import ohos.graphics.colorSpaceManager as colorSpaceManager; -import ohos.file.photoAccessHelper as photoAccessHelper; +import application.BaseContext.default as Context; +import ohos.multimedia.image.default as image; +import ohos.graphics.colorSpaceManager.default as colorSpaceManager; +import ohos.file.photoAccessHelper.default as photoAccessHelper; +[DefaultExport] namespace camera { - + [Throws] + CameraManager getCameraManager(Context context); dictionary CameraStatus { - number CAMERA_STATUS_APPEAR = 0; number CAMERA_STATUS_DISAPPEAR = 1; number CAMERA_STATUS_AVAILABLE = 2; number CAMERA_STATUS_UNAVAILABLE = 3; - }; dictionary FoldStatus { - number NON_FOLDABLE = 0; number EXPANDED = 1; number FOLDED = 2; - + }; + dictionary SystemPressureLevel { + number SYSTEM_PRESSURE_NORMAL = 0; + number SYSTEM_PRESSURE_MILD = 1; + number SYSTEM_PRESSURE_SEVERE = 2; + number SYSTEM_PRESSURE_CRITICAL = 3; + number SYSTEM_PRESSURE_SHUTDOWN = 4; }; [Entity=Interface] interface Profile { - readonly attribute CameraFormat format; readonly attribute Size size; - }; [Entity=Interface] interface FrameRateRange { - readonly attribute number min; readonly attribute number max; - }; [Entity=Interface] interface VideoProfile: Profile { - readonly attribute FrameRateRange frameRateRange; - }; [Entity=Interface] interface CameraOutputCapability { - readonly attribute sequence previewProfiles; readonly attribute sequence photoProfiles; readonly attribute sequence videoProfiles; readonly attribute sequence depthProfiles; readonly attribute sequence supportedMetadataObjectTypes; - + }; + [Entity=Interface] + interface ControlCenterStatusInfo { + readonly attribute ControlCenterEffectType effectType; + readonly attribute boolean isActive; }; dictionary CameraErrorCode { - number INVALID_ARGUMENT = 7400101; number OPERATION_NOT_ALLOWED = 7400102; number SESSION_NOT_CONFIG = 7400103; @@ -65,27 +66,23 @@ namespace camera { number DEVICE_DISABLED = 7400108; number DEVICE_PREEMPTED = 7400109; number UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110; + number DEVICE_FREQUENTLY_SWITCHED = 7400111; + number CAMERA_LENS_RETRACTED = 7400112; number SERVICE_FATAL_ERROR = 7400201; - }; dictionary RestoreParamType { - number NO_NEED_RESTORE_PARAM = 0; number PRESISTENT_DEFAULT_PARAM = 1; number TRANSIENT_ACTIVE_PARAM = 2; - }; [Entity=Interface] interface SettingParam { - attribute number skinSmoothLevel; attribute number faceSlender; attribute number skinTone; - }; [Entity=Interface] interface PrelaunchConfig { - attribute CameraDevice cameraDevice; [Optional] attribute RestoreParamType restoreParamType; @@ -93,7 +90,6 @@ namespace camera { attribute number activeTime; [Optional] attribute SettingParam settingParam; - }; [Async, Synthetic] callback AsyncCallback_CameraStatusInfo_Void = void (CameraStatusInfo result); @@ -105,12 +101,11 @@ namespace camera { callback AsyncCallback_TorchStatusInfo_Void = void (TorchStatusInfo result); [Entity=Interface] interface CameraManager { - sequence getSupportedCameras(); [Deprecated] CameraOutputCapability getSupportedOutputCapability(CameraDevice camera); - sequence getSupportedSceneModes(CameraDevice camera); CameraOutputCapability getSupportedOutputCapability(CameraDevice camera, SceneMode mode); + sequence getSupportedSceneModes(CameraDevice camera); boolean isCameraMuted(); [Throws] boolean isCameraMuteSupported(); @@ -140,20 +135,36 @@ namespace camera { DepthDataOutput createDepthDataOutput(DepthProfile profile); [Deprecated, Throws] CaptureSession createCaptureSession(); - [Throws, TypeParameters="T extends Session"] + [Throws, TypeParameters="T"] T createSession(SceneMode mode); + [Throws] + CameraDevice getCameraDevice(CameraPosition position, CameraType type); + [Throws] + sequence getCameraConcurrentInfos(sequence cameras); [DtsName="on", DtsTag="'cameraStatus'"] void onCameraStatus(AsyncCallback_CameraStatusInfo_Void callback_); - [DtsName="off", DtsTag="'cameraStatus'"] - void offCameraStatus(optional AsyncCallback_CameraStatusInfo_Void callback_); [DtsName="on", DtsTag="'foldStatusChange'"] void onFoldStatusChange(AsyncCallback_FoldStatusInfo_Void callback_); - [DtsName="off", DtsTag="'foldStatusChange'"] - void offFoldStatusChange(optional AsyncCallback_FoldStatusInfo_Void callback_); [Throws, DtsName="on", DtsTag="'cameraMute'"] void onCameraMute(AsyncCallback_Boolean_Void callback_); + [Throws, DtsName="on", DtsTag="'controlCenterStatusChange'"] + void onControlCenterStatusChange(AsyncCallback_Boolean_Void callback_); + [DtsName="on", DtsTag="'torchStatusChange'"] + void onTorchStatusChange(AsyncCallback_TorchStatusInfo_Void callback_); + [DtsName="off", DtsTag="'cameraStatus'"] + void offCameraStatus(optional AsyncCallback_CameraStatusInfo_Void callback_); + [DtsName="off", DtsTag="'foldStatusChange'"] + void offFoldStatusChange(optional AsyncCallback_FoldStatusInfo_Void callback_); [Throws, DtsName="off", DtsTag="'cameraMute'"] void offCameraMute(optional AsyncCallback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'controlCenterStatusChange'"] + void offControlCenterStatusChange(optional AsyncCallback_Boolean_Void callback_); + [DtsName="off", DtsTag="'torchStatusChange'"] + void offTorchStatusChange(optional AsyncCallback_TorchStatusInfo_Void callback_); + [Throws] + boolean isControlCenterActive(); + [Throws] + ControlCenterSession createControlCenterSession(); [Throws] boolean isPrelaunchSupported(CameraDevice camera); [Throws] @@ -169,76 +180,54 @@ namespace camera { TorchMode getTorchMode(); [Throws] void setTorchMode(TorchMode mode); - [DtsName="on", DtsTag="'torchStatusChange'"] - void onTorchStatusChange(AsyncCallback_TorchStatusInfo_Void callback_); - [DtsName="off", DtsTag="'torchStatusChange'"] - void offTorchStatusChange(optional AsyncCallback_TorchStatusInfo_Void callback_); - }; [Entity=Interface] interface TorchStatusInfo { - readonly attribute boolean isTorchAvailable; readonly attribute boolean isTorchActive; readonly attribute number torchLevel; - }; dictionary TorchMode { - number OFF = 0; number ON = 1; number AUTO = 2; - }; [Entity=Interface] interface CameraStatusInfo { - attribute CameraDevice camera; attribute CameraStatus status; - }; [Entity=Interface] interface FoldStatusInfo { - readonly attribute sequence supportedCameras; readonly attribute FoldStatus foldStatus; - }; dictionary CameraPosition { - number CAMERA_POSITION_UNSPECIFIED = 0; number CAMERA_POSITION_BACK = 1; number CAMERA_POSITION_FRONT = 2; [Deprecated] number CAMERA_POSITION_FOLD_INNER = 3; - }; dictionary CameraType { - number CAMERA_TYPE_DEFAULT = 0; number CAMERA_TYPE_WIDE_ANGLE = 1; number CAMERA_TYPE_ULTRA_WIDE = 2; number CAMERA_TYPE_TELEPHOTO = 3; number CAMERA_TYPE_TRUE_DEPTH = 4; - }; dictionary ConnectionType { - number CAMERA_CONNECTION_BUILT_IN = 0; number CAMERA_CONNECTION_USB_PLUGIN = 1; number CAMERA_CONNECTION_REMOTE = 2; - }; dictionary HostDeviceType { - number UNKNOWN_TYPE = 0; number PHONE = 14; number TABLET = 17; - }; [Entity=Interface] interface CameraDevice { - readonly attribute String cameraId; readonly attribute CameraPosition cameraPosition; readonly attribute CameraType cameraType; @@ -246,21 +235,20 @@ namespace camera { readonly attribute String hostDeviceName; readonly attribute HostDeviceType hostDeviceType; readonly attribute number cameraOrientation; - + [Optional] + readonly attribute boolean isRetractable; + [Optional] + readonly attribute sequence lensEquivalentFocalLength; }; [Entity=Interface] interface Size { - attribute number height; attribute number width; - }; [Entity=Interface] interface Point { - attribute number x; attribute number y; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -268,7 +256,6 @@ namespace camera { callback AsyncCallback_CameraOcclusionDetectionResult_Void = void (CameraOcclusionDetectionResult result); [Entity=Interface] interface CameraInput { - [Throws] void open(AsyncCallback_Void callback_); [Throws] @@ -276,21 +263,27 @@ namespace camera { [Throws] async bigint open(boolean isSecureEnabled); [Throws] + async void open(CameraConcurrentType type); + [Throws] void close(AsyncCallback_Void callback_); [Throws] async void close(); + [Throws] + async void closeDelayed(number time); [DtsName="on", DtsTag="'error'"] void onError(CameraDevice camera, ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(CameraDevice camera, optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'cameraOcclusionDetection'"] void onCameraOcclusionDetection(AsyncCallback_CameraOcclusionDetectionResult_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(CameraDevice camera, optional ErrorCallback callback_); [Throws, DtsName="off", DtsTag="'cameraOcclusionDetection'"] void offCameraOcclusionDetection(optional AsyncCallback_CameraOcclusionDetectionResult_Void callback_); - + [Throws] + void usedAsPosition(CameraPosition position); + [Throws] + async void controlAuxiliary(AuxiliaryType auxiliaryType, AuxiliaryStatus auxiliaryStatus); }; dictionary SceneMode { - number NORMAL_PHOTO = 1; number NORMAL_VIDEO = 2; number PORTRAIT_PHOTO = 3; @@ -308,12 +301,11 @@ namespace camera { number PANORAMA_PHOTO = 15; number TIME_LAPSE_PHOTO = 16; number FLUORESCENCE_PHOTO = 17; - }; dictionary CameraFormat { - number CAMERA_FORMAT_RGBA_8888 = 3; number CAMERA_FORMAT_DNG = 4; + number CAMERA_FORMAT_DNG_XDRAW = 5; number CAMERA_FORMAT_YUV_420_SP = 1003; number CAMERA_FORMAT_JPEG = 2000; number CAMERA_FORMAT_YCBCR_P010 = 2001; @@ -321,74 +313,58 @@ namespace camera { number CAMERA_FORMAT_HEIC = 2003; number CAMERA_FORMAT_DEPTH_16 = 3000; number CAMERA_FORMAT_DEPTH_32 = 3001; - }; dictionary FlashMode { - number FLASH_MODE_CLOSE = 0; number FLASH_MODE_OPEN = 1; number FLASH_MODE_AUTO = 2; number FLASH_MODE_ALWAYS_OPEN = 3; - }; [Entity=Interface] interface LcdFlashStatus { - readonly attribute boolean isLcdFlashNeeded; readonly attribute number lcdCompensation; - }; [Entity=Interface] interface FlashQuery { - [Throws] boolean hasFlash(); [Throws] boolean isFlashModeSupported(FlashMode flashMode); [Throws] boolean isLcdFlashSupported(); - }; [Entity=Interface] interface Flash: FlashQuery { - [Throws] FlashMode getFlashMode(); [Throws] void setFlashMode(FlashMode flashMode); [Throws] void enableLcdFlash(boolean enabled); - }; dictionary ExposureMode { - number EXPOSURE_MODE_LOCKED = 0; number EXPOSURE_MODE_AUTO = 1; number EXPOSURE_MODE_CONTINUOUS_AUTO = 2; number EXPOSURE_MODE_MANUAL = 3; - }; dictionary ExposureMeteringMode { - number MATRIX = 0; number CENTER = 1; number SPOT = 2; - }; [Entity=Interface] interface AutoExposureQuery { - [Throws] boolean isExposureModeSupported(ExposureMode aeMode); [Throws] sequence getExposureBiasRange(); [Throws] boolean isExposureMeteringModeSupported(ExposureMeteringMode aeMeteringMode); - }; [Entity=Interface] interface AutoExposure: AutoExposureQuery { - [Throws] ExposureMode getExposureMode(); [Throws] @@ -398,8 +374,6 @@ namespace camera { [Throws] void setMeteringPoint(Point point); [Throws] - sequence getExposureBiasRange(); - [Throws] void setExposureBias(number exposureBias); [Throws] number getExposureValue(); @@ -407,50 +381,36 @@ namespace camera { ExposureMeteringMode getExposureMeteringMode(); [Throws] void setExposureMeteringMode(ExposureMeteringMode aeMeteringMode); - }; dictionary FocusMode { - number FOCUS_MODE_MANUAL = 0; number FOCUS_MODE_CONTINUOUS_AUTO = 1; number FOCUS_MODE_AUTO = 2; number FOCUS_MODE_LOCKED = 3; - }; dictionary FocusState { - number FOCUS_STATE_SCAN = 0; number FOCUS_STATE_FOCUSED = 1; number FOCUS_STATE_UNFOCUSED = 2; - }; dictionary FocusRangeType { - number AUTO = 0; number NEAR = 1; - }; dictionary FocusDrivenType { - number AUTO = 0; number FACE = 1; - }; dictionary FocusTrackingMode { - number AUTO = 0; - }; [Entity=Interface] interface FocusTrackingInfo { - attribute FocusTrackingMode trackingMode; attribute Rect trackingRegion; - }; [Entity=Interface] interface FocusQuery { - [Throws] boolean isFocusModeSupported(FocusMode afMode); [Throws] @@ -459,11 +419,9 @@ namespace camera { boolean isFocusRangeTypeSupported(FocusRangeType type); [Throws] boolean isFocusDrivenTypeSupported(FocusDrivenType type); - }; [Entity=Interface] interface Focus: FocusQuery { - [Throws] FocusMode getFocusMode(); [Throws] @@ -486,19 +444,15 @@ namespace camera { FocusDrivenType getFocusDriven(); [Throws] void setFocusDriven(FocusDrivenType type); - }; [Entity=Interface] interface ManualFocus { - [Throws] number getFocusDistance(); [Throws] void setFocusDistance(number distance); - }; dictionary WhiteBalanceMode { - number AUTO = 0; number CLOUDY = 1; number INCANDESCENT = 2; @@ -506,20 +460,16 @@ namespace camera { number DAYLIGHT = 4; number MANUAL = 5; number LOCKED = 6; - }; [Entity=Interface] interface WhiteBalanceQuery { - [Throws] boolean isWhiteBalanceModeSupported(WhiteBalanceMode mode); [Throws] sequence getWhiteBalanceRange(); - }; [Entity=Interface] interface WhiteBalance: WhiteBalanceQuery { - [Throws] WhiteBalanceMode getWhiteBalanceMode(); [Throws] @@ -528,56 +478,44 @@ namespace camera { number getWhiteBalance(); [Throws] void setWhiteBalance(number whiteBalance); - }; [Entity=Interface] interface ManualIsoQuery { - [Throws] boolean isManualIsoSupported(); [Throws] sequence getIsoRange(); - }; [Entity=Interface] interface ManualIso: ManualIsoQuery { - [Throws] number getIso(); [Throws] void setIso(number iso); - }; dictionary SmoothZoomMode { - number NORMAL = 0; - }; [Entity=Interface] interface SmoothZoomInfo { - attribute number duration; - }; [Entity=Interface] interface ZoomPointInfo { - readonly attribute number zoomRatio; readonly attribute number equivalentFocalLength; - }; [Entity=Interface] interface ZoomQuery { - [Throws] sequence getZoomRatioRange(); [Throws] sequence getZoomPointInfos(); - + [Throws] + boolean isZoomCenterPointSupported(); }; [Entity=Interface] interface Zoom: ZoomQuery { - [Throws] number getZoomRatio(); [Throws] @@ -588,51 +526,43 @@ namespace camera { void prepareZoom(); [Throws] void unprepareZoom(); - + [Throws] + Point getZoomCenterPoint(); + [Throws] + void setZoomCenterPoint(Point point); }; dictionary VideoStabilizationMode { - number OFF = 0; number LOW = 1; number MIDDLE = 2; number HIGH = 3; number AUTO = 4; - }; [Entity=Interface] interface StabilizationQuery { - [Throws] boolean isVideoStabilizationModeSupported(VideoStabilizationMode vsMode); - }; [Entity=Interface] interface Stabilization: StabilizationQuery { - [Throws] VideoStabilizationMode getActiveVideoStabilizationMode(); [Throws] void setVideoStabilizationMode(VideoStabilizationMode mode); - }; dictionary PortraitThemeType { - number NATURAL = 0; number DELICATE = 1; number STYLISH = 2; - }; dictionary BeautyType { - number AUTO = 0; number SKIN_SMOOTH = 1; number FACE_SLENDER = 2; number SKIN_TONE = 3; - }; [Entity=Interface] interface BeautyQuery { - [Throws] sequence getSupportedBeautyTypes(); [Throws] @@ -641,22 +571,18 @@ namespace camera { sequence getSupportedPortraitThemeTypes(); [Throws] boolean isPortraitThemeSupported(); - }; [Entity=Interface] interface Beauty: BeautyQuery { - [Throws] number getBeauty(BeautyType type); [Throws] void setBeauty(BeautyType type, number value); [Throws] void setPortraitThemeType(PortraitThemeType type); - }; [Entity=Interface] interface EffectSuggestion { - [Throws] boolean isEffectSuggestionSupported(); [Throws] @@ -667,96 +593,84 @@ namespace camera { void setEffectSuggestionStatus(sequence status); [Throws] void updateEffectSuggestion(EffectSuggestionType type, boolean enabled); - }; dictionary ColorEffectType { - number NORMAL = 0; number BRIGHT = 1; number SOFT = 2; number BLACK_WHITE = 3; - + }; + dictionary ControlCenterEffectType { + number BEAUTY = 0; + number PORTRAIT = 1; }; dictionary PolicyType { - number PRIVACY = 1; - }; [Entity=Interface] interface ColorEffectQuery { - [Throws] sequence getSupportedColorEffects(); - }; [Entity=Interface] interface ColorEffect: ColorEffectQuery { - [Throws] ColorEffectType getColorEffect(); [Throws] void setColorEffect(ColorEffectType type); - }; [Entity=Interface] interface ColorManagementQuery { - [Throws] sequence getSupportedColorSpaces(); - }; [Entity=Interface] interface ColorManagement: ColorManagementQuery { - [Throws] colorSpaceManager.ColorSpace getActiveColorSpace(); [Throws] void setColorSpace(colorSpaceManager.ColorSpace colorSpace); - + }; + [Entity=Interface] + interface ControlCenterQuery { + boolean isControlCenterSupported(); + sequence getSupportedEffectTypes(); + }; + [Entity=Interface] + interface ControlCenter: ControlCenterQuery { + [Throws] + void enableControlCenter(boolean enabled); }; [Entity=Interface] interface AutoDeviceSwitchQuery { - [Throws] boolean isAutoDeviceSwitchSupported(); - }; [Entity=Interface] interface AutoDeviceSwitch: AutoDeviceSwitchQuery { - [Throws] void enableAutoDeviceSwitch(boolean enabled); - }; [Entity=Interface] interface AutoDeviceSwitchStatus { - readonly attribute boolean isDeviceSwitched; readonly attribute boolean isDeviceCapabilityChanged; - }; [Entity=Interface] interface MacroQuery { - [Throws] boolean isMacroSupported(); - }; [Entity=Interface] interface Macro: MacroQuery { - [Throws] void enableMacro(boolean enabled); - }; dictionary UsageType { - number BOKEH = 0; - }; [Entity=Interface] interface Session { - [Throws] void beginConfig(); [Throws] @@ -789,13 +703,11 @@ namespace camera { void setUsage(UsageType usage, boolean enabled); [Throws] sequence getCameraOutputCapabilities(CameraDevice camera); - }; [Async, Synthetic] callback AsyncCallback_FocusState_Void = void (FocusState result); [Entity=Interface, Deprecated] interface CaptureSession { - [Deprecated, Throws] void beginConfig(); [Deprecated, Throws] @@ -872,10 +784,10 @@ namespace camera { void setVideoStabilizationMode(VideoStabilizationMode mode); [Deprecated, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Deprecated, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Deprecated, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Deprecated, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Deprecated, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); [Deprecated, Throws] @@ -886,73 +798,56 @@ namespace camera { number getBeauty(BeautyType type); [Deprecated, Throws] void setBeauty(BeautyType type, number value); - }; dictionary PreconfigType { - number PRECONFIG_720P = 0; number PRECONFIG_1080P = 1; number PRECONFIG_4K = 2; number PRECONFIG_HIGH_QUALITY = 3; - }; dictionary PreconfigRatio { - number PRECONFIG_RATIO_1_1 = 0; number PRECONFIG_RATIO_4_3 = 1; number PRECONFIG_RATIO_16_9 = 2; - }; dictionary SceneFeatureType { - number MOON_CAPTURE_BOOST = 0; number TRIPOD_DETECTION = 1; number LOW_LIGHT_BOOST = 2; - }; [Entity=Interface] interface SceneFeatureDetectionResult { - readonly attribute SceneFeatureType featureType; readonly attribute boolean detected; - }; dictionary TripodStatus { - number INVALID = 0; number ACTIVE = 1; number ENTERING = 2; number EXITING = 3; - }; [Entity=Interface] interface TripodDetectionResult: SceneFeatureDetectionResult { - readonly attribute TripodStatus tripodStatus; - }; [Entity=Interface] interface SceneDetectionQuery { - [Throws] boolean isSceneFeatureSupported(SceneFeatureType type); - }; [Entity=Interface] interface SceneDetection: SceneDetectionQuery { - [Throws] void enableSceneFeature(SceneFeatureType type, boolean enabled); - }; [Entity=Interface] - interface PhotoSessionForSys: PhotoSession { - - + interface PhotoSessionForSys: PhotoSession, Beauty, ColorEffect, ColorManagement, Macro, SceneDetection, EffectSuggestion, DepthFusion { }; [Async, Synthetic] callback AsyncCallback_SmoothZoomInfo_Void = void (SmoothZoomInfo result); [Async, Synthetic] + callback AsyncCallback_SystemPressureLevel_Void = void (SystemPressureLevel result); + [Async, Synthetic] callback AsyncCallback_SceneFeatureDetectionResult_Void = void (SceneFeatureDetectionResult result); [Async, Synthetic] callback AsyncCallback_EffectSuggestionType_Void = void (EffectSuggestionType result); @@ -961,158 +856,165 @@ namespace camera { [Async, Synthetic] callback AsyncCallback_LcdFlashStatus_Void = void (LcdFlashStatus result); [Entity=Interface] - interface PhotoSession: Session { - + interface PhotoSession: Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro { [Throws] boolean canPreconfig(PreconfigType preconfigType, optional PreconfigRatio preconfigRatio); [Throws] void preconfig(PreconfigType preconfigType, optional PreconfigRatio preconfigRatio); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); - [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] - void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="on", DtsTag="'macroStatusChanged'"] void onMacroStatusChanged(AsyncCallback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'macroStatusChanged'"] - void offMacroStatusChanged(optional AsyncCallback_Boolean_Void callback_); + [DtsName="on", DtsTag="'systemPressureLevelChange'"] + void onSystemPressureLevelChange(AsyncCallback_SystemPressureLevel_Void callback_); [Throws, DtsName="on", DtsTag="'featureDetection'"] void onFeatureDetection(SceneFeatureType featureType, AsyncCallback_SceneFeatureDetectionResult_Void callback_); - [Throws, DtsName="off", DtsTag="'featureDetection'"] - void offFeatureDetection(SceneFeatureType featureType, optional AsyncCallback_SceneFeatureDetectionResult_Void callback_); [DtsName="on", DtsTag="'effectSuggestionChange'"] void onEffectSuggestionChange(AsyncCallback_EffectSuggestionType_Void callback_); - [DtsName="off", DtsTag="'effectSuggestionChange'"] - void offEffectSuggestionChange(optional AsyncCallback_EffectSuggestionType_Void callback_); [DtsName="on", DtsTag="'autoDeviceSwitchStatusChange'"] void onAutoDeviceSwitchStatusChange(AsyncCallback_AutoDeviceSwitchStatus_Void callback_); - [DtsName="off", DtsTag="'autoDeviceSwitchStatusChange'"] - void offAutoDeviceSwitchStatusChange(optional AsyncCallback_AutoDeviceSwitchStatus_Void callback_); [Throws, DtsName="on", DtsTag="'lcdFlashStatus'"] void onLcdFlashStatus(AsyncCallback_LcdFlashStatus_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] + void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'macroStatusChanged'"] + void offMacroStatusChanged(optional AsyncCallback_Boolean_Void callback_); + [DtsName="off", DtsTag="'systemPressureLevelChange'"] + void offSystemPressureLevelChange(optional AsyncCallback_SystemPressureLevel_Void callback_); + [Throws, DtsName="off", DtsTag="'featureDetection'"] + void offFeatureDetection(SceneFeatureType featureType, optional AsyncCallback_SceneFeatureDetectionResult_Void callback_); + [DtsName="off", DtsTag="'effectSuggestionChange'"] + void offEffectSuggestionChange(optional AsyncCallback_EffectSuggestionType_Void callback_); + [DtsName="off", DtsTag="'autoDeviceSwitchStatusChange'"] + void offAutoDeviceSwitchStatusChange(optional AsyncCallback_AutoDeviceSwitchStatus_Void callback_); [Throws, DtsName="off", DtsTag="'lcdFlashStatus'"] void offLcdFlashStatus(optional AsyncCallback_LcdFlashStatus_Void callback_); [Throws] sequence getSessionFunctions(CameraOutputCapability outputCapability); [Throws] sequence getSessionConflictFunctions(); - }; [Entity=Interface] - interface VideoSessionForSys: VideoSession { - - + interface VideoSessionForSys: VideoSession, Beauty, ColorEffect, ColorManagement, Macro, Aperture, ColorReservation, EffectSuggestion { }; dictionary QualityPrioritization { - number HIGH_QUALITY = 0; number POWER_BALANCE = 1; - }; + [Async, Synthetic] + callback AsyncCallback_ControlCenterStatusInfo_Void = void (ControlCenterStatusInfo result); [Synthetic] callback Callback_FocusTrackingInfo_Void = void (FocusTrackingInfo parameter); + [Async, Synthetic] + callback AsyncCallback_LightStatus_Void = void (LightStatus result); [Entity=Interface] - interface VideoSession: Session { - + interface VideoSession: Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, ControlCenter, AutoDeviceSwitch, Macro { [Throws] boolean canPreconfig(PreconfigType preconfigType, optional PreconfigRatio preconfigRatio); [Throws] void preconfig(PreconfigType preconfigType, optional PreconfigRatio preconfigRatio); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); - [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] - void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="on", DtsTag="'macroStatusChanged'"] void onMacroStatusChanged(AsyncCallback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'macroStatusChanged'"] - void offMacroStatusChanged(optional AsyncCallback_Boolean_Void callback_); + [DtsName="on", DtsTag="'systemPressureLevelChange'"] + void onSystemPressureLevelChange(AsyncCallback_SystemPressureLevel_Void callback_); + [DtsName="on", DtsTag="'controlCenterEffectStatusChange'"] + void onControlCenterEffectStatusChange(AsyncCallback_ControlCenterStatusInfo_Void callback_); [Throws, DtsName="on", DtsTag="'lcdFlashStatus'"] void onLcdFlashStatus(AsyncCallback_LcdFlashStatus_Void callback_); - [Throws, DtsName="off", DtsTag="'lcdFlashStatus'"] - void offLcdFlashStatus(optional AsyncCallback_LcdFlashStatus_Void callback_); [DtsName="on", DtsTag="'autoDeviceSwitchStatusChange'"] void onAutoDeviceSwitchStatusChange(AsyncCallback_AutoDeviceSwitchStatus_Void callback_); - [DtsName="off", DtsTag="'autoDeviceSwitchStatusChange'"] - void offAutoDeviceSwitchStatusChange(optional AsyncCallback_AutoDeviceSwitchStatus_Void callback_); [Throws, DtsName="on", DtsTag="'focusTrackingInfoAvailable'"] void onFocusTrackingInfoAvailable(Callback_FocusTrackingInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'effectSuggestionChange'"] + void onEffectSuggestionChange(AsyncCallback_EffectSuggestionType_Void callback_); + [Throws, DtsName="on", DtsTag="'lightStatusChange'"] + void onLightStatusChange(AsyncCallback_LightStatus_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] + void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'macroStatusChanged'"] + void offMacroStatusChanged(optional AsyncCallback_Boolean_Void callback_); + [DtsName="off", DtsTag="'systemPressureLevelChange'"] + void offSystemPressureLevelChange(optional AsyncCallback_SystemPressureLevel_Void callback_); + [DtsName="off", DtsTag="'controlCenterEffectStatusChange'"] + void offControlCenterEffectStatusChange(optional AsyncCallback_ControlCenterStatusInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'lcdFlashStatus'"] + void offLcdFlashStatus(optional AsyncCallback_LcdFlashStatus_Void callback_); + [DtsName="off", DtsTag="'autoDeviceSwitchStatusChange'"] + void offAutoDeviceSwitchStatusChange(optional AsyncCallback_AutoDeviceSwitchStatus_Void callback_); [Throws, DtsName="off", DtsTag="'focusTrackingInfoAvailable'"] void offFocusTrackingInfoAvailable(optional Callback_FocusTrackingInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'effectSuggestionChange'"] + void offEffectSuggestionChange(optional AsyncCallback_EffectSuggestionType_Void callback_); + [Throws, DtsName="off", DtsTag="'lightStatusChange'"] + void offLightStatusChange(optional AsyncCallback_LightStatus_Void callback_); [Throws] sequence getSessionFunctions(CameraOutputCapability outputCapability); [Throws] sequence getSessionConflictFunctions(); [Throws] void setQualityPrioritization(QualityPrioritization quality); - + }; + dictionary LightStatus { + number NORMAL = 0; + number INSUFFICIENT = 1; }; dictionary PortraitEffect { - number OFF = 0; number CIRCLES = 1; number HEART = 2; number ROTATED = 3; number STUDIO = 4; number THEATER = 5; - }; [Entity=Interface] interface PortraitQuery { - [Throws] sequence getSupportedPortraitEffects(); - }; [Entity=Interface] interface Portrait: PortraitQuery { - [Throws] PortraitEffect getPortraitEffect(); [Throws] void setPortraitEffect(PortraitEffect effect); - }; [Entity=Interface] interface ZoomRange { - readonly attribute number min; readonly attribute number max; - }; [Entity=Interface] interface PhysicalAperture { - attribute ZoomRange zoomRange; attribute sequence apertures; - }; [Entity=Interface] interface ApertureQuery { - [Throws] sequence getSupportedVirtualApertures(); [Throws] sequence getSupportedPhysicalApertures(); - }; [Entity=Interface] interface Aperture: ApertureQuery { - [Throws] number getVirtualAperture(); [Throws] @@ -1121,114 +1023,95 @@ namespace camera { number getPhysicalAperture(); [Throws] void setPhysicalAperture(number aperture); - }; [Entity=Interface] - interface PortraitPhotoSession: Session { - + interface PortraitPhotoSession: Session, Flash, AutoExposure, Focus, Zoom, Beauty, ColorEffect, ColorManagement, Portrait, Aperture { [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); - [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] - void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="on", DtsTag="'lcdFlashStatus'"] void onLcdFlashStatus(AsyncCallback_LcdFlashStatus_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] + void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="off", DtsTag="'lcdFlashStatus'"] void offLcdFlashStatus(optional AsyncCallback_LcdFlashStatus_Void callback_); [Throws] sequence getSessionFunctions(CameraOutputCapability outputCapability); [Throws] sequence getSessionConflictFunctions(); - }; [Entity=Interface] - interface ApertureVideoSession: Session { - + interface ApertureVideoSession: Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); - }; [Entity=Interface] interface ManualExposureQuery { - [Throws] sequence getSupportedExposureRange(); - }; [Entity=Interface] interface ManualExposure: ManualExposureQuery { - [Throws] number getExposure(); [Throws] void setExposure(number exposure); - }; [Entity=Interface] - interface NightPhotoSession: Session { - + interface NightPhotoSession: Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Beauty, ColorManagement, ManualExposure { [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); - [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] - void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="on", DtsTag="'lcdFlashStatus'"] void onLcdFlashStatus(AsyncCallback_LcdFlashStatus_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] + void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="off", DtsTag="'lcdFlashStatus'"] void offLcdFlashStatus(optional AsyncCallback_LcdFlashStatus_Void callback_); - }; [Entity=Interface] interface IsoInfo { - [Optional] readonly attribute number iso; - }; [Entity=Interface] interface ExposureInfo { - [Optional] readonly attribute number exposureTime; - }; [Entity=Interface] interface ApertureInfo { - [Optional] readonly attribute number aperture; - }; [Entity=Interface] interface LuminationInfo { - [Optional] readonly attribute number lumination; - }; [Async, Synthetic] callback AsyncCallback_IsoInfo_Void = void (IsoInfo result); @@ -1239,182 +1122,165 @@ namespace camera { [Async, Synthetic] callback AsyncCallback_LuminationInfo_Void = void (LuminationInfo result); [Entity=Interface] - interface ProfessionalPhotoSession: Session { - + interface ProfessionalPhotoSession: Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] - void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="on", DtsTag="'isoInfoChange'"] void onIsoInfoChange(AsyncCallback_IsoInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'isoInfoChange'"] - void offIsoInfoChange(optional AsyncCallback_IsoInfo_Void callback_); [Throws, DtsName="on", DtsTag="'exposureInfoChange'"] void onExposureInfoChange(AsyncCallback_ExposureInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'exposureInfoChange'"] - void offExposureInfoChange(optional AsyncCallback_ExposureInfo_Void callback_); [Throws, DtsName="on", DtsTag="'apertureInfoChange'"] void onApertureInfoChange(AsyncCallback_ApertureInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'apertureInfoChange'"] - void offApertureInfoChange(optional AsyncCallback_ApertureInfo_Void callback_); [Throws, DtsName="on", DtsTag="'luminationInfoChange'"] void onLuminationInfoChange(AsyncCallback_LuminationInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] + void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'isoInfoChange'"] + void offIsoInfoChange(optional AsyncCallback_IsoInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'exposureInfoChange'"] + void offExposureInfoChange(optional AsyncCallback_ExposureInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'apertureInfoChange'"] + void offApertureInfoChange(optional AsyncCallback_ApertureInfo_Void callback_); [Throws, DtsName="off", DtsTag="'luminationInfoChange'"] void offLuminationInfoChange(optional AsyncCallback_LuminationInfo_Void callback_); - }; [Entity=Interface] - interface ProfessionalVideoSession: Session { - + interface ProfessionalVideoSession: Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] - void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws, DtsName="on", DtsTag="'isoInfoChange'"] void onIsoInfoChange(AsyncCallback_IsoInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'isoInfoChange'"] - void offIsoInfoChange(optional AsyncCallback_IsoInfo_Void callback_); [Throws, DtsName="on", DtsTag="'exposureInfoChange'"] void onExposureInfoChange(AsyncCallback_ExposureInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'exposureInfoChange'"] - void offExposureInfoChange(optional AsyncCallback_ExposureInfo_Void callback_); [Throws, DtsName="on", DtsTag="'apertureInfoChange'"] void onApertureInfoChange(AsyncCallback_ApertureInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'apertureInfoChange'"] - void offApertureInfoChange(optional AsyncCallback_ApertureInfo_Void callback_); [Throws, DtsName="on", DtsTag="'luminationInfoChange'"] void onLuminationInfoChange(AsyncCallback_LuminationInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] + void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'isoInfoChange'"] + void offIsoInfoChange(optional AsyncCallback_IsoInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'exposureInfoChange'"] + void offExposureInfoChange(optional AsyncCallback_ExposureInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'apertureInfoChange'"] + void offApertureInfoChange(optional AsyncCallback_ApertureInfo_Void callback_); [Throws, DtsName="off", DtsTag="'luminationInfoChange'"] void offLuminationInfoChange(optional AsyncCallback_LuminationInfo_Void callback_); - }; dictionary SlowMotionStatus { - number DISABLED = 0; number READY = 1; number VIDEO_START = 2; number VIDEO_DONE = 3; number FINISHED = 4; - }; [Async, Synthetic] callback AsyncCallback_SlowMotionStatus_Void = void (SlowMotionStatus result); [Entity=Interface] - interface SlowMotionVideoSession: Session { - + interface SlowMotionVideoSession: Session, Flash, AutoExposure, Focus, Zoom, ColorEffect { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'slowMotionStatus'"] + void onSlowMotionStatus(AsyncCallback_SlowMotionStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'slowMotionStatus'"] + void offSlowMotionStatus(optional AsyncCallback_SlowMotionStatus_Void callback_); [Throws] boolean isSlowMotionDetectionSupported(); [Throws] void setSlowMotionDetectionArea(Rect area); - [Throws, DtsName="on", DtsTag="'slowMotionStatus'"] - void onSlowMotionStatus(AsyncCallback_SlowMotionStatus_Void callback_); - [Throws, DtsName="off", DtsTag="'slowMotionStatus'"] - void offSlowMotionStatus(optional AsyncCallback_SlowMotionStatus_Void callback_); - }; [Entity=Interface] - interface HighResolutionPhotoSession: Session { - + interface HighResolutionPhotoSession: Session, AutoExposure, Focus { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); [Throws, DtsName="off", DtsTag="'focusStateChange'"] void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); - }; [Entity=Interface] - interface MacroPhotoSession: Session { - + interface MacroPhotoSession: Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion, ColorManagement { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); - }; [Entity=Interface] - interface MacroVideoSession: Session { - + interface MacroVideoSession: Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, ColorManagement { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); - }; [Entity=Interface] - interface SecureSession: Session { - + interface SecureSession: Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom { [Throws] void addSecureOutput(PreviewOutput previewOutput); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); [DtsName="off", DtsTag="'focusStateChange'"] void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); - }; [Entity=Interface] - interface LightPaintingPhotoSession: Session { - + interface LightPaintingPhotoSession: Session, Flash, Focus, Zoom, ColorEffect { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); [Throws] @@ -1423,106 +1289,83 @@ namespace camera { void setLightPaintingType(LightPaintingType type); [Throws] sequence getSupportedLightPaintingTypes(); - }; [Entity=Interface] - interface QuickShotPhotoSession: Session { - + interface QuickShotPhotoSession: Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'effectSuggestionChange'"] void onEffectSuggestionChange(AsyncCallback_EffectSuggestionType_Void callback_); - [Throws, DtsName="off", DtsTag="'effectSuggestionChange'"] - void offEffectSuggestionChange(optional AsyncCallback_EffectSuggestionType_Void callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'smoothZoomInfoAvailable'"] void onSmoothZoomInfoAvailable(AsyncCallback_SmoothZoomInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'effectSuggestionChange'"] + void offEffectSuggestionChange(optional AsyncCallback_EffectSuggestionType_Void callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="off", DtsTag="'smoothZoomInfoAvailable'"] void offSmoothZoomInfoAvailable(optional AsyncCallback_SmoothZoomInfo_Void callback_); - }; [Entity=Interface] - interface PanoramaPhotoSession: Session { - + interface PanoramaPhotoSession: Session, Focus, AutoExposure, WhiteBalance, ColorEffect { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); [Throws, DtsName="off", DtsTag="'focusStateChange'"] void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); - }; [Entity=Interface] - interface FluorescencePhotoSession: Session { - + interface FluorescencePhotoSession: Session, AutoExposure, Focus, Zoom { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); [Throws, DtsName="off", DtsTag="'focusStateChange'"] void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); - }; [Entity=Interface] - interface PhotoFunctions: FlashQuery { - - + interface PhotoFunctions: FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery { }; [Entity=Interface] - interface VideoFunctions: FlashQuery { - - + interface VideoFunctions: FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery { }; [Entity=Interface] - interface PortraitPhotoFunctions: FlashQuery { - - + interface PortraitPhotoFunctions: FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery { }; [Entity=Interface] - interface PhotoConflictFunctions: ZoomQuery { - - + interface PhotoConflictFunctions: ZoomQuery, MacroQuery { }; [Entity=Interface] - interface VideoConflictFunctions: ZoomQuery { - - + interface VideoConflictFunctions: ZoomQuery, MacroQuery { }; [Entity=Interface] - interface PortraitPhotoConflictFunctions: ZoomQuery { - - + interface PortraitPhotoConflictFunctions: ZoomQuery, PortraitQuery, ApertureQuery { }; [Entity=Interface] interface CameraOutput { - [Throws] void release(AsyncCallback_Void callback_); [Throws] async void release(); - }; [Entity=Interface] interface SketchStatusData { - attribute number status; attribute number sketchRatio; - + attribute Point centerPointOffset; }; [Async, Synthetic] callback AsyncCallback_SketchStatusData_Void = void (SketchStatusData result); [Entity=Interface] interface PreviewOutput: CameraOutput { - [Deprecated, Throws] void start(AsyncCallback_Void callback_); [Deprecated, Throws] @@ -1533,27 +1376,31 @@ namespace camera { async void stop(); [DtsName="on", DtsTag="'frameStart'"] void onFrameStart(AsyncCallback_Void callback_); - [DtsName="off", DtsTag="'frameStart'"] - void offFrameStart(optional AsyncCallback_Void callback_); [DtsName="on", DtsTag="'frameEnd'"] void onFrameEnd(AsyncCallback_Void callback_); - [DtsName="off", DtsTag="'frameEnd'"] - void offFrameEnd(optional AsyncCallback_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="on", DtsTag="'sketchStatusChanged'"] + void onSketchStatusChanged(AsyncCallback_SketchStatusData_Void callback_); + [DtsName="off", DtsTag="'frameStart'"] + void offFrameStart(optional AsyncCallback_Void callback_); + [DtsName="off", DtsTag="'frameEnd'"] + void offFrameEnd(optional AsyncCallback_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'sketchStatusChanged'"] + void offSketchStatusChanged(optional AsyncCallback_SketchStatusData_Void callback_); sequence getSupportedFrameRates(); [Throws] void setFrameRate(number minFps, number maxFps); FrameRateRange getActiveFrameRate(); [Throws] + Profile getActiveProfile(); + [Throws] ImageRotation getPreviewRotation(number displayRotation); [Throws] void setPreviewRotation(ImageRotation previewRotation, optional boolean isDisplayLocked); [Throws] - Profile getActiveProfile(); - [Throws] void addDeferredSurface(String surfaceId); [Throws] boolean isSketchSupported(); @@ -1563,54 +1410,39 @@ namespace camera { void enableSketch(boolean enabled); [Throws] void attachSketchSurface(String surfaceId); - [Throws, DtsName="on", DtsTag="'sketchStatusChanged'"] - void onSketchStatusChanged(AsyncCallback_SketchStatusData_Void callback_); - [Throws, DtsName="off", DtsTag="'sketchStatusChanged'"] - void offSketchStatusChanged(optional AsyncCallback_SketchStatusData_Void callback_); - }; dictionary EffectSuggestionType { - number EFFECT_SUGGESTION_NONE = 0; number EFFECT_SUGGESTION_PORTRAIT = 1; number EFFECT_SUGGESTION_FOOD = 2; number EFFECT_SUGGESTION_SKY = 3; number EFFECT_SUGGESTION_SUNRISE_SUNSET = 4; - + number EFFECT_SUGGESTION_STAGE = 5; }; [Entity=Class] interface EffectSuggestionStatus { - attribute EffectSuggestionType type; attribute boolean status; - }; dictionary ImageRotation { - number ROTATION_0 = 0; number ROTATION_90 = 90; number ROTATION_180 = 180; number ROTATION_270 = 270; - }; [Entity=Interface] interface Location { - attribute number latitude; attribute number longitude; attribute number altitude; - }; dictionary QualityLevel { - number QUALITY_LEVEL_HIGH = 0; number QUALITY_LEVEL_MEDIUM = 1; number QUALITY_LEVEL_LOW = 2; - }; [Entity=Interface] interface PhotoCaptureSetting { - [Optional] attribute QualityLevel quality; [Optional] @@ -1619,47 +1451,38 @@ namespace camera { attribute Location location; [Optional] attribute boolean mirror; - }; dictionary DeferredDeliveryImageType { - number NONE = 0; number PHOTO = 1; number VIDEO = 2; - }; [Entity=Interface] interface Photo { - attribute image.Image main; [Optional] attribute image.Image raw; [Optional] attribute DepthData depthData; async void release(); - }; [Entity=Interface] interface DeferredPhotoProxy { - [Throws] async image.PixelMap getThumbnail(); [Throws] async void release(); - }; dictionary VideoCodecType { - number AVC = 0; number HEVC = 1; - }; [Async, Synthetic] callback AsyncCallback_Photo_Void = void (Photo result); [Async, Synthetic] callback AsyncCallback_DeferredPhotoProxy_Void = void (DeferredPhotoProxy result); [Async, Synthetic] - callback AsyncCallback_photoAccessHelper_PhotoAsset_Void = void (photoAccessHelper.PhotoAsset result); + callback AsyncCallback_PhotoAccessHelper_PhotoAsset_Void = void (photoAccessHelper.PhotoAsset result); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] @@ -1671,10 +1494,9 @@ namespace camera { [Async, Synthetic] callback AsyncCallback_CaptureEndInfo_Void = void (CaptureEndInfo result); [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); [Entity=Interface] interface PhotoOutput: CameraOutput { - [Throws] void capture(AsyncCallback_Void callback_); [Throws] @@ -1686,7 +1508,7 @@ namespace camera { [Throws] async void burstCapture(PhotoCaptureSetting setting); [Throws] - undefined confirmCapture(); + void confirmCapture(); [Throws] boolean isRawDeliverySupported(); [Throws] @@ -1707,61 +1529,65 @@ namespace camera { void setMovingPhotoVideoCodecType(VideoCodecType codecType); [DtsName="on", DtsTag="'photoAvailable'"] void onPhotoAvailable(AsyncCallback_Photo_Void callback_); - [DtsName="off", DtsTag="'photoAvailable'"] - void offPhotoAvailable(optional AsyncCallback_Photo_Void callback_); [Throws, DtsName="on", DtsTag="'deferredPhotoProxyAvailable'"] void onDeferredPhotoProxyAvailable(AsyncCallback_DeferredPhotoProxy_Void callback_); - [Throws, DtsName="off", DtsTag="'deferredPhotoProxyAvailable'"] - void offDeferredPhotoProxyAvailable(optional AsyncCallback_DeferredPhotoProxy_Void callback_); [DtsName="on", DtsTag="'photoAssetAvailable'"] - void onPhotoAssetAvailable(AsyncCallback_photoAccessHelper_PhotoAsset_Void callback_); - [DtsName="off", DtsTag="'photoAssetAvailable'"] - void offPhotoAssetAvailable(optional AsyncCallback_photoAccessHelper_PhotoAsset_Void callback_); - boolean isMirrorSupported(); - [Throws] - void enableMirror(boolean enabled); + void onPhotoAssetAvailable(AsyncCallback_PhotoAccessHelper_PhotoAsset_Void callback_); [Deprecated, DtsName="on", DtsTag="'captureStart'"] void onCaptureStart(AsyncCallback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'captureStart'"] - void offCaptureStart(optional AsyncCallback_Number_Void callback_); [DtsName="on", DtsTag="'captureStartWithInfo'"] void onCaptureStartWithInfo(AsyncCallback_CaptureStartInfo_Void callback_); - [DtsName="off", DtsTag="'captureStartWithInfo'"] - void offCaptureStartWithInfo(optional AsyncCallback_CaptureStartInfo_Void callback_); [DtsName="on", DtsTag="'frameShutter'"] void onFrameShutter(AsyncCallback_FrameShutterInfo_Void callback_); - [DtsName="off", DtsTag="'frameShutter'"] - void offFrameShutter(optional AsyncCallback_FrameShutterInfo_Void callback_); [DtsName="on", DtsTag="'frameShutterEnd'"] void onFrameShutterEnd(AsyncCallback_FrameShutterEndInfo_Void callback_); - [DtsName="off", DtsTag="'frameShutterEnd'"] - void offFrameShutterEnd(optional AsyncCallback_FrameShutterEndInfo_Void callback_); [DtsName="on", DtsTag="'captureEnd'"] void onCaptureEnd(AsyncCallback_CaptureEndInfo_Void callback_); - [DtsName="off", DtsTag="'captureEnd'"] - void offCaptureEnd(optional AsyncCallback_CaptureEndInfo_Void callback_); [DtsName="on", DtsTag="'captureReady'"] void onCaptureReady(AsyncCallback_Void callback_); - [DtsName="off", DtsTag="'captureReady'"] - void offCaptureReady(optional AsyncCallback_Void callback_); [DtsName="on", DtsTag="'estimatedCaptureDuration'"] void onEstimatedCaptureDuration(AsyncCallback_Number_Void callback_); - [DtsName="off", DtsTag="'estimatedCaptureDuration'"] - void offEstimatedCaptureDuration(optional AsyncCallback_Number_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [DtsName="on", DtsTag="'quickThumbnail'"] + void onQuickThumbnail(AsyncCallback_Image_PixelMap_Void callback_); + [Throws, DtsName="on", DtsTag="'offlineDeliveryFinished'"] + void onOfflineDeliveryFinished(AsyncCallback_Void callback_); + [DtsName="off", DtsTag="'photoAvailable'"] + void offPhotoAvailable(optional AsyncCallback_Photo_Void callback_); + [Throws, DtsName="off", DtsTag="'deferredPhotoProxyAvailable'"] + void offDeferredPhotoProxyAvailable(optional AsyncCallback_DeferredPhotoProxy_Void callback_); + [DtsName="off", DtsTag="'photoAssetAvailable'"] + void offPhotoAssetAvailable(optional AsyncCallback_PhotoAccessHelper_PhotoAsset_Void callback_); + [Deprecated, DtsName="off", DtsTag="'captureStart'"] + void offCaptureStart(optional AsyncCallback_Number_Void callback_); + [DtsName="off", DtsTag="'captureStartWithInfo'"] + void offCaptureStartWithInfo(optional AsyncCallback_CaptureStartInfo_Void callback_); + [DtsName="off", DtsTag="'frameShutter'"] + void offFrameShutter(optional AsyncCallback_FrameShutterInfo_Void callback_); + [DtsName="off", DtsTag="'frameShutterEnd'"] + void offFrameShutterEnd(optional AsyncCallback_FrameShutterEndInfo_Void callback_); + [DtsName="off", DtsTag="'captureEnd'"] + void offCaptureEnd(optional AsyncCallback_CaptureEndInfo_Void callback_); + [DtsName="off", DtsTag="'captureReady'"] + void offCaptureReady(optional AsyncCallback_Void callback_); + [DtsName="off", DtsTag="'estimatedCaptureDuration'"] + void offEstimatedCaptureDuration(optional AsyncCallback_Number_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'quickThumbnail'"] + void offQuickThumbnail(optional AsyncCallback_Image_PixelMap_Void callback_); + [Throws, DtsName="off", DtsTag="'offlineDeliveryFinished'"] + void offOfflineDeliveryFinished(optional AsyncCallback_Void callback_); + boolean isMirrorSupported(); + [Throws] + void enableMirror(boolean enabled); [Throws] Profile getActiveProfile(); [Throws] boolean isQuickThumbnailSupported(); [Throws] void enableQuickThumbnail(boolean enabled); - [DtsName="on", DtsTag="'quickThumbnail'"] - void onQuickThumbnail(AsyncCallback_image_PixelMap_Void callback_); - [DtsName="off", DtsTag="'quickThumbnail'"] - void offQuickThumbnail(optional AsyncCallback_image_PixelMap_Void callback_); [Throws] boolean isAutoHighQualityPhotoSupported(); [Throws] @@ -1776,48 +1602,40 @@ namespace camera { void enableMovingPhoto(boolean enabled); [Throws] ImageRotation getPhotoRotation(number deviceDegree); - + [Throws] + boolean isOfflineSupported(); + [Throws] + void enableOffline(); }; [Entity=Interface] interface FrameShutterInfo { - attribute number captureId; attribute number timestamp; - }; [Entity=Interface] interface FrameShutterEndInfo { - attribute number captureId; - }; [Entity=Interface] interface CaptureStartInfo { - attribute number captureId; attribute number time; - }; [Entity=Interface] interface CaptureEndInfo { - attribute number captureId; attribute number frameCount; - }; [Entity=Interface] interface DeferredVideoEnhancementInfo { - readonly attribute boolean isDeferredVideoEnhancementAvailable; [Optional] readonly attribute String videoId; - }; [Async, Synthetic] callback AsyncCallback_DeferredVideoEnhancementInfo_Void = void (DeferredVideoEnhancementInfo result); [Entity=Interface] interface VideoOutput: CameraOutput { - [Throws] void start(AsyncCallback_Void callback_); [Throws] @@ -1852,18 +1670,18 @@ namespace camera { void enableAutoVideoFrameRate(boolean enabled); [Throws, DtsName="on", DtsTag="'deferredVideoEnhancementInfo'"] void onDeferredVideoEnhancementInfo(AsyncCallback_DeferredVideoEnhancementInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'deferredVideoEnhancementInfo'"] - void offDeferredVideoEnhancementInfo(optional AsyncCallback_DeferredVideoEnhancementInfo_Void callback_); [DtsName="on", DtsTag="'frameStart'"] void onFrameStart(AsyncCallback_Void callback_); - [DtsName="off", DtsTag="'frameStart'"] - void offFrameStart(optional AsyncCallback_Void callback_); [DtsName="on", DtsTag="'frameEnd'"] void onFrameEnd(AsyncCallback_Void callback_); - [DtsName="off", DtsTag="'frameEnd'"] - void offFrameEnd(optional AsyncCallback_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'deferredVideoEnhancementInfo'"] + void offDeferredVideoEnhancementInfo(optional AsyncCallback_DeferredVideoEnhancementInfo_Void callback_); + [DtsName="off", DtsTag="'frameStart'"] + void offFrameStart(optional AsyncCallback_Void callback_); + [DtsName="off", DtsTag="'frameEnd'"] + void offFrameEnd(optional AsyncCallback_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); [Throws] @@ -1872,15 +1690,11 @@ namespace camera { sequence getSupportedVideoMetaTypes(); [Throws] void attachMetaSurface(String surfaceId, VideoMetaType type); - }; dictionary VideoMetaType { - number VIDEO_META_MAKER_INFO = 0; - }; dictionary MetadataObjectType { - number FACE_DETECTION = 0; number HUMAN_BODY = 1; number CAT_FACE = 2; @@ -1889,46 +1703,36 @@ namespace camera { number DOG_BODY = 5; number SALIENT_DETECTION = 6; number BAR_CODE_DETECTION = 7; - }; dictionary LightPaintingType { - number TRAFFIC_TRAILS = 0; number STAR_TRAILS = 1; number SILKY_WATER = 2; number LIGHT_GRAFFITI = 3; - }; [Entity=Interface] interface Rect { - attribute number topLeftX; attribute number topLeftY; attribute number width; attribute number height; - }; dictionary Emotion { - number NEUTRAL = 0; number SADNESS = 1; number SMILE = 2; number SURPRISE = 3; - }; [Entity=Interface] interface MetadataObject { - readonly attribute MetadataObjectType type; readonly attribute number timestamp; readonly attribute Rect boundingBox; readonly attribute number objectId; readonly attribute number confidence; - }; [Entity=Interface] interface MetadataFaceObject: MetadataObject { - readonly attribute Rect leftEyeBoundingBox; readonly attribute Rect rightEyeBoundingBox; readonly attribute Emotion emotion; @@ -1936,59 +1740,41 @@ namespace camera { readonly attribute number pitchAngle; readonly attribute number yawAngle; readonly attribute number rollAngle; - }; [Entity=Interface] interface MetadataHumanBodyObject: MetadataObject { - - }; [Entity=Interface] interface MetadataCatFaceObject: MetadataObject { - readonly attribute Rect leftEyeBoundingBox; readonly attribute Rect rightEyeBoundingBox; - }; [Entity=Interface] interface MetadataCatBodyObject: MetadataObject { - - }; [Entity=Interface] interface MetadataDogFaceObject: MetadataObject { - readonly attribute Rect leftEyeBoundingBox; readonly attribute Rect rightEyeBoundingBox; - }; [Entity=Interface] interface MetadataDogBodyObject: MetadataObject { - - }; [Entity=Interface] interface MetadataSalientDetectionObject: MetadataObject { - - }; [Entity=Interface] interface MetadataBarcodeObject: MetadataObject { - - }; [Entity=Interface] interface CameraOcclusionDetectionResult { - readonly attribute boolean isCameraOccluded; readonly attribute boolean isCameraLensDirty; - }; [Async, Synthetic] callback AsyncCallback_Array_MetadataObject_Void = void (sequence result); [Entity=Interface] interface MetadataOutput: CameraOutput { - [Throws] void start(AsyncCallback_Void callback_); [Throws] @@ -2001,29 +1787,34 @@ namespace camera { void removeMetadataObjectTypes(sequence types); [DtsName="on", DtsTag="'metadataObjectsAvailable'"] void onMetadataObjectsAvailable(AsyncCallback_Array_MetadataObject_Void callback_); - [DtsName="off", DtsTag="'metadataObjectsAvailable'"] - void offMetadataObjectsAvailable(optional AsyncCallback_Array_MetadataObject_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [DtsName="off", DtsTag="'metadataObjectsAvailable'"] + void offMetadataObjectsAvailable(optional AsyncCallback_Array_MetadataObject_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - + }; + dictionary CameraConcurrentType { + number CAMERA_LIMITED_CAPABILITY = 0; + number CAMERA_FULL_CAPABILITY = 1; + }; + [Entity=Interface] + interface CameraConcurrentInfo { + readonly attribute CameraDevice device; + readonly attribute CameraConcurrentType type; + readonly attribute sequence modes; + readonly attribute sequence outputCapabilities; }; dictionary TimeLapseRecordState { - number IDLE = 0; number RECORDING = 1; - }; dictionary TimeLapsePreviewType { - number DARK = 1; number LIGHT = 2; - }; [Entity=Interface] interface TryAEInfo { - readonly attribute boolean isTryAEDone; [Optional] readonly attribute boolean isTryAEHintNeeded; @@ -2031,43 +1822,41 @@ namespace camera { readonly attribute TimeLapsePreviewType previewType; [Optional] readonly attribute number captureInterval; - }; [Async, Synthetic] callback AsyncCallback_TryAEInfo_Void = void (TryAEInfo result); [Entity=Interface] - interface TimeLapsePhotoSession: Session { - + interface TimeLapsePhotoSession: Session, Focus, ManualFocus, AutoExposure, ManualExposure, ManualIso, WhiteBalance, Zoom, ColorEffect { [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [Throws, DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'focusStateChange'"] void onFocusStateChange(AsyncCallback_FocusState_Void callback_); - [Throws, DtsName="off", DtsTag="'focusStateChange'"] - void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); [Throws, DtsName="on", DtsTag="'isoInfoChange'"] void onIsoInfoChange(AsyncCallback_IsoInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'isoInfoChange'"] - void offIsoInfoChange(optional AsyncCallback_IsoInfo_Void callback_); [Throws, DtsName="on", DtsTag="'exposureInfoChange'"] void onExposureInfoChange(AsyncCallback_ExposureInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'exposureInfoChange'"] - void offExposureInfoChange(optional AsyncCallback_ExposureInfo_Void callback_); [Throws, DtsName="on", DtsTag="'luminationInfoChange'"] void onLuminationInfoChange(AsyncCallback_LuminationInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'tryAEInfoChange'"] + void onTryAEInfoChange(AsyncCallback_TryAEInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'focusStateChange'"] + void offFocusStateChange(optional AsyncCallback_FocusState_Void callback_); + [Throws, DtsName="off", DtsTag="'isoInfoChange'"] + void offIsoInfoChange(optional AsyncCallback_IsoInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'exposureInfoChange'"] + void offExposureInfoChange(optional AsyncCallback_ExposureInfo_Void callback_); [Throws, DtsName="off", DtsTag="'luminationInfoChange'"] void offLuminationInfoChange(optional AsyncCallback_LuminationInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'tryAEInfoChange'"] + void offTryAEInfoChange(optional AsyncCallback_TryAEInfo_Void callback_); [Throws] boolean isTryAENeeded(); [Throws] void startTryAE(); [Throws] void stopTryAE(); - [Throws, DtsName="on", DtsTag="'tryAEInfoChange'"] - void onTryAEInfoChange(AsyncCallback_TryAEInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'tryAEInfoChange'"] - void offTryAEInfoChange(optional AsyncCallback_TryAEInfo_Void callback_); [Throws] sequence getSupportedTimeLapseIntervalRange(); [Throws] @@ -2082,105 +1871,95 @@ namespace camera { TimeLapsePreviewType getTimeLapsePreviewType(); [Throws] void setTimeLapsePreviewType(TimeLapsePreviewType type); - + }; + [Entity=Interface] + interface ControlCenterSession: Beauty, Aperture { + [Throws] + async void release(); }; dictionary DepthDataAccuracy { - number DEPTH_DATA_ACCURACY_RELATIVE = 0; number DEPTH_DATA_ACCURACY_ABSOLUTE = 1; - }; dictionary DepthDataQualityLevel { - number DEPTH_DATA_QUALITY_BAD = 0; number DEPTH_DATA_QUALITY_FAIR = 1; number DEPTH_DATA_QUALITY_GOOD = 2; - }; [Entity=Interface] interface DepthProfile { - readonly attribute CameraFormat format; readonly attribute DepthDataAccuracy dataAccuracy; readonly attribute Size size; - }; [Entity=Interface] interface DepthData { - readonly attribute CameraFormat format; readonly attribute image.PixelMap depthMap; readonly attribute DepthDataQualityLevel qualityLevel; readonly attribute DepthDataAccuracy dataAccuracy; [Throws] async void release(); - }; [Async, Synthetic] callback AsyncCallback_DepthData_Void = void (DepthData result); [Entity=Interface] interface DepthDataOutput: CameraOutput { - [Throws] async void start(); [Throws] async void stop(); [Throws, DtsName="on", DtsTag="'depthDataAvailable'"] void onDepthDataAvailable(AsyncCallback_DepthData_Void callback_); - [Throws, DtsName="off", DtsTag="'depthDataAvailable'"] - void offDepthDataAvailable(optional AsyncCallback_DepthData_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'depthDataAvailable'"] + void offDepthDataAvailable(optional AsyncCallback_DepthData_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface DepthFusionQuery { - [Throws] boolean isDepthFusionSupported(); [Throws] sequence getDepthFusionThreshold(); - }; [Entity=Interface] interface DepthFusion: DepthFusionQuery { - [Throws] boolean isDepthFusionEnabled(); [Throws] void enableDepthFusion(boolean enabled); - + }; + dictionary AuxiliaryType { + number CONTRACT_LENS = 0; + }; + dictionary AuxiliaryStatus { + number LOCKED = 0; + number ON = 1; + number OFF = 2; }; dictionary ColorReservationType { - number NONE = 0; number PORTRAIT = 1; - }; [Entity=Interface] interface ColorReservationQuery { - [Throws] sequence getSupportedColorReservationTypes(); - }; [Entity=Interface] interface ColorReservation: ColorReservationQuery { - [Throws] ColorReservationType getColorReservation(); [Throws] void setColorReservation(ColorReservationType type); - }; - [GlobalScope] - interface GlobalScope_camera_ohos_multimedia_camera { - - [Throws] - static CameraManager getCameraManager(Context context); - + [Entity=Interface] + interface QuickThumbnail { + readonly attribute number captureId; + attribute image.PixelMap thumbnailImage; + async void release(); }; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.cameraPicker.idl b/idl/@ohos.multimedia.cameraPicker.idl index 72e2cf2..f994c6b 100644 --- a/idl/@ohos.multimedia.cameraPicker.idl +++ b/idl/@ohos.multimedia.cameraPicker.idl @@ -1,37 +1,25 @@ -package ohos.multimedia; -import application.Context as Context; -import ohos.multimedia.camera as camera; +package ohos.multimedia.cameraPicker; +import application.Context.default as Context; +import ohos.multimedia.camera.default as camera; +[DefaultExport] namespace cameraPicker { - [Entity=Class] interface PickerProfile { - attribute camera.CameraPosition cameraPosition; [Optional] attribute String saveUri; [Optional] attribute number videoDuration; - }; dictionary PickerMediaType { - String PHOTO = "photo"; String VIDEO = "video"; - }; [Entity=Class] interface PickerResult { - attribute number resultCode; attribute String resultUri; attribute PickerMediaType mediaType; - }; - [GlobalScope] - interface GlobalScope_cameraPicker_ohos_multimedia_cameraPicker { - - static async PickerResult pick(Context context, sequence mediaTypes, PickerProfile pickerProfile); - - }; - + async PickerResult pick(Context context, sequence mediaTypes, PickerProfile pickerProfile); }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.drm.idl b/idl/@ohos.multimedia.drm.idl index 6e2a007..af224d9 100644 --- a/idl/@ohos.multimedia.drm.idl +++ b/idl/@ohos.multimedia.drm.idl @@ -1,16 +1,13 @@ -package ohos.multimedia; +package ohos.multimedia.drm; +[DefaultExport] namespace drm { - dictionary DrmErrorCode { - number ERROR_UNKNOWN = 24700101; number MAX_SYSTEM_NUM_REACHED = 24700103; number MAX_SESSION_NUM_REACHED = 24700104; number SERVICE_FATAL_ERROR = 24700201; - }; dictionary PreDefinedConfigName { - String CONFIG_DEVICE_VENDOR = "vendor"; String CONFIG_DEVICE_VERSION = "version"; String CONFIG_DEVICE_DESCRIPTION = "description"; @@ -18,118 +15,100 @@ namespace drm { String CONFIG_DEVICE_UNIQUE_ID = "deviceUniqueId"; String CONFIG_SESSION_MAX = "maxSessionNum"; String CONFIG_SESSION_CURRENT = "currentSessionNum"; - }; dictionary MediaKeyType { - number MEDIA_KEY_TYPE_OFFLINE = 0; number MEDIA_KEY_TYPE_ONLINE = 1; - }; dictionary OfflineMediaKeyStatus { - number OFFLINE_MEDIA_KEY_STATUS_UNKNOWN = 0; number OFFLINE_MEDIA_KEY_STATUS_USABLE = 1; number OFFLINE_MEDIA_KEY_STATUS_INACTIVE = 2; - }; dictionary CertificateStatus { - number CERT_STATUS_PROVISIONED = 0; number CERT_STATUS_NOT_PROVISIONED = 1; number CERT_STATUS_EXPIRED = 2; number CERT_STATUS_INVALID = 3; number CERT_STATUS_UNAVAILABLE = 4; - }; dictionary MediaKeyRequestType { - number MEDIA_KEY_REQUEST_TYPE_UNKNOWN = 0; number MEDIA_KEY_REQUEST_TYPE_INITIAL = 1; number MEDIA_KEY_REQUEST_TYPE_RENEWAL = 2; number MEDIA_KEY_REQUEST_TYPE_RELEASE = 3; number MEDIA_KEY_REQUEST_TYPE_NONE = 4; number MEDIA_KEY_REQUEST_TYPE_UPDATE = 5; - }; dictionary ContentProtectionLevel { - number CONTENT_PROTECTION_LEVEL_UNKNOWN = 0; number CONTENT_PROTECTION_LEVEL_SW_CRYPTO = 1; number CONTENT_PROTECTION_LEVEL_HW_CRYPTO = 2; number CONTENT_PROTECTION_LEVEL_ENHANCED_HW = 3; number CONTENT_PROTECTION_LEVEL_MAX = 4; - }; [Entity=Interface] interface ProvisionRequest { - attribute buffer data; attribute String defaultURL; - }; [Entity=Interface] interface OptionsData { - attribute String name; attribute String value; - }; [Entity=Interface] interface MediaKeyRequest { - attribute MediaKeyRequestType mediaKeyRequestType; attribute buffer data; attribute String defaultURL; - }; [Entity=Interface] interface EventInfo { - attribute buffer info; attribute String extraInfo; - }; [Entity=Interface] interface StatisticKeyValue { - attribute String name; attribute String value; - }; [Entity=Interface] interface MediaKeyStatus { - attribute String name; attribute String value; - }; [Entity=Interface] interface KeysInfo { - attribute buffer keyId; attribute String value; - }; [Entity=Interface] interface MediaKeySystemInfo { - attribute String uuid; attribute buffer pssh; - }; [Entity=Interface] interface MediaKeySystemDescription { - attribute String name; attribute String uuid; - }; + [Throws] + String getMediaKeySystemUuid(String name); + [Throws] + sequence getMediaKeySystems(); + [Throws] + MediaKeySystem createMediaKeySystem(String name); + [Throws] + boolean isMediaKeySystemSupported(String name, String mimeType, ContentProtectionLevel level); + [Throws] + boolean isMediaKeySystemSupported(String name, String mimeType); + [Throws] + boolean isMediaKeySystemSupported(String name); [Synthetic] callback Callback_EventInfo_Void = void (EventInfo eventInfo); [Entity=Interface] interface MediaKeySystem { - [Throws] String getConfigurationString(String configName); [Throws] @@ -164,13 +143,11 @@ namespace drm { void clearOfflineMediaKeys(buffer mediaKeyId); [Throws] void destroy(); - }; [Synthetic] callback Callback_Array_KeysInfo_Boolean_Void = void (sequence keyInfo, boolean newKeyAvailable); [Entity=Interface] interface MediaKeySession { - [Throws] async MediaKeyRequest generateMediaKeyRequest(String mimeType, buffer initData, number mediaKeyType, optional sequence options); [Throws] @@ -191,44 +168,25 @@ namespace drm { boolean requireSecureDecoderModule(String mimeType); [Throws, DtsName="on", DtsTag="'keyRequired'"] void onKeyRequired(Callback_EventInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'keyRequired'"] - void offKeyRequired(optional Callback_EventInfo_Void callback_); [Throws, DtsName="on", DtsTag="'keyExpired'"] void onKeyExpired(Callback_EventInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'keyExpired'"] - void offKeyExpired(optional Callback_EventInfo_Void callback_); [Throws, DtsName="on", DtsTag="'vendorDefined'"] void onVendorDefined(Callback_EventInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'vendorDefined'"] - void offVendorDefined(optional Callback_EventInfo_Void callback_); [Throws, DtsName="on", DtsTag="'expirationUpdate'"] void onExpirationUpdate(Callback_EventInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'expirationUpdate'"] - void offExpirationUpdate(optional Callback_EventInfo_Void callback_); [Throws, DtsName="on", DtsTag="'keysChange'"] void onKeysChange(Callback_Array_KeysInfo_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'keyRequired'"] + void offKeyRequired(optional Callback_EventInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'keyExpired'"] + void offKeyExpired(optional Callback_EventInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'vendorDefined'"] + void offVendorDefined(optional Callback_EventInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'expirationUpdate'"] + void offExpirationUpdate(optional Callback_EventInfo_Void callback_); [Throws, DtsName="off", DtsTag="'keysChange'"] void offKeysChange(optional Callback_Array_KeysInfo_Boolean_Void callback_); [Throws] void destroy(); - - }; - [GlobalScope] - interface GlobalScope_drm_ohos_multimedia_drm { - - [Throws] - static String getMediaKeySystemUuid(String name); - [Throws] - static sequence getMediaKeySystems(); - [Throws] - static MediaKeySystem createMediaKeySystem(String name); - [Throws] - static boolean isMediaKeySystemSupported(String name, String mimeType, ContentProtectionLevel level); - [Throws] - static boolean isMediaKeySystemSupported(String name, String mimeType); - [Throws] - static boolean isMediaKeySystemSupported(String name); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.image.idl b/idl/@ohos.multimedia.image.idl index e07a7b4..9b90a57 100644 --- a/idl/@ohos.multimedia.image.idl +++ b/idl/@ohos.multimedia.image.idl @@ -1,12 +1,11 @@ -package ohos.multimedia; +package ohos.multimedia.image; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.graphics.colorSpaceManager as colorSpaceManager; -import ohos.resourceManager as resourceManager; -import ohos.rpc as rpc; +import ohos.graphics.colorSpaceManager.default as colorSpaceManager; +import ohos.resourceManager.default as resourceManager; +import ohos.rpc.default as rpc; +[DefaultExport] namespace image { - dictionary PixelMapFormat { - number UNKNOWN = 0; number ARGB_8888 = 1; number RGB_565 = 2; @@ -22,24 +21,18 @@ namespace image { number YCRCB_P010 = 12; [OriginalEnumMemberName=ASTC_4x4] number ASTC_4X_4 = 102; - }; dictionary ResolutionQuality { - number LOW = 1; number MEDIUM = 2; number HIGH = 3; - }; [Entity=Interface] interface Size { - - attribute number height; - attribute number width; - + attribute i32 height; + attribute i32 width; }; dictionary PropertyKey { - String BITS_PER_SAMPLE = "BitsPerSample"; String ORIENTATION = "Orientation"; String IMAGE_LENGTH = "ImageLength"; @@ -220,160 +213,128 @@ namespace image { String CLOUD_ENHANCEMENT_MODE = "HwMnoteCloudEnhancementMode"; String WIND_SNAPSHOT_MODE = "HwMnoteWindSnapshotMode"; String GIF_LOOP_COUNT = "GIFLoopCount"; - }; dictionary ImageFormat { - number YCBCR_422_SP = 1000; number JPEG = 2000; - }; dictionary AlphaType { - number UNKNOWN = 0; number OPAQUE = 1; number PREMUL = 2; number UNPREMUL = 3; - }; dictionary DecodingDynamicRange { - number AUTO = 0; number SDR = 1; number HDR = 2; - }; dictionary PackingDynamicRange { - number AUTO = 0; number SDR = 1; - }; dictionary AntiAliasingLevel { - number NONE = 0; number LOW = 1; number MEDIUM = 2; number HIGH = 3; - }; dictionary ScaleMode { - number FIT_TARGET_SIZE = 0; number CENTER_CROP = 1; - }; dictionary ComponentType { - number YUV_Y = 1; number YUV_U = 2; number YUV_V = 3; number JPEG = 4; - }; dictionary HdrMetadataKey { - number HDR_METADATA_TYPE = 0; number HDR_STATIC_METADATA = 1; number HDR_DYNAMIC_METADATA = 2; number HDR_GAINMAP_METADATA = 3; - }; dictionary HdrMetadataType { - number NONE = 0; number BASE = 1; number GAINMAP = 2; number ALTERNATE = 3; - }; dictionary AllocatorType { - number AUTO = 0; number DMA = 1; number SHARE_MEMORY = 2; - }; [Entity=Interface] interface Region { - attribute Size size; - attribute number x; - attribute number y; - + attribute i32 x; + attribute i32 y; }; [Entity=Interface] interface PositionArea { - attribute buffer pixels; - attribute number offset; - attribute number stride; + attribute i32 offset; + attribute i32 stride; attribute Region region; - }; [Entity=Interface] interface ImageInfo { - attribute Size size; - attribute number density; - attribute number stride; + attribute i32 density; + attribute i32 stride; attribute PixelMapFormat pixelFormat; attribute AlphaType alphaType; attribute String mimeType; attribute boolean isHdr; - + }; + dictionary CropAndScaleStrategy { + number SCALE_FIRST = 1; + number CROP_FIRST = 2; }; [Entity=Interface] interface PackingOption { - attribute String format; - attribute number quality; + attribute i32 quality; [Optional] - attribute number bufferSize; + attribute i32 bufferSize; [Optional] attribute PackingDynamicRange desiredDynamicRange; [Optional] attribute boolean needsPackProperties; - }; [Entity=Interface] interface PackingOptionsForSequence { - attribute number frameCount; attribute sequence delayTimeList; [Optional] attribute sequence disposalTypes; [Optional] attribute number loopCount; - }; [Entity=Interface, Deprecated] interface GetImagePropertyOptions { - [Optional, Deprecated] attribute number index; [Optional, Deprecated] attribute String defaultValue; - }; [Entity=Interface] interface ImagePropertyOptions { - [Optional] - attribute number index; + attribute i32 index; [Optional] attribute String defaultValue; - }; [Entity=Interface] interface DecodingOptions { - [Optional] - attribute number index; + attribute i32 index; [Optional] - attribute number sampleSize; + attribute i32 sampleSize; [Optional] - attribute number rotate; + attribute i32 rotate; [Optional] attribute boolean editable; [Optional] @@ -383,27 +344,25 @@ namespace image { [Optional] attribute PixelMapFormat desiredPixelFormat; [Optional] - attribute number fitDensity; + attribute i32 fitDensity; [Optional] attribute colorSpaceManager.ColorSpaceManager desiredColorSpace; [Optional] attribute DecodingDynamicRange desiredDynamicRange; [Optional] attribute ResolutionQuality resolutionQuality; - + [Optional] + attribute CropAndScaleStrategy cropAndScaleStrategy; }; [Entity=Interface] interface Component { - readonly attribute ComponentType componentType; - readonly attribute number rowStride; - readonly attribute number pixelStride; + readonly attribute i32 rowStride; + readonly attribute i32 pixelStride; readonly attribute buffer byteBuffer; - }; [Entity=Interface] interface InitializationOptions { - attribute Size size; [Optional] attribute PixelMapFormat srcPixelFormat; @@ -415,21 +374,17 @@ namespace image { attribute AlphaType alphaType; [Optional] attribute ScaleMode scaleMode; - }; [Entity=Interface] interface SourceOptions { - - attribute number sourceDensity; + attribute i32 sourceDensity; [Optional] attribute PixelMapFormat sourcePixelFormat; [Optional] attribute Size sourceSize; - }; [Entity=Interface] interface HdrStaticMetadata { - attribute sequence displayPrimariesX; attribute sequence displayPrimariesY; attribute number whitePointX; @@ -438,21 +393,17 @@ namespace image { attribute number minLuminance; attribute number maxContentLightLevel; attribute number maxFrameAverageLightLevel; - }; [Entity=Interface] interface GainmapChannel { - attribute number gainmapMax; attribute number gainmapMin; attribute number gamma; attribute number baseOffset; attribute number alternateOffset; - }; [Entity=Interface] interface HdrGainmapMetadata { - attribute number writerVersion; attribute number miniVersion; attribute number gainmapChannelCount; @@ -460,18 +411,64 @@ namespace image { attribute number baseHeadroom; attribute number alternateHeadroom; attribute sequence channels; - }; typedef (HdrMetadataType or HdrStaticMetadata or buffer or HdrGainmapMetadata) HdrMetadataValue; [Async, Synthetic] callback AsyncCallback_PixelMap_Void = void (PixelMap result); + void createPixelMap(buffer colors, InitializationOptions options, AsyncCallback_PixelMap_Void callback_); + async PixelMap createPixelMap(buffer colors, InitializationOptions options); + [Throws] + PixelMap createPixelMapSync(buffer colors, InitializationOptions options); + [Throws] + async PixelMap createPixelMapUsingAllocator(buffer colors, InitializationOptions param, optional AllocatorType allocatorType); + [Throws] + PixelMap createPixelMapUsingAllocatorSync(buffer colors, InitializationOptions param, optional AllocatorType allocatorType); + [Throws] + PixelMap createPixelMapSync(InitializationOptions options); + [Throws] + PixelMap createPixelMapUsingAllocatorSync(InitializationOptions param, optional AllocatorType allocatorType); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void createPremultipliedPixelMap(PixelMap src, PixelMap dst, AsyncCallback_Void callback_); + [Throws] + async void createPremultipliedPixelMap(PixelMap src, PixelMap dst); + [Throws] + void createUnpremultipliedPixelMap(PixelMap src, PixelMap dst, AsyncCallback_Void callback_); + [Throws] + async void createUnpremultipliedPixelMap(PixelMap src, PixelMap dst); + [Throws] + PixelMap createPixelMapFromParcel(rpc.MessageSequence sequence_); + [Throws] + async PixelMap createPixelMapFromSurface(String surfaceId, Region region); + [Throws] + PixelMap createPixelMapFromSurfaceSync(String surfaceId, Region region); + [Throws] + async PixelMap createPixelMapFromSurface(String surfaceId); + [Throws] + PixelMap createPixelMapFromSurfaceSync(String surfaceId); + ImageSource createImageSource(String uri); + ImageSource createImageSource(String uri, SourceOptions options); + ImageSource createImageSource(i32 fd); + ImageSource createImageSource(i32 fd, SourceOptions options); + ImageSource createImageSource(buffer buf); + ImageSource createImageSource(buffer buf, SourceOptions options); + ImageSource createImageSource(resourceManager.RawFileDescriptor rawfile, optional SourceOptions options); + ImageSource CreateIncrementalSource(buffer buf); + ImageSource CreateIncrementalSource(buffer buf, optional SourceOptions options); + ImagePacker createImagePacker(); + [Deprecated] + ImageReceiver createImageReceiver(number width, number height, number format, number capacity); + [Throws] + ImageReceiver createImageReceiver(Size size, ImageFormat format, i32 capacity); + [Deprecated] + ImageCreator createImageCreator(number width, number height, number format, number capacity); + [Throws] + ImageCreator createImageCreator(Size size, ImageFormat format, i32 capacity); [Async, Synthetic] callback AsyncCallback_ImageInfo_Void = void (ImageInfo result); [Entity=Interface] interface PixelMap { - readonly attribute boolean isEditable; readonly attribute boolean isStrideAlignment; async void readPixelsToBuffer(buffer dst); @@ -496,37 +493,37 @@ namespace image { void getImageInfo(AsyncCallback_ImageInfo_Void callback_); [Throws] ImageInfo getImageInfoSync(); - number getBytesNumberPerRow(); - number getPixelBytesNumber(); + i32 getBytesNumberPerRow(); + i32 getPixelBytesNumber(); number getDensity(); - void opacity(number rate, AsyncCallback_Void callback_); - async void opacity(number rate); + void opacity(f64 rate, AsyncCallback_Void callback_); + async void opacity(f64 rate); [Throws] - void opacitySync(number rate); + void opacitySync(f64 rate); async PixelMap createAlphaPixelmap(); void createAlphaPixelmap(AsyncCallback_PixelMap_Void callback_); [Throws] PixelMap createAlphaPixelmapSync(); - void scale(number x, number y, AsyncCallback_Void callback_); - async void scale(number x, number y); + void scale(f64 x, f64 y, AsyncCallback_Void callback_); + async void scale(f64 x, f64 y); [Throws] - void scaleSync(number x, number y); + async void scale(f64 x, f64 y, AntiAliasingLevel level); [Throws] - async void scale(number x, number y, AntiAliasingLevel level); + void scaleSync(f64 x, f64 y); [Throws] - void scaleSync(number x, number y, AntiAliasingLevel level); + void scaleSync(f64 x, f64 y, AntiAliasingLevel level); [Throws] - async PixelMap createScaledPixelMap(number x, number y, optional AntiAliasingLevel level); + async PixelMap createScaledPixelMap(f64 x, f64 y, optional AntiAliasingLevel level); [Throws] - PixelMap createScaledPixelMapSync(number x, number y, optional AntiAliasingLevel level); - void translate(number x, number y, AsyncCallback_Void callback_); - async void translate(number x, number y); + PixelMap createScaledPixelMapSync(f64 x, f64 y, optional AntiAliasingLevel level); + void translate(f64 x, f64 y, AsyncCallback_Void callback_); + async void translate(f64 x, f64 y); [Throws] - void translateSync(number x, number y); - void rotate(number angle, AsyncCallback_Void callback_); - async void rotate(number angle); + void translateSync(f64 x, f64 y); + void rotate(f64 angle, AsyncCallback_Void callback_); + async void rotate(f64 angle); [Throws] - void rotateSync(number angle); + void rotateSync(f64 angle); void flip(boolean horizontal, boolean vertical, AsyncCallback_Void callback_); async void flip(boolean horizontal, boolean vertical); [Throws] @@ -563,11 +560,9 @@ namespace image { async PixelMap clone(); [Throws] async void setMetadata(HdrMetadataKey key, HdrMetadataValue value); - }; [Entity=Interface] interface Picture { - PixelMap getMainPixelmap(); [Throws] async PixelMap getHdrComposedPixelmap(); @@ -583,14 +578,19 @@ namespace image { [Throws] void marshalling(rpc.MessageSequence sequence_); void release(); - }; + [Throws] + Picture createPicture(PixelMap mainPixelmap); + [Throws] + async Picture createPictureByHdrAndSdrPixelMap(PixelMap hdrPixelMap, PixelMap sdrPixelMap); + [Throws] + Picture createPictureFromParcel(rpc.MessageSequence sequence_); + [Throws] + AuxiliaryPicture createAuxiliaryPicture(buffer buffer, Size size, AuxiliaryPictureType type); [Entity=Interface] interface AuxiliaryPicture { - [Throws] async void writePixelsFromBuffer(buffer data); - [Throws] async buffer readPixelsToBuffer(); AuxiliaryPictureType getType(); [Throws] @@ -601,75 +601,65 @@ namespace image { [Throws] void setAuxiliaryPictureInfo(AuxiliaryPictureInfo info); void release(); - }; dictionary AuxiliaryPictureType { - number GAINMAP = 1; number DEPTH_MAP = 2; number UNREFOCUS_MAP = 3; number LINEAR_MAP = 4; number FRAGMENT_MAP = 5; - }; dictionary MetadataType { - number EXIF_METADATA = 1; number FRAGMENT_METADATA = 2; - + number GIF_METADATA = 5; }; [Entity=Interface] interface Metadata { - [Throws] async record getProperties(sequence key); [Throws] async void setProperties(record records); async record getAllProperties(); - [Throws] async Metadata clone(); - }; dictionary FragmentMapPropertyKey { - String X_IN_ORIGINAL = "XInOriginal"; String Y_IN_ORIGINAL = "YInOriginal"; String WIDTH = "FragmentImageWidth"; String HEIGHT = "FragmentImageHeight"; - + }; + dictionary GifPropertyKey { + String GIF_DELAY_TIME = "GifDelayTime"; + String GIF_DISPOSAL_TYPE = "GifDisposalType"; }; [Entity=Interface] interface DecodingOptionsForPicture { - attribute sequence desiredAuxiliaryPictures; - }; [Entity=Interface] interface AuxiliaryPictureInfo { - attribute AuxiliaryPictureType auxiliaryPictureType; attribute Size size; - attribute number rowStride; + attribute i32 rowStride; attribute PixelMapFormat pixelFormat; attribute colorSpaceManager.ColorSpaceManager colorSpace; - }; [Async, Synthetic] callback AsyncCallback_Array_PixelMap_Void = void (sequence result); [Async, Synthetic] - callback AsyncCallback_Array_Number_Void = void (sequence result); + callback AsyncCallback_Array_I32_Void = void (sequence result); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Entity=Interface] interface ImageSource { - readonly attribute sequence supportedFormats; - void getImageInfo(number index, AsyncCallback_ImageInfo_Void callback_); + void getImageInfo(i32 index, AsyncCallback_ImageInfo_Void callback_); void getImageInfo(AsyncCallback_ImageInfo_Void callback_); - async ImageInfo getImageInfo(optional number index); - ImageInfo getImageInfoSync(optional number index); + async ImageInfo getImageInfo(optional i32 index); + ImageInfo getImageInfoSync(optional i32 index); async PixelMap createPixelMap(optional DecodingOptions options); void createPixelMap(AsyncCallback_PixelMap_Void callback_); void createPixelMap(DecodingOptions options, AsyncCallback_PixelMap_Void callback_); @@ -685,9 +675,9 @@ namespace image { [Throws] void createPixelMapList(DecodingOptions options, AsyncCallback_Array_PixelMap_Void callback_); [Throws] - async sequence getDelayTimeList(); + async sequence getDelayTimeList(); [Throws] - void getDelayTimeList(AsyncCallback_Array_Number_Void callback_); + void getDelayTimeList(AsyncCallback_Array_I32_Void callback_); [Throws] async sequence getDisposalTypeList(); [Throws] @@ -705,6 +695,8 @@ namespace image { [Throws] async record getImageProperties(sequence key); [Throws] + String getImagePropertySync(PropertyKey key); + [Throws] async void modifyImageProperty(PropertyKey key, String value); [Deprecated] async void modifyImageProperty(String key, String value); @@ -718,68 +710,66 @@ namespace image { async void release(); [Throws] async Picture createPicture(optional DecodingOptionsForPicture options); - + [Throws] + async Picture createPictureAtIndex(number index); + [Throws] + async PixelMap createWideGamutSdrPixelMap(); }; [Async, Synthetic] callback AsyncCallback_Buffer_Void = void (buffer result); [Entity=Interface] interface ImagePacker { - readonly attribute sequence supportedFormats; [Deprecated] void packing(ImageSource source, PackingOption option, AsyncCallback_Buffer_Void callback_); [Deprecated] async buffer packing(ImageSource source, PackingOption option); - [Throws] - async buffer packToData(ImageSource source, PackingOption options); [Deprecated] void packing(PixelMap source, PackingOption option, AsyncCallback_Buffer_Void callback_); [Deprecated] async buffer packing(PixelMap source, PackingOption option); [Throws] + async buffer packing(Picture picture, PackingOption options); + [Throws] + async buffer packToData(ImageSource source, PackingOption options); + [Throws] async buffer packToData(PixelMap source, PackingOption options); [Throws] - async buffer packToData(sequence pixelmapSequence, PackingOptionsForSequence options); + async buffer packToDataFromPixelmapSequence(sequence pixelmapSequence, PackingOptionsForSequence options); + [Throws] + void packToFile(ImageSource source, i32 fd, PackingOption options, AsyncCallback_Void callback_); [Throws] - void packToFile(ImageSource source, number fd, PackingOption options, AsyncCallback_Void callback_); + async void packToFile(ImageSource source, i32 fd, PackingOption options); [Throws] - async void packToFile(ImageSource source, number fd, PackingOption options); + void packToFile(PixelMap source, i32 fd, PackingOption options, AsyncCallback_Void callback_); [Throws] - void packToFile(PixelMap source, number fd, PackingOption options, AsyncCallback_Void callback_); + async void packToFile(PixelMap source, i32 fd, PackingOption options); [Throws] - async void packToFile(PixelMap source, number fd, PackingOption options); + async void packToFile(Picture picture, i32 fd, PackingOption options); [Throws] - async void packToFile(sequence pixelmapSequence, number fd, PackingOptionsForSequence options); + async void packToFileFromPixelmapSequence(sequence pixelmapSequence, number fd, PackingOptionsForSequence options); void release(AsyncCallback_Void callback_); async void release(); - [Throws] - async buffer packing(Picture picture, PackingOption options); - [Throws] - async void packToFile(Picture picture, number fd, PackingOption options); - }; [Async, Synthetic] callback AsyncCallback_Component_Void = void (Component result); [Entity=Interface] interface Image { - attribute Region clipRect; readonly attribute Size size; - readonly attribute number format; + readonly attribute i32 format; readonly attribute number timestamp; void getComponent(ComponentType componentType, AsyncCallback_Component_Void callback_); async Component getComponent(ComponentType componentType); void release(AsyncCallback_Void callback_); async void release(); - }; [Async, Synthetic] callback AsyncCallback_Image_Void = void (Image result); [Entity=Interface] interface ImageReceiver { - readonly attribute Size size; - readonly attribute number capacity; + readonly attribute i32 capacity; readonly attribute ImageFormat format; void getReceivingSurfaceId(AsyncCallback_String_Void callback_); async String getReceivingSurfaceId(); @@ -793,77 +783,22 @@ namespace image { void offImageArrival(optional AsyncCallback_Void callback_); void release(AsyncCallback_Void callback_); async void release(); - }; [Entity=Interface] interface ImageCreator { - - readonly attribute number capacity; + readonly attribute i32 capacity; readonly attribute ImageFormat format; void dequeueImage(AsyncCallback_Image_Void callback_); async Image dequeueImage(); - void queueImage(Image interface_, AsyncCallback_Void callback_); - async void queueImage(Image interface_); + void queueImage(Image image, AsyncCallback_Void callback_); + async void queueImage(Image image); [DtsName="on", DtsTag="'imageRelease'"] void onImageRelease(AsyncCallback_Void callback_); [DtsName="off", DtsTag="'imageRelease'"] void offImageRelease(optional AsyncCallback_Void callback_); void release(AsyncCallback_Void callback_); async void release(); - - }; - [GlobalScope] - interface GlobalScope_image_ohos_multimedia_image { - - static void createPixelMap(buffer colors, InitializationOptions options, AsyncCallback_PixelMap_Void callback_); - static async PixelMap createPixelMap(buffer colors, InitializationOptions options); - [Throws] - static PixelMap createPixelMapSync(buffer colors, InitializationOptions options); - [Throws] - static PixelMap createPixelMapSync(InitializationOptions options); - [Throws] - static void createPremultipliedPixelMap(PixelMap src, PixelMap dst, AsyncCallback_Void callback_); - [Throws] - static async void createPremultipliedPixelMap(PixelMap src, PixelMap dst); - [Throws] - static void createUnpremultipliedPixelMap(PixelMap src, PixelMap dst, AsyncCallback_Void callback_); - [Throws] - static async void createUnpremultipliedPixelMap(PixelMap src, PixelMap dst); - [Throws] - static PixelMap createPixelMapFromParcel(rpc.MessageSequence sequence_); - [Throws] - static async PixelMap createPixelMapFromSurface(String surfaceId, Region region); - [Throws] - static PixelMap createPixelMapFromSurfaceSync(String surfaceId, Region region); - [Throws] - static async PixelMap createPixelMapFromSurface(String surfaceId); - [Throws] - static PixelMap createPixelMapFromSurfaceSync(String surfaceId); - static ImageSource createImageSource(String uri); - static ImageSource createImageSource(String uri, SourceOptions options); - static ImageSource createImageSource(number fd); - static ImageSource createImageSource(number fd, SourceOptions options); - static ImageSource createImageSource(buffer buf); - static ImageSource createImageSource(buffer buf, SourceOptions options); - static ImageSource createImageSource(resourceManager.RawFileDescriptor rawfile, optional SourceOptions options); - static ImageSource CreateIncrementalSource(buffer buf); - static ImageSource CreateIncrementalSource(buffer buf, optional SourceOptions options); - static ImagePacker createImagePacker(); - [Deprecated] - static ImageReceiver createImageReceiver(number width, number height, number format, number capacity); - [Throws] - static ImageReceiver createImageReceiver(Size size, ImageFormat format, number capacity); - [Deprecated] - static ImageCreator createImageCreator(number width, number height, number format, number capacity); - [Throws] - static ImageCreator createImageCreator(Size size, ImageFormat format, number capacity); - [Throws] - static Picture createPicture(PixelMap mainPixelmap); - [Throws] - static Picture createPictureFromParcel(rpc.MessageSequence sequence_); - [Throws] - static AuxiliaryPicture createAuxiliaryPicture(buffer buffer, Size size, AuxiliaryPictureType type); - }; - + sequence getImageSourceSupportedFormats(); + sequence getImagePackerSupportedFormats(); }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.media.idl b/idl/@ohos.multimedia.media.idl index 51d35de..a3e5a8f 100644 --- a/idl/@ohos.multimedia.media.idl +++ b/idl/@ohos.multimedia.media.idl @@ -1,46 +1,90 @@ -package ohos.multimedia; +package ohos.multimedia.media; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.multimedia.audio as audio; -import ohos.file.photoAccessHelper as photoAccessHelper; -import ohos.multimedia.image as image; +import ohos.multimedia.audio.default as audio; +import ohos.file.photoAccessHelper.default as photoAccessHelper; +import ohos.multimedia.image.default as image; import multimedia.soundPool.SoundPool as _SoundPool; import multimedia.soundPool.PlayParameters as _PlayParameters; -import ohos.multimedia.drm as drm; +import ohos.multimedia.drm.default as drm; +[DefaultExport] namespace media { - [Async, Synthetic] callback AsyncCallback_AVPlayer_Void = void (AVPlayer result); + [Throws] + void createAVPlayer(AsyncCallback_AVPlayer_Void callback_); + [Throws] + async AVPlayer createAVPlayer(); [Async, Synthetic] callback AsyncCallback_AVRecorder_Void = void (AVRecorder result); + [Throws] + void createAVRecorder(AsyncCallback_AVRecorder_Void callback_); + [Throws] + async AVRecorder createAVRecorder(); + [Deprecated] + AudioPlayer createAudioPlayer(); + [Deprecated] + AudioRecorder createAudioRecorder(); + [Throws] + MediaSource createMediaSourceWithUrl(String url, optional record headers); + MediaSource createMediaSourceWithStreamData(sequence streams); [Async, Synthetic] callback AsyncCallback_VideoPlayer_Void = void (VideoPlayer result); + [Deprecated] + void createVideoPlayer(AsyncCallback_VideoPlayer_Void callback_); + [Deprecated] + async VideoPlayer createVideoPlayer(); [Async, Synthetic] callback AsyncCallback_VideoRecorder_Void = void (VideoRecorder result); + [Throws] + void createVideoRecorder(AsyncCallback_VideoRecorder_Void callback_); + [Throws] + async VideoRecorder createVideoRecorder(); [Async, Synthetic] callback AsyncCallback_SoundPool_Void = void (SoundPool result); + [Throws] + void createSoundPool(number maxStreams, audio.AudioRendererInfo audioRenderInfo, AsyncCallback_SoundPool_Void callback_); + [Throws] + async SoundPool createSoundPool(number maxStreams, audio.AudioRendererInfo audioRenderInfo); + [Throws] + async SoundPool createParallelSoundPool(number maxStreams, audio.AudioRendererInfo audioRenderInfo); + [Throws] + async AVScreenCaptureRecorder createAVScreenCaptureRecorder(); + [Throws] + async void reportAVScreenCaptureUserChoice(number sessionId, String choice); + [Throws] + async String getAVScreenCaptureConfigurableParameters(number sessionId); + [Throws] + async AVTranscoder createAVTranscoder(); + [Throws] + async ScreenCaptureMonitor getScreenCaptureMonitor(); typedef _SoundPool SoundPool; typedef _PlayParameters PlayParameters; dictionary StateChangeReason { - number USER = 1; number BACKGROUND = 2; - }; + [Throws] + async AVMetadataExtractor createAVMetadataExtractor(); [Async, Synthetic] callback AsyncCallback_AVMetadataExtractor_Void = void (AVMetadataExtractor result); + [Throws] + void createAVMetadataExtractor(AsyncCallback_AVMetadataExtractor_Void callback_); + [Throws] + async AVImageGenerator createAVImageGenerator(); [Async, Synthetic] callback AsyncCallback_AVImageGenerator_Void = void (AVImageGenerator result); + [Throws] + void createAVImageGenerator(AsyncCallback_AVImageGenerator_Void callback_); [Async, Synthetic] callback AsyncCallback_AVMetadata_Void = void (AVMetadata result); [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface AVMetadataExtractor { - [Optional] attribute AVFileDescriptor fdSrc; [Optional] @@ -50,9 +94,12 @@ namespace media { [Throws] async AVMetadata fetchMetadata(); [Throws] - void fetchAlbumCover(AsyncCallback_image_PixelMap_Void callback_); + void fetchAlbumCover(AsyncCallback_Image_PixelMap_Void callback_); [Throws] async image.PixelMap fetchAlbumCover(); + void setUrlSource(String url, optional record headers); + [Throws] + async image.PixelMap fetchFrameByTime(number timeUs, AVImageQueryOptions options, PixelMapParams param); [Throws] async number getTimeByFrameIndex(number index); [Throws] @@ -61,11 +108,9 @@ namespace media { void release(AsyncCallback_Void callback_); [Throws] async void release(); - }; [Entity=Interface] interface AVMetadata { - [Optional] attribute String album; [Optional] @@ -108,57 +153,56 @@ namespace media { attribute Location location; [Optional] attribute record customInfo; - + [Optional] + attribute sequence tracks; + }; + [Entity=Interface] + interface OutputSize { + [Optional] + attribute number width; + [Optional] + attribute number height; }; dictionary HdrType { - number AV_HDR_TYPE_NONE = 0; number AV_HDR_TYPE_VIVID = 1; - }; [Entity=Interface] interface AVImageGenerator { - [Optional] attribute AVFileDescriptor fdSrc; [Throws] - void fetchFrameByTime(number timeUs, AVImageQueryOptions options, PixelMapParams param, AsyncCallback_image_PixelMap_Void callback_); + void fetchFrameByTime(number timeUs, AVImageQueryOptions options, PixelMapParams param, AsyncCallback_Image_PixelMap_Void callback_); [Throws] async image.PixelMap fetchFrameByTime(number timeUs, AVImageQueryOptions options, PixelMapParams param); [Throws] + async image.PixelMap fetchScaledFrameByTime(number timeUs, AVImageQueryOptions queryMode, optional OutputSize outputSize); + [Throws] void release(AsyncCallback_Void callback_); [Throws] async void release(); - }; dictionary AVImageQueryOptions { - number AV_IMAGE_QUERY_NEXT_SYNC = 0; number AV_IMAGE_QUERY_PREVIOUS_SYNC = 1; number AV_IMAGE_QUERY_CLOSEST_SYNC = 2; number AV_IMAGE_QUERY_CLOSEST = 3; - }; [Entity=Interface] interface PixelMapParams { - [Optional] attribute number width; [Optional] attribute number height; [Optional] attribute PixelFormat colorFormat; - }; dictionary PixelFormat { - number RGB_565 = 2; number RGBA_8888 = 3; number RGB_888 = 5; - }; dictionary AVErrorCode { - number AVERR_OK = 0; number AVERR_NO_PERMISSION = 201; number AVERR_INVALID_PARAMETER = 401; @@ -170,6 +214,7 @@ namespace media { number AVERR_SERVICE_DIED = 5400105; number AVERR_UNSUPPORT_FORMAT = 5400106; number AVERR_AUDIO_INTERRUPTED = 5400107; + number AVERR_SESSION_NOT_EXIST = 5400109; number AVERR_IO_HOST_NOT_FOUND = 5411001; number AVERR_IO_CONNECTION_TIMEOUT = 5411002; number AVERR_IO_NETWORK_ABNORMAL = 5411003; @@ -182,42 +227,43 @@ namespace media { number AVERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010; number AVERR_IO_UNSUPPORTED_REQUEST = 5411011; number AVERR_SEEK_CONTINUOUS_UNSUPPORTED = 5410002; - + number AVERR_SUPER_RESOLUTION_UNSUPPORTED = 5410003; + number AVERR_SUPER_RESOLUTION_NOT_ENABLED = 5410004; + number AVERR_PARAMETER_OUT_OF_RANGE = 5400108; }; typedef String AVPlayerState; callback OnTrackChangeHandler = void (number index, boolean isSelected); callback OnAVPlayerStateChangeHandle = void (AVPlayerState state, StateChangeReason reason); callback OnBufferingUpdateHandler = void (BufferingInfoType infoType, number value); callback OnVideoSizeChangeHandler = void (number width, number height); + callback OnSuperResolutionChanged = void (boolean enabled); [Entity=Interface] interface SeiMessage { - attribute number payloadType; attribute buffer payload; - }; callback OnSeiMessageHandle = void (sequence messages, optional number playbackPosition); + callback OnPlaybackRateDone = void (number rate); [Async, Synthetic] callback AsyncCallback_Array_MediaDescription_Void = void (sequence result); [Synthetic] - callback Callback_Array_drm_MediaKeySystemInfo_Void = void (sequence parameter); + callback Callback_Array_Drm_MediaKeySystemInfo_Void = void (sequence parameter); [Synthetic] callback Callback_Number_Void = void (number parameter); [Synthetic] callback Callback_Void = void (); [Synthetic] - callback Callback_audio_InterruptEvent_Void = void (audio.InterruptEvent parameter); + callback Callback_Audio_InterruptEvent_Void = void (audio.InterruptEvent parameter); [Synthetic] callback Callback_Array_Number_Void = void (sequence parameter); [Synthetic] - callback Callback_audio_AudioStreamDeviceChangeInfo_Void = void (audio.AudioStreamDeviceChangeInfo parameter); + callback Callback_Audio_AudioStreamDeviceChangeInfo_Void = void (audio.AudioStreamDeviceChangeInfo parameter); [Synthetic] callback Callback_SubtitleInfo_Void = void (SubtitleInfo parameter); [Synthetic] callback Callback_Array_MediaDescription_Void = void (sequence parameter); [Entity=Interface] interface AVPlayer { - [Optional] attribute String url; [Optional] @@ -289,117 +335,125 @@ namespace media { async void setMediaMuted(MediaType mediaType, boolean muted); [Throws] async void setPlaybackRange(number startTimeMs, number endTimeMs, optional SeekMode mode); + boolean isSeekContinuousSupported(); [Throws] number getPlaybackPosition(); - boolean isSeekContinuousSupported(); + [Throws] + async void setSuperResolution(boolean enabled); + [Throws] + async void setVideoWindowSize(number width, number height); void setSpeed(PlaybackSpeed speed); + [Throws] + void setPlaybackRate(number rate); void setBitrate(number bitrate); [Throws] void setDecryptionConfig(drm.MediaKeySession mediaKeySession, boolean secureVideoPath); sequence getMediaKeySystemInfos(); [DtsName="on", DtsTag="'mediaKeySystemInfoUpdate'"] - void onMediaKeySystemInfoUpdate(Callback_Array_drm_MediaKeySystemInfo_Void callback_); - [DtsName="off", DtsTag="'mediaKeySystemInfoUpdate'"] - void offMediaKeySystemInfoUpdate(optional Callback_Array_drm_MediaKeySystemInfo_Void callback_); + void onMediaKeySystemInfoUpdate(Callback_Array_Drm_MediaKeySystemInfo_Void callback_); [DtsName="on", DtsTag="'stateChange'"] void onStateChange(OnAVPlayerStateChangeHandle callback_); - [DtsName="off", DtsTag="'stateChange'"] - void offStateChange(optional OnAVPlayerStateChangeHandle callback_); [DtsName="on", DtsTag="'volumeChange'"] void onVolumeChange(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'volumeChange'"] - void offVolumeChange(optional Callback_Number_Void callback_); [DtsName="on", DtsTag="'endOfStream'"] void onEndOfStream(Callback_Void callback_); - [DtsName="off", DtsTag="'endOfStream'"] - void offEndOfStream(optional Callback_Void callback_); [DtsName="on", DtsTag="'seekDone'"] void onSeekDone(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'seekDone'"] - void offSeekDone(optional Callback_Number_Void callback_); [DtsName="on", DtsTag="'speedDone'"] void onSpeedDone(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'speedDone'"] - void offSpeedDone(optional Callback_Number_Void callback_); + [DtsName="on", DtsTag="'playbackRateDone'"] + void onPlaybackRateDone(OnPlaybackRateDone callback_); [DtsName="on", DtsTag="'bitrateDone'"] void onBitrateDone(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'bitrateDone'"] - void offBitrateDone(optional Callback_Number_Void callback_); [DtsName="on", DtsTag="'timeUpdate'"] void onTimeUpdate(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'timeUpdate'"] - void offTimeUpdate(optional Callback_Number_Void callback_); [DtsName="on", DtsTag="'durationUpdate'"] void onDurationUpdate(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'durationUpdate'"] - void offDurationUpdate(optional Callback_Number_Void callback_); [DtsName="on", DtsTag="'bufferingUpdate'"] void onBufferingUpdate(OnBufferingUpdateHandler callback_); - [DtsName="off", DtsTag="'bufferingUpdate'"] - void offBufferingUpdate(optional OnBufferingUpdateHandler callback_); [DtsName="on", DtsTag="'startRenderFrame'"] void onStartRenderFrame(Callback_Void callback_); - [DtsName="off", DtsTag="'startRenderFrame'"] - void offStartRenderFrame(optional Callback_Void callback_); [DtsName="on", DtsTag="'videoSizeChange'"] void onVideoSizeChange(OnVideoSizeChangeHandler callback_); - [DtsName="off", DtsTag="'videoSizeChange'"] - void offVideoSizeChange(optional OnVideoSizeChangeHandler callback_); [DtsName="on", DtsTag="'audioInterrupt'"] - void onAudioInterrupt(Callback_audio_InterruptEvent_Void callback_); - [DtsName="off", DtsTag="'audioInterrupt'"] - void offAudioInterrupt(optional Callback_audio_InterruptEvent_Void callback_); + void onAudioInterrupt(Callback_Audio_InterruptEvent_Void callback_); [DtsName="on", DtsTag="'availableBitrates'"] void onAvailableBitrates(Callback_Array_Number_Void callback_); - [DtsName="off", DtsTag="'availableBitrates'"] - void offAvailableBitrates(optional Callback_Array_Number_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [Throws, DtsName="on", DtsTag="'audioOutputDeviceChangeWithInfo'"] - void onAudioOutputDeviceChangeWithInfo(Callback_audio_AudioStreamDeviceChangeInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'audioOutputDeviceChangeWithInfo'"] - void offAudioOutputDeviceChangeWithInfo(optional Callback_audio_AudioStreamDeviceChangeInfo_Void callback_); + void onAudioOutputDeviceChangeWithInfo(Callback_Audio_AudioStreamDeviceChangeInfo_Void callback_); [DtsName="on", DtsTag="'subtitleUpdate'"] void onSubtitleUpdate(Callback_SubtitleInfo_Void callback_); - [DtsName="off", DtsTag="'subtitleUpdate'"] - void offSubtitleUpdate(optional Callback_SubtitleInfo_Void callback_); [DtsName="on", DtsTag="'trackChange'"] void onTrackChange(OnTrackChangeHandler callback_); - [DtsName="off", DtsTag="'trackChange'"] - void offTrackChange(optional OnTrackChangeHandler callback_); [DtsName="on", DtsTag="'trackInfoUpdate'"] void onTrackInfoUpdate(Callback_Array_MediaDescription_Void callback_); - [DtsName="off", DtsTag="'trackInfoUpdate'"] - void offTrackInfoUpdate(optional Callback_Array_MediaDescription_Void callback_); [DtsName="on", DtsTag="'amplitudeUpdate'"] void onAmplitudeUpdate(Callback_Array_Number_Void callback_); - [DtsName="off", DtsTag="'amplitudeUpdate'"] - void offAmplitudeUpdate(optional Callback_Array_Number_Void callback_); [DtsName="on", DtsTag="'seiMessageReceived'"] void onSeiMessageReceived(sequence payloadTypes, OnSeiMessageHandle callback_); + [DtsName="on", DtsTag="'superResolutionChanged'"] + void onSuperResolutionChanged(OnSuperResolutionChanged callback_); + [DtsName="off", DtsTag="'mediaKeySystemInfoUpdate'"] + void offMediaKeySystemInfoUpdate(optional Callback_Array_Drm_MediaKeySystemInfo_Void callback_); + [DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional OnAVPlayerStateChangeHandle callback_); + [DtsName="off", DtsTag="'volumeChange'"] + void offVolumeChange(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'endOfStream'"] + void offEndOfStream(optional Callback_Void callback_); + [DtsName="off", DtsTag="'seekDone'"] + void offSeekDone(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'speedDone'"] + void offSpeedDone(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'playbackRateDone'"] + void offPlaybackRateDone(optional OnPlaybackRateDone callback_); + [DtsName="off", DtsTag="'bitrateDone'"] + void offBitrateDone(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'timeUpdate'"] + void offTimeUpdate(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'durationUpdate'"] + void offDurationUpdate(optional Callback_Number_Void callback_); + [DtsName="off", DtsTag="'bufferingUpdate'"] + void offBufferingUpdate(optional OnBufferingUpdateHandler callback_); + [DtsName="off", DtsTag="'startRenderFrame'"] + void offStartRenderFrame(optional Callback_Void callback_); + [DtsName="off", DtsTag="'videoSizeChange'"] + void offVideoSizeChange(optional OnVideoSizeChangeHandler callback_); + [DtsName="off", DtsTag="'audioInterrupt'"] + void offAudioInterrupt(optional Callback_Audio_InterruptEvent_Void callback_); + [DtsName="off", DtsTag="'availableBitrates'"] + void offAvailableBitrates(optional Callback_Array_Number_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'audioOutputDeviceChangeWithInfo'"] + void offAudioOutputDeviceChangeWithInfo(optional Callback_Audio_AudioStreamDeviceChangeInfo_Void callback_); + [DtsName="off", DtsTag="'subtitleUpdate'"] + void offSubtitleUpdate(optional Callback_SubtitleInfo_Void callback_); + [DtsName="off", DtsTag="'trackChange'"] + void offTrackChange(optional OnTrackChangeHandler callback_); + [DtsName="off", DtsTag="'trackInfoUpdate'"] + void offTrackInfoUpdate(optional Callback_Array_MediaDescription_Void callback_); + [DtsName="off", DtsTag="'amplitudeUpdate'"] + void offAmplitudeUpdate(optional Callback_Array_Number_Void callback_); [DtsName="off", DtsTag="'seiMessageReceived'"] void offSeiMessageReceived(optional sequence payloadTypes, optional OnSeiMessageHandle callback_); - + [DtsName="off", DtsTag="'superResolutionChanged'"] + void offSuperResolutionChanged(optional OnSuperResolutionChanged callback_); }; [Entity=Interface] interface PlaybackInfo { - - }; dictionary PlaybackInfoKey { - String SERVER_IP_ADDRESS = "server_ip_address"; String AVG_DOWNLOAD_RATE = "average_download_rate"; String DOWNLOAD_RATE = "download_rate"; String IS_DOWNLOADING = "is_downloading"; String BUFFER_DURATION = "buffer_duration"; - }; [Deprecated] dictionary MediaErrorCode { - [Deprecated] number MSERR_OK = 0; [Deprecated] @@ -420,30 +474,57 @@ namespace media { number MSERR_INVALID_STATE = 8; [Deprecated] number MSERR_UNSUPPORTED = 9; - }; dictionary BufferingInfoType { - number BUFFERING_START = 1; number BUFFERING_END = 2; number BUFFERING_PERCENT = 3; number CACHED_DURATION = 4; - + }; + callback SourceOpenCallback = number (MediaSourceLoadingRequest request); + callback SourceReadCallback = void (number uuid, number requestedOffset, number requestedLength); + callback SourceCloseCallback = void (number uuid); + [Entity=Interface] + interface MediaSourceLoader { + attribute SourceOpenCallback open; + attribute SourceReadCallback read; + attribute SourceCloseCallback close; + }; + dictionary LoadingRequestError { + number LOADING_ERROR_SUCCESS = 0; + number LOADING_ERROR_NOT_READY = 1; + number LOADING_ERROR_NO_RESOURCE = 2; + number LOADING_ERROR_INVAID_HANDLE = 3; + number LOADING_ERROR_ACCESS_DENIED = 4; + number LOADING_ERROR_ACCESS_TIMEOUT = 5; + number LOADING_ERROR_AUTHORIZE_FAILED = 6; + }; + [Entity=Interface] + interface MediaSourceLoadingRequest { + attribute String url; + [Optional] + attribute record header; + number respondData(number uuid, number offset, buffer buffer); + void respondHeader(number uuid, optional record header, optional String redirectUrl); + void finishLoading(number uuid, LoadingRequestError state); + }; + [Entity=Interface] + interface MediaStream { + attribute String url; + attribute number width; + attribute number height; + attribute number bitrate; }; [Entity=Interface] interface MediaSource { - void setMimeType(AVMimeTypes mimeType); - + void setMediaResourceLoaderDelegate(MediaSourceLoader resourceLoader); }; dictionary AVMimeTypes { - String APPLICATION_M3U8 = "application/m3u8"; - }; [Entity=Interface] interface PlaybackStrategy { - [Optional] attribute number preferredWidth; [Optional] @@ -462,38 +543,39 @@ namespace media { attribute boolean showFirstFrameOnPrepare; [Optional] attribute number preferredBufferDurationForPlaying; - + [Optional] + attribute boolean enableSuperResolution; + [Optional] + attribute number thresholdForAutoQuickPlay; + [Optional] + attribute boolean keepDecodingOnMute; + [Optional] + attribute boolean enableCameraPostprocessing; }; [Entity=Interface] interface AVFileDescriptor { - attribute number fd; [Optional] attribute number offset; [Optional] attribute number length; - }; [Synthetic] - callback Callback_Buffer_Number_Number_Number = number (buffer buffer, number length, optional number pos); + callback Callback_Buffer_Number_Opt_Number_Number = number (buffer buffer, number length, optional number pos); [Entity=Interface] interface AVDataSrcDescriptor { - attribute number fileSize; [DtsName="callback"] - attribute Callback_Buffer_Number_Number_Number callback_; - + attribute Callback_Buffer_Number_Opt_Number_Number callback_; }; [Entity=Interface] interface SubtitleInfo { - [Optional] attribute number duration; [Optional] attribute number startTime; [Optional] attribute String text; - }; [Deprecated] typedef String AudioState; @@ -501,7 +583,6 @@ namespace media { callback Callback_BufferingInfoType_Number_Void = void (BufferingInfoType infoType, number value); [Entity=Interface, Deprecated] interface AudioPlayer { - [Deprecated] attribute String src; [Deprecated] @@ -541,10 +622,9 @@ namespace media { [Deprecated, DtsName="on", DtsTag="'timeUpdate'"] void onTimeUpdate(Callback_Number_Void callback_); [Deprecated, DtsName="on", DtsTag="'audioInterrupt'"] - void onAudioInterrupt(Callback_audio_InterruptEvent_Void callback_); + void onAudioInterrupt(Callback_Audio_InterruptEvent_Void callback_); [Deprecated, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - }; typedef String AVRecorderState; callback OnAVRecorderStateChangeHandler = void (AVRecorderState state, StateChangeReason reason); @@ -553,18 +633,17 @@ namespace media { [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Async, Synthetic] - callback AsyncCallback_audio_AudioCapturerChangeInfo_Void = void (audio.AudioCapturerChangeInfo result); + callback AsyncCallback_Audio_AudioCapturerChangeInfo_Void = void (audio.AudioCapturerChangeInfo result); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] callback AsyncCallback_Array_EncoderInfo_Void = void (sequence result); [Synthetic] - callback Callback_audio_AudioCapturerChangeInfo_Void = void (audio.AudioCapturerChangeInfo parameter); + callback Callback_Audio_AudioCapturerChangeInfo_Void = void (audio.AudioCapturerChangeInfo parameter); [Synthetic] - callback Callback_photoAccessHelper_PhotoAsset_Void = void (photoAccessHelper.PhotoAsset parameter); + callback Callback_PhotoAccessHelper_PhotoAsset_Void = void (photoAccessHelper.PhotoAsset parameter); [Entity=Interface] interface AVRecorder { - readonly attribute AVRecorderState state; [Throws] void prepare(AVRecorderConfig config, AsyncCallback_Void callback_); @@ -584,8 +663,12 @@ namespace media { [Throws] async void setWatermark(image.PixelMap watermark, WatermarkConfig config); [Throws] + void setMetadata(record metadata); + [Throws] async void updateRotation(number rotation); [Throws] + async void setWillMuteWhenInterrupted(boolean muteWhenInterrupted); + [Throws] void start(AsyncCallback_Void callback_); [Throws] async void start(); @@ -610,7 +693,7 @@ namespace media { [Throws] async void release(); [Throws] - void getCurrentAudioCapturerInfo(AsyncCallback_audio_AudioCapturerChangeInfo_Void callback_); + void getCurrentAudioCapturerInfo(AsyncCallback_Audio_AudioCapturerChangeInfo_Void callback_); [Throws] async audio.AudioCapturerChangeInfo getCurrentAudioCapturerInfo(); [Throws] @@ -622,9 +705,9 @@ namespace media { [Throws] async sequence getAvailableEncoder(); [Throws, DtsName="on", DtsTag="'audioCapturerChange'"] - void onAudioCapturerChange(Callback_audio_AudioCapturerChangeInfo_Void callback_); + void onAudioCapturerChange(Callback_Audio_AudioCapturerChangeInfo_Void callback_); [Throws, DtsName="on", DtsTag="'photoAssetAvailable'"] - void onPhotoAssetAvailable(Callback_photoAccessHelper_PhotoAsset_Void callback_); + void onPhotoAssetAvailable(Callback_PhotoAccessHelper_PhotoAsset_Void callback_); [Throws, DtsName="on", DtsTag="'stateChange'"] void onStateChange(OnAVRecorderStateChangeHandler callback_); [Throws, DtsName="on", DtsTag="'error'"] @@ -634,14 +717,12 @@ namespace media { [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); [DtsName="off", DtsTag="'audioCapturerChange'"] - void offAudioCapturerChange(optional Callback_audio_AudioCapturerChangeInfo_Void callback_); + void offAudioCapturerChange(optional Callback_Audio_AudioCapturerChangeInfo_Void callback_); [DtsName="off", DtsTag="'photoAssetAvailable'"] - void offPhotoAssetAvailable(optional Callback_photoAccessHelper_PhotoAsset_Void callback_); - + void offPhotoAssetAvailable(optional Callback_PhotoAccessHelper_PhotoAsset_Void callback_); }; [Deprecated] dictionary AudioEncoder { - [Deprecated] number DEFAULT = 0; [Deprecated] @@ -652,11 +733,9 @@ namespace media { number AAC_LC = 3; [Deprecated] number HE_AAC = 4; - }; [Deprecated] dictionary AudioOutputFormat { - [Deprecated] number DEFAULT = 0; [Deprecated] @@ -667,25 +746,19 @@ namespace media { number AMR_WB = 4; [Deprecated] number AAC_ADTS = 6; - }; [Entity=Interface] interface Location { - attribute number latitude; attribute number longitude; - }; [Entity=Interface] interface WatermarkConfig { - attribute number top; attribute number left; - }; [Entity=Interface, Deprecated] interface AudioRecorderConfig { - [Optional, Deprecated] attribute AudioEncoder audioEncoder; [Optional, Deprecated] @@ -704,11 +777,9 @@ namespace media { attribute CodecMimeType audioEncoderMime; [Optional, Deprecated] attribute ContainerFormatType fileFormat; - }; [Entity=Interface, Deprecated] interface AudioRecorder { - [Deprecated, Throws] void prepare(AudioRecorderConfig config); [Deprecated] @@ -727,12 +798,10 @@ namespace media { void on(String type, Callback_Void callback_); [Deprecated, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - }; typedef String VideoRecordState; [Entity=Interface] interface VideoRecorder { - readonly attribute VideoRecordState state; [Throws] void prepare(VideoRecorderConfig config, AsyncCallback_Void callback_); @@ -768,12 +837,10 @@ namespace media { async void reset(); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - }; [Deprecated] typedef String VideoPlayState; dictionary PlaybackSpeed { - number SPEED_FORWARD_0_75_X = 0; number SPEED_FORWARD_1_00_X = 1; number SPEED_FORWARD_1_25_X = 2; @@ -784,13 +851,11 @@ namespace media { number SPEED_FORWARD_3_00_X = 7; number SPEED_FORWARD_0_25_X = 8; number SPEED_FORWARD_0_125_X = 9; - }; [Synthetic] callback Callback_Number_Number_Void = void (number width, number height); [Entity=Interface, Deprecated] interface VideoPlayer { - [Deprecated] attribute String url; [Deprecated] @@ -866,34 +931,34 @@ namespace media { [Deprecated, DtsName="on", DtsTag="'videoSizeChanged'"] void onVideoSizeChanged(Callback_Number_Number_Void callback_); [Deprecated, DtsName="on", DtsTag="'audioInterrupt'"] - void onAudioInterrupt(Callback_audio_InterruptEvent_Void callback_); + void onAudioInterrupt(Callback_Audio_InterruptEvent_Void callback_); [Deprecated, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - }; dictionary VideoScaleType { - number VIDEO_SCALE_TYPE_FIT = 0; number VIDEO_SCALE_TYPE_FIT_CROP = 1; - + number VIDEO_SCALE_TYPE_SCALED_ASPECT = 2; }; dictionary ContainerFormatType { - String CFT_MPEG_4 = "mp4"; String CFT_MPEG_4A = "m4a"; String CFT_MP3 = "mp3"; String CFT_WAV = "wav"; - + String CFT_AMR = "amr"; + String CFT_AAC = "aac"; }; dictionary MediaType { - + number MEDIA_TYPE_UNSUPPORTED = -1; number MEDIA_TYPE_AUD = 0; number MEDIA_TYPE_VID = 1; number MEDIA_TYPE_SUBTITLE = 2; - + number MEDIA_TYPE_ATTACHMENT = 3; + number MEDIA_TYPE_DATA = 4; + number MEDIA_TYPE_TIMED_METADATA = 5; + number MEDIA_TYPE_AUXILIARY = 6; }; dictionary MediaDescriptionKey { - String MD_KEY_TRACK_INDEX = "track_index"; String MD_KEY_TRACK_TYPE = "track_type"; String MD_KEY_CODEC_MIME = "codec_mime"; @@ -908,11 +973,9 @@ namespace media { String MD_KEY_LANGUAGE = "language"; String MD_KEY_TRACK_NAME = "track_name"; String MD_KEY_HDR_TYPE = "hdr_type"; - }; [Entity=Interface] interface VideoRecorderProfile { - readonly attribute number audioBitrate; readonly attribute number audioChannels; readonly attribute CodecMimeType audioCodec; @@ -923,38 +986,28 @@ namespace media { readonly attribute number videoFrameWidth; readonly attribute number videoFrameHeight; readonly attribute number videoFrameRate; - }; dictionary AudioSourceType { - number AUDIO_SOURCE_TYPE_DEFAULT = 0; number AUDIO_SOURCE_TYPE_MIC = 1; number AUDIO_SOURCE_TYPE_VOICE_RECOGNITION = 2; number AUDIO_SOURCE_TYPE_VOICE_COMMUNICATION = 7; number AUDIO_SOURCE_TYPE_VOICE_MESSAGE = 10; number AUDIO_SOURCE_TYPE_CAMCORDER = 13; - }; dictionary VideoSourceType { - number VIDEO_SOURCE_TYPE_SURFACE_YUV = 0; number VIDEO_SOURCE_TYPE_SURFACE_ES = 1; - }; dictionary MetaSourceType { - number VIDEO_MAKER_INFO = 0; - }; dictionary FileGenerationMode { - number APP_CREATE = 0; number AUTO_CREATE_CAMERA_SCENE = 1; - }; [Entity=Interface] interface VideoRecorderConfig { - [Optional] attribute AudioSourceType audioSourceType; attribute VideoSourceType videoSourceType; @@ -964,11 +1017,9 @@ namespace media { attribute number rotation; [Optional] attribute Location location; - }; [Entity=Interface] interface EncoderInfo { - attribute CodecMimeType mimeType; attribute String type; [Optional] @@ -983,18 +1034,14 @@ namespace media { attribute Range channels; [Optional] attribute sequence sampleRate; - }; [Entity=Interface] interface Range { - attribute number min; attribute number max; - }; [Entity=Interface] interface AVRecorderProfile { - [Optional] attribute number audioBitrate; [Optional] @@ -1018,11 +1065,13 @@ namespace media { attribute boolean isHdr; [Optional] attribute boolean enableTemporalScale; - + [Optional] + attribute boolean enableStableQualityMode; + [Optional] + attribute boolean enableBFrame; }; [Entity=Interface] interface AVRecorderConfig { - [Optional] attribute AudioSourceType audioSourceType; [Optional] @@ -1030,7 +1079,6 @@ namespace media { [Optional] attribute sequence metaSourceTypes; attribute AVRecorderProfile profile; - [Optional] attribute String url; [Optional] attribute FileGenerationMode fileGenerationMode; @@ -1042,30 +1090,22 @@ namespace media { attribute AVMetadata metadata; [Optional] attribute number maxDuration; - }; [Entity=Interface] interface MediaDescription { - - }; dictionary SeekMode { - number SEEK_NEXT_SYNC = 0; number SEEK_PREV_SYNC = 1; number SEEK_CLOSEST = 2; number SEEK_CONTINUOUS = 3; - }; dictionary SwitchMode { - number SMOOTH = 0; number SEGMENT = 1; number CLOSEST = 2; - }; dictionary CodecMimeType { - String VIDEO_H263 = "video/h263"; String VIDEO_AVC = "video/avc"; String VIDEO_MPEG2 = "video/mpeg2"; @@ -1077,16 +1117,18 @@ namespace media { String VIDEO_HEVC = "video/hevc"; String AUDIO_MP3 = "audio/mpeg"; String AUDIO_G711MU = "audio/g711mu"; - + String AUDIO_AMR_NB = "audio/3gpp"; + String AUDIO_AMR_WB = "audio/amr-wb"; }; dictionary AVScreenCaptureRecordPreset { - number SCREEN_RECORD_PRESET_H264_AAC_MP4 = 0; number SCREEN_RECORD_PRESET_H265_AAC_MP4 = 1; - + }; + dictionary AVScreenCaptureFillMode { + number PRESERVE_ASPECT_RATIO = 0; + number SCALE_TO_FILL = 1; }; dictionary AVScreenCaptureStateCode { - number SCREENCAPTURE_STATE_STARTED = 0; number SCREENCAPTURE_STATE_CANCELED = 1; number SCREENCAPTURE_STATE_STOPPED_BY_USER = 2; @@ -1098,11 +1140,18 @@ namespace media { number SCREENCAPTURE_STATE_ENTER_PRIVATE_SCENE = 8; number SCREENCAPTURE_STATE_EXIT_PRIVATE_SCENE = 9; number SCREENCAPTURE_STATE_STOPPED_BY_USER_SWITCHES = 10; - + }; + [Entity=Interface] + interface AVScreenCaptureStrategy { + [Optional] + attribute boolean enableDeviceLevelCapture; + [Optional] + attribute boolean keepCaptureDuringCall; + [Optional] + attribute boolean enableBFrame; }; [Entity=Interface] interface AVScreenCaptureRecordConfig { - attribute number fd; [Optional] attribute number frameWidth; @@ -1120,13 +1169,15 @@ namespace media { attribute AVScreenCaptureRecordPreset preset; [Optional] attribute number displayId; - + [Optional] + attribute AVScreenCaptureFillMode fillMode; + [Optional] + attribute AVScreenCaptureStrategy strategy; }; [Synthetic] callback Callback_AVScreenCaptureStateCode_Void = void (AVScreenCaptureStateCode parameter); [Entity=Interface] interface AVScreenCaptureRecorder { - [Throws] async void init(AVScreenCaptureRecordConfig config); [Throws] @@ -1147,11 +1198,9 @@ namespace media { void offStateChange(optional Callback_AVScreenCaptureStateCode_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface AVTranscoderConfig { - [Optional] attribute number audioBitrate; [Optional] @@ -1165,11 +1214,11 @@ namespace media { attribute number videoFrameWidth; [Optional] attribute number videoFrameHeight; - + [Optional] + attribute boolean enableBFrame; }; [Entity=Interface] interface AVTranscoder { - attribute AVFileDescriptor fdSrc; attribute number fdDst; [Throws] @@ -1196,52 +1245,19 @@ namespace media { void offError(optional ErrorCallback callback_); [DtsName="off", DtsTag="'progressUpdate'"] void offProgressUpdate(optional Callback_Number_Void callback_); - }; - [GlobalScope] - interface GlobalScope_media_ohos_multimedia_media { - - [Throws] - static void createAVPlayer(AsyncCallback_AVPlayer_Void callback_); - [Throws] - static async AVPlayer createAVPlayer(); - [Throws] - static void createAVRecorder(AsyncCallback_AVRecorder_Void callback_); - [Throws] - static async AVRecorder createAVRecorder(); - [Deprecated] - static AudioPlayer createAudioPlayer(); - [Deprecated] - static AudioRecorder createAudioRecorder(); - [Throws] - static MediaSource createMediaSourceWithUrl(String url, optional record headers); - [Deprecated] - static void createVideoPlayer(AsyncCallback_VideoPlayer_Void callback_); - [Deprecated] - static async VideoPlayer createVideoPlayer(); - [Throws] - static void createVideoRecorder(AsyncCallback_VideoRecorder_Void callback_); - [Throws] - static async VideoRecorder createVideoRecorder(); - [Throws] - static void createSoundPool(number maxStreams, audio.AudioRendererInfo audioRenderInfo, AsyncCallback_SoundPool_Void callback_); - [Throws] - static async SoundPool createSoundPool(number maxStreams, audio.AudioRendererInfo audioRenderInfo); - [Throws] - static async AVScreenCaptureRecorder createAVScreenCaptureRecorder(); - [Throws] - static async void reportAVScreenCaptureUserChoice(number sessionId, String choice); - [Throws] - static async AVTranscoder createAVTranscoder(); - [Throws] - static async AVMetadataExtractor createAVMetadataExtractor(); - [Throws] - static void createAVMetadataExtractor(AsyncCallback_AVMetadataExtractor_Void callback_); - [Throws] - static async AVImageGenerator createAVImageGenerator(); - [Throws] - static void createAVImageGenerator(AsyncCallback_AVImageGenerator_Void callback_); - + dictionary ScreenCaptureEvent { + number SCREENCAPTURE_STARTED = 0; + number SCREENCAPTURE_STOPPED = 1; + }; + [Synthetic] + callback Callback_ScreenCaptureEvent_Void = void (ScreenCaptureEvent parameter); + [Entity=Interface] + interface ScreenCaptureMonitor { + readonly attribute boolean isSystemScreenRecorderWorking; + [Throws, DtsName="on", DtsTag="'systemScreenRecorder'"] + void onSystemScreenRecorder(Callback_ScreenCaptureEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'systemScreenRecorder'"] + void offSystemScreenRecorder(optional Callback_ScreenCaptureEvent_Void callback_); }; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.movingphotoview.idl b/idl/@ohos.multimedia.movingphotoview.idl index 31af52a..5a30865 100644 --- a/idl/@ohos.multimedia.movingphotoview.idl +++ b/idl/@ohos.multimedia.movingphotoview.idl @@ -1,25 +1,7 @@ package ohos.multimedia.movingphotoview; -import ohos.file.photoAccessHelper as photoAccessHelper; -dictionary PixelMapFormat { - - number UNKNOWN = 0; - number RGBA_8888 = 1; - number NV21 = 2; - number RGBA_1010102 = 3; - number YCBCR_P010 = 4; - number YCRCB_P010 = 5; - -}; -dictionary DynamicRangeMode { - - number HIGH = 0; - number CONSTRAINT = 1; - number STANDARD = 2; - -}; +import ohos.file.photoAccessHelper.default as photoAccessHelper; [Entity=Interface] interface MovingPhotoViewOptions { - attribute photoAccessHelper.MovingPhoto movingPhoto; [Optional] attribute MovingPhotoViewController controller; @@ -29,19 +11,17 @@ interface MovingPhotoViewOptions { attribute PixelMapFormat movingPhotoFormat; [Optional] attribute DynamicRangeMode dynamicRangeMode; - + [Optional] + attribute boolean playWithMask; }; [Entity=Interface] interface MovingPhotoViewInterface { - [CallSignature] MovingPhotoViewAttribute invoke(MovingPhotoViewOptions options); - }; callback MovingPhotoViewEventCallback = void (); [Entity=Class] -interface MovingPhotoViewAttribute: [TypeArguments="MovingPhotoViewAttribute"] CommonMethod { - +interface MovingPhotoViewAttribute: [Extends, TypeArguments="MovingPhotoViewAttribute"] CommonMethod { MovingPhotoViewAttribute muted(boolean isMuted); MovingPhotoViewAttribute objectFit(ImageFit value); MovingPhotoViewAttribute onComplete(MovingPhotoViewEventCallback callback_); @@ -50,18 +30,41 @@ interface MovingPhotoViewAttribute: [TypeArguments="MovingPhotoViewAttribute"] C MovingPhotoViewAttribute onPause(MovingPhotoViewEventCallback callback_); MovingPhotoViewAttribute onFinish(MovingPhotoViewEventCallback callback_); MovingPhotoViewAttribute onError(MovingPhotoViewEventCallback callback_); + MovingPhotoViewAttribute onPrepared(MovingPhotoViewEventCallback callback_); MovingPhotoViewAttribute autoPlayPeriod(number startTime, number endTime); MovingPhotoViewAttribute autoPlay(boolean isAutoPlay); MovingPhotoViewAttribute repeatPlay(boolean isRepeatPlay); MovingPhotoViewAttribute enableAnalyzer(boolean enabled); - }; [Entity=Class] interface MovingPhotoViewController { - constructor(); - undefined startPlayback(); - undefined stopPlayback(); - undefined refreshMovingPhoto(); - + void startPlayback(); + void stopPlayback(); + void refreshMovingPhoto(); + [Throws] + void pausePlayback(); + [Throws] + void reset(); + [Throws] + void restart(); + [Throws] + void enableTransition(boolean enabled); + [Throws] + void setPlaybackPeriod(f64 startTime, f64 endTime); + [Throws] + void enableAutoPlay(boolean enabled); +}; +dictionary DynamicRangeMode { + number STANDARD = 2; + number CONSTRAINT = 1; + number HIGH = 0; +}; +dictionary PixelMapFormat { + number NV21 = 2; + number YCBCR_P010 = 4; + number RGBA_1010102 = 3; + number RGBA_8888 = 1; + number YCRCB_P010 = 5; + number UNKNOWN = 0; }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.systemSoundManager.idl b/idl/@ohos.multimedia.systemSoundManager.idl index 3a17058..b24e52e 100644 --- a/idl/@ohos.multimedia.systemSoundManager.idl +++ b/idl/@ohos.multimedia.systemSoundManager.idl @@ -1,39 +1,46 @@ -package ohos.multimedia; +package ohos.multimedia.systemSoundManager; import ohos.base.AsyncCallback as AsyncCallback; -import application.Context as Context; -import application.BaseContext as BaseContext; +import application.Context.default as Context; +import application.BaseContext.default as BaseContext; import multimedia.ringtonePlayer.RingtonePlayer as _RingtonePlayer; import multimedia.ringtonePlayer.RingtoneOptions as _RingtoneOptions; import multimedia.systemTonePlayer.SystemTonePlayer as _SystemTonePlayer; import multimedia.systemTonePlayer.SystemToneOptions as _SystemToneOptions; +[DefaultExport] namespace systemSoundManager { - + dictionary SystemSoundError { + number ERROR_IO = 5400103; + number ERROR_OK = 20700000; + number ERROR_TYPE_MISMATCH = 20700001; + number ERROR_UNSUPPORTED_OPERATION = 20700003; + number ERROR_DATA_TOO_LARGE = 20700004; + number ERROR_TOO_MANY_FILES = 20700005; + number ERROR_INSUFFICIENT_ROM = 20700006; + number ERROR_INVALID_PARAM = 20700007; + }; dictionary RingtoneType { - [Deprecated] number RINGTONE_TYPE_DEFAULT = 0; number RINGTONE_TYPE_SIM_CARD_0 = 0; [Deprecated] number RINGTONE_TYPE_MULTISIM = 1; number RINGTONE_TYPE_SIM_CARD_1 = 1; - }; dictionary SystemToneType { - number SYSTEM_TONE_TYPE_SIM_CARD_0 = 0; number SYSTEM_TONE_TYPE_SIM_CARD_1 = 1; number SYSTEM_TONE_TYPE_NOTIFICATION = 32; - }; dictionary ToneCustomizedType { - number PRE_INSTALLED = 0; number CUSTOMIZED = 1; - + }; + dictionary MediaType { + number AUDIO = 0; + number VIDEO = 1; }; [Entity=Interface] interface ToneAttrs { - [Throws] String getTitle(); [Throws] @@ -50,60 +57,66 @@ namespace systemSoundManager { void setCategory(number category); [Throws] number getCategory(); - + [Throws] + void setMediaType(MediaType type); + [Throws] + MediaType getMediaType(); }; typedef sequence ToneAttrsArray; + [Throws] + ToneAttrs createCustomizedToneAttrs(); dictionary ToneHapticsFeature { - number STANDARD = 0; number GENTLE = 1; - }; dictionary ToneHapticsType { - number CALL_SIM_CARD_0 = 0; number CALL_SIM_CARD_1 = 1; number TEXT_MESSAGE_SIM_CARD_0 = 20; number TEXT_MESSAGE_SIM_CARD_1 = 21; number NOTIFICATION = 40; - }; dictionary ToneHapticsMode { - number NONE = 0; number SYNC = 1; number NON_SYNC = 2; - }; [Entity=Interface] interface ToneHapticsSettings { - attribute ToneHapticsMode mode; [Optional] attribute String hapticsUri; - }; [Entity=Interface] interface ToneHapticsAttrs { - [Throws] String getUri(); [Throws] String getTitle(); [Throws] String getFileName(); - }; typedef sequence ToneHapticsAttrsArray; + SystemSoundManager getSystemSoundManager(); [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Async, Synthetic] callback AsyncCallback_RingtonePlayer_Void = void (RingtonePlayer result); + [Entity=Tuple, Synthetic] + interface Tuple_String_Number_SystemSoundError { + attribute String value0; + attribute number value1; + attribute SystemSoundError value2; + }; + [Entity=Tuple, Synthetic] + interface Tuple_String_SystemSoundError { + attribute String value0; + attribute SystemSoundError value1; + }; [Entity=Interface] interface SystemSoundManager { - [Deprecated] void setSystemRingtoneUri(Context context, String uri, RingtoneType type, AsyncCallback_Void callback_); [Deprecated] @@ -117,6 +130,8 @@ namespace systemSoundManager { [Throws] async String getRingtoneUri(BaseContext context, RingtoneType type); [Throws] + async ToneAttrs getCurrentRingtoneAttribute(RingtoneType type); + [Throws] async ToneAttrs getDefaultRingtoneAttrs(BaseContext context, RingtoneType type); [Throws] async ToneAttrsArray getRingtoneAttrList(BaseContext context, RingtoneType type); @@ -147,6 +162,8 @@ namespace systemSoundManager { [Throws] async number openAlarmTone(BaseContext context, String uri); [Throws] + async sequence openToneList(sequence uriList); + [Throws] async void close(number fd); [Throws] async String addCustomizedTone(BaseContext context, ToneAttrs toneAttr, String externalUri); @@ -155,6 +172,8 @@ namespace systemSoundManager { [Throws] async void removeCustomizedTone(BaseContext context, String uri); [Throws] + async sequence removeCustomizedToneList(sequence uriList); + [Throws] async ToneHapticsSettings getToneHapticsSettings(BaseContext context, ToneHapticsType type); [Throws] async void setToneHapticsSettings(BaseContext context, ToneHapticsType type, ToneHapticsSettings settings); @@ -164,19 +183,9 @@ namespace systemSoundManager { async ToneHapticsAttrs getHapticsAttrsSyncedWithTone(BaseContext context, String toneUri); [Throws] async number openToneHaptics(BaseContext context, String hapticsUri); - }; typedef _RingtonePlayer RingtonePlayer; typedef _SystemTonePlayer SystemTonePlayer; typedef _RingtoneOptions RingtoneOptions; typedef _SystemToneOptions SystemToneOptions; - [GlobalScope] - interface GlobalScope_systemSoundManager_ohos_multimedia_systemSoundManager { - - [Throws] - static ToneAttrs createCustomizedToneAttrs(); - static SystemSoundManager getSystemSoundManager(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.multimedia.videoProcessingEngine.idl b/idl/@ohos.multimedia.videoProcessingEngine.idl new file mode 100644 index 0000000..04e9f7f --- /dev/null +++ b/idl/@ohos.multimedia.videoProcessingEngine.idl @@ -0,0 +1,28 @@ +package ohos.multimedia.videoProcessingEngine; +import ohos.multimedia.image.default as image; +[DefaultExport] +namespace videoProcessingEngine { + dictionary QualityLevel { + number NONE = 0; + number LOW = 1; + number MEDIUM = 2; + number HIGH = 3; + }; + [Entity=Interface] + interface ImageProcessor { + [Throws] + async image.PixelMap enhanceDetail(image.PixelMap sourceImage, number width, number height, optional QualityLevel level); + [Throws] + async image.PixelMap enhanceDetail(image.PixelMap sourceImage, number scale, optional QualityLevel level); + [Throws] + image.PixelMap enhanceDetailSync(image.PixelMap sourceImage, number width, number height, optional QualityLevel level); + [Throws] + image.PixelMap enhanceDetailSync(image.PixelMap sourceImage, number scale, optional QualityLevel level); + }; + [Throws] + async void initializeEnvironment(); + [Throws] + async void deinitializeEnvironment(); + [Throws] + ImageProcessor create(); +}; \ No newline at end of file diff --git a/idl/@ohos.multimodalAwareness.deviceStatus.idl b/idl/@ohos.multimodalAwareness.deviceStatus.idl new file mode 100644 index 0000000..26a346a --- /dev/null +++ b/idl/@ohos.multimodalAwareness.deviceStatus.idl @@ -0,0 +1,23 @@ +package ohos.multimodalAwareness.deviceStatus; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace deviceStatus { + dictionary SteadyStandingStatus { + number STATUS_EXIT = 0; + number STATUS_ENTER = 1; + }; + [Entity=Interface] + interface DeviceRotationRadian { + attribute number x; + attribute number y; + attribute number z; + }; + [Synthetic] + callback Callback_SteadyStandingStatus_Void = void (SteadyStandingStatus parameter); + [Throws, DtsName="on", DtsTag="'steadyStandingDetect'"] + void onSteadyStandingDetect(Callback_SteadyStandingStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'steadyStandingDetect'"] + void offSteadyStandingDetect(optional Callback_SteadyStandingStatus_Void callback_); + [Throws] + async DeviceRotationRadian getDeviceRotationRadian(); +}; \ No newline at end of file diff --git a/idl/@ohos.multimodalAwareness.metadataBinding.idl b/idl/@ohos.multimodalAwareness.metadataBinding.idl new file mode 100644 index 0000000..1aadc65 --- /dev/null +++ b/idl/@ohos.multimodalAwareness.metadataBinding.idl @@ -0,0 +1,20 @@ +package ohos.multimodalAwareness.metadataBinding; +import ohos.multimedia.image.image as image; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace metadataBinding { + [Throws] + async image.PixelMap encodeImage(image.PixelMap srcImage, String metadata); + [Throws] + async String decodeImage(image.PixelMap encodedImage); + [Throws] + async String notifyMetadataBindingEvent(String bundleName); + [Throws] + void submitMetadata(String metadata); + [Synthetic] + callback Callback_Number_Void = void (number parameter); + [Throws, DtsName="on", DtsTag="'operationSubmitMetadata'"] + void onOperationSubmitMetadata(String bundleName, Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'operationSubmitMetadata'"] + void offOperationSubmitMetadata(String bundleName, optional Callback_Number_Void callback_); +}; \ No newline at end of file diff --git a/idl/@ohos.multimodalAwareness.motion.idl b/idl/@ohos.multimodalAwareness.motion.idl new file mode 100644 index 0000000..ad6dab5 --- /dev/null +++ b/idl/@ohos.multimodalAwareness.motion.idl @@ -0,0 +1,31 @@ +package ohos.multimodalAwareness.motion; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace motion { + dictionary OperatingHandStatus { + number UNKNOWN_STATUS = 0; + number LEFT_HAND_OPERATED = 1; + number RIGHT_HAND_OPERATED = 2; + }; + dictionary HoldingHandStatus { + number NOT_HELD = 0; + number LEFT_HAND_HELD = 1; + number RIGHT_HAND_HELD = 2; + number BOTH_HANDS_HELD = 3; + number UNKNOWN_STATUS = 16; + }; + [Synthetic] + callback Callback_OperatingHandStatus_Void = void (OperatingHandStatus parameter); + [Throws, DtsName="on", DtsTag="'operatingHandChanged'"] + void onOperatingHandChanged(Callback_OperatingHandStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'operatingHandChanged'"] + void offOperatingHandChanged(optional Callback_OperatingHandStatus_Void callback_); + [Throws] + OperatingHandStatus getRecentOperatingHandStatus(); + [Synthetic] + callback Callback_HoldingHandStatus_Void = void (HoldingHandStatus parameter); + [Throws, DtsName="on", DtsTag="'holdingHandChanged'"] + void onHoldingHandChanged(Callback_HoldingHandStatus_Void callback_); + [Throws, DtsName="off", DtsTag="'holdingHandChanged'"] + void offHoldingHandChanged(optional Callback_HoldingHandStatus_Void callback_); +}; \ No newline at end of file diff --git a/idl/@ohos.multimodalAwareness.userStatus.idl b/idl/@ohos.multimodalAwareness.userStatus.idl new file mode 100644 index 0000000..0023ce2 --- /dev/null +++ b/idl/@ohos.multimodalAwareness.userStatus.idl @@ -0,0 +1,22 @@ +package ohos.multimodalAwareness.userStatus; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace userStatus { + [Entity=Interface] + interface UserClassification { + [Optional] + attribute UserAgeGroup ageGroup; + [Optional] + attribute f32 confidence; + }; + dictionary UserAgeGroup { + number OTHERS = 0; + number CHILD = 1; + }; + [Synthetic] + callback Callback_UserClassification_Void = void (UserClassification parameter); + [Throws, DtsName="on", DtsTag="'userAgeGroupDetected'"] + void onUserAgeGroupDetected(Callback_UserClassification_Void callback_); + [Throws, DtsName="off", DtsTag="'userAgeGroupDetected'"] + void offUserAgeGroupDetected(optional Callback_UserClassification_Void callback_); +}; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.gestureEvent.idl b/idl/@ohos.multimodalInput.gestureEvent.idl index 7ac561d..995a6d3 100644 --- a/idl/@ohos.multimodalInput.gestureEvent.idl +++ b/idl/@ohos.multimodalInput.gestureEvent.idl @@ -1,57 +1,42 @@ package ohos.multimodalInput.gestureEvent; [Entity=Interface] interface Pinch { - attribute ActionType type; attribute number scale; - }; [Entity=Interface] interface Rotate { - attribute ActionType type; attribute number angle; - }; [Entity=Interface] interface ThreeFingersSwipe { - attribute ActionType type; attribute number x; attribute number y; - }; [Entity=Interface] interface FourFingersSwipe { - attribute ActionType type; attribute number x; attribute number y; - }; [Entity=Interface] interface SwipeInward { - attribute ActionType type; attribute number x; attribute number y; - }; [Entity=Interface] interface ThreeFingersTap { - attribute ActionType type; - }; [Entity=Interface] interface TouchGestureEvent { - attribute TouchGestureAction action; attribute sequence touches; - }; dictionary TouchGestureAction { - number SWIPE_DOWN = 0; number SWIPE_UP = 1; number SWIPE_LEFT = 2; @@ -59,13 +44,10 @@ dictionary TouchGestureAction { number PINCH_CLOSED = 4; number PINCH_OPENED = 5; number GESTURE_END = 6; - }; dictionary ActionType { - number CANCEL = 0; number BEGIN = 1; number UPDATE = 2; number END = 3; - }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.infraredEmitter.idl b/idl/@ohos.multimodalInput.infraredEmitter.idl index 41085f6..976c8a6 100644 --- a/idl/@ohos.multimodalInput.infraredEmitter.idl +++ b/idl/@ohos.multimodalInput.infraredEmitter.idl @@ -1,21 +1,13 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.infraredEmitter; +[DefaultExport] namespace infraredEmitter { - [Entity=Interface] interface InfraredFrequency { - attribute number max; attribute number min; - }; - [GlobalScope] - interface GlobalScope_infraredEmitter_ohos_multimodalInput_infraredEmitter { - - [Throws] - static void transmitInfrared(number infraredFrequency, sequence pattern); - [Throws] - static sequence getInfraredFrequencies(); - - }; - + [Throws] + void transmitInfrared(number infraredFrequency, sequence pattern); + [Throws] + sequence getInfraredFrequencies(); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.inputConsumer.idl b/idl/@ohos.multimodalInput.inputConsumer.idl index 85a8d45..0ee66e5 100644 --- a/idl/@ohos.multimodalInput.inputConsumer.idl +++ b/idl/@ohos.multimodalInput.inputConsumer.idl @@ -1,54 +1,56 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.inputConsumer; import ohos.base.Callback as Callback; +import ohos.multimodalInput.keyEvent.KeyEvent as KeyEvent; +import ohos.base.Callback as Callback; +[DefaultExport] namespace inputConsumer { - [Entity=Interface] interface KeyOptions { - attribute sequence preKeys; attribute number finalKey; attribute boolean isFinalKeyDown; attribute number finalKeyDownDuration; [Optional] attribute boolean isRepeat; - }; [Entity=Interface] interface HotkeyOptions { - attribute sequence preKeys; attribute number finalKey; [Optional] attribute boolean isRepeat; - + }; + [Entity=Interface] + interface KeyPressedConfig { + attribute number key; + attribute number action; + attribute boolean isRepeat; }; dictionary ShieldMode { - number FACTORY_MODE = 0; - }; [Synthetic] callback Callback_KeyOptions_Void = void (KeyOptions parameter); + [Throws, DtsName="on", DtsTag="'key'"] + void onKey(KeyOptions keyOptions, Callback_KeyOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'key'"] + void offKey(KeyOptions keyOptions, optional Callback_KeyOptions_Void callback_); + [Throws] + void setShieldStatus(ShieldMode shieldMode, boolean isShield); + [Throws] + boolean getShieldStatus(ShieldMode shieldMode); + [Throws] + async sequence getAllSystemHotkeys(); [Synthetic] callback Callback_HotkeyOptions_Void = void (HotkeyOptions parameter); - [GlobalScope] - interface GlobalScope_inputConsumer_ohos_multimodalInput_inputConsumer { - - [Throws, DtsName="on", DtsTag="'key'"] - static void onKey(KeyOptions keyOptions, Callback_KeyOptions_Void callback_); - [Throws, DtsName="off", DtsTag="'key'"] - static void offKey(KeyOptions keyOptions, optional Callback_KeyOptions_Void callback_); - [Throws] - static void setShieldStatus(ShieldMode shieldMode, boolean isShield); - [Throws] - static boolean getShieldStatus(ShieldMode shieldMode); - [Throws] - static async sequence getAllSystemHotkeys(); - [Throws, DtsName="on", DtsTag="'hotkeyChange'"] - static void onHotkeyChange(HotkeyOptions hotkeyOptions, Callback_HotkeyOptions_Void callback_); - [Throws, DtsName="off", DtsTag="'hotkeyChange'"] - static void offHotkeyChange(HotkeyOptions hotkeyOptions, optional Callback_HotkeyOptions_Void callback_); - - }; - + [Throws, DtsName="on", DtsTag="'hotkeyChange'"] + void onHotkeyChange(HotkeyOptions hotkeyOptions, Callback_HotkeyOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'hotkeyChange'"] + void offHotkeyChange(HotkeyOptions hotkeyOptions, optional Callback_HotkeyOptions_Void callback_); + [Synthetic] + callback Callback_KeyEvent_Void = void (KeyEvent parameter); + [Throws, DtsName="on", DtsTag="'keyPressed'"] + void onKeyPressed(KeyPressedConfig options, Callback_KeyEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'keyPressed'"] + void offKeyPressed(optional Callback_KeyEvent_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.inputDevice.idl b/idl/@ohos.multimodalInput.inputDevice.idl index a97f8bc..9312ca1 100644 --- a/idl/@ohos.multimodalInput.inputDevice.idl +++ b/idl/@ohos.multimodalInput.inputDevice.idl @@ -1,39 +1,38 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.inputDevice; import ohos.base.Callback as Callback; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimodalInput.KeyCode as KeyCode; +import ohos.multimodalInput.keyCode.KeyCode as KeyCode; +import ohos.base.Callback as Callback; +import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace inputDevice { - typedef String ChangedType; typedef String SourceType; typedef String AxisType; dictionary KeyboardType { - number NONE = 0; number UNKNOWN = 1; number ALPHABETIC_KEYBOARD = 2; number DIGITAL_KEYBOARD = 3; number HANDWRITING_PEN = 4; number REMOTE_CONTROL = 5; - }; dictionary FunctionKey { - number CAPS_LOCK = 1; - }; [Entity=Interface] interface DeviceListener { - attribute ChangedType type; attribute number deviceId; - }; [Synthetic] callback Callback_DeviceListener_Void = void (DeviceListener parameter); + [Throws, DtsName="on", DtsTag="'change'"] + void onChange(Callback_DeviceListener_Void listener); + [Throws, DtsName="off", DtsTag="'change'"] + void offChange(optional Callback_DeviceListener_Void listener); [Entity=Interface] interface AxisRange { - attribute SourceType source; attribute AxisType axis; attribute number max; @@ -41,11 +40,9 @@ namespace inputDevice { attribute number fuzz; attribute number flat; attribute number resolution; - }; [Entity=Interface] interface InputDeviceData { - attribute number id; attribute String name; attribute sequence sources; @@ -56,80 +53,69 @@ namespace inputDevice { attribute number version; attribute String phys; attribute String uniq; - }; [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); + [Deprecated] + void getDeviceIds(AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async sequence getDeviceIds(); [Async, Synthetic] callback AsyncCallback_InputDeviceData_Void = void (InputDeviceData result); + [Deprecated] + void getDevice(number deviceId, AsyncCallback_InputDeviceData_Void callback_); + [Deprecated] + async InputDeviceData getDevice(number deviceId); + [Throws] + void getDeviceList(AsyncCallback_Array_Number_Void callback_); + async sequence getDeviceList(); + [Throws] + void getDeviceInfo(number deviceId, AsyncCallback_InputDeviceData_Void callback_); + [Throws] + async InputDeviceData getDeviceInfo(number deviceId); + [Throws] + InputDeviceData getDeviceInfoSync(number deviceId); [Async, Synthetic] callback AsyncCallback_Array_Boolean_Void = void (sequence result); + [Throws] + void supportKeys(number deviceId, sequence keys, AsyncCallback_Array_Boolean_Void callback_); + [Throws] + async sequence supportKeys(number deviceId, sequence keys); + [Throws] + sequence supportKeysSync(number deviceId, sequence keys); [Async, Synthetic] callback AsyncCallback_KeyboardType_Void = void (KeyboardType result); + [Throws] + void getKeyboardType(number deviceId, AsyncCallback_KeyboardType_Void callback_); + [Throws] + async KeyboardType getKeyboardType(number deviceId); + [Throws] + KeyboardType getKeyboardTypeSync(number deviceId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setKeyboardRepeatDelay(number delay, AsyncCallback_Void callback_); + [Throws] + async void setKeyboardRepeatDelay(number delay); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); - [GlobalScope] - interface GlobalScope_inputDevice_ohos_multimodalInput_inputDevice { - - [Throws, DtsName="on", DtsTag="'change'"] - static void onChange(Callback_DeviceListener_Void listener); - [Throws, DtsName="off", DtsTag="'change'"] - static void offChange(optional Callback_DeviceListener_Void listener); - [Deprecated] - static void getDeviceIds(AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async sequence getDeviceIds(); - [Deprecated] - static void getDevice(number deviceId, AsyncCallback_InputDeviceData_Void callback_); - [Deprecated] - static async InputDeviceData getDevice(number deviceId); - [Throws] - static void getDeviceList(AsyncCallback_Array_Number_Void callback_); - static async sequence getDeviceList(); - [Throws] - static void getDeviceInfo(number deviceId, AsyncCallback_InputDeviceData_Void callback_); - [Throws] - static async InputDeviceData getDeviceInfo(number deviceId); - [Throws] - static InputDeviceData getDeviceInfoSync(number deviceId); - [Throws] - static void supportKeys(number deviceId, sequence keys, AsyncCallback_Array_Boolean_Void callback_); - [Throws] - static async sequence supportKeys(number deviceId, sequence keys); - [Throws] - static sequence supportKeysSync(number deviceId, sequence keys); - [Throws] - static void getKeyboardType(number deviceId, AsyncCallback_KeyboardType_Void callback_); - [Throws] - static async KeyboardType getKeyboardType(number deviceId); - [Throws] - static KeyboardType getKeyboardTypeSync(number deviceId); - [Throws] - static void setKeyboardRepeatDelay(number delay, AsyncCallback_Void callback_); - [Throws] - static async void setKeyboardRepeatDelay(number delay); - [Throws] - static void getKeyboardRepeatDelay(AsyncCallback_Number_Void callback_); - [Throws] - static async number getKeyboardRepeatDelay(); - [Throws] - static void setKeyboardRepeatRate(number rate, AsyncCallback_Void callback_); - [Throws] - static async void setKeyboardRepeatRate(number rate); - [Throws] - static void getKeyboardRepeatRate(AsyncCallback_Number_Void callback_); - [Throws] - static async number getKeyboardRepeatRate(); - static async number getIntervalSinceLastInput(); - [Throws] - static async void setInputDeviceEnabled(number deviceId, boolean enabled); - [Throws] - static async void setFunctionKeyEnabled(FunctionKey functionKey, boolean enabled); - [Throws] - static async boolean isFunctionKeyEnabled(FunctionKey functionKey); - - }; - + [Throws] + void getKeyboardRepeatDelay(AsyncCallback_Number_Void callback_); + [Throws] + async number getKeyboardRepeatDelay(); + [Throws] + void setKeyboardRepeatRate(number rate, AsyncCallback_Void callback_); + [Throws] + async void setKeyboardRepeatRate(number rate); + [Throws] + void getKeyboardRepeatRate(AsyncCallback_Number_Void callback_); + [Throws] + async number getKeyboardRepeatRate(); + async number getIntervalSinceLastInput(); + [Throws] + async void setInputDeviceEnabled(number deviceId, boolean enabled); + [Throws] + async void setFunctionKeyEnabled(FunctionKey functionKey, boolean enabled); + [Throws] + async boolean isFunctionKeyEnabled(FunctionKey functionKey); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.inputDeviceCooperate.idl b/idl/@ohos.multimodalInput.inputDeviceCooperate.idl index 6d13acb..0f01989 100644 --- a/idl/@ohos.multimodalInput.inputDeviceCooperate.idl +++ b/idl/@ohos.multimodalInput.inputDeviceCooperate.idl @@ -1,59 +1,47 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.inputDeviceCooperate; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace inputDeviceCooperate { - dictionary EventMsg { - number MSG_COOPERATE_INFO_START = 200; number MSG_COOPERATE_INFO_SUCCESS = 201; number MSG_COOPERATE_INFO_FAIL = 202; number MSG_COOPERATE_STATE_ON = 500; number MSG_COOPERATE_STATE_OFF = 501; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enable(boolean enable, AsyncCallback_Void callback_); + [Throws] + async void enable(boolean enable); + [Throws] + void start(String sinkDeviceDescriptor, number srcInputDeviceId, AsyncCallback_Void callback_); + [Throws] + async void start(String sinkDeviceDescriptor, number srcInputDeviceId); + [Throws] + void stop(AsyncCallback_Void callback_); + [Throws] + async void stop(); [Entity=Literal, Synthetic] interface Literal_Boolean_state { - attribute boolean state; - }; [Async, Synthetic] callback AsyncCallback_Literal_Boolean_state_Void = void (Literal_Boolean_state result); + [Throws] + void getState(String deviceDescriptor, AsyncCallback_Literal_Boolean_state_Void callback_); + [Throws] + async Literal_Boolean_state getState(String deviceDescriptor); [Entity=Literal, Synthetic] interface Literal_String_deviceDescriptor_EventMsg_eventMsg { - attribute String deviceDescriptor; attribute EventMsg eventMsg; - }; [Async, Synthetic] callback AsyncCallback_Literal_String_deviceDescriptor_EventMsg_eventMsg_Void = void (Literal_String_deviceDescriptor_EventMsg_eventMsg result); - [GlobalScope] - interface GlobalScope_inputDeviceCooperate_ohos_multimodalInput_inputDeviceCooperate { - - [Throws] - static void enable(boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void enable(boolean enable); - [Throws] - static void start(String sinkDeviceDescriptor, number srcInputDeviceId, AsyncCallback_Void callback_); - [Throws] - static async void start(String sinkDeviceDescriptor, number srcInputDeviceId); - [Throws] - static void stop(AsyncCallback_Void callback_); - [Throws] - static async void stop(); - [Throws] - static void getState(String deviceDescriptor, AsyncCallback_Literal_Boolean_state_Void callback_); - [Throws] - static async Literal_Boolean_state getState(String deviceDescriptor); - [Throws, DtsName="on", DtsTag="'cooperation'"] - static void onCooperation(AsyncCallback_Literal_String_deviceDescriptor_EventMsg_eventMsg_Void callback_); - [Throws, DtsName="off", DtsTag="'cooperation'"] - static void offCooperation(optional AsyncCallback_Void callback_); - - }; - + [Throws, DtsName="on", DtsTag="'cooperation'"] + void onCooperation(AsyncCallback_Literal_String_deviceDescriptor_EventMsg_eventMsg_Void callback_); + [Throws, DtsName="off", DtsTag="'cooperation'"] + void offCooperation(optional AsyncCallback_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.inputEvent.idl b/idl/@ohos.multimodalInput.inputEvent.idl index 482e7dc..29f4dac 100644 --- a/idl/@ohos.multimodalInput.inputEvent.idl +++ b/idl/@ohos.multimodalInput.inputEvent.idl @@ -1,11 +1,9 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.inputEvent; [Entity=Interface] interface InputEvent { - attribute number id; attribute number deviceId; attribute number actionTime; attribute number screenId; attribute number windowId; - }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.inputEventClient.idl b/idl/@ohos.multimodalInput.inputEventClient.idl index 4a032e2..9fd83b2 100644 --- a/idl/@ohos.multimodalInput.inputEventClient.idl +++ b/idl/@ohos.multimodalInput.inputEventClient.idl @@ -1,49 +1,39 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.inputEventClient; import ohos.multimodalInput.mouseEvent.MouseEvent as MouseEvent; import ohos.multimodalInput.touchEvent.TouchEvent as TouchEvent; +[DefaultExport] namespace inputEventClient { - [Entity=Interface] interface KeyEvent { - attribute boolean isPressed; attribute number keyCode; attribute number keyDownDuration; attribute boolean isIntercepted; - }; [Entity=Interface] interface MouseEventData { - attribute MouseEvent mouseEvent; - + [Optional] + attribute boolean useGlobalCoordinate; }; [Entity=Interface] interface TouchEventData { - attribute TouchEvent touchEvent; - + [Optional] + attribute boolean useGlobalCoordinate; }; [Entity=Interface] interface KeyEventData { - attribute KeyEvent keyEvent; - }; - [GlobalScope] - interface GlobalScope_inputEventClient_ohos_multimodalInput_inputEventClient { - - [Throws] - static void injectKeyEvent(KeyEventData keyEvent); - [Throws] - static void injectEvent(KeyEvent bound); - [Throws] - static void injectMouseEvent(MouseEventData mouseEvent); - [Throws] - static void injectTouchEvent(TouchEventData touchEvent); - [Throws] - static void permitInjection(boolean result); - - }; - + [Throws] + void injectKeyEvent(KeyEventData keyEvent); + [Throws] + void injectEvent(KeyEvent bound); + [Throws] + void injectMouseEvent(MouseEventData mouseEvent); + [Throws] + void injectTouchEvent(TouchEventData touchEvent); + [Throws] + void permitInjection(boolean result); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.inputMonitor.idl b/idl/@ohos.multimodalInput.inputMonitor.idl index 9146bc2..3a9bdc0 100644 --- a/idl/@ohos.multimodalInput.inputMonitor.idl +++ b/idl/@ohos.multimodalInput.inputMonitor.idl @@ -1,7 +1,7 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.inputMonitor; import ohos.base.Callback as Callback; import ohos.multimodalInput.mouseEvent.MouseEvent as MouseEvent; -import ohos.display as display; +import ohos.display.default as display; import ohos.multimodalInput.touchEvent.TouchEvent as TouchEvent; import ohos.multimodalInput.gestureEvent.Rotate as Rotate; import ohos.multimodalInput.gestureEvent.Pinch as Pinch; @@ -10,96 +10,90 @@ import ohos.multimodalInput.gestureEvent.FourFingersSwipe as FourFingersSwipe; import ohos.multimodalInput.gestureEvent.SwipeInward as SwipeInward; import ohos.multimodalInput.gestureEvent.ThreeFingersTap as ThreeFingersTap; import ohos.multimodalInput.gestureEvent.TouchGestureEvent as TouchGestureEvent; -import ohos.multimodalInput.FingerprintEvent as FingerprintEvent; +import ohos.multimodalInput.shortKey.FingerprintEvent as FingerprintEvent; import ohos.multimodalInput.keyEvent.KeyEvent as KeyEvent; -import ohos.multimodalInput.KeyCode as KeyCode; +import ohos.multimodalInput.keyCode.KeyCode as KeyCode; +[DefaultExport] namespace inputMonitor { - [Entity=Interface] interface TouchEventReceiver { - [CallSignature] boolean invoke(TouchEvent touchEvent); - }; + [Throws, DtsName="on", DtsTag="'touch'"] + void onTouch(TouchEventReceiver receiver); [Synthetic] callback Callback_MouseEvent_Void = void (MouseEvent parameter); + [Throws, DtsName="on", DtsTag="'mouse'"] + void onMouse(Callback_MouseEvent_Void receiver); + [Throws, DtsName="on", DtsTag="'mouse'"] + void onMouse(sequence rect, Callback_MouseEvent_Void receiver); + [Throws, DtsName="off", DtsTag="'touch'"] + void offTouch(optional TouchEventReceiver receiver); + [Throws, DtsName="off", DtsTag="'mouse'"] + void offMouse(optional Callback_MouseEvent_Void receiver); [Synthetic] callback Callback_Pinch_Void = void (Pinch parameter); + [Throws, DtsName="on", DtsTag="'pinch'"] + void onPinch(Callback_Pinch_Void receiver); + [Throws, DtsName="off", DtsTag="'pinch'"] + void offPinch(optional Callback_Pinch_Void receiver); + [Throws, DtsName="on", DtsTag="'pinch'"] + void onPinch(number fingers, Callback_Pinch_Void receiver); + [Throws, DtsName="off", DtsTag="'pinch'"] + void offPinch(number fingers, optional Callback_Pinch_Void receiver); [Synthetic] callback Callback_Rotate_Void = void (Rotate parameter); + [Throws, DtsName="on", DtsTag="'rotate'"] + void onRotate(number fingers, Callback_Rotate_Void receiver); + [Throws, DtsName="off", DtsTag="'rotate'"] + void offRotate(number fingers, optional Callback_Rotate_Void receiver); [Synthetic] callback Callback_ThreeFingersSwipe_Void = void (ThreeFingersSwipe parameter); + [Throws, DtsName="on", DtsTag="'threeFingersSwipe'"] + void onThreeFingersSwipe(Callback_ThreeFingersSwipe_Void receiver); + [Throws, DtsName="off", DtsTag="'threeFingersSwipe'"] + void offThreeFingersSwipe(optional Callback_ThreeFingersSwipe_Void receiver); [Synthetic] callback Callback_FourFingersSwipe_Void = void (FourFingersSwipe parameter); + [Throws, DtsName="on", DtsTag="'fourFingersSwipe'"] + void onFourFingersSwipe(Callback_FourFingersSwipe_Void receiver); + [Throws, DtsName="off", DtsTag="'fourFingersSwipe'"] + void offFourFingersSwipe(optional Callback_FourFingersSwipe_Void receiver); [Synthetic] callback Callback_ThreeFingersTap_Void = void (ThreeFingersTap parameter); + [Throws, DtsName="on", DtsTag="'threeFingersTap'"] + void onThreeFingersTap(Callback_ThreeFingersTap_Void receiver); + [Throws, DtsName="off", DtsTag="'threeFingersTap'"] + void offThreeFingersTap(optional Callback_ThreeFingersTap_Void receiver); [Synthetic] callback Callback_FingerprintEvent_Void = void (FingerprintEvent parameter); + [Throws, DtsName="on", DtsTag="'fingerprint'"] + void onFingerprint(Callback_FingerprintEvent_Void receiver); + [Throws, DtsName="off", DtsTag="'fingerprint'"] + void offFingerprint(optional Callback_FingerprintEvent_Void receiver); [Synthetic] callback Callback_SwipeInward_Void = void (SwipeInward parameter); + [Throws, DtsName="on", DtsTag="'swipeInward'"] + void onSwipeInward(Callback_SwipeInward_Void receiver); + [Throws, DtsName="off", DtsTag="'swipeInward'"] + void offSwipeInward(optional Callback_SwipeInward_Void receiver); [Synthetic] callback Callback_TouchGestureEvent_Void = void (TouchGestureEvent parameter); + [Throws, DtsName="on", DtsTag="'touchscreenSwipe'"] + void onTouchscreenSwipe(number fingers, Callback_TouchGestureEvent_Void receiver); + [Throws, DtsName="off", DtsTag="'touchscreenSwipe'"] + void offTouchscreenSwipe(number fingers, optional Callback_TouchGestureEvent_Void receiver); + [Throws, DtsName="on", DtsTag="'touchscreenPinch'"] + void onTouchscreenPinch(number fingers, Callback_TouchGestureEvent_Void receiver); + [Throws, DtsName="off", DtsTag="'touchscreenPinch'"] + void offTouchscreenPinch(number fingers, optional Callback_TouchGestureEvent_Void receiver); [Synthetic] callback Callback_KeyEvent_Void = void (KeyEvent parameter); - [GlobalScope] - interface GlobalScope_inputMonitor_ohos_multimodalInput_inputMonitor { - - [Throws, DtsName="on", DtsTag="'touch'"] - static void onTouch(TouchEventReceiver receiver); - [Throws, DtsName="on", DtsTag="'mouse'"] - static void onMouse(Callback_MouseEvent_Void receiver); - [Throws, DtsName="on", DtsTag="'mouse'"] - static void onMouse(sequence rect, Callback_MouseEvent_Void receiver); - [Throws, DtsName="off", DtsTag="'touch'"] - static void offTouch(optional TouchEventReceiver receiver); - [Throws, DtsName="off", DtsTag="'mouse'"] - static void offMouse(optional Callback_MouseEvent_Void receiver); - [Throws, DtsName="on", DtsTag="'pinch'"] - static void onPinch(Callback_Pinch_Void receiver); - [Throws, DtsName="off", DtsTag="'pinch'"] - static void offPinch(optional Callback_Pinch_Void receiver); - [Throws, DtsName="on", DtsTag="'pinch'"] - static void onPinch(number fingers, Callback_Pinch_Void receiver); - [Throws, DtsName="off", DtsTag="'pinch'"] - static void offPinch(number fingers, optional Callback_Pinch_Void receiver); - [Throws, DtsName="on", DtsTag="'rotate'"] - static void onRotate(number fingers, Callback_Rotate_Void receiver); - [Throws, DtsName="off", DtsTag="'rotate'"] - static void offRotate(number fingers, optional Callback_Rotate_Void receiver); - [Throws, DtsName="on", DtsTag="'threeFingersSwipe'"] - static void onThreeFingersSwipe(Callback_ThreeFingersSwipe_Void receiver); - [Throws, DtsName="off", DtsTag="'threeFingersSwipe'"] - static void offThreeFingersSwipe(optional Callback_ThreeFingersSwipe_Void receiver); - [Throws, DtsName="on", DtsTag="'fourFingersSwipe'"] - static void onFourFingersSwipe(Callback_FourFingersSwipe_Void receiver); - [Throws, DtsName="off", DtsTag="'fourFingersSwipe'"] - static void offFourFingersSwipe(optional Callback_FourFingersSwipe_Void receiver); - [Throws, DtsName="on", DtsTag="'threeFingersTap'"] - static void onThreeFingersTap(Callback_ThreeFingersTap_Void receiver); - [Throws, DtsName="off", DtsTag="'threeFingersTap'"] - static void offThreeFingersTap(optional Callback_ThreeFingersTap_Void receiver); - [Throws, DtsName="on", DtsTag="'fingerprint'"] - static void onFingerprint(Callback_FingerprintEvent_Void receiver); - [Throws, DtsName="off", DtsTag="'fingerprint'"] - static void offFingerprint(optional Callback_FingerprintEvent_Void receiver); - [Throws, DtsName="on", DtsTag="'swipeInward'"] - static void onSwipeInward(Callback_SwipeInward_Void receiver); - [Throws, DtsName="off", DtsTag="'swipeInward'"] - static void offSwipeInward(optional Callback_SwipeInward_Void receiver); - [Throws, DtsName="on", DtsTag="'touchscreenSwipe'"] - static void onTouchscreenSwipe(number fingers, Callback_TouchGestureEvent_Void receiver); - [Throws, DtsName="off", DtsTag="'touchscreenSwipe'"] - static void offTouchscreenSwipe(number fingers, optional Callback_TouchGestureEvent_Void receiver); - [Throws, DtsName="on", DtsTag="'touchscreenPinch'"] - static void onTouchscreenPinch(number fingers, Callback_TouchGestureEvent_Void receiver); - [Throws, DtsName="off", DtsTag="'touchscreenPinch'"] - static void offTouchscreenPinch(number fingers, optional Callback_TouchGestureEvent_Void receiver); - [Throws, DtsName="on", DtsTag="'keyPressed'"] - static void onKeyPressed(sequence keys, Callback_KeyEvent_Void receiver); - [Throws, DtsName="off", DtsTag="'keyPressed'"] - static void offKeyPressed(optional Callback_KeyEvent_Void receiver); - - }; - + [Throws, DtsName="on", DtsTag="'keyPressed'"] + void onKeyPressed(sequence keys, Callback_KeyEvent_Void receiver); + [Throws, DtsName="off", DtsTag="'keyPressed'"] + void offKeyPressed(optional Callback_KeyEvent_Void receiver); + [Throws] + async sequence queryTouchEvents(number count); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.intentionCode.idl b/idl/@ohos.multimodalInput.intentionCode.idl index 902ee49..9453b4b 100644 --- a/idl/@ohos.multimodalInput.intentionCode.idl +++ b/idl/@ohos.multimodalInput.intentionCode.idl @@ -1,6 +1,5 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.intentionCode; dictionary IntentionCode { - number INTENTION_UNKNOWN = -1; number INTENTION_UP = 1; number INTENTION_DOWN = 2; @@ -15,5 +14,4 @@ dictionary IntentionCode { number INTENTION_PAGE_DOWN = 12; number INTENTION_ZOOM_OUT = 13; number INTENTION_ZOOM_IN = 14; - }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.keyCode.idl b/idl/@ohos.multimodalInput.keyCode.idl index 7b708bb..8922201 100644 --- a/idl/@ohos.multimodalInput.keyCode.idl +++ b/idl/@ohos.multimodalInput.keyCode.idl @@ -1,10 +1,10 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.keyCode; dictionary KeyCode { - number KEYCODE_FN = 0; number KEYCODE_UNKNOWN = -1; number KEYCODE_HOME = 1; number KEYCODE_BACK = 2; + number KEYCODE_HEADSETHOOK = 6; number KEYCODE_SEARCH = 9; number KEYCODE_MEDIA_PLAY_PAUSE = 10; number KEYCODE_MEDIA_STOP = 11; @@ -348,5 +348,5 @@ dictionary KeyCode { number KEYCODE_DAGGER_CLICK = 3211; number KEYCODE_DAGGER_DOUBLE_CLICK = 3212; number KEYCODE_DAGGER_LONG_PRESS = 3213; - + number KEYCODE_DIV = 3220; }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.keyEvent.idl b/idl/@ohos.multimodalInput.keyEvent.idl index c86f64d..acad71d 100644 --- a/idl/@ohos.multimodalInput.keyEvent.idl +++ b/idl/@ohos.multimodalInput.keyEvent.idl @@ -1,24 +1,19 @@ package ohos.multimodalInput.keyEvent; -import ohos.multimodalInput.InputEvent as InputEvent; -import ohos.multimodalInput.KeyCode as KeyCode; +import ohos.multimodalInput.inputEvent.InputEvent as InputEvent; +import ohos.multimodalInput.keyCode.KeyCode as KeyCode; dictionary Action { - number CANCEL = 0; number DOWN = 1; number UP = 2; - }; [Entity=Interface] interface Key { - attribute KeyCode code; attribute number pressedTime; attribute number deviceId; - }; [Entity=Interface] interface KeyEvent: InputEvent { - attribute Action action; attribute Key key; attribute number unicodeChar; @@ -31,5 +26,4 @@ interface KeyEvent: InputEvent { attribute boolean capsLock; attribute boolean numLock; attribute boolean scrollLock; - }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.mouseEvent.idl b/idl/@ohos.multimodalInput.mouseEvent.idl index d946f71..2c0b9be 100644 --- a/idl/@ohos.multimodalInput.mouseEvent.idl +++ b/idl/@ohos.multimodalInput.mouseEvent.idl @@ -1,8 +1,7 @@ package ohos.multimodalInput.mouseEvent; -import ohos.multimodalInput.InputEvent as InputEvent; -import ohos.multimodalInput.KeyCode as KeyCode; +import ohos.multimodalInput.inputEvent.InputEvent as InputEvent; +import ohos.multimodalInput.keyCode.KeyCode as KeyCode; dictionary Action { - number CANCEL = 0; number MOVE = 1; number BUTTON_DOWN = 2; @@ -12,10 +11,8 @@ dictionary Action { number AXIS_END = 6; number ACTION_DOWN = 7; number ACTION_UP = 8; - }; dictionary Button { - number LEFT = 0; number MIDDLE = 1; number RIGHT = 2; @@ -24,33 +21,25 @@ dictionary Button { number FORWARD = 5; number BACK = 6; number TASK = 7; - }; dictionary Axis { - number SCROLL_VERTICAL = 0; number SCROLL_HORIZONTAL = 1; number PINCH = 2; - }; [Entity=Interface] interface AxisValue { - attribute Axis axis; attribute number value; - }; dictionary ToolType { - number UNKNOWN = 0; number MOUSE = 1; number JOYSTICK = 2; number TOUCHPAD = 3; - }; [Entity=Interface] interface MouseEvent: InputEvent { - attribute Action action; attribute number screenX; attribute number screenY; @@ -71,5 +60,8 @@ interface MouseEvent: InputEvent { attribute boolean numLock; attribute boolean scrollLock; attribute ToolType toolType; - + [Optional] + attribute number globalX; + [Optional] + attribute number globalY; }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.pointer.idl b/idl/@ohos.multimodalInput.pointer.idl index de6ea76..546053d 100644 --- a/idl/@ohos.multimodalInput.pointer.idl +++ b/idl/@ohos.multimodalInput.pointer.idl @@ -1,10 +1,11 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.pointer; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimedia.image as image; +import ohos.multimedia.image.default as image; +import ohos.base.AsyncCallback as AsyncCallback; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace pointer { - dictionary PointerStyle { - number DEFAULT = 0; number EAST = 1; number WEST = 2; @@ -50,205 +51,193 @@ namespace pointer { number LOADING = 42; number RUNNING = 43; number MIDDLE_BTN_EAST_WEST = 44; - + number SCREENRECORDER_CURSOR = 48; }; dictionary PrimaryButton { - number LEFT = 0; number RIGHT = 1; - }; dictionary RightClickType { - number TOUCHPAD_RIGHT_BUTTON = 1; number TOUCHPAD_LEFT_BUTTON = 2; number TOUCHPAD_TWO_FINGER_TAP = 3; - + number TOUCHPAD_TWO_FINGER_TAP_OR_RIGHT_BUTTON = 4; + number TOUCHPAD_TWO_FINGER_TAP_OR_LEFT_BUTTON = 5; }; [Entity=Interface] interface CustomCursor { - attribute image.PixelMap pixelMap; [Optional] attribute number focusX; [Optional] attribute number focusY; - }; [Entity=Interface] interface CursorConfig { - attribute boolean followSystem; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setPointerSpeed(number speed, AsyncCallback_Void callback_); + [Throws] + async void setPointerSpeed(number speed); + [Throws] + void setPointerSpeedSync(number speed); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getPointerSpeed(AsyncCallback_Number_Void callback_); + [Throws] + async number getPointerSpeed(); + [Throws] + number getPointerSpeedSync(); + [Throws] + void setPointerStyle(number windowId, PointerStyle pointerStyle, AsyncCallback_Void callback_); + [Throws] + async void setPointerStyle(number windowId, PointerStyle pointerStyle); + [Throws] + void setPointerStyleSync(number windowId, PointerStyle pointerStyle); [Async, Synthetic] callback AsyncCallback_PointerStyle_Void = void (PointerStyle result); + [Throws] + void getPointerStyle(number windowId, AsyncCallback_PointerStyle_Void callback_); + [Throws] + async PointerStyle getPointerStyle(number windowId); + [Throws] + PointerStyle getPointerStyleSync(number windowId); + [Throws] + void setPointerVisible(boolean visible, AsyncCallback_Void callback_); + [Throws] + async void setPointerVisible(boolean visible); + [Throws] + void setPointerVisibleSync(boolean visible); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isPointerVisible(AsyncCallback_Boolean_Void callback_); + async boolean isPointerVisible(); + boolean isPointerVisibleSync(); + [Throws] + void setPointerColor(number color, AsyncCallback_Void callback_); + [Throws] + async void setPointerColor(number color); + [Throws] + void setPointerColorSync(number color); + [Throws] + void getPointerColor(AsyncCallback_Number_Void callback_); + [Throws] + async number getPointerColor(); + [Throws] + number getPointerColorSync(); + [Throws] + void setPointerSize(number size, AsyncCallback_Void callback_); + [Throws] + async void setPointerSize(number size); + [Throws] + void setPointerSizeSync(number size); + [Throws] + void getPointerSize(AsyncCallback_Number_Void callback_); + [Throws] + async number getPointerSize(); + [Throws] + number getPointerSizeSync(); + [Throws] + void setMousePrimaryButton(PrimaryButton primary, AsyncCallback_Void callback_); + [Throws] + async void setMousePrimaryButton(PrimaryButton primary); [Async, Synthetic] callback AsyncCallback_PrimaryButton_Void = void (PrimaryButton result); + [Throws] + void getMousePrimaryButton(AsyncCallback_PrimaryButton_Void callback_); + [Throws] + async PrimaryButton getMousePrimaryButton(); + [Throws] + void setHoverScrollState(boolean state, AsyncCallback_Void callback_); + [Throws] + async void setHoverScrollState(boolean state); + [Throws] + void getHoverScrollState(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getHoverScrollState(); + [Throws] + void setMouseScrollRows(number rows, AsyncCallback_Void callback_); + [Throws] + async void setMouseScrollRows(number rows); + [Throws] + void getMouseScrollRows(AsyncCallback_Number_Void callback_); + [Throws] + async number getMouseScrollRows(); + [Throws] + void setTouchpadScrollSwitch(boolean state, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadScrollSwitch(boolean state); + [Throws] + void getTouchpadScrollSwitch(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getTouchpadScrollSwitch(); + [Throws] + void setTouchpadScrollDirection(boolean state, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadScrollDirection(boolean state); + [Throws] + void getTouchpadScrollDirection(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getTouchpadScrollDirection(); + [Throws] + void setTouchpadTapSwitch(boolean state, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadTapSwitch(boolean state); + [Throws] + void getTouchpadTapSwitch(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getTouchpadTapSwitch(); + [Throws] + void setTouchpadPointerSpeed(number speed, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadPointerSpeed(number speed); + [Throws] + void getTouchpadPointerSpeed(AsyncCallback_Number_Void callback_); + [Throws] + async number getTouchpadPointerSpeed(); + [Throws] + void setTouchpadPinchSwitch(boolean state, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadPinchSwitch(boolean state); + [Throws] + void getTouchpadPinchSwitch(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getTouchpadPinchSwitch(); + [Throws] + void setTouchpadSwipeSwitch(boolean state, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadSwipeSwitch(boolean state); + [Throws] + void getTouchpadSwipeSwitch(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getTouchpadSwipeSwitch(); + [Throws] + void setTouchpadRightClickType(RightClickType type, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadRightClickType(RightClickType type); [Async, Synthetic] callback AsyncCallback_RightClickType_Void = void (RightClickType result); - [GlobalScope] - interface GlobalScope_pointer_ohos_multimodalInput_pointer { - - [Throws] - static void setPointerSpeed(number speed, AsyncCallback_Void callback_); - [Throws] - static async void setPointerSpeed(number speed); - [Throws] - static void setPointerSpeedSync(number speed); - [Throws] - static void getPointerSpeed(AsyncCallback_Number_Void callback_); - [Throws] - static async number getPointerSpeed(); - [Throws] - static number getPointerSpeedSync(); - [Throws] - static void setPointerStyle(number windowId, PointerStyle pointerStyle, AsyncCallback_Void callback_); - [Throws] - static async void setPointerStyle(number windowId, PointerStyle pointerStyle); - [Throws] - static void setPointerStyleSync(number windowId, PointerStyle pointerStyle); - [Throws] - static void getPointerStyle(number windowId, AsyncCallback_PointerStyle_Void callback_); - [Throws] - static async PointerStyle getPointerStyle(number windowId); - [Throws] - static PointerStyle getPointerStyleSync(number windowId); - [Throws] - static void setPointerVisible(boolean visible, AsyncCallback_Void callback_); - [Throws] - static async void setPointerVisible(boolean visible); - [Throws] - static void setPointerVisibleSync(boolean visible); - [Throws] - static void isPointerVisible(AsyncCallback_Boolean_Void callback_); - static async boolean isPointerVisible(); - static boolean isPointerVisibleSync(); - [Throws] - static void setPointerColor(number color, AsyncCallback_Void callback_); - [Throws] - static async void setPointerColor(number color); - [Throws] - static void setPointerColorSync(number color); - [Throws] - static void getPointerColor(AsyncCallback_Number_Void callback_); - [Throws] - static async number getPointerColor(); - [Throws] - static number getPointerColorSync(); - [Throws] - static void setPointerSize(number size, AsyncCallback_Void callback_); - [Throws] - static async void setPointerSize(number size); - [Throws] - static void setPointerSizeSync(number size); - [Throws] - static void getPointerSize(AsyncCallback_Number_Void callback_); - [Throws] - static async number getPointerSize(); - [Throws] - static number getPointerSizeSync(); - [Throws] - static void setMousePrimaryButton(PrimaryButton primary, AsyncCallback_Void callback_); - [Throws] - static async void setMousePrimaryButton(PrimaryButton primary); - [Throws] - static void getMousePrimaryButton(AsyncCallback_PrimaryButton_Void callback_); - [Throws] - static async PrimaryButton getMousePrimaryButton(); - [Throws] - static void setHoverScrollState(boolean state, AsyncCallback_Void callback_); - [Throws] - static async void setHoverScrollState(boolean state); - [Throws] - static void getHoverScrollState(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getHoverScrollState(); - [Throws] - static void setMouseScrollRows(number rows, AsyncCallback_Void callback_); - [Throws] - static async void setMouseScrollRows(number rows); - [Throws] - static void getMouseScrollRows(AsyncCallback_Number_Void callback_); - [Throws] - static async number getMouseScrollRows(); - [Throws] - static void setTouchpadScrollSwitch(boolean state, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadScrollSwitch(boolean state); - [Throws] - static void getTouchpadScrollSwitch(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getTouchpadScrollSwitch(); - [Throws] - static void setTouchpadScrollDirection(boolean state, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadScrollDirection(boolean state); - [Throws] - static void getTouchpadScrollDirection(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getTouchpadScrollDirection(); - [Throws] - static void setTouchpadTapSwitch(boolean state, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadTapSwitch(boolean state); - [Throws] - static void getTouchpadTapSwitch(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getTouchpadTapSwitch(); - [Throws] - static void setTouchpadPointerSpeed(number speed, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadPointerSpeed(number speed); - [Throws] - static void getTouchpadPointerSpeed(AsyncCallback_Number_Void callback_); - [Throws] - static async number getTouchpadPointerSpeed(); - [Throws] - static void setTouchpadPinchSwitch(boolean state, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadPinchSwitch(boolean state); - [Throws] - static void getTouchpadPinchSwitch(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getTouchpadPinchSwitch(); - [Throws] - static void setTouchpadSwipeSwitch(boolean state, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadSwipeSwitch(boolean state); - [Throws] - static void getTouchpadSwipeSwitch(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getTouchpadSwipeSwitch(); - [Throws] - static void setTouchpadRightClickType(RightClickType type, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadRightClickType(RightClickType type); - [Throws] - static void getTouchpadRightClickType(AsyncCallback_RightClickType_Void callback_); - [Throws] - static async RightClickType getTouchpadRightClickType(); - [Throws] - static async void setCustomCursor(number windowId, image.PixelMap pixelMap, optional number focusX, optional number focusY); - [Throws] - static void setCustomCursorSync(number windowId, image.PixelMap pixelMap, optional number focusX, optional number focusY); - [Throws] - static async void setCustomCursor(number windowId, CustomCursor cursor, CursorConfig config); - [Throws] - static void setTouchpadDoubleTapAndDragState(boolean isOpen, AsyncCallback_Void callback_); - [Throws] - static async void setTouchpadDoubleTapAndDragState(boolean isOpen); - [Throws] - static void getTouchpadDoubleTapAndDragState(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getTouchpadDoubleTapAndDragState(); - - }; - + [Throws] + void getTouchpadRightClickType(AsyncCallback_RightClickType_Void callback_); + [Throws] + async RightClickType getTouchpadRightClickType(); + [Throws] + async void setCustomCursor(number windowId, image.PixelMap pixelMap, optional number focusX, optional number focusY); + [Throws] + void setCustomCursorSync(number windowId, image.PixelMap pixelMap, optional number focusX, optional number focusY); + [Throws] + async void setCustomCursor(number windowId, CustomCursor cursor, CursorConfig config); + [Throws] + void setTouchpadDoubleTapAndDragState(boolean isOpen, AsyncCallback_Void callback_); + [Throws] + async void setTouchpadDoubleTapAndDragState(boolean isOpen); + [Throws] + void getTouchpadDoubleTapAndDragState(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getTouchpadDoubleTapAndDragState(); }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.shortKey.idl b/idl/@ohos.multimodalInput.shortKey.idl index bf4852a..5bb81e8 100644 --- a/idl/@ohos.multimodalInput.shortKey.idl +++ b/idl/@ohos.multimodalInput.shortKey.idl @@ -1,34 +1,24 @@ -package ohos.multimodalInput; +package ohos.multimodalInput.shortKey; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace shortKey { - [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_shortKey_ohos_multimodalInput_shortKey { - - [Throws] - static void setKeyDownDuration(String businessKey, number delay, AsyncCallback_Void callback_); - [Throws] - static async void setKeyDownDuration(String businessKey, number delay); - - }; - + [Throws] + void setKeyDownDuration(String businessKey, number delay, AsyncCallback_Void callback_); + [Throws] + async void setKeyDownDuration(String businessKey, number delay); }; dictionary FingerprintAction { - number DOWN = 0; number UP = 1; number SLIDE = 2; number RETOUCH = 3; number CLICK = 4; - }; [Entity=Interface] interface FingerprintEvent { - attribute FingerprintAction action; attribute number distanceX; attribute number distanceY; - }; \ No newline at end of file diff --git a/idl/@ohos.multimodalInput.touchEvent.idl b/idl/@ohos.multimodalInput.touchEvent.idl index 24b3e0c..364d3f9 100644 --- a/idl/@ohos.multimodalInput.touchEvent.idl +++ b/idl/@ohos.multimodalInput.touchEvent.idl @@ -1,15 +1,12 @@ package ohos.multimodalInput.touchEvent; -import ohos.multimodalInput.InputEvent as InputEvent; +import ohos.multimodalInput.inputEvent.InputEvent as InputEvent; dictionary Action { - number CANCEL = 0; number DOWN = 1; number MOVE = 2; number UP = 3; - }; dictionary ToolType { - number FINGER = 0; number PEN = 1; number RUBBER = 2; @@ -18,24 +15,18 @@ dictionary ToolType { number AIRBRUSH = 5; number MOUSE = 6; number LENS = 7; - }; dictionary SourceType { - number TOUCH_SCREEN = 0; number PEN = 1; number TOUCH_PAD = 2; - }; dictionary FixedMode { - number NONE = 0; - number ONE_HAND = 1; - + number AUTO = 1; }; [Entity=Interface] interface Touch { - attribute number id; attribute number pressedTime; attribute number screenX; @@ -58,16 +49,19 @@ interface Touch { attribute number fixedDisplayX; [Optional] attribute number fixedDisplayY; - + [Optional] + attribute number globalX; + [Optional] + attribute number globalY; }; [Entity=Interface] interface TouchEvent: InputEvent { - attribute Action action; attribute Touch touch; attribute sequence touches; attribute SourceType sourceType; [Optional] attribute FixedMode fixedMode; - + [Optional] + attribute boolean isInject; }; \ No newline at end of file diff --git a/idl/@ohos.net.connection.idl b/idl/@ohos.net.connection.idl index f035684..3d24c24 100644 --- a/idl/@ohos.net.connection.idl +++ b/idl/@ohos.net.connection.idl @@ -1,29 +1,136 @@ -package ohos.net; +package ohos.net.connection; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.http as http; -import ohos.net.socket as socket; +import ohos.net.http.default as http; +import ohos.net.socket.default as socket; +[DefaultExport] namespace connection { - typedef http.HttpRequest HttpRequest; typedef socket.TCPSocket TCPSocket; typedef socket.UDPSocket UDPSocket; + NetConnection createNetConnection(optional NetSpecifier netSpecifier, optional number timeout); [Async, Synthetic] callback AsyncCallback_NetHandle_Void = void (NetHandle result); + [Throws] + void getDefaultNet(AsyncCallback_NetHandle_Void callback_); + [Throws] + async NetHandle getDefaultNet(); + [Throws] + NetHandle getDefaultNetSync(); [Async, Synthetic] callback AsyncCallback_Array_NetHandle_Void = void (sequence result); + [Throws] + void getAllNets(AsyncCallback_Array_NetHandle_Void callback_); + [Throws] + async sequence getAllNets(); + [Throws] + sequence getAllNetsSync(); [Async, Synthetic] callback AsyncCallback_ConnectionProperties_Void = void (ConnectionProperties result); + [Throws] + void getConnectionProperties(NetHandle netHandle, AsyncCallback_ConnectionProperties_Void callback_); + [Throws] + async ConnectionProperties getConnectionProperties(NetHandle netHandle); + [Throws] + ConnectionProperties getConnectionPropertiesSync(NetHandle netHandle); [Async, Synthetic] callback AsyncCallback_NetCapabilities_Void = void (NetCapabilities result); + [Throws] + void getNetCapabilities(NetHandle netHandle, AsyncCallback_NetCapabilities_Void callback_); + [Throws] + async NetCapabilities getNetCapabilities(NetHandle netHandle); + [Throws] + NetCapabilities getNetCapabilitiesSync(NetHandle netHandle); + [Throws] + async void setNetExtAttribute(NetHandle netHandle, String netExtAttribute); + [Throws] + void setNetExtAttributeSync(NetHandle netHandle, String netExtAttribute); + [Throws] + async String getNetExtAttribute(NetHandle netHandle); + [Throws] + String getNetExtAttributeSync(NetHandle netHandle); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isDefaultNetMetered(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isDefaultNetMetered(); + [Throws] + boolean isDefaultNetMeteredSync(); + [Throws] + void hasDefaultNet(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean hasDefaultNet(); + [Throws] + boolean hasDefaultNetSync(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void enableAirplaneMode(AsyncCallback_Void callback_); + [Throws] + async void enableAirplaneMode(); + [Throws] + void disableAirplaneMode(AsyncCallback_Void callback_); + [Throws] + async void disableAirplaneMode(); + [Throws] + void reportNetConnected(NetHandle netHandle, AsyncCallback_Void callback_); + [Throws] + async void reportNetConnected(NetHandle netHandle); + [Throws] + void reportNetDisconnected(NetHandle netHandle, AsyncCallback_Void callback_); + [Throws] + async void reportNetDisconnected(NetHandle netHandle); [Async, Synthetic] callback AsyncCallback_Array_NetAddress_Void = void (sequence result); + [Throws] + void getAddressesByName(String host, AsyncCallback_Array_NetAddress_Void callback_); + [Throws] + async sequence getAddressesByName(String host); + [Throws] + void getAppNet(AsyncCallback_NetHandle_Void callback_); + [Throws] + async NetHandle getAppNet(); + [Throws] + NetHandle getAppNetSync(); + [Throws] + void setAppNet(NetHandle netHandle, AsyncCallback_Void callback_); + [Throws] + async void setAppNet(NetHandle netHandle); [Async, Synthetic] callback AsyncCallback_HttpProxy_Void = void (HttpProxy result); + [Throws] + void getDefaultHttpProxy(AsyncCallback_HttpProxy_Void callback_); + [Throws] + async HttpProxy getDefaultHttpProxy(); + [Throws] + void getGlobalHttpProxy(AsyncCallback_HttpProxy_Void callback_); + [Throws] + async HttpProxy getGlobalHttpProxy(); + [Throws] + void setAppHttpProxy(HttpProxy httpProxy); + [Throws] + void setGlobalHttpProxy(HttpProxy httpProxy, AsyncCallback_Void callback_); + [Throws] + async void setGlobalHttpProxy(HttpProxy httpProxy); + [Throws] + void setPacUrl(String pacUrl); + [Throws] + String getPacUrl(); + [Throws] + void addCustomDnsRule(String host, sequence ip, AsyncCallback_Void callback_); + [Throws] + async void addCustomDnsRule(String host, sequence ip); + [Throws] + void removeCustomDnsRule(String host, AsyncCallback_Void callback_); + [Throws] + async void removeCustomDnsRule(String host); + [Throws] + void clearCustomDnsRules(AsyncCallback_Void callback_); + [Throws] + async void clearCustomDnsRules(); + [Throws] + async void factoryReset(); [Synthetic] callback Callback_NetHandle_Void = void (NetHandle parameter); [Synthetic] @@ -36,7 +143,6 @@ namespace connection { callback Callback_Void = void (); [Entity=Interface] interface NetConnection { - [DtsName="on", DtsTag="'netAvailable'"] void onNetAvailable(Callback_NetHandle_Void callback_); [DtsName="on", DtsTag="'netBlockStatusChange'"] @@ -53,28 +159,22 @@ namespace connection { void register(AsyncCallback_Void callback_); [Throws] void unregister(AsyncCallback_Void callback_); - }; [Entity=Interface] interface NetSpecifier { - attribute NetCapabilities netCapabilities; [Optional] attribute String bearerPrivateIdentifier; - }; [Entity=Interface] interface NetCapabilityInfo { - attribute NetHandle netHandle; attribute NetCapabilities netCap; - }; [Async, Synthetic] callback AsyncCallback_NetAddress_Void = void (NetAddress result); [Entity=Interface] interface NetHandle { - attribute number netId; [Throws] void bindSocket((TCPSocket or UDPSocket) socketParam, AsyncCallback_Void callback_); @@ -88,11 +188,9 @@ namespace connection { void getAddressByName(String host, AsyncCallback_NetAddress_Void callback_); [Throws] async NetAddress getAddressByName(String host); - }; [Entity=Interface] interface NetCapabilities { - [Optional] attribute number linkUpBandwidthKbps; [Optional] @@ -100,24 +198,18 @@ namespace connection { [Optional] attribute sequence networkCap; attribute sequence bearerTypes; - }; [Entity=Interface] interface NetConnectionPropertyInfo { - attribute NetHandle netHandle; attribute ConnectionProperties connectionProperties; - }; [Entity=Interface] interface NetBlockStatusInfo { - attribute NetHandle netHandle; attribute boolean blocked; - }; dictionary NetCap { - number NET_CAPABILITY_MMS = 0; number NET_CAPABILITY_NOT_METERED = 11; number NET_CAPABILITY_INTERNET = 12; @@ -125,59 +217,49 @@ namespace connection { number NET_CAPABILITY_VALIDATED = 16; number NET_CAPABILITY_PORTAL = 17; number NET_CAPABILITY_CHECKING_CONNECTIVITY = 31; - }; dictionary NetBearType { - number BEARER_CELLULAR = 0; number BEARER_WIFI = 1; number BEARER_BLUETOOTH = 2; number BEARER_ETHERNET = 3; number BEARER_VPN = 4; - }; [Entity=Interface] interface ConnectionProperties { - attribute String interfaceName; attribute String domains; attribute sequence linkAddresses; attribute sequence dnses; attribute sequence routes; attribute number mtu; - }; [Entity=Interface] interface RouteInfo { - [DtsName="interface"] attribute String interface_; attribute LinkAddress destination; attribute NetAddress gateway; attribute boolean hasGateway; attribute boolean isDefaultRoute; - + [Optional] + attribute boolean isExcludedRoute; }; [Entity=Interface] interface LinkAddress { - attribute NetAddress address; attribute number prefixLength; - }; [Entity=Interface] interface NetAddress { - attribute String address; [Optional] attribute number family; [Optional] attribute number port; - }; [Entity=Interface] interface HttpProxy { - attribute String host; attribute number port; [Optional] @@ -185,111 +267,5 @@ namespace connection { [Optional] attribute String password; attribute sequence exclusionList; - - }; - [GlobalScope] - interface GlobalScope_connection_ohos_net_connection { - - static NetConnection createNetConnection(optional NetSpecifier netSpecifier, optional number timeout); - [Throws] - static void getDefaultNet(AsyncCallback_NetHandle_Void callback_); - [Throws] - static async NetHandle getDefaultNet(); - [Throws] - static NetHandle getDefaultNetSync(); - [Throws] - static void getAllNets(AsyncCallback_Array_NetHandle_Void callback_); - [Throws] - static async sequence getAllNets(); - [Throws] - static sequence getAllNetsSync(); - [Throws] - static void getConnectionProperties(NetHandle netHandle, AsyncCallback_ConnectionProperties_Void callback_); - [Throws] - static async ConnectionProperties getConnectionProperties(NetHandle netHandle); - [Throws] - static ConnectionProperties getConnectionPropertiesSync(NetHandle netHandle); - [Throws] - static void getNetCapabilities(NetHandle netHandle, AsyncCallback_NetCapabilities_Void callback_); - [Throws] - static async NetCapabilities getNetCapabilities(NetHandle netHandle); - [Throws] - static NetCapabilities getNetCapabilitiesSync(NetHandle netHandle); - [Throws] - static void isDefaultNetMetered(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isDefaultNetMetered(); - [Throws] - static boolean isDefaultNetMeteredSync(); - [Throws] - static void hasDefaultNet(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean hasDefaultNet(); - [Throws] - static boolean hasDefaultNetSync(); - [Throws] - static void enableAirplaneMode(AsyncCallback_Void callback_); - [Throws] - static async void enableAirplaneMode(); - [Throws] - static void disableAirplaneMode(AsyncCallback_Void callback_); - [Throws] - static async void disableAirplaneMode(); - [Throws] - static void reportNetConnected(NetHandle netHandle, AsyncCallback_Void callback_); - [Throws] - static async void reportNetConnected(NetHandle netHandle); - [Throws] - static void reportNetDisconnected(NetHandle netHandle, AsyncCallback_Void callback_); - [Throws] - static async void reportNetDisconnected(NetHandle netHandle); - [Throws] - static void getAddressesByName(String host, AsyncCallback_Array_NetAddress_Void callback_); - [Throws] - static async sequence getAddressesByName(String host); - [Throws] - static void getAppNet(AsyncCallback_NetHandle_Void callback_); - [Throws] - static async NetHandle getAppNet(); - [Throws] - static NetHandle getAppNetSync(); - [Throws] - static void setAppNet(NetHandle netHandle, AsyncCallback_Void callback_); - [Throws] - static async void setAppNet(NetHandle netHandle); - [Throws] - static void getDefaultHttpProxy(AsyncCallback_HttpProxy_Void callback_); - [Throws] - static async HttpProxy getDefaultHttpProxy(); - [Throws] - static void getGlobalHttpProxy(AsyncCallback_HttpProxy_Void callback_); - [Throws] - static async HttpProxy getGlobalHttpProxy(); - [Throws] - static void setAppHttpProxy(HttpProxy httpProxy); - [Throws] - static void setGlobalHttpProxy(HttpProxy httpProxy, AsyncCallback_Void callback_); - [Throws] - static async void setGlobalHttpProxy(HttpProxy httpProxy); - [Throws] - static void setPacUrl(String pacUrl); - [Throws] - static String getPacUrl(); - [Throws] - static void addCustomDnsRule(String host, sequence ip, AsyncCallback_Void callback_); - [Throws] - static async void addCustomDnsRule(String host, sequence ip); - [Throws] - static void removeCustomDnsRule(String host, AsyncCallback_Void callback_); - [Throws] - static async void removeCustomDnsRule(String host); - [Throws] - static void clearCustomDnsRules(AsyncCallback_Void callback_); - [Throws] - static async void clearCustomDnsRules(); - [Throws] - static async void factoryReset(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.eap.idl b/idl/@ohos.net.eap.idl new file mode 100644 index 0000000..1990568 --- /dev/null +++ b/idl/@ohos.net.eap.idl @@ -0,0 +1,67 @@ +package ohos.net.eap; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace eap { + [Synthetic] + callback Callback_EapData_Void = void (EapData parameter); + [Throws] + void regCustomEapHandler(number netType, number eapCode, number eapType, Callback_EapData_Void callback_); + [Throws] + void unregCustomEapHandler(number netType, number eapCode, number eapType, Callback_EapData_Void callback_); + [Throws] + void replyCustomEapData(CustomResult result, EapData data); + [Throws] + void startEthEap(number netId, EthEapProfile profile); + [Throws] + void logOffEthEap(number netId); + [Entity=Interface] + interface EapData { + attribute number msgId; + attribute buffer eapBuffer; + attribute number bufferLen; + }; + dictionary CustomResult { + number RESULT_FAIL = 0; + number RESULT_NEXT = 1; + number RESULT_FINISH = 2; + }; + dictionary EapMethod { + number EAP_NONE = 0; + number EAP_PEAP = 1; + number EAP_TLS = 2; + number EAP_TTLS = 3; + number EAP_PWD = 4; + number EAP_SIM = 5; + number EAP_AKA = 6; + number EAP_AKA_PRIME = 7; + number EAP_UNAUTH_TLS = 8; + }; + dictionary Phase2Method { + number PHASE2_NONE = 0; + number PHASE2_PAP = 1; + number PHASE2_MSCHAP = 2; + number PHASE2_MSCHAPV2 = 3; + number PHASE2_GTC = 4; + number PHASE2_SIM = 5; + number PHASE2_AKA = 6; + number PHASE2_AKA_PRIME = 7; + }; + [Entity=Interface] + interface EthEapProfile { + attribute EapMethod eapMethod; + attribute Phase2Method phase2Method; + attribute String identity; + attribute String anonymousIdentity; + attribute String password; + attribute String caCertAliases; + attribute String caPath; + attribute String clientCertAliases; + attribute buffer certEntry; + attribute String certPassword; + attribute String altSubjectMatch; + attribute String domainSuffixMatch; + attribute String realm; + attribute String plmn; + attribute number eapSubId; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.net.ethernet.idl b/idl/@ohos.net.ethernet.idl index c7d5814..848c88e 100644 --- a/idl/@ohos.net.ethernet.idl +++ b/idl/@ohos.net.ethernet.idl @@ -1,23 +1,46 @@ -package ohos.net; +package ohos.net.ethernet; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; +import ohos.net.connection.default as connection; +[DefaultExport] namespace ethernet { - typedef connection.HttpProxy HttpProxy; [Async, Synthetic] callback AsyncCallback_InterfaceConfiguration_Void = void (InterfaceConfiguration result); + [Throws] + void getIfaceConfig(String iface, AsyncCallback_InterfaceConfiguration_Void callback_); + [Throws] + async InterfaceConfiguration getIfaceConfig(String iface); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setIfaceConfig(String iface, InterfaceConfiguration ic, AsyncCallback_Void callback_); + [Throws] + async void setIfaceConfig(String iface, InterfaceConfiguration ic); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void isIfaceActive(String iface, AsyncCallback_Number_Void callback_); + [Throws] + async number isIfaceActive(String iface); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void getAllActiveIfaces(AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getAllActiveIfaces(); [Synthetic] callback Callback_InterfaceStateInfo_Void = void (InterfaceStateInfo parameter); + [Throws, DtsName="on", DtsTag="'interfaceStateChange'"] + void onInterfaceStateChange(Callback_InterfaceStateInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'interfaceStateChange'"] + void offInterfaceStateChange(optional Callback_InterfaceStateInfo_Void callback_); + [Throws] + async sequence getMacAddress(); + [Throws] + async sequence getEthernetDeviceInfos(); [Entity=Interface] interface InterfaceConfiguration { - attribute IPSetMode mode; attribute String ipAddr; attribute String route; @@ -26,56 +49,35 @@ namespace ethernet { attribute String dnsServers; [Optional] attribute HttpProxy httpProxy; - }; [Entity=Interface] interface InterfaceStateInfo { - attribute String iface; attribute boolean active; - }; dictionary IPSetMode { - number STATIC = 0; number DHCP = 1; number LAN_STATIC = 2; number LAN_DHCP = 3; - }; [Entity=Interface] interface MacAddressInfo { - attribute String iface; attribute String macAddress; - }; - [GlobalScope] - interface GlobalScope_ethernet_ohos_net_ethernet { - - [Throws] - static void getIfaceConfig(String iface, AsyncCallback_InterfaceConfiguration_Void callback_); - [Throws] - static async InterfaceConfiguration getIfaceConfig(String iface); - [Throws] - static void setIfaceConfig(String iface, InterfaceConfiguration ic, AsyncCallback_Void callback_); - [Throws] - static async void setIfaceConfig(String iface, InterfaceConfiguration ic); - [Throws] - static void isIfaceActive(String iface, AsyncCallback_Number_Void callback_); - [Throws] - static async number isIfaceActive(String iface); - [Throws] - static void getAllActiveIfaces(AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getAllActiveIfaces(); - [Throws, DtsName="on", DtsTag="'interfaceStateChange'"] - static void onInterfaceStateChange(Callback_InterfaceStateInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'interfaceStateChange'"] - static void offInterfaceStateChange(optional Callback_InterfaceStateInfo_Void callback_); - [Throws] - static async sequence getMacAddress(); - + [Entity=Interface] + interface EthernetDeviceInfos { + attribute String ifaceName; + attribute String deviceName; + attribute DeviceConnectionType connectionMode; + attribute String supplierName; + attribute String supplierId; + attribute String productName; + attribute String maximumRate; + }; + dictionary DeviceConnectionType { + number BUILT_IN = 0; + number EXTERNAL = 1; }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.http.idl b/idl/@ohos.net.http.idl index fa44145..42f6185 100644 --- a/idl/@ohos.net.http.idl +++ b/idl/@ohos.net.http.idl @@ -1,20 +1,18 @@ -package ohos.net; +package ohos.net.http; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; +import ohos.net.connection.default as connection; +[DefaultExport] namespace http { - typedef connection.HttpProxy HttpProxy; + HttpRequest createHttp(); dictionary AddressFamily { - String DEFAULT = "CURL_IPRESOLVE_WHATEVER"; String ONLY_V4 = "CURL_IPRESOLVE_V4"; String ONLY_V6 = "CURL_IPRESOLVE_V6"; - }; [Entity=Interface] interface HttpRequestOptions { - [Optional] attribute RequestMethod method; [Optional] @@ -38,6 +36,8 @@ namespace http { [Optional] attribute String caPath; [Optional] + attribute String caData; + [Optional] attribute number resumeFrom; [Optional] attribute number resumeTo; @@ -61,34 +61,27 @@ namespace http { attribute ServerAuthentication serverAuthentication; [Optional] attribute AddressFamily addressFamily; - }; [Entity=Interface] interface ServerAuthentication { - attribute Credential credential; [Optional] attribute AuthenticationType authenticationType; - }; typedef (String or TlsConfig) TlsOptions; typedef String RemoteValidation; typedef String AuthenticationType; [Entity=Interface] interface Credential { - attribute String username; attribute String password; - }; [Entity=Interface] interface TlsConfig { - attribute TlsVersion tlsVersionMin; attribute TlsVersion tlsVersionMax; [Optional] attribute sequence cipherSuites; - }; typedef String TlsV13SpecificCipherSuite; typedef String TlsV12SpecificCipherSuite; @@ -99,16 +92,13 @@ namespace http { typedef TlsV10CipherSuite TlsV11CipherSuite; typedef TlsV10SpecificCipherSuite TlsV10CipherSuite; dictionary TlsVersion { - number TLS_V_1_0 = 4; number TLS_V_1_1 = 5; number TLS_V_1_2 = 6; number TLS_V_1_3 = 7; - }; [Entity=Interface] interface MultiFormData { - attribute String name; attribute String contentType; [Optional] @@ -117,32 +107,25 @@ namespace http { attribute (String or Object or buffer) data; [Optional] attribute String filePath; - }; dictionary CertType { - String PEM = "PEM"; String DER = "DER"; String P12 = "P12"; - }; [Entity=Interface] interface ClientCert { - attribute String certPath; [Optional] attribute CertType certType; attribute String keyPath; [Optional] attribute String keyPassword; - }; [Entity=Interface] interface CertificatePinning { - attribute String publicKeyHash; attribute String hashAlgorithm; - }; [Async, Synthetic] callback AsyncCallback_HttpResponse_Void = void (HttpResponse result); @@ -162,7 +145,6 @@ namespace http { callback Callback_DataSendProgressInfo_Void = void (DataSendProgressInfo parameter); [Entity=Interface] interface HttpRequest { - [Throws] void request(String url, AsyncCallback_HttpResponse_Void callback_); [Throws] @@ -178,34 +160,32 @@ namespace http { void destroy(); [Deprecated, DtsName="on", DtsTag="'headerReceive'"] void onHeaderReceive(AsyncCallback_Object_Void callback_); - [Deprecated, DtsName="off", DtsTag="'headerReceive'"] - void offHeaderReceive(optional AsyncCallback_Object_Void callback_); [DtsName="on", DtsTag="'headersReceive'"] void onHeadersReceive(Callback_Object_Void callback_); - [DtsName="off", DtsTag="'headersReceive'"] - void offHeadersReceive(optional Callback_Object_Void callback_); - [DtsName="once", DtsTag="'headersReceive'"] - void onceHeadersReceive(Callback_Object_Void callback_); [DtsName="on", DtsTag="'dataReceive'"] void onDataReceive(Callback_Buffer_Void callback_); - [DtsName="off", DtsTag="'dataReceive'"] - void offDataReceive(optional Callback_Buffer_Void callback_); [DtsName="on", DtsTag="'dataEnd'"] void onDataEnd(Callback_Void callback_); - [DtsName="off", DtsTag="'dataEnd'"] - void offDataEnd(optional Callback_Void callback_); [DtsName="on", DtsTag="'dataReceiveProgress'"] void onDataReceiveProgress(Callback_DataReceiveProgressInfo_Void callback_); - [DtsName="off", DtsTag="'dataReceiveProgress'"] - void offDataReceiveProgress(optional Callback_DataReceiveProgressInfo_Void callback_); [DtsName="on", DtsTag="'dataSendProgress'"] void onDataSendProgress(Callback_DataSendProgressInfo_Void callback_); + [Deprecated, DtsName="off", DtsTag="'headerReceive'"] + void offHeaderReceive(optional AsyncCallback_Object_Void callback_); + [DtsName="off", DtsTag="'headersReceive'"] + void offHeadersReceive(optional Callback_Object_Void callback_); + [DtsName="off", DtsTag="'dataReceive'"] + void offDataReceive(optional Callback_Buffer_Void callback_); + [DtsName="off", DtsTag="'dataEnd'"] + void offDataEnd(optional Callback_Void callback_); + [DtsName="off", DtsTag="'dataReceiveProgress'"] + void offDataReceiveProgress(optional Callback_DataReceiveProgressInfo_Void callback_); [DtsName="off", DtsTag="'dataSendProgress'"] void offDataSendProgress(optional Callback_DataSendProgressInfo_Void callback_); - + [DtsName="once", DtsTag="'headersReceive'"] + void onceHeadersReceive(Callback_Object_Void callback_); }; dictionary RequestMethod { - String OPTIONS = "OPTIONS"; String GET = "GET"; String HEAD = "HEAD"; @@ -214,10 +194,8 @@ namespace http { String DELETE = "DELETE"; String TRACE = "TRACE"; String CONNECT = "CONNECT"; - }; dictionary ResponseCode { - number OK = 200; number CREATED = 201; number ACCEPTED = 202; @@ -254,36 +232,28 @@ namespace http { number UNAVAILABLE = 503; number GATEWAY_TIMEOUT = 504; number VERSION = 505; - }; dictionary HttpProtocol { - number HTTP1_1 = 0; number HTTP2 = 1; number HTTP3 = 2; - }; dictionary HttpDataType { - number STRING = 0; number OBJECT = 1; number ARRAY_BUFFER = 2; - }; [Entity=Interface] interface HttpResponse { - attribute (String or Object or buffer) result; attribute HttpDataType resultType; attribute (ResponseCode or number) responseCode; attribute Object header; attribute String cookies; attribute PerformanceTiming performanceTiming; - }; [Entity=Interface] interface PerformanceTiming { - attribute number dnsTiming; attribute number tcpTiming; attribute number tlsTiming; @@ -294,39 +264,25 @@ namespace http { attribute number responseHeaderTiming; attribute number responseBodyTiming; attribute number totalTiming; - }; [Entity=Interface] interface DataReceiveProgressInfo { - attribute number receiveSize; attribute number totalSize; - }; [Entity=Interface] interface DataSendProgressInfo { - attribute number sendSize; attribute number totalSize; - }; + HttpResponseCache createHttpResponseCache(optional number cacheSize); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface HttpResponseCache { - void flush(AsyncCallback_Void callback_); async void flush(); void delete(AsyncCallback_Void callback_); async void delete(); - - }; - [GlobalScope] - interface GlobalScope_http_ohos_net_http { - - static HttpRequest createHttp(); - static HttpResponseCache createHttpResponseCache(optional number cacheSize); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.mdns.idl b/idl/@ohos.net.mdns.idl index e70dad1..1c1f965 100644 --- a/idl/@ohos.net.mdns.idl +++ b/idl/@ohos.net.mdns.idl @@ -1,43 +1,54 @@ -package ohos.net; +package ohos.net.mdns; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; -import application.Context as Context; +import ohos.net.connection.default as connection; +import application.Context.default as Context; +[DefaultExport] namespace mdns { - typedef connection.NetAddress NetAddress; [Async, Synthetic] callback AsyncCallback_LocalServiceInfo_Void = void (LocalServiceInfo result); + [Throws] + void addLocalService(Context context, LocalServiceInfo serviceInfo, AsyncCallback_LocalServiceInfo_Void callback_); + [Throws] + async LocalServiceInfo addLocalService(Context context, LocalServiceInfo serviceInfo); + [Throws] + void removeLocalService(Context context, LocalServiceInfo serviceInfo, AsyncCallback_LocalServiceInfo_Void callback_); + [Throws] + async LocalServiceInfo removeLocalService(Context context, LocalServiceInfo serviceInfo); + [Throws] + DiscoveryService createDiscoveryService(Context context, String serviceType); + [Throws] + void resolveLocalService(Context context, LocalServiceInfo serviceInfo, AsyncCallback_LocalServiceInfo_Void callback_); + [Throws] + async LocalServiceInfo resolveLocalService(Context context, LocalServiceInfo serviceInfo); [Synthetic] callback Callback_DiscoveryEventInfo_Void = void (DiscoveryEventInfo parameter); [Synthetic] callback Callback_LocalServiceInfo_Void = void (LocalServiceInfo parameter); [Entity=Interface] interface DiscoveryService { - [DtsName="on", DtsTag="'discoveryStart'"] void onDiscoveryStart(Callback_DiscoveryEventInfo_Void callback_); - [DtsName="off", DtsTag="'discoveryStart'"] - void offDiscoveryStart(optional Callback_DiscoveryEventInfo_Void callback_); [DtsName="on", DtsTag="'discoveryStop'"] void onDiscoveryStop(Callback_DiscoveryEventInfo_Void callback_); - [DtsName="off", DtsTag="'discoveryStop'"] - void offDiscoveryStop(optional Callback_DiscoveryEventInfo_Void callback_); [DtsName="on", DtsTag="'serviceFound'"] void onServiceFound(Callback_LocalServiceInfo_Void callback_); - [DtsName="off", DtsTag="'serviceFound'"] - void offServiceFound(optional Callback_LocalServiceInfo_Void callback_); [DtsName="on", DtsTag="'serviceLost'"] void onServiceLost(Callback_LocalServiceInfo_Void callback_); + [DtsName="off", DtsTag="'discoveryStart'"] + void offDiscoveryStart(optional Callback_DiscoveryEventInfo_Void callback_); + [DtsName="off", DtsTag="'discoveryStop'"] + void offDiscoveryStop(optional Callback_DiscoveryEventInfo_Void callback_); + [DtsName="off", DtsTag="'serviceFound'"] + void offServiceFound(optional Callback_LocalServiceInfo_Void callback_); [DtsName="off", DtsTag="'serviceLost'"] void offServiceLost(optional Callback_LocalServiceInfo_Void callback_); void startSearchingMDNS(); void stopSearchingMDNS(); - }; [Entity=Interface] interface LocalServiceInfo { - attribute String serviceType; attribute String serviceName; [Optional] @@ -46,48 +57,21 @@ namespace mdns { attribute NetAddress host; [Optional] attribute sequence serviceAttribute; - }; [Entity=Interface] interface ServiceAttribute { - attribute String key; attribute sequence value; - }; [Entity=Interface] interface DiscoveryEventInfo { - attribute LocalServiceInfo serviceInfo; [Optional] attribute MdnsError errorCode; - }; dictionary MdnsError { - number INTERNAL_ERROR = 0; number ALREADY_ACTIVE = 1; number MAX_LIMIT = 2; - - }; - [GlobalScope] - interface GlobalScope_mdns_ohos_net_mdns { - - [Throws] - static void addLocalService(Context context, LocalServiceInfo serviceInfo, AsyncCallback_LocalServiceInfo_Void callback_); - [Throws] - static async LocalServiceInfo addLocalService(Context context, LocalServiceInfo serviceInfo); - [Throws] - static void removeLocalService(Context context, LocalServiceInfo serviceInfo, AsyncCallback_LocalServiceInfo_Void callback_); - [Throws] - static async LocalServiceInfo removeLocalService(Context context, LocalServiceInfo serviceInfo); - [Throws] - static DiscoveryService createDiscoveryService(Context context, String serviceType); - [Throws] - static void resolveLocalService(Context context, LocalServiceInfo serviceInfo, AsyncCallback_LocalServiceInfo_Void callback_); - [Throws] - static async LocalServiceInfo resolveLocalService(Context context, LocalServiceInfo serviceInfo); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.netFirewall.idl b/idl/@ohos.net.netFirewall.idl index 81516a8..1a11aad 100644 --- a/idl/@ohos.net.netFirewall.idl +++ b/idl/@ohos.net.netFirewall.idl @@ -1,48 +1,51 @@ -package ohos.net; +package ohos.net.netFirewall; +[DefaultExport] namespace netFirewall { - + [Throws] + async void setNetFirewallPolicy(number userId, NetFirewallPolicy policy); + [Throws] + async NetFirewallPolicy getNetFirewallPolicy(number userId); + [Throws] + async number addNetFirewallRule(NetFirewallRule rule); + [Throws] + async void updateNetFirewallRule(NetFirewallRule rule); + [Throws] + async void removeNetFirewallRule(number userId, number ruleId); + [Throws] + async FirewallRulePage getNetFirewallRules(number userId, RequestParam requestParam); + [Throws] + async NetFirewallRule getNetFirewallRule(number userId, number ruleId); + [Throws] + async InterceptedRecordPage getInterceptedRecords(number userId, RequestParam requestParam); dictionary NetFirewallRuleDirection { - number RULE_IN = 1; number RULE_OUT = 2; - }; dictionary FirewallRuleAction { - number RULE_ALLOW = 0; number RULE_DENY = 1; - }; dictionary NetFirewallRuleType { - number RULE_IP = 1; number RULE_DOMAIN = 2; number RULE_DNS = 3; - }; dictionary NetFirewallOrderField { - number ORDER_BY_RULE_NAME = 1; number ORDER_BY_RECORD_TIME = 100; - }; dictionary NetFirewallOrderType { - number ORDER_ASC = 1; number ORDER_DESC = 100; - }; [Entity=Interface] interface NetFirewallPolicy { - attribute boolean isOpen; attribute FirewallRuleAction inAction; attribute FirewallRuleAction outAction; - }; [Entity=Interface] interface NetFirewallIpParams { - attribute number type; [Optional] attribute number family; @@ -54,33 +57,25 @@ namespace netFirewall { attribute String startIp; [Optional] attribute String endIp; - }; [Entity=Interface] interface NetFirewallPortParams { - attribute number startPort; attribute number endPort; - }; [Entity=Interface] interface NetFirewallDomainParams { - attribute boolean isWildcard; attribute String domain; - }; [Entity=Interface] interface NetFirewallDnsParams { - attribute String primaryDns; [Optional] attribute String standbyDns; - }; [Entity=Interface] interface NetFirewallRule { - attribute number userId; attribute String name; attribute NetFirewallRuleDirection direction; @@ -107,11 +102,9 @@ namespace netFirewall { attribute sequence domains; [Optional] attribute NetFirewallDnsParams dns; - }; [Entity=Interface] interface InterceptedRecord { - attribute number time; [Optional] attribute String localIp; @@ -127,55 +120,26 @@ namespace netFirewall { attribute number appUid; [Optional] attribute String domain; - }; [Entity=Interface] interface RequestParam { - attribute number page; attribute number pageSize; attribute NetFirewallOrderField orderField; attribute NetFirewallOrderType orderType; - }; [Entity=Interface] interface FirewallRulePage { - attribute number page; attribute number pageSize; attribute number totalPage; attribute sequence data; - }; [Entity=Interface] interface InterceptedRecordPage { - attribute number page; attribute number pageSize; attribute number totalPage; attribute sequence data; - }; - [GlobalScope] - interface GlobalScope_netFirewall_ohos_net_netFirewall { - - [Throws] - static async void setNetFirewallPolicy(number userId, NetFirewallPolicy policy); - [Throws] - static async NetFirewallPolicy getNetFirewallPolicy(number userId); - [Throws] - static async number addNetFirewallRule(NetFirewallRule rule); - [Throws] - static async void updateNetFirewallRule(NetFirewallRule rule); - [Throws] - static async void removeNetFirewallRule(number userId, number ruleId); - [Throws] - static async FirewallRulePage getNetFirewallRules(number userId, RequestParam requestParam); - [Throws] - static async NetFirewallRule getNetFirewallRule(number userId, number ruleId); - [Throws] - static async InterceptedRecordPage getInterceptedRecords(number userId, RequestParam requestParam); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.networkSecurity.idl b/idl/@ohos.net.networkSecurity.idl index bb6cf7a..9a46a15 100644 --- a/idl/@ohos.net.networkSecurity.idl +++ b/idl/@ohos.net.networkSecurity.idl @@ -1,32 +1,22 @@ -package ohos.net; +package ohos.net.networkSecurity; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace networkSecurity { - dictionary CertType { - number CERT_TYPE_PEM = 0; number CERT_TYPE_DER = 1; - }; [Entity=Interface] interface CertBlob { - attribute CertType type; attribute (String or buffer) data; - }; - [GlobalScope] - interface GlobalScope_networkSecurity_ohos_net_networkSecurity { - - [Throws] - static async number certVerification(CertBlob cert, optional CertBlob caCert); - [Throws] - static number certVerificationSync(CertBlob cert, optional CertBlob caCert); - [Throws] - static boolean isCleartextPermitted(); - [Throws] - static boolean isCleartextPermittedByHostName(String hostName); - - }; - + [Throws] + async number certVerification(CertBlob cert, optional CertBlob caCert); + [Throws] + number certVerificationSync(CertBlob cert, optional CertBlob caCert); + [Throws] + boolean isCleartextPermitted(); + [Throws] + boolean isCleartextPermittedByHostName(String hostName); }; \ No newline at end of file diff --git a/idl/@ohos.net.policy.idl b/idl/@ohos.net.policy.idl index 4edc408..f02daab 100644 --- a/idl/@ohos.net.policy.idl +++ b/idl/@ohos.net.policy.idl @@ -1,50 +1,135 @@ -package ohos.net; +package ohos.net.policy; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; +import ohos.net.connection.default as connection; +[DefaultExport] namespace policy { - typedef connection.NetBearType NetBearType; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setBackgroundAllowed(boolean isAllowed, AsyncCallback_Void callback_); + [Throws] + async void setBackgroundAllowed(boolean isAllowed); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isBackgroundAllowed(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isBackgroundAllowed(); [Async, Synthetic] callback AsyncCallback_NetBackgroundPolicy_Void = void (NetBackgroundPolicy result); + [Throws] + void getBackgroundPolicyByUid(number uid, AsyncCallback_NetBackgroundPolicy_Void callback_); + [Throws] + async NetBackgroundPolicy getBackgroundPolicyByUid(number uid); + [Throws] + void setPolicyByUid(number uid, NetUidPolicy policy, AsyncCallback_Void callback_); + [Throws] + async void setPolicyByUid(number uid, NetUidPolicy policy); [Async, Synthetic] callback AsyncCallback_NetUidPolicy_Void = void (NetUidPolicy result); + [Throws] + void getPolicyByUid(number uid, AsyncCallback_NetUidPolicy_Void callback_); + [Throws] + async NetUidPolicy getPolicyByUid(number uid); [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); + [Throws] + void getUidsByPolicy(NetUidPolicy policy, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getUidsByPolicy(NetUidPolicy policy); + [Throws] + void isUidNetAllowed(number uid, boolean isMetered, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isUidNetAllowed(number uid, boolean isMetered); + [Throws] + void isUidNetAllowed(number uid, String iface, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isUidNetAllowed(number uid, String iface); + [Throws] + void setNetQuotaPolicies(sequence quotaPolicies, AsyncCallback_Void callback_); + [Throws] + async void setNetQuotaPolicies(sequence quotaPolicies); [Async, Synthetic] callback AsyncCallback_Array_NetQuotaPolicy_Void = void (sequence result); + [Throws] + void getNetQuotaPolicies(AsyncCallback_Array_NetQuotaPolicy_Void callback_); + [Throws] + async sequence getNetQuotaPolicies(); + [Throws] + void updateRemindPolicy(NetBearType netType, String simId, RemindType remindType, AsyncCallback_Void callback_); + [Throws] + async void updateRemindPolicy(NetBearType netType, String simId, RemindType remindType); + [Throws] + void setDeviceIdleTrustlist(sequence uids, boolean isAllowed, AsyncCallback_Void callback_); + [Throws] + async void setDeviceIdleTrustlist(sequence uids, boolean isAllowed); + [Throws] + void getDeviceIdleTrustlist(AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getDeviceIdleTrustlist(); + [Throws] + void setPowerSaveTrustlist(sequence uids, boolean isAllowed, AsyncCallback_Void callback_); + [Throws] + async void setPowerSaveTrustlist(sequence uids, boolean isAllowed); + [Throws] + void getPowerSaveTrustlist(AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getPowerSaveTrustlist(); + [Throws] + void resetPolicies(String simId, AsyncCallback_Void callback_); + [Throws] + async void resetPolicies(String simId); + [Throws] + async void setNetworkAccessPolicy(number uid, NetworkAccessPolicy policy, optional boolean isReconfirmed); + [Throws] + async NetworkAccessPolicy getNetworkAccessPolicy(number uid); + [Throws] + async UidNetworkAccessPolicy getNetworkAccessPolicy(); [Synthetic] callback Callback_NetUidPolicyInfo_Void = void (NetUidPolicyInfo parameter); + [Throws, DtsName="on", DtsTag="'netUidPolicyChange'"] + void onNetUidPolicyChange(Callback_NetUidPolicyInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'netUidPolicyChange'"] + void offNetUidPolicyChange(optional Callback_NetUidPolicyInfo_Void callback_); [Synthetic] callback Callback_NetUidRuleInfo_Void = void (NetUidRuleInfo parameter); + [Throws, DtsName="on", DtsTag="'netUidRuleChange'"] + void onNetUidRuleChange(Callback_NetUidRuleInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'netUidRuleChange'"] + void offNetUidRuleChange(optional Callback_NetUidRuleInfo_Void callback_); [Synthetic] callback Callback_Array_String_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'netMeteredIfacesChange'"] + void onNetMeteredIfacesChange(Callback_Array_String_Void callback_); + [Throws, DtsName="off", DtsTag="'netMeteredIfacesChange'"] + void offNetMeteredIfacesChange(optional Callback_Array_String_Void callback_); [Synthetic] callback Callback_Array_NetQuotaPolicy_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'netQuotaPolicyChange'"] + void onNetQuotaPolicyChange(Callback_Array_NetQuotaPolicy_Void callback_); + [Throws, DtsName="off", DtsTag="'netQuotaPolicyChange'"] + void offNetQuotaPolicyChange(optional Callback_Array_NetQuotaPolicy_Void callback_); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="on", DtsTag="'netBackgroundPolicyChange'"] + void onNetBackgroundPolicyChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'netBackgroundPolicyChange'"] + void offNetBackgroundPolicyChange(optional Callback_Boolean_Void callback_); dictionary NetBackgroundPolicy { - number NET_BACKGROUND_POLICY_NONE = 0; number NET_BACKGROUND_POLICY_ENABLE = 1; number NET_BACKGROUND_POLICY_DISABLE = 2; number NET_BACKGROUND_POLICY_TRUSTLIST = 3; - }; [Entity=Interface] interface NetQuotaPolicy { - attribute NetworkMatchRule networkMatchRule; attribute QuotaPolicy quotaPolicy; - }; [Entity=Interface] interface QuotaPolicy { - attribute String periodDuration; attribute number warningBytes; attribute number limitBytes; @@ -54,63 +139,47 @@ namespace policy { attribute number lastWarningRemind; [Optional] attribute number lastLimitRemind; - }; [Entity=Interface] interface NetworkMatchRule { - attribute NetBearType netType; attribute String identity; attribute String simId; - }; [Entity=Interface] interface NetUidRuleInfo { - attribute number uid; attribute NetUidRule rule; - }; [Entity=Interface] interface NetUidPolicyInfo { - attribute number uid; attribute NetUidPolicy policy; - }; dictionary LimitAction { - number LIMIT_ACTION_NONE = -1; number LIMIT_ACTION_ACCESS_DISABLED = 0; number LIMIT_ACTION_ALERT_ONLY = 1; - }; dictionary NetUidRule { - number NET_RULE_NONE = 0; number NET_RULE_ALLOW_METERED_FOREGROUND = 1; number NET_RULE_ALLOW_METERED = 2; number NET_RULE_REJECT_METERED = 4; number NET_RULE_ALLOW_ALL = 32; number NET_RULE_REJECT_ALL = 64; - }; dictionary RemindType { - number REMIND_TYPE_WARNING = 1; number REMIND_TYPE_LIMIT = 2; - }; dictionary NetUidPolicy { - number NET_POLICY_NONE = 0; number NET_POLICY_ALLOW_METERED_BACKGROUND = 1; number NET_POLICY_REJECT_METERED_BACKGROUND = 2; - }; [Entity=Interface] interface NetworkAccessPolicy { - [Optional] attribute boolean allowWiFi; [Optional] @@ -119,107 +188,8 @@ namespace policy { attribute boolean alwaysAllowWiFi; [Optional] attribute boolean alwaysAllowCellular; - }; [Entity=Interface] interface UidNetworkAccessPolicy { - - }; - [GlobalScope] - interface GlobalScope_policy_ohos_net_policy { - - [Throws] - static void setBackgroundAllowed(boolean isAllowed, AsyncCallback_Void callback_); - [Throws] - static async void setBackgroundAllowed(boolean isAllowed); - [Throws] - static void isBackgroundAllowed(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isBackgroundAllowed(); - [Throws] - static void getBackgroundPolicyByUid(number uid, AsyncCallback_NetBackgroundPolicy_Void callback_); - [Throws] - static async NetBackgroundPolicy getBackgroundPolicyByUid(number uid); - [Throws] - static void setPolicyByUid(number uid, NetUidPolicy policy, AsyncCallback_Void callback_); - [Throws] - static async void setPolicyByUid(number uid, NetUidPolicy policy); - [Throws] - static void getPolicyByUid(number uid, AsyncCallback_NetUidPolicy_Void callback_); - [Throws] - static async NetUidPolicy getPolicyByUid(number uid); - [Throws] - static void getUidsByPolicy(NetUidPolicy policy, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getUidsByPolicy(NetUidPolicy policy); - [Throws] - static void isUidNetAllowed(number uid, boolean isMetered, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isUidNetAllowed(number uid, boolean isMetered); - [Throws] - static void isUidNetAllowed(number uid, String iface, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isUidNetAllowed(number uid, String iface); - [Throws] - static void setNetQuotaPolicies(sequence quotaPolicies, AsyncCallback_Void callback_); - [Throws] - static async void setNetQuotaPolicies(sequence quotaPolicies); - [Throws] - static void getNetQuotaPolicies(AsyncCallback_Array_NetQuotaPolicy_Void callback_); - [Throws] - static async sequence getNetQuotaPolicies(); - [Throws] - static void updateRemindPolicy(NetBearType netType, String simId, RemindType remindType, AsyncCallback_Void callback_); - [Throws] - static async void updateRemindPolicy(NetBearType netType, String simId, RemindType remindType); - [Throws] - static void setDeviceIdleTrustlist(sequence uids, boolean isAllowed, AsyncCallback_Void callback_); - [Throws] - static async void setDeviceIdleTrustlist(sequence uids, boolean isAllowed); - [Throws] - static void getDeviceIdleTrustlist(AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getDeviceIdleTrustlist(); - [Throws] - static void setPowerSaveTrustlist(sequence uids, boolean isAllowed, AsyncCallback_Void callback_); - [Throws] - static async void setPowerSaveTrustlist(sequence uids, boolean isAllowed); - [Throws] - static void getPowerSaveTrustlist(AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getPowerSaveTrustlist(); - [Throws] - static void resetPolicies(String simId, AsyncCallback_Void callback_); - [Throws] - static async void resetPolicies(String simId); - [Throws] - static async void setNetworkAccessPolicy(number uid, NetworkAccessPolicy policy, optional boolean isReconfirmed); - [Throws] - static async NetworkAccessPolicy getNetworkAccessPolicy(number uid); - [Throws] - static async UidNetworkAccessPolicy getNetworkAccessPolicy(); - [Throws, DtsName="on", DtsTag="'netUidPolicyChange'"] - static void onNetUidPolicyChange(Callback_NetUidPolicyInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'netUidPolicyChange'"] - static void offNetUidPolicyChange(optional Callback_NetUidPolicyInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'netUidRuleChange'"] - static void onNetUidRuleChange(Callback_NetUidRuleInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'netUidRuleChange'"] - static void offNetUidRuleChange(optional Callback_NetUidRuleInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'netMeteredIfacesChange'"] - static void onNetMeteredIfacesChange(Callback_Array_String_Void callback_); - [Throws, DtsName="off", DtsTag="'netMeteredIfacesChange'"] - static void offNetMeteredIfacesChange(optional Callback_Array_String_Void callback_); - [Throws, DtsName="on", DtsTag="'netQuotaPolicyChange'"] - static void onNetQuotaPolicyChange(Callback_Array_NetQuotaPolicy_Void callback_); - [Throws, DtsName="off", DtsTag="'netQuotaPolicyChange'"] - static void offNetQuotaPolicyChange(optional Callback_Array_NetQuotaPolicy_Void callback_); - [Throws, DtsName="on", DtsTag="'netBackgroundPolicyChange'"] - static void onNetBackgroundPolicyChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'netBackgroundPolicyChange'"] - static void offNetBackgroundPolicyChange(optional Callback_Boolean_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.sharing.idl b/idl/@ohos.net.sharing.idl index 3521780..a153633 100644 --- a/idl/@ohos.net.sharing.idl +++ b/idl/@ohos.net.sharing.idl @@ -1,104 +1,92 @@ -package ohos.net; +package ohos.net.sharing; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; +import ohos.net.connection.default as connection; +[DefaultExport] namespace sharing { - typedef connection.NetHandle NetHandle; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isSharingSupported(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isSharingSupported(); + [Throws] + void isSharing(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isSharing(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void startSharing(SharingIfaceType type, AsyncCallback_Void callback_); + [Throws] + async void startSharing(SharingIfaceType type); + [Throws] + void stopSharing(SharingIfaceType type, AsyncCallback_Void callback_); + [Throws] + async void stopSharing(SharingIfaceType type); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getStatsRxBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getStatsRxBytes(); + [Throws] + void getStatsTxBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getStatsTxBytes(); + [Throws] + void getStatsTotalBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getStatsTotalBytes(); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void getSharingIfaces(SharingIfaceState state, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getSharingIfaces(SharingIfaceState state); [Async, Synthetic] callback AsyncCallback_SharingIfaceState_Void = void (SharingIfaceState result); + [Throws] + void getSharingState(SharingIfaceType type, AsyncCallback_SharingIfaceState_Void callback_); + [Throws] + async SharingIfaceState getSharingState(SharingIfaceType type); + [Throws] + void getSharableRegexes(SharingIfaceType type, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getSharableRegexes(SharingIfaceType type); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="on", DtsTag="'sharingStateChange'"] + void onSharingStateChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'sharingStateChange'"] + void offSharingStateChange(optional Callback_Boolean_Void callback_); [Synthetic] callback Callback_InterfaceSharingStateInfo_Void = void (InterfaceSharingStateInfo parameter); + [Throws, DtsName="on", DtsTag="'interfaceSharingStateChange'"] + void onInterfaceSharingStateChange(Callback_InterfaceSharingStateInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'interfaceSharingStateChange'"] + void offInterfaceSharingStateChange(optional Callback_InterfaceSharingStateInfo_Void callback_); [Synthetic] callback Callback_NetHandle_Void = void (NetHandle parameter); + [Throws, DtsName="on", DtsTag="'sharingUpstreamChange'"] + void onSharingUpstreamChange(Callback_NetHandle_Void callback_); + [Throws, DtsName="off", DtsTag="'sharingUpstreamChange'"] + void offSharingUpstreamChange(optional Callback_NetHandle_Void callback_); dictionary SharingIfaceState { - number SHARING_NIC_SERVING = 1; number SHARING_NIC_CAN_SERVER = 2; number SHARING_NIC_ERROR = 3; - }; [Entity=Interface] interface InterfaceSharingStateInfo { - attribute SharingIfaceType type; attribute String iface; attribute SharingIfaceState state; - }; dictionary SharingIfaceType { - number SHARING_WIFI = 0; number SHARING_USB = 1; number SHARING_BLUETOOTH = 2; - }; - [GlobalScope] - interface GlobalScope_sharing_ohos_net_sharing { - - [Throws] - static void isSharingSupported(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isSharingSupported(); - [Throws] - static void isSharing(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isSharing(); - [Throws] - static void startSharing(SharingIfaceType type, AsyncCallback_Void callback_); - [Throws] - static async void startSharing(SharingIfaceType type); - [Throws] - static void stopSharing(SharingIfaceType type, AsyncCallback_Void callback_); - [Throws] - static async void stopSharing(SharingIfaceType type); - [Throws] - static void getStatsRxBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getStatsRxBytes(); - [Throws] - static void getStatsTxBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getStatsTxBytes(); - [Throws] - static void getStatsTotalBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getStatsTotalBytes(); - [Throws] - static void getSharingIfaces(SharingIfaceState state, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getSharingIfaces(SharingIfaceState state); - [Throws] - static void getSharingState(SharingIfaceType type, AsyncCallback_SharingIfaceState_Void callback_); - [Throws] - static async SharingIfaceState getSharingState(SharingIfaceType type); - [Throws] - static void getSharableRegexes(SharingIfaceType type, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getSharableRegexes(SharingIfaceType type); - [Throws, DtsName="on", DtsTag="'sharingStateChange'"] - static void onSharingStateChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'sharingStateChange'"] - static void offSharingStateChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'interfaceSharingStateChange'"] - static void onInterfaceSharingStateChange(Callback_InterfaceSharingStateInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'interfaceSharingStateChange'"] - static void offInterfaceSharingStateChange(optional Callback_InterfaceSharingStateInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'sharingUpstreamChange'"] - static void onSharingUpstreamChange(Callback_NetHandle_Void callback_); - [Throws, DtsName="off", DtsTag="'sharingUpstreamChange'"] - static void offSharingUpstreamChange(optional Callback_NetHandle_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.socket.idl b/idl/@ohos.net.socket.idl index 062119f..dbb61d3 100644 --- a/idl/@ohos.net.socket.idl +++ b/idl/@ohos.net.socket.idl @@ -1,41 +1,44 @@ -package ohos.net; +package ohos.net.socket; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; import ohos.base.ErrorCallback as ErrorCallback; -import ohos.net.connection as connection; -import ohos.security.cert as cert; +import ohos.net.connection.default as connection; +import ohos.security.cert.default as cert; +[DefaultExport] namespace socket { - typedef cert.EncodingBlob X509CertRawData; + UDPSocket constructUDPSocketInstance(); + MulticastSocket constructMulticastSocketInstance(); + TCPSocket constructTCPSocketInstance(); + TLSSocket constructTLSSocketInstance(); + [Throws] + TLSSocket constructTLSSocketInstance(TCPSocket tcpSocket); + TCPSocketServer constructTCPSocketServerInstance(); + TLSSocketServer constructTLSSocketServerInstance(); + LocalSocket constructLocalSocketInstance(); + LocalSocketServer constructLocalSocketServerInstance(); [Entity=Interface] interface UDPSendOptions { - attribute (String or buffer) data; attribute NetAddress address; [Optional] attribute ProxyOptions proxy; - }; dictionary ProxyTypes { - number NONE = 0; number SOCKS5 = 1; - }; [Entity=Interface] interface ProxyOptions { - attribute ProxyTypes type; attribute NetAddress address; [Optional] attribute String username; [Optional] attribute String password; - }; [Entity=Interface] interface ExtraOptionsBase { - [Optional] attribute number receiveBufferSize; [Optional] @@ -44,61 +47,46 @@ namespace socket { attribute boolean reuseAddress; [Optional] attribute number socketTimeout; - }; [Entity=Interface] interface UDPExtraOptions: ExtraOptionsBase { - [Optional] attribute boolean broadcast; - }; [Entity=Interface] interface SocketStateBase { - attribute boolean isBound; attribute boolean isClose; attribute boolean isConnected; - }; [Entity=Interface] interface SocketRemoteInfo { - attribute String address; attribute String family; attribute number port; attribute number size; - }; [Entity=Interface] interface LocalSocketMessageInfo { - attribute buffer message; attribute String address; attribute number size; - }; [Entity=Interface] interface LocalAddress { - attribute String address; - }; [Entity=Interface] interface LocalConnectOptions { - attribute LocalAddress address; [Optional] attribute number timeout; - }; [Entity=Interface] interface LocalSendOptions { - attribute (String or buffer) data; [Optional] attribute String encoding; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -110,7 +98,6 @@ namespace socket { callback Callback_Void = void (); [Entity=Interface] interface UDPSocket { - [Throws] void bind(NetAddress address, AsyncCallback_Void callback_); [Throws] @@ -135,15 +122,14 @@ namespace socket { async void setExtraOptions(UDPExtraOptions options); [DtsName="on", DtsTag="'message'"] void onMessage(Callback_SocketMessageInfo_Void callback_); - [DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_SocketMessageInfo_Void callback_); void on(String type, Callback_Void callback_); - void off(String type, optional Callback_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_SocketMessageInfo_Void callback_); + void off(String type, optional Callback_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); @@ -151,7 +137,6 @@ namespace socket { callback AsyncCallback_Boolean_Void = void (boolean result); [Entity=Interface] interface MulticastSocket: UDPSocket { - [Throws] void addMembership(NetAddress multicastAddress, AsyncCallback_Void callback_); [Throws] @@ -176,13 +161,11 @@ namespace socket { void getLoopbackMode(AsyncCallback_Boolean_Void callback_); [Throws] async boolean getLoopbackMode(); - }; [Synthetic] callback Callback_LocalSocketMessageInfo_Void = void (LocalSocketMessageInfo parameter); [Entity=Interface] interface LocalSocket { - [Throws] async void bind(LocalAddress address); [Throws] @@ -201,25 +184,23 @@ namespace socket { async String getLocalAddress(); [Throws, DtsName="on", DtsTag="'message'"] void onMessage(Callback_LocalSocketMessageInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_LocalSocketMessageInfo_Void callback_); [Throws, DtsName="on", DtsTag="'connect'"] void onConnect(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'connect'"] - void offConnect(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'close'"] void onClose(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'close'"] - void offClose(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_LocalSocketMessageInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'connect'"] + void offConnect(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'close'"] + void offClose(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface LocalSocketConnection { - attribute number clientId; [Throws] async void send(LocalSendOptions options); @@ -229,23 +210,21 @@ namespace socket { async String getLocalAddress(); [Throws, DtsName="on", DtsTag="'message'"] void onMessage(Callback_LocalSocketMessageInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_LocalSocketMessageInfo_Void callback_); [Throws, DtsName="on", DtsTag="'close'"] void onClose(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'close'"] - void offClose(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_LocalSocketMessageInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'close'"] + void offClose(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Synthetic] callback Callback_LocalSocketConnection_Void = void (LocalSocketConnection parameter); [Entity=Interface] interface LocalSocketServer { - [Throws] async void listen(LocalAddress address); async SocketStateBase getState(); @@ -255,44 +234,38 @@ namespace socket { async ExtraOptionsBase getExtraOptions(); [Throws] async String getLocalAddress(); + [Throws] + async void close(); [Throws, DtsName="on", DtsTag="'connect'"] void onConnect(Callback_LocalSocketConnection_Void callback_); - [Throws, DtsName="off", DtsTag="'connect'"] - void offConnect(optional Callback_LocalSocketConnection_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'connect'"] + void offConnect(optional Callback_LocalSocketConnection_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface TCPConnectOptions { - attribute NetAddress address; [Optional] attribute number timeout; [Optional] attribute ProxyOptions proxy; - }; [Entity=Interface] interface TCPSendOptions { - attribute (String or buffer) data; [Optional] attribute String encoding; - }; [Entity=Literal, Synthetic] interface Literal_Boolean_on_Number_linger { - attribute boolean on; attribute number linger; - }; [Entity=Interface] interface TCPExtraOptions: ExtraOptionsBase { - [Optional] attribute boolean keepAlive; [Optional] @@ -301,13 +274,11 @@ namespace socket { attribute boolean TCPNoDelay; [Optional] attribute Literal_Boolean_on_Number_linger socketLinger; - }; [Async, Synthetic] callback AsyncCallback_NetAddress_Void = void (NetAddress result); [Entity=Interface] interface TCPSocket { - [Throws] void bind(NetAddress address, AsyncCallback_Void callback_); [Throws] @@ -342,15 +313,14 @@ namespace socket { async NetAddress getLocalAddress(); [DtsName="on", DtsTag="'message'"] void onMessage(Callback_SocketMessageInfo_Void callback_); - [DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_SocketMessageInfo_Void callback_); void on(String type, Callback_Void callback_); - void off(String type, optional Callback_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_SocketMessageInfo_Void callback_); + void off(String type, optional Callback_Void callback_); [DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Async, Synthetic] callback AsyncCallback_X509CertRawData_Void = void (X509CertRawData result); @@ -360,7 +330,6 @@ namespace socket { callback AsyncCallback_Array_String_Void = void (sequence result); [Entity=Interface] interface TLSSocket { - [Throws] void bind(NetAddress address, AsyncCallback_Void callback_); [Throws] @@ -381,14 +350,14 @@ namespace socket { async NetAddress getLocalAddress(); [Throws, DtsName="on", DtsTag="'message'"] void onMessage(Callback_SocketMessageInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_SocketMessageInfo_Void callback_); [Throws] void on(String type, Callback_Void callback_); - [Throws] - void off(String type, optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_SocketMessageInfo_Void callback_); + [Throws] + void off(String type, optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); [Throws] @@ -411,6 +380,7 @@ namespace socket { void getSignatureAlgorithms(AsyncCallback_Array_String_Void callback_); [Throws] async sequence getSignatureAlgorithms(); + async number getSocketFd(); [Throws] void connect(TLSConnectOptions options, AsyncCallback_Void callback_); [Throws] @@ -423,11 +393,9 @@ namespace socket { void close(AsyncCallback_Void callback_); [Throws] async void close(); - }; [Entity=Interface] interface TLSSecureOptions { - [Optional] attribute (String or sequence) ca; [Optional] @@ -446,11 +414,9 @@ namespace socket { attribute String cipherSuite; [Optional] attribute boolean isBidirectionalAuthentication; - }; [Entity=Interface] interface TLSConnectOptions { - attribute NetAddress address; attribute TLSSecureOptions secureOptions; [Optional] @@ -459,19 +425,15 @@ namespace socket { attribute boolean skipRemoteValidation; [Optional] attribute ProxyOptions proxy; - }; dictionary Protocol { - [OriginalEnumMemberName=TLSv12] String TLSV_12 = "TLSv1.2"; [OriginalEnumMemberName=TLSv13] String TLSV_13 = "TLSv1.3"; - }; [Entity=Interface] interface TCPSocketConnection { - attribute number clientId; [Throws] void send(TCPSendOptions options, AsyncCallback_Void callback_); @@ -489,28 +451,28 @@ namespace socket { async NetAddress getLocalAddress(); [Throws, DtsName="on", DtsTag="'message'"] void onMessage(Callback_SocketMessageInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_SocketMessageInfo_Void callback_); [Throws, DtsName="on", DtsTag="'close'"] void onClose(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'close'"] - void offClose(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_SocketMessageInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'close'"] + void offClose(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Synthetic] callback Callback_TCPSocketConnection_Void = void (TCPSocketConnection parameter); [Entity=Interface] interface TCPSocketServer { - [Throws] void listen(NetAddress address, AsyncCallback_Void callback_); [Throws] async void listen(NetAddress address); [Throws] + async void close(); + [Throws] void getState(AsyncCallback_SocketStateBase_Void callback_); [Throws] async SocketStateBase getState(); @@ -522,17 +484,15 @@ namespace socket { async NetAddress getLocalAddress(); [Throws, DtsName="on", DtsTag="'connect'"] void onConnect(Callback_TCPSocketConnection_Void callback_); - [Throws, DtsName="off", DtsTag="'connect'"] - void offConnect(optional Callback_TCPSocketConnection_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'connect'"] + void offConnect(optional Callback_TCPSocketConnection_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface TLSSocketConnection { - attribute number clientId; [Throws] void send((String or buffer) data, AsyncCallback_Void callback_); @@ -562,35 +522,33 @@ namespace socket { async NetAddress getLocalAddress(); [Throws, DtsName="on", DtsTag="'message'"] void onMessage(Callback_SocketMessageInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'message'"] - void offMessage(optional Callback_SocketMessageInfo_Void callback_); [Throws, DtsName="on", DtsTag="'close'"] void onClose(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'close'"] - void offClose(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'message'"] + void offMessage(optional Callback_SocketMessageInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'close'"] + void offClose(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface SocketMessageInfo { - attribute buffer message; attribute SocketRemoteInfo remoteInfo; - }; [Synthetic] callback Callback_TLSSocketConnection_Void = void (TLSSocketConnection parameter); [Entity=Interface] interface TLSSocketServer { - [Throws] void listen(TLSConnectOptions options, AsyncCallback_Void callback_); [Throws] async void listen(TLSConnectOptions options); [Throws] + async void close(); + [Throws] void getState(AsyncCallback_SocketStateBase_Void callback_); [Throws] async SocketStateBase getState(); @@ -610,28 +568,11 @@ namespace socket { async NetAddress getLocalAddress(); [Throws, DtsName="on", DtsTag="'connect'"] void onConnect(Callback_TLSSocketConnection_Void callback_); - [Throws, DtsName="off", DtsTag="'connect'"] - void offConnect(optional Callback_TLSSocketConnection_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'connect'"] + void offConnect(optional Callback_TLSSocketConnection_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - - }; - [GlobalScope] - interface GlobalScope_socket_ohos_net_socket { - - static UDPSocket constructUDPSocketInstance(); - static MulticastSocket constructMulticastSocketInstance(); - static TCPSocket constructTCPSocketInstance(); - static TLSSocket constructTLSSocketInstance(); - [Throws] - static TLSSocket constructTLSSocketInstance(TCPSocket tcpSocket); - static TCPSocketServer constructTCPSocketServerInstance(); - static TLSSocketServer constructTLSSocketServerInstance(); - static LocalSocket constructLocalSocketInstance(); - static LocalSocketServer constructLocalSocketServerInstance(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.statistics.idl b/idl/@ohos.net.statistics.idl index 2e3826b..68867e2 100644 --- a/idl/@ohos.net.statistics.idl +++ b/idl/@ohos.net.statistics.idl @@ -1,134 +1,114 @@ -package ohos.net; +package ohos.net.statistics; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; +import ohos.net.connection.default as connection; +[DefaultExport] namespace statistics { - typedef connection.NetBearType NetBearType; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getIfaceRxBytes(String nic, AsyncCallback_Number_Void callback_); + [Throws] + async number getIfaceRxBytes(String nic); + [Throws] + void getIfaceTxBytes(String nic, AsyncCallback_Number_Void callback_); + [Throws] + async number getIfaceTxBytes(String nic); + [Throws] + void getCellularRxBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getCellularRxBytes(); + [Throws] + void getCellularTxBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getCellularTxBytes(); + [Throws] + void getAllRxBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getAllRxBytes(); + [Throws] + void getAllTxBytes(AsyncCallback_Number_Void callback_); + [Throws] + async number getAllTxBytes(); + [Throws] + void getUidRxBytes(number uid, AsyncCallback_Number_Void callback_); + [Throws] + async number getUidRxBytes(number uid); + [Throws] + void getUidTxBytes(number uid, AsyncCallback_Number_Void callback_); + [Throws] + async number getUidTxBytes(number uid); [Synthetic] callback Callback_NetStatsChangeInfo_Void = void (NetStatsChangeInfo parameter); + [Throws, DtsName="on", DtsTag="'netStatsChange'"] + void onNetStatsChange(Callback_NetStatsChangeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'netStatsChange'"] + void offNetStatsChange(optional Callback_NetStatsChangeInfo_Void callback_); [Async, Synthetic] callback AsyncCallback_NetStatsInfo_Void = void (NetStatsInfo result); + [Throws] + void getTrafficStatsByIface(IfaceInfo ifaceInfo, AsyncCallback_NetStatsInfo_Void callback_); + [Throws] + async NetStatsInfo getTrafficStatsByIface(IfaceInfo ifaceInfo); + [Throws] + void getTrafficStatsByUid(UidInfo uidInfo, AsyncCallback_NetStatsInfo_Void callback_); + [Throws] + async NetStatsInfo getTrafficStatsByUid(UidInfo uidInfo); + [Throws] + void getSockfdRxBytes(number sockfd, AsyncCallback_Number_Void callback_); + [Throws] + async number getSockfdRxBytes(number sockfd); + [Throws] + void getSockfdTxBytes(number sockfd, AsyncCallback_Number_Void callback_); + [Throws] + async number getSockfdTxBytes(number sockfd); [Entity=Interface] interface IfaceInfo { - attribute String iface; attribute number startTime; attribute number endTime; - }; [Entity=Interface] interface UidInfo { - attribute IfaceInfo ifaceInfo; attribute number uid; - }; [Entity=Interface] interface NetStatsInfo { - attribute number rxBytes; attribute number txBytes; attribute number rxPackets; attribute number txPackets; - }; [Entity=Interface] interface NetStatsChangeInfo { - attribute String iface; [Optional] attribute number uid; - }; [Entity=Literal, Synthetic] interface NetStatsInfoSequence { - attribute number startTime; attribute number endTime; attribute NetStatsInfo info; - }; typedef sequence NetStatsInfoSequence; [Entity=Literal] interface UidNetStatsInfo { - [IndexSignature] NetStatsInfo indexSignature(number uid); - }; [Entity=Interface] interface NetworkInfo { - attribute NetBearType type; attribute number startTime; attribute number endTime; [Optional] attribute number simId; - }; - [GlobalScope] - interface GlobalScope_statistics_ohos_net_statistics { - - [Throws] - static void getIfaceRxBytes(String nic, AsyncCallback_Number_Void callback_); - [Throws] - static async number getIfaceRxBytes(String nic); - [Throws] - static void getIfaceTxBytes(String nic, AsyncCallback_Number_Void callback_); - [Throws] - static async number getIfaceTxBytes(String nic); - [Throws] - static void getCellularRxBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getCellularRxBytes(); - [Throws] - static void getCellularTxBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getCellularTxBytes(); - [Throws] - static void getAllRxBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getAllRxBytes(); - [Throws] - static void getAllTxBytes(AsyncCallback_Number_Void callback_); - [Throws] - static async number getAllTxBytes(); - [Throws] - static void getUidRxBytes(number uid, AsyncCallback_Number_Void callback_); - [Throws] - static async number getUidRxBytes(number uid); - [Throws] - static void getUidTxBytes(number uid, AsyncCallback_Number_Void callback_); - [Throws] - static async number getUidTxBytes(number uid); - [Throws, DtsName="on", DtsTag="'netStatsChange'"] - static void onNetStatsChange(Callback_NetStatsChangeInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'netStatsChange'"] - static void offNetStatsChange(optional Callback_NetStatsChangeInfo_Void callback_); - [Throws] - static void getTrafficStatsByIface(IfaceInfo ifaceInfo, AsyncCallback_NetStatsInfo_Void callback_); - [Throws] - static async NetStatsInfo getTrafficStatsByIface(IfaceInfo ifaceInfo); - [Throws] - static void getTrafficStatsByUid(UidInfo uidInfo, AsyncCallback_NetStatsInfo_Void callback_); - [Throws] - static async NetStatsInfo getTrafficStatsByUid(UidInfo uidInfo); - [Throws] - static void getSockfdRxBytes(number sockfd, AsyncCallback_Number_Void callback_); - [Throws] - static async number getSockfdRxBytes(number sockfd); - [Throws] - static void getSockfdTxBytes(number sockfd, AsyncCallback_Number_Void callback_); - [Throws] - static async number getSockfdTxBytes(number sockfd); - [Throws] - static async UidNetStatsInfo getTrafficStatsByNetwork(NetworkInfo networkInfo); - [Throws] - static async NetStatsInfoSequence getTrafficStatsByUidNetwork(number uid, NetworkInfo networkInfo); - - }; - + [Throws] + async UidNetStatsInfo getTrafficStatsByNetwork(NetworkInfo networkInfo); + [Throws] + async NetStatsInfoSequence getTrafficStatsByUidNetwork(number uid, NetworkInfo networkInfo); }; \ No newline at end of file diff --git a/idl/@ohos.net.vpn.idl b/idl/@ohos.net.vpn.idl index 004b8f6..10f5d3b 100644 --- a/idl/@ohos.net.vpn.idl +++ b/idl/@ohos.net.vpn.idl @@ -1,22 +1,37 @@ -package ohos.net; +package ohos.net.vpn; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; -import application._AbilityContext as _AbilityContext; +import ohos.net.connection.default as connection; +import application.UIAbilityContext.default as _AbilityContext; +[DefaultExport] namespace vpn { - typedef connection.LinkAddress LinkAddress; typedef connection.RouteInfo RouteInfo; typedef _AbilityContext AbilityContext; + [Throws] + VpnConnection createVpnConnection(AbilityContext context); [Synthetic] callback Callback_VpnConnectState_Void = void (VpnConnectState parameter); + [Throws, DtsName="on", DtsTag="'connect'"] + void onConnect(Callback_VpnConnectState_Void callback_); + [Throws, DtsName="off", DtsTag="'connect'"] + void offConnect(optional Callback_VpnConnectState_Void callback_); + [Throws] + async void addSysVpnConfig(SysVpnConfig config); + [Throws] + async void deleteSysVpnConfig(String vpnId); + [Throws] + async sequence getSysVpnConfigList(); + [Throws] + async SysVpnConfig getSysVpnConfig(String vpnId); + [Throws] + async SysVpnConfig getConnectedSysVpnConfig(); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface VpnConnection { - [Throws] void setUp(VpnConfig config, AsyncCallback_Number_Void callback_); [Throws] @@ -29,11 +44,9 @@ namespace vpn { void destroy(AsyncCallback_Void callback_); [Throws] async void destroy(); - }; [Entity=Interface] interface VpnConfig { - attribute sequence addresses; [Optional] attribute sequence routes; @@ -55,11 +68,9 @@ namespace vpn { attribute sequence trustedApplications; [Optional] attribute sequence blockedApplications; - }; [Entity=Interface] interface SysVpnConfig: VpnConfig { - [Optional] attribute String vpnId; [Optional] @@ -76,11 +87,9 @@ namespace vpn { attribute number userId; [Optional] attribute String forwardingRoutes; - }; [Entity=Interface] interface OpenVpnConfig: SysVpnConfig { - [Optional] attribute String ovpnPort; [Optional] @@ -99,11 +108,9 @@ namespace vpn { attribute String ovpnUserCertFilePath; [Optional] attribute String ovpnPrivateKeyFilePath; - }; [Entity=Interface] interface IpsecVpnConfig: SysVpnConfig { - [Optional] attribute String ipsecPreSharedKey; [Optional] @@ -132,11 +139,9 @@ namespace vpn { attribute String ipsecPrivateServerCertFilePath; [Optional] attribute String ipsecPublicServerCertFilePath; - }; [Entity=Interface] interface L2tpVpnConfig: SysVpnConfig { - [Optional] attribute String ipsecPreSharedKey; [Optional] @@ -173,10 +178,8 @@ namespace vpn { attribute String xl2tpdConfig; [Optional] attribute String l2tpSharedKey; - }; dictionary SysVpnType { - number IKEV2_IPSEC_MSCHAPV2 = 1; number IKEV2_IPSEC_PSK = 2; number IKEV2_IPSEC_RSA = 3; @@ -186,28 +189,5 @@ namespace vpn { number IPSEC_XAUTH_RSA = 7; number IPSEC_HYBRID_RSA = 8; number OPENVPN = 9; - }; - [GlobalScope] - interface GlobalScope_vpn_ohos_net_vpn { - - [Throws] - static VpnConnection createVpnConnection(AbilityContext context); - [Throws, DtsName="on", DtsTag="'connect'"] - static void onConnect(Callback_VpnConnectState_Void callback_); - [Throws, DtsName="off", DtsTag="'connect'"] - static void offConnect(optional Callback_VpnConnectState_Void callback_); - [Throws] - static async void addSysVpnConfig(SysVpnConfig config); - [Throws] - static async void deleteSysVpnConfig(String vpnId); - [Throws] - static async sequence getSysVpnConfigList(); - [Throws] - static async SysVpnConfig getSysVpnConfig(String vpnId); - [Throws] - static async SysVpnConfig getConnectedSysVpnConfig(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.vpnExtension.idl b/idl/@ohos.net.vpnExtension.idl index 370957d..2a222e7 100644 --- a/idl/@ohos.net.vpnExtension.idl +++ b/idl/@ohos.net.vpnExtension.idl @@ -1,26 +1,35 @@ -package ohos.net; -import ohos.net.connection as connection; -import application._VpnExtensionContext as _VpnExtensionContext; -import ohos.app.ability.Want as Want; +package ohos.net.vpnExtension; +import ohos.net.connection.default as connection; +import application.VpnExtensionContext.default as _VpnExtensionContext; +import ohos.app.ability.Want.default as Want; +[DefaultExport] namespace vpnExtension { - typedef connection.LinkAddress LinkAddress; typedef connection.RouteInfo RouteInfo; typedef _VpnExtensionContext VpnExtensionContext; + [Throws] + async void startVpnExtensionAbility(Want want); + [Throws] + async void stopVpnExtensionAbility(Want want); + [Throws] + async void setAlwaysOnVpnEnabled(boolean enable, String bundleName); + [Throws] + async boolean isAlwaysOnVpnEnabled(String bundleName); + [Throws] + boolean updateVpnAuthorizedState(String bundleName); + [Throws] + VpnConnection createVpnConnection(VpnExtensionContext context); [Entity=Interface] interface VpnConnection { - [Throws] async number create(VpnConfig config); [Throws] async void protect(number socketFd); [Throws] async void destroy(); - }; [Entity=Interface] interface VpnConfig { - attribute sequence addresses; [Optional] attribute sequence routes; @@ -42,24 +51,5 @@ namespace vpnExtension { attribute sequence trustedApplications; [Optional] attribute sequence blockedApplications; - }; - [GlobalScope] - interface GlobalScope_vpnExtension_ohos_net_vpnExtension { - - [Throws] - static async void startVpnExtensionAbility(Want want); - [Throws] - static async void stopVpnExtensionAbility(Want want); - [Throws] - static async void setAlwaysOnVpnEnabled(boolean enable, String bundleName); - [Throws] - static async boolean isAlwaysOnVpnEnabled(String bundleName); - [Throws] - static boolean updateVpnAuthorizedState(String bundleName); - [Throws] - static VpnConnection createVpnConnection(VpnExtensionContext context); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.net.webSocket.idl b/idl/@ohos.net.webSocket.idl index a9caa1d..0018d49 100644 --- a/idl/@ohos.net.webSocket.idl +++ b/idl/@ohos.net.webSocket.idl @@ -1,58 +1,51 @@ -package ohos.net; +package ohos.net.webSocket; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.Callback as Callback; -import ohos.net.connection as connection; +import ohos.net.connection.default as connection; +[DefaultExport] namespace webSocket { - typedef connection.HttpProxy HttpProxy; + WebSocket createWebSocket(); [Entity=Interface] interface WebSocketRequestOptions { - [Optional] attribute Object header; [Optional] attribute String caPath; [Optional] + attribute boolean skipServerCertVerification; + [Optional] attribute ClientCert clientCert; [Optional] attribute ProxyConfiguration proxy; [Optional] attribute String protocol; - }; typedef (String or HttpProxy) ProxyConfiguration; [Entity=Interface] interface ClientCert { - attribute String certPath; attribute String keyPath; [Optional] attribute String keyPassword; - }; [Entity=Interface] interface WebSocketCloseOptions { - [Optional] attribute number code; [Optional] attribute String reason; - }; [Entity=Interface] interface CloseResult { - attribute number code; attribute String reason; - }; [Entity=Literal] interface ResponseHeaders { - [IndexSignature] ((String or sequence) or undefined) indexSignature(String k); - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); @@ -68,7 +61,6 @@ namespace webSocket { callback Callback_ResponseHeaders_Void = void (ResponseHeaders parameter); [Entity=Interface] interface WebSocket { - [Throws] void connect(String url, AsyncCallback_Boolean_Void callback_); [Throws] @@ -87,35 +79,89 @@ namespace webSocket { async boolean close(optional WebSocketCloseOptions options); [DtsName="on", DtsTag="'open'"] void onOpen(AsyncCallback_Object_Void callback_); - [DtsName="off", DtsTag="'open'"] - void offOpen(optional AsyncCallback_Object_Void callback_); [DtsName="on", DtsTag="'message'"] void onMessage(AsyncCallback_Union_String_Buffer_Void callback_); - [DtsName="off", DtsTag="'message'"] - void offMessage(optional AsyncCallback_Union_String_Buffer_Void callback_); [DtsName="on", DtsTag="'close'"] void onClose(AsyncCallback_CloseResult_Void callback_); - [DtsName="off", DtsTag="'close'"] - void offClose(optional AsyncCallback_CloseResult_Void callback_); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); - [DtsName="off", DtsTag="'error'"] - void offError(optional ErrorCallback callback_); [DtsName="on", DtsTag="'dataEnd'"] void onDataEnd(Callback_Void callback_); - [DtsName="off", DtsTag="'dataEnd'"] - void offDataEnd(optional Callback_Void callback_); [DtsName="on", DtsTag="'headerReceive'"] void onHeaderReceive(Callback_ResponseHeaders_Void callback_); + [DtsName="off", DtsTag="'open'"] + void offOpen(optional AsyncCallback_Object_Void callback_); + [DtsName="off", DtsTag="'message'"] + void offMessage(optional AsyncCallback_Union_String_Buffer_Void callback_); + [DtsName="off", DtsTag="'close'"] + void offClose(optional AsyncCallback_CloseResult_Void callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'dataEnd'"] + void offDataEnd(optional Callback_Void callback_); [DtsName="off", DtsTag="'headerReceive'"] void offHeaderReceive(optional Callback_ResponseHeaders_Void callback_); - }; - [GlobalScope] - interface GlobalScope_webSocket_ohos_net_webSocket { - - static WebSocket createWebSocket(); - + WebSocketServer createWebSocketServer(); + [Entity=Interface] + interface WebSocketServerConfig { + [Optional] + attribute String serverIP; + attribute number serverPort; + [Optional] + attribute ServerCert serverCert; + attribute number maxConcurrentClientsNumber; + [Optional] + attribute String protocol; + attribute number maxConnectionsForOneClient; + }; + [Entity=Interface] + interface ServerCert { + attribute String certPath; + attribute String keyPath; + }; + [Entity=Interface] + interface WebSocketConnection { + attribute String clientIP; + attribute number clientPort; + }; + [Entity=Interface] + interface WebSocketMessage { + attribute (String or buffer) data; + attribute WebSocketConnection clientConnection; + }; + callback ClientConnectionCloseCallback = void (WebSocketConnection clientConnection, CloseResult closeReason); + [Synthetic] + callback Callback_WebSocketConnection_Void = void (WebSocketConnection parameter); + [Synthetic] + callback Callback_WebSocketMessage_Void = void (WebSocketMessage parameter); + [Entity=Interface] + interface WebSocketServer { + [Throws] + async boolean start(WebSocketServerConfig config); + [Throws] + sequence listAllConnections(); + [Throws] + async boolean close(WebSocketConnection connection, optional webSocket.WebSocketCloseOptions options); + [Throws] + async boolean send((String or buffer) data, WebSocketConnection connection); + [Throws] + async boolean stop(); + [DtsName="on", DtsTag="'error'"] + void onError(ErrorCallback callback_); + [DtsName="on", DtsTag="'connect'"] + void onConnect(Callback_WebSocketConnection_Void callback_); + [DtsName="on", DtsTag="'messageReceive'"] + void onMessageReceive(Callback_WebSocketMessage_Void callback_); + [DtsName="on", DtsTag="'close'"] + void onClose(ClientConnectionCloseCallback callback_); + [DtsName="off", DtsTag="'error'"] + void offError(optional ErrorCallback callback_); + [DtsName="off", DtsTag="'connect'"] + void offConnect(optional Callback_WebSocketConnection_Void callback_); + [DtsName="off", DtsTag="'close'"] + void offClose(optional ClientConnectionCloseCallback callback_); + [DtsName="off", DtsTag="'messageReceive'"] + void offMessageReceive(optional Callback_WebSocketMessage_Void callback_); }; - }; \ No newline at end of file diff --git a/idl/@ohos.nfc.cardEmulation.idl b/idl/@ohos.nfc.cardEmulation.idl index 36e6129..def168c 100644 --- a/idl/@ohos.nfc.cardEmulation.idl +++ b/idl/@ohos.nfc.cardEmulation.idl @@ -1,33 +1,36 @@ -package ohos.nfc; +package ohos.nfc.cardEmulation; import ohos.base.AsyncCallback as AsyncCallback; -import bundleManager.ElementName as ElementName; -import bundleManager.AbilityInfo as AbilityInfo; +import bundleManager.ElementName.ElementName as ElementName; +import bundleManager.AbilityInfo.AbilityInfo as AbilityInfo; +[DefaultExport] namespace cardEmulation { - [Deprecated] dictionary FeatureType { - [Deprecated] number HCE = 0; [Deprecated] number UICC = 1; [Deprecated] number ESE = 2; - }; dictionary CardType { - String PAYMENT = "payment"; String OTHER = "other"; - }; + [Deprecated] + boolean isSupported(number feature); + [Throws] + boolean hasHceCapability(); + [Throws] + boolean isDefaultService(ElementName elementName, CardType type); + [Throws] + sequence getPaymentServices(); [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Class] interface HceService { - [Deprecated] boolean startHCE(sequence aidList); [Throws] @@ -46,20 +49,5 @@ namespace cardEmulation { async void transmit(sequence response); [Throws] void transmit(sequence response, AsyncCallback_Void callback_); - - }; - [GlobalScope] - interface GlobalScope_cardEmulation_ohos_nfc_cardEmulation { - - [Deprecated] - static boolean isSupported(number feature); - [Throws] - static boolean hasHceCapability(); - [Throws] - static boolean isDefaultService(ElementName elementName, CardType type); - [Throws] - static sequence getPaymentServices(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.nfc.controller.idl b/idl/@ohos.nfc.controller.idl index 435220c..e6c9eca 100644 --- a/idl/@ohos.nfc.controller.idl +++ b/idl/@ohos.nfc.controller.idl @@ -1,37 +1,29 @@ package ohos.nfc.controller; import ohos.base.Callback as Callback; +[DefaultExport] namespace nfcController { - dictionary NfcState { - number STATE_OFF = 1; number STATE_TURNING_ON = 2; number STATE_ON = 3; number STATE_TURNING_OFF = 4; - }; + [Deprecated] + boolean isNfcAvailable(); [Synthetic] callback Callback_NfcState_Void = void (NfcState parameter); - [GlobalScope] - interface GlobalScope_nfcController_ohos_nfc_controller { - - [Deprecated] - static boolean isNfcAvailable(); - [DtsName="on", DtsTag="'nfcStateChange'"] - static void onNfcStateChange(Callback_NfcState_Void callback_); - [DtsName="off", DtsTag="'nfcStateChange'"] - static void offNfcStateChange(optional Callback_NfcState_Void callback_); - [Deprecated] - static boolean openNfc(); - [Throws] - static void enableNfc(); - [Deprecated] - static boolean closeNfc(); - [Throws] - static void disableNfc(); - static boolean isNfcOpen(); - static NfcState getNfcState(); - - }; - + [DtsName="on", DtsTag="'nfcStateChange'"] + void onNfcStateChange(Callback_NfcState_Void callback_); + [DtsName="off", DtsTag="'nfcStateChange'"] + void offNfcStateChange(optional Callback_NfcState_Void callback_); + [Deprecated] + boolean openNfc(); + [Throws] + void enableNfc(); + [Deprecated] + boolean closeNfc(); + [Throws] + void disableNfc(); + boolean isNfcOpen(); + NfcState getNfcState(); }; \ No newline at end of file diff --git a/idl/@ohos.nfc.tag.idl b/idl/@ohos.nfc.tag.idl index e6dfc91..653b9b5 100644 --- a/idl/@ohos.nfc.tag.idl +++ b/idl/@ohos.nfc.tag.idl @@ -1,4 +1,4 @@ -package ohos.nfc; +package ohos.nfc.tag; import tag.nfctech.NfcATag as _NfcATag; import tag.nfctech.NfcBTag as _NfcBTag; import tag.nfctech.NfcFTag as _NfcFTag; @@ -10,16 +10,25 @@ import tag.nfctech.MifareUltralightTag as _MifareUltralightTag; import tag.nfctech.NdefFormatableTag as _NdefFormatableTag; import tag.nfctech.BarcodeTag as _BarcodeTag; import tag.nfctech.NdefMessage as _NdefMessage; -import tag.TagSession as _TagSession; +import tag.tagSession.TagSession as _TagSession; import ability.dataAbilityHelper.PacMap as PacMap; -import ohos.rpc as rpc; +import ohos.rpc.default as rpc; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import bundleManager.ElementName as ElementName; +import ohos.app.ability.Want.default as Want; +import bundleManager.ElementName.ElementName as ElementName; +[DefaultExport] namespace tag { - + const number NFC_A = 1; + const number NFC_B = 2; + const number ISO_DEP = 3; + const number NFC_F = 4; + const number NFC_V = 5; + const number NDEF = 6; + const number NDEF_FORMATABLE = 7; + const number MIFARE_CLASSIC = 8; + const number MIFARE_ULTRALIGHT = 9; + const number NFC_BARCODE = 10; dictionary TnfType { - number TNF_EMPTY = 0; number TNF_WELL_KNOWN = 1; number TNF_MEDIA = 2; @@ -27,45 +36,73 @@ namespace tag { number TNF_EXT_APP = 4; number TNF_UNKNOWN = 5; number TNF_UNCHANGED = 6; - }; dictionary NfcForumType { - number NFC_FORUM_TYPE_1 = 1; number NFC_FORUM_TYPE_2 = 2; number NFC_FORUM_TYPE_3 = 3; number NFC_FORUM_TYPE_4 = 4; number MIFARE_CLASSIC = 101; - }; dictionary MifareClassicType { - number TYPE_UNKNOWN = 0; number TYPE_CLASSIC = 1; number TYPE_PLUS = 2; number TYPE_PRO = 3; - }; dictionary MifareClassicSize { - number MC_SIZE_MINI = 320; number MC_SIZE_1K = 1024; number MC_SIZE_2K = 2048; number MC_SIZE_4K = 4096; - }; dictionary MifareUltralightType { - number TYPE_UNKNOWN = 0; number TYPE_ULTRALIGHT = 1; number TYPE_ULTRALIGHT_C = 2; - }; + [Deprecated] + NfcATag getNfcATag(TagInfo tagInfo); + [Throws] + NfcATag getNfcA(TagInfo tagInfo); + [Deprecated] + NfcBTag getNfcBTag(TagInfo tagInfo); + [Throws] + NfcBTag getNfcB(TagInfo tagInfo); + [Deprecated] + NfcFTag getNfcFTag(TagInfo tagInfo); + [Throws] + NfcFTag getNfcF(TagInfo tagInfo); + [Deprecated] + NfcVTag getNfcVTag(TagInfo tagInfo); + [Throws] + NfcVTag getNfcV(TagInfo tagInfo); + [Throws] + IsoDepTag getIsoDep(TagInfo tagInfo); + [Throws] + NdefTag getNdef(TagInfo tagInfo); + [Throws] + MifareClassicTag getMifareClassic(TagInfo tagInfo); + [Throws] + MifareUltralightTag getMifareUltralight(TagInfo tagInfo); + [Throws] + NdefFormatableTag getNdefFormatable(TagInfo tagInfo); + [Throws] + BarcodeTag getBarcodeTag(TagInfo tagInfo); + [Throws] + TagInfo getTagInfo(Want want); [Async, Synthetic] callback AsyncCallback_TagInfo_Void = void (TagInfo result); + [Throws] + void registerForegroundDispatch(ElementName elementName, sequence discTech, AsyncCallback_TagInfo_Void callback_); + [Throws] + void unregisterForegroundDispatch(ElementName elementName); + [Throws, DtsName="on", DtsTag="'readerMode'"] + void onReaderMode(ElementName elementName, sequence discTech, AsyncCallback_TagInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'readerMode'"] + void offReaderMode(ElementName elementName, optional AsyncCallback_TagInfo_Void callback_); [Entity=Interface] interface TagInfo { - attribute sequence uid; attribute sequence technology; attribute sequence extrasData; @@ -73,41 +110,31 @@ namespace tag { attribute rpc.RemoteObject remoteTagService; [Deprecated] attribute sequence supportedProfiles; - }; [Entity=Interface] interface NdefRecord { - attribute number tnf; attribute sequence rtdType; attribute sequence id; attribute sequence payload; - }; namespace ndef { - - [GlobalScope] - interface GlobalScope_tag.ndef_ohos_nfc_tag { - - [Throws] - static NdefRecord makeUriRecord(String uri); - [Throws] - static NdefRecord makeTextRecord(String text, String locale); - [Throws] - static NdefRecord makeApplicationRecord(String bundleName); - [Throws] - static NdefRecord makeMimeRecord(String mimeType, sequence mimeData); - [Throws] - static NdefRecord makeExternalRecord(String domainName, String type, sequence externalData); - [Throws] - static NdefMessage createNdefMessage(sequence data); - [Throws] - static NdefMessage createNdefMessage(sequence ndefRecords); - [Throws] - static sequence messageToBytes(NdefMessage ndefMessage); - - }; - + [Throws] + NdefRecord makeUriRecord(String uri); + [Throws] + NdefRecord makeTextRecord(String text, String locale); + [Throws] + NdefRecord makeApplicationRecord(String bundleName); + [Throws] + NdefRecord makeMimeRecord(String mimeType, sequence mimeData); + [Throws] + NdefRecord makeExternalRecord(String domainName, String type, sequence externalData); + [Throws] + NdefMessage createNdefMessage(sequence data); + [Throws] + NdefMessage createNdefMessage(sequence ndefRecords); + [Throws] + sequence messageToBytes(NdefMessage ndefMessage); }; typedef _NfcATag NfcATag; typedef _NfcBTag NfcBTag; @@ -121,58 +148,4 @@ namespace tag { typedef _BarcodeTag BarcodeTag; typedef _NdefMessage NdefMessage; typedef _TagSession TagSession; - [GlobalScope] - interface GlobalScope_tag_ohos_nfc_tag { - - const number NFC_A = 1; - const number NFC_B = 2; - const number ISO_DEP = 3; - const number NFC_F = 4; - const number NFC_V = 5; - const number NDEF = 6; - const number NDEF_FORMATABLE = 7; - const number MIFARE_CLASSIC = 8; - const number MIFARE_ULTRALIGHT = 9; - const number NFC_BARCODE = 10; - [Deprecated] - static NfcATag getNfcATag(TagInfo tagInfo); - [Throws] - static NfcATag getNfcA(TagInfo tagInfo); - [Deprecated] - static NfcBTag getNfcBTag(TagInfo tagInfo); - [Throws] - static NfcBTag getNfcB(TagInfo tagInfo); - [Deprecated] - static NfcFTag getNfcFTag(TagInfo tagInfo); - [Throws] - static NfcFTag getNfcF(TagInfo tagInfo); - [Deprecated] - static NfcVTag getNfcVTag(TagInfo tagInfo); - [Throws] - static NfcVTag getNfcV(TagInfo tagInfo); - [Throws] - static IsoDepTag getIsoDep(TagInfo tagInfo); - [Throws] - static NdefTag getNdef(TagInfo tagInfo); - [Throws] - static MifareClassicTag getMifareClassic(TagInfo tagInfo); - [Throws] - static MifareUltralightTag getMifareUltralight(TagInfo tagInfo); - [Throws] - static NdefFormatableTag getNdefFormatable(TagInfo tagInfo); - [Throws] - static BarcodeTag getBarcodeTag(TagInfo tagInfo); - [Throws] - static TagInfo getTagInfo(Want want); - [Throws] - static void registerForegroundDispatch(ElementName elementName, sequence discTech, AsyncCallback_TagInfo_Void callback_); - [Throws] - static void unregisterForegroundDispatch(ElementName elementName); - [Throws, DtsName="on", DtsTag="'readerMode'"] - static void onReaderMode(ElementName elementName, sequence discTech, AsyncCallback_TagInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'readerMode'"] - static void offReaderMode(ElementName elementName, optional AsyncCallback_TagInfo_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.notification.idl b/idl/@ohos.notification.idl index 3628bf1..b8aba22 100644 --- a/idl/@ohos.notification.idl +++ b/idl/@ohos.notification.idl @@ -1,6 +1,6 @@ -package ohos; +package ohos.notification; import ohos.base.AsyncCallback as AsyncCallback; -import notification.NotificationActionButton as NotificationActionButton; +import notification.notificationActionButton.NotificationActionButton as NotificationActionButton; import notification.notificationContent.NotificationBasicContent as NotificationBasicContent; import notification.notificationContent.NotificationContent as NotificationContent; import notification.notificationContent.NotificationLongTextContent as NotificationLongTextContent; @@ -10,25 +10,70 @@ import notification.notificationFlags.NotificationFlags as NotificationFlags; import notification.notificationFlags.NotificationFlagStatus as NotificationFlagStatus; import notification.notificationRequest.NotificationRequest as NotificationRequest; import notification.notificationRequest.DistributedOptions as DistributedOptions; -import notification.NotificationSlot as NotificationSlot; -import notification.NotificationSorting as NotificationSorting; -import notification.NotificationSubscribeInfo as NotificationSubscribeInfo; +import notification.notificationSlot.NotificationSlot as NotificationSlot; +import notification.notificationSorting.NotificationSorting as NotificationSorting; +import notification.notificationSubscribeInfo.NotificationSubscribeInfo as NotificationSubscribeInfo; import notification.notificationSubscriber.NotificationSubscriber as NotificationSubscriber; import notification.notificationSubscriber.SubscribeCallbackData as SubscribeCallbackData; import notification.notificationSubscriber.EnabledNotificationCallbackData as EnabledNotificationCallbackData; -import notification.NotificationTemplate as NotificationTemplate; -import notification.NotificationUserInput as NotificationUserInput; +import notification.notificationTemplate.NotificationTemplate as NotificationTemplate; +import notification.notificationUserInput.NotificationUserInput as NotificationUserInput; +[DefaultExport] namespace notification { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void publish(NotificationRequest request, AsyncCallback_Void callback_); + [Deprecated] + async void publish(NotificationRequest request); + [Deprecated] + void publish(NotificationRequest request, number userId, AsyncCallback_Void callback_); + [Deprecated] + async void publish(NotificationRequest request, number userId); + [Deprecated] + void cancel(number id, AsyncCallback_Void callback_); + [Deprecated] + void cancel(number id, String label, AsyncCallback_Void callback_); + [Deprecated] + async void cancel(number id, optional String label); + [Deprecated] + void cancelAll(AsyncCallback_Void callback_); + [Deprecated] + async void cancelAll(); + [Deprecated] + void addSlot(NotificationSlot slot, AsyncCallback_Void callback_); + [Deprecated] + async void addSlot(NotificationSlot slot); + [Deprecated] + void addSlot(SlotType type, AsyncCallback_Void callback_); + [Deprecated] + async void addSlot(SlotType type); + [Deprecated] + void addSlots(sequence slots, AsyncCallback_Void callback_); + [Deprecated] + async void addSlots(sequence slots); [Async, Synthetic] callback AsyncCallback_NotificationSlot_Void = void (NotificationSlot result); + [Deprecated] + void getSlot(SlotType slotType, AsyncCallback_NotificationSlot_Void callback_); + [Deprecated] + async NotificationSlot getSlot(SlotType slotType); [Async, Synthetic] callback AsyncCallback_Array_NotificationSlot_Void = void (sequence result); [Deprecated] + void getSlots(AsyncCallback_Array_NotificationSlot_Void callback_); + [Deprecated] + async sequence getSlots(); + [Deprecated] + void removeSlot(SlotType slotType, AsyncCallback_Void callback_); + [Deprecated] + async void removeSlot(SlotType slotType); + [Deprecated] + void removeAllSlots(AsyncCallback_Void callback_); + [Deprecated] + async void removeAllSlots(); + [Deprecated] dictionary SlotType { - [Deprecated] number UNKNOWN_TYPE = 0; [Deprecated] @@ -39,11 +84,9 @@ namespace notification { number CONTENT_INFORMATION = 3; [Deprecated] number OTHER_TYPES = 65535; - }; [Deprecated] dictionary ContentType { - [Deprecated] number NOTIFICATION_CONTENT_BASIC_TEXT = 0; [Deprecated] @@ -54,11 +97,9 @@ namespace notification { number NOTIFICATION_CONTENT_CONVERSATION = 3; [Deprecated] number NOTIFICATION_CONTENT_MULTILINE = 4; - }; [Deprecated] dictionary SlotLevel { - [Deprecated] number LEVEL_NONE = 0; [Deprecated] @@ -69,39 +110,165 @@ namespace notification { number LEVEL_DEFAULT = 3; [Deprecated] number LEVEL_HIGH = 4; - }; + [Deprecated] + void subscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); + [Deprecated] + void subscribe(NotificationSubscriber subscriber, NotificationSubscribeInfo info, AsyncCallback_Void callback_); + [Deprecated] + async void subscribe(NotificationSubscriber subscriber, optional NotificationSubscribeInfo info); + [Deprecated] + void unsubscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); + [Deprecated] + async void unsubscribe(NotificationSubscriber subscriber); + [Deprecated] + void enableNotification(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); + [Deprecated] + async void enableNotification(BundleOption bundle, boolean enable); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isNotificationEnabled(BundleOption bundle, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isNotificationEnabled(BundleOption bundle); + [Deprecated] + void isNotificationEnabled(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isNotificationEnabled(); + [Deprecated] + void isNotificationEnabled(number userId, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isNotificationEnabled(number userId); + [Deprecated] + void displayBadge(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); + [Deprecated] + async void displayBadge(BundleOption bundle, boolean enable); + [Deprecated] + void isBadgeDisplayed(BundleOption bundle, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isBadgeDisplayed(BundleOption bundle); + [Deprecated] + void setSlotByBundle(BundleOption bundle, NotificationSlot slot, AsyncCallback_Void callback_); + [Deprecated] + async void setSlotByBundle(BundleOption bundle, NotificationSlot slot); + [Deprecated] + void getSlotsByBundle(BundleOption bundle, AsyncCallback_Array_NotificationSlot_Void callback_); + [Deprecated] + async sequence getSlotsByBundle(BundleOption bundle); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void getSlotNumByBundle(BundleOption bundle, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getSlotNumByBundle(BundleOption bundle); + [Deprecated] + void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason, AsyncCallback_Void callback_); + [Deprecated] + async void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason); + [Deprecated] + void remove(String hashCode, RemoveReason reason, AsyncCallback_Void callback_); + [Deprecated] + async void remove(String hashCode, RemoveReason reason); + [Deprecated] + void removeAll(BundleOption bundle, AsyncCallback_Void callback_); + [Deprecated] + void removeAll(AsyncCallback_Void callback_); + [Deprecated] + void removeAll(number userId, AsyncCallback_Void callback_); + [Deprecated] + async void removeAll(number userId); + [Deprecated] + async void removeAll(optional BundleOption bundle); [Async, Synthetic] callback AsyncCallback_Array_NotificationRequest_Void = void (sequence result); + [Deprecated] + void getAllActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); + [Deprecated] + async sequence getAllActiveNotifications(); + [Deprecated] + void getActiveNotificationCount(AsyncCallback_Number_Void callback_); + [Deprecated] + async number getActiveNotificationCount(); + [Deprecated] + void getActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); + [Deprecated] + async sequence getActiveNotifications(); + [Deprecated] + void cancelGroup(String groupName, AsyncCallback_Void callback_); + [Deprecated] + async void cancelGroup(String groupName); + [Deprecated] + void removeGroupByBundle(BundleOption bundle, String groupName, AsyncCallback_Void callback_); + [Deprecated] + async void removeGroupByBundle(BundleOption bundle, String groupName); + [Deprecated] + void setDoNotDisturbDate(DoNotDisturbDate date, AsyncCallback_Void callback_); + [Deprecated] + async void setDoNotDisturbDate(DoNotDisturbDate date); + [Deprecated] + void setDoNotDisturbDate(DoNotDisturbDate date, number userId, AsyncCallback_Void callback_); + [Deprecated] + async void setDoNotDisturbDate(DoNotDisturbDate date, number userId); [Async, Synthetic] callback AsyncCallback_DoNotDisturbDate_Void = void (DoNotDisturbDate result); + [Deprecated] + void getDoNotDisturbDate(AsyncCallback_DoNotDisturbDate_Void callback_); + [Deprecated] + async DoNotDisturbDate getDoNotDisturbDate(); + [Deprecated] + void getDoNotDisturbDate(number userId, AsyncCallback_DoNotDisturbDate_Void callback_); + [Deprecated] + async DoNotDisturbDate getDoNotDisturbDate(number userId); + [Deprecated] + void supportDoNotDisturbMode(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean supportDoNotDisturbMode(); + [Deprecated] + void isSupportTemplate(String templateName, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isSupportTemplate(String templateName); + [Deprecated] + void requestEnableNotification(AsyncCallback_Void callback_); + [Deprecated] + async void requestEnableNotification(); + [Deprecated] + void enableDistributed(boolean enable, AsyncCallback_Void callback_); + [Deprecated] + async void enableDistributed(boolean enable); + [Deprecated] + void isDistributedEnabled(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isDistributedEnabled(); + [Deprecated] + void enableDistributedByBundle(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); + [Deprecated] + async void enableDistributedByBundle(BundleOption bundle, boolean enable); + [Deprecated] + void isDistributedEnabledByBundle(BundleOption bundle, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isDistributedEnabledByBundle(BundleOption bundle); [Async, Synthetic] callback AsyncCallback_DeviceRemindType_Void = void (DeviceRemindType result); + [Deprecated] + void getDeviceRemindType(AsyncCallback_DeviceRemindType_Void callback_); + [Deprecated] + async DeviceRemindType getDeviceRemindType(); [Entity=Interface, Deprecated] interface BundleOption { - [Deprecated] attribute String bundle; [Optional, Deprecated] attribute number uid; - }; [Entity=Interface, Deprecated] interface NotificationKey { - [Deprecated] attribute number id; [Optional, Deprecated] attribute String label; - }; [Deprecated] dictionary DoNotDisturbType { - [Deprecated] number TYPE_NONE = 0; [Deprecated] @@ -110,22 +277,18 @@ namespace notification { number TYPE_DAILY = 2; [Deprecated] number TYPE_CLEARLY = 3; - }; [Entity=Interface, Deprecated] interface DoNotDisturbDate { - [Deprecated] attribute DoNotDisturbType type; [Deprecated] - attribute Date begin; + attribute date begin; [Deprecated] - attribute Date end; - + attribute date end; }; [Deprecated] dictionary DeviceRemindType { - [Deprecated] number IDLE_DONOT_REMIND = 0; [Deprecated] @@ -134,210 +297,21 @@ namespace notification { number ACTIVE_DONOT_REMIND = 2; [Deprecated] number ACTIVE_REMIND = 3; - }; [Deprecated] dictionary SourceType { - [Deprecated] number TYPE_NORMAL = 0; [Deprecated] number TYPE_CONTINUOUS = 1; [Deprecated] number TYPE_TIMER = 2; - }; [Deprecated] dictionary RemoveReason { - [Deprecated] number CLICK_REASON_REMOVE = 1; [Deprecated] number CANCEL_REASON_REMOVE = 2; - - }; - [GlobalScope] - interface GlobalScope_notification_ohos_notification { - - [Deprecated] - static void publish(NotificationRequest request, AsyncCallback_Void callback_); - [Deprecated] - static async void publish(NotificationRequest request); - [Deprecated] - static void publish(NotificationRequest request, number userId, AsyncCallback_Void callback_); - [Deprecated] - static async void publish(NotificationRequest request, number userId); - [Deprecated] - static void cancel(number id, AsyncCallback_Void callback_); - [Deprecated] - static void cancel(number id, String label, AsyncCallback_Void callback_); - [Deprecated] - static async void cancel(number id, optional String label); - [Deprecated] - static void cancelAll(AsyncCallback_Void callback_); - [Deprecated] - static async void cancelAll(); - [Deprecated] - static void addSlot(NotificationSlot slot, AsyncCallback_Void callback_); - [Deprecated] - static async void addSlot(NotificationSlot slot); - [Deprecated] - static void addSlot(SlotType type, AsyncCallback_Void callback_); - [Deprecated] - static async void addSlot(SlotType type); - [Deprecated] - static void addSlots(sequence slots, AsyncCallback_Void callback_); - [Deprecated] - static async void addSlots(sequence slots); - [Deprecated] - static void getSlot(SlotType slotType, AsyncCallback_NotificationSlot_Void callback_); - [Deprecated] - static async NotificationSlot getSlot(SlotType slotType); - [Deprecated] - static void getSlots(AsyncCallback_Array_NotificationSlot_Void callback_); - [Deprecated] - static async sequence getSlots(); - [Deprecated] - static void removeSlot(SlotType slotType, AsyncCallback_Void callback_); - [Deprecated] - static async void removeSlot(SlotType slotType); - [Deprecated] - static void removeAllSlots(AsyncCallback_Void callback_); - [Deprecated] - static async void removeAllSlots(); - [Deprecated] - static void subscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); - [Deprecated] - static void subscribe(NotificationSubscriber subscriber, NotificationSubscribeInfo info, AsyncCallback_Void callback_); - [Deprecated] - static async void subscribe(NotificationSubscriber subscriber, optional NotificationSubscribeInfo info); - [Deprecated] - static void unsubscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); - [Deprecated] - static async void unsubscribe(NotificationSubscriber subscriber); - [Deprecated] - static void enableNotification(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); - [Deprecated] - static async void enableNotification(BundleOption bundle, boolean enable); - [Deprecated] - static void isNotificationEnabled(BundleOption bundle, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isNotificationEnabled(BundleOption bundle); - [Deprecated] - static void isNotificationEnabled(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isNotificationEnabled(); - [Deprecated] - static void isNotificationEnabled(number userId, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isNotificationEnabled(number userId); - [Deprecated] - static void displayBadge(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); - [Deprecated] - static async void displayBadge(BundleOption bundle, boolean enable); - [Deprecated] - static void isBadgeDisplayed(BundleOption bundle, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isBadgeDisplayed(BundleOption bundle); - [Deprecated] - static void setSlotByBundle(BundleOption bundle, NotificationSlot slot, AsyncCallback_Void callback_); - [Deprecated] - static async void setSlotByBundle(BundleOption bundle, NotificationSlot slot); - [Deprecated] - static void getSlotsByBundle(BundleOption bundle, AsyncCallback_Array_NotificationSlot_Void callback_); - [Deprecated] - static async sequence getSlotsByBundle(BundleOption bundle); - [Deprecated] - static void getSlotNumByBundle(BundleOption bundle, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getSlotNumByBundle(BundleOption bundle); - [Deprecated] - static void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason, AsyncCallback_Void callback_); - [Deprecated] - static async void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason); - [Deprecated] - static void remove(String hashCode, RemoveReason reason, AsyncCallback_Void callback_); - [Deprecated] - static async void remove(String hashCode, RemoveReason reason); - [Deprecated] - static void removeAll(BundleOption bundle, AsyncCallback_Void callback_); - [Deprecated] - static void removeAll(AsyncCallback_Void callback_); - [Deprecated] - static void removeAll(number userId, AsyncCallback_Void callback_); - [Deprecated] - static async void removeAll(number userId); - [Deprecated] - static async void removeAll(optional BundleOption bundle); - [Deprecated] - static void getAllActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); - [Deprecated] - static async sequence getAllActiveNotifications(); - [Deprecated] - static void getActiveNotificationCount(AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getActiveNotificationCount(); - [Deprecated] - static void getActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); - [Deprecated] - static async sequence getActiveNotifications(); - [Deprecated] - static void cancelGroup(String groupName, AsyncCallback_Void callback_); - [Deprecated] - static async void cancelGroup(String groupName); - [Deprecated] - static void removeGroupByBundle(BundleOption bundle, String groupName, AsyncCallback_Void callback_); - [Deprecated] - static async void removeGroupByBundle(BundleOption bundle, String groupName); - [Deprecated] - static void setDoNotDisturbDate(DoNotDisturbDate date, AsyncCallback_Void callback_); - [Deprecated] - static async void setDoNotDisturbDate(DoNotDisturbDate date); - [Deprecated] - static void setDoNotDisturbDate(DoNotDisturbDate date, number userId, AsyncCallback_Void callback_); - [Deprecated] - static async void setDoNotDisturbDate(DoNotDisturbDate date, number userId); - [Deprecated] - static void getDoNotDisturbDate(AsyncCallback_DoNotDisturbDate_Void callback_); - [Deprecated] - static async DoNotDisturbDate getDoNotDisturbDate(); - [Deprecated] - static void getDoNotDisturbDate(number userId, AsyncCallback_DoNotDisturbDate_Void callback_); - [Deprecated] - static async DoNotDisturbDate getDoNotDisturbDate(number userId); - [Deprecated] - static void supportDoNotDisturbMode(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean supportDoNotDisturbMode(); - [Deprecated] - static void isSupportTemplate(String templateName, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isSupportTemplate(String templateName); - [Deprecated] - static void requestEnableNotification(AsyncCallback_Void callback_); - [Deprecated] - static async void requestEnableNotification(); - [Deprecated] - static void enableDistributed(boolean enable, AsyncCallback_Void callback_); - [Deprecated] - static async void enableDistributed(boolean enable); - [Deprecated] - static void isDistributedEnabled(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isDistributedEnabled(); - [Deprecated] - static void enableDistributedByBundle(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); - [Deprecated] - static async void enableDistributedByBundle(BundleOption bundle, boolean enable); - [Deprecated] - static void isDistributedEnabledByBundle(BundleOption bundle, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isDistributedEnabledByBundle(BundleOption bundle); - [Deprecated] - static void getDeviceRemindType(AsyncCallback_DeviceRemindType_Void callback_); - [Deprecated] - static async DeviceRemindType getDeviceRemindType(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.notificationManager.idl b/idl/@ohos.notificationManager.idl index 38e4efd..8b3efa6 100644 --- a/idl/@ohos.notificationManager.idl +++ b/idl/@ohos.notificationManager.idl @@ -1,15 +1,11 @@ -package ohos; -import ohos.base.AsyncCallback as AsyncCallback; +package ohos.notificationManager; import notification.NotificationCommonDef.BundleOption as _BundleOption; -import notification.NotificationActionButton as _NotificationActionButton; +import notification.notificationActionButton.NotificationActionButton as _NotificationActionButton; import notification.notificationContent.NotificationBasicContent as _NotificationBasicContent; import notification.notificationContent.NotificationContent as _NotificationContent; import notification.notificationContent.NotificationLongTextContent as _NotificationLongTextContent; -import notification.notificationContent.NotificationLiveViewContent as _NotificationLiveViewContent; import notification.notificationContent.NotificationMultiLineContent as _NotificationMultiLineContent; import notification.notificationContent.NotificationPictureContent as _NotificationPictureContent; -import notification.notificationContent.LiveViewStatus as _LiveViewStatus; -import notification.notificationContent.LiveViewTypes as _LiveViewTypes; import notification.notificationContent.NotificationSystemLiveViewContent as _NotificationSystemLiveViewContent; import notification.notificationContent.NotificationCapsule as _NotificationCapsule; import notification.notificationContent.NotificationButton as _NotificationButton; @@ -20,55 +16,325 @@ import notification.notificationFlags.NotificationFlagStatus as _NotificationFla import notification.notificationRequest.NotificationRequest as _NotificationRequest; import notification.notificationRequest.UnifiedGroupInfo as _UnifiedGroupInfo; import notification.notificationRequest.DistributedOptions as _DistributedOptions; +import notification.notificationSlot.NotificationSlot as _NotificationSlot; +import notification.notificationSorting.NotificationSorting as _NotificationSorting; +import notification.notificationTemplate.NotificationTemplate as _NotificationTemplate; +import notification.notificationUserInput.NotificationUserInput as _NotificationUserInput; +import ohos.base.AsyncCallback as AsyncCallback; +import notification.notificationContent.NotificationLiveViewContent as _NotificationLiveViewContent; +import notification.notificationContent.LiveViewStatus as _LiveViewStatus; +import notification.notificationContent.LiveViewTypes as _LiveViewTypes; +import notification.notificationRequest.NotificationFilter as _NotificationFilter; +import notification.notificationRequest.NotificationCheckRequest as _NotificationCheckRequest; +import application.UIAbilityContext.default as UIAbilityContext; +import ohos.base.AsyncCallback as AsyncCallback; +import notification.notificationContent.NotificationLiveViewContent as _NotificationLiveViewContent; +import notification.notificationContent.LiveViewStatus as _LiveViewStatus; +import notification.notificationContent.LiveViewTypes as _LiveViewTypes; import notification.notificationRequest.NotificationFilter as _NotificationFilter; import notification.notificationRequest.NotificationCheckRequest as _NotificationCheckRequest; -import notification.NotificationSlot as _NotificationSlot; -import notification.NotificationSorting as _NotificationSorting; -import notification.NotificationTemplate as _NotificationTemplate; -import notification.NotificationUserInput as _NotificationUserInput; -import application.UIAbilityContext as UIAbilityContext; +import application.UIAbilityContext.default as UIAbilityContext; +[DefaultExport] namespace notificationManager { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void publish(NotificationRequest request, AsyncCallback_Void callback_); + [Throws] + async void publish(NotificationRequest request); + [Throws] + void publish(NotificationRequest request, number userId, AsyncCallback_Void callback_); + [Throws] + async void publish(NotificationRequest request, number userId); + [Throws] + void publishAsBundle(NotificationRequest request, String representativeBundle, number userId, AsyncCallback_Void callback_); + [Throws] + async void publishAsBundle(NotificationRequest request, String representativeBundle, number userId); + [Throws] + async void publishAsBundle(BundleOption representativeBundle, NotificationRequest request); + [Throws] + void cancel(number id, AsyncCallback_Void callback_); + [Throws] + void cancel(number id, String label, AsyncCallback_Void callback_); + [Throws] + async void cancel(number id, optional String label); + [Throws] + async void cancel(BundleOption representativeBundle, number id); + [Throws] + void cancelAsBundle(number id, String representativeBundle, number userId, AsyncCallback_Void callback_); + [Throws] + async void cancelAsBundle(number id, String representativeBundle, number userId); + [Throws] + async void cancelAsBundle(BundleOption representativeBundle, number id); + [Throws] + void cancelAll(AsyncCallback_Void callback_); + [Throws] + async void cancelAll(); + [Throws] + void addSlot(NotificationSlot slot, AsyncCallback_Void callback_); + [Throws] + async void addSlot(NotificationSlot slot); + [Throws] + void addSlot(SlotType type, AsyncCallback_Void callback_); + [Throws] + async void addSlot(SlotType type); + [Throws] + void addSlots(sequence slots, AsyncCallback_Void callback_); + [Throws] + async void addSlots(sequence slots); [Async, Synthetic] callback AsyncCallback_NotificationSlot_Void = void (NotificationSlot result); + [Throws] + void getSlot(SlotType slotType, AsyncCallback_NotificationSlot_Void callback_); + [Throws] + async NotificationSlot getSlot(SlotType slotType); [Async, Synthetic] callback AsyncCallback_Array_NotificationSlot_Void = void (sequence result); + [Throws] + void getSlots(AsyncCallback_Array_NotificationSlot_Void callback_); + [Throws] + async sequence getSlots(); + [Throws] + async sequence getAllNotificationEnabledBundles(); + [Throws] + void removeSlot(SlotType slotType, AsyncCallback_Void callback_); + [Throws] + async void removeSlot(SlotType slotType); + [Throws] + void removeAllSlots(AsyncCallback_Void callback_); + [Throws] + async void removeAllSlots(); + [Throws] + void setNotificationEnable(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setNotificationEnable(BundleOption bundle, boolean enable); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isNotificationEnabled(BundleOption bundle, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isNotificationEnabled(BundleOption bundle); + [Throws] + void isNotificationEnabled(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isNotificationEnabled(); + [Throws] + boolean isNotificationEnabledSync(); + [Throws] + void isNotificationEnabled(number userId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isNotificationEnabled(number userId); + [Throws] + void displayBadge(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); + [Throws] + async void displayBadge(BundleOption bundle, boolean enable); + [Throws] + void isBadgeDisplayed(BundleOption bundle, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isBadgeDisplayed(BundleOption bundle); + [Throws] + void setSlotByBundle(BundleOption bundle, NotificationSlot slot, AsyncCallback_Void callback_); + [Throws] + async void setSlotByBundle(BundleOption bundle, NotificationSlot slot); + [Throws] + void getSlotsByBundle(BundleOption bundle, AsyncCallback_Array_NotificationSlot_Void callback_); + [Throws] + async NotificationSlot getSlotByBundle(BundleOption bundle, SlotType slotType); + [Throws] + async sequence getSlotsByBundle(BundleOption bundle); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getSlotNumByBundle(BundleOption bundle, AsyncCallback_Number_Void callback_); + [Throws] + async number getSlotNumByBundle(BundleOption bundle); [Async, Synthetic] callback AsyncCallback_Array_NotificationRequest_Void = void (sequence result); + [Throws] + void getAllActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); + [Throws] + async sequence getAllActiveNotifications(); + [Throws] + void getActiveNotificationCount(AsyncCallback_Number_Void callback_); + [Throws] + async number getActiveNotificationCount(); + [Throws] + void getActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); + [Throws] + async sequence getActiveNotifications(); [Async, Synthetic] callback AsyncCallback_NotificationRequest_Void = void (NotificationRequest result); + [Throws] + void getActiveNotificationByFilter(NotificationFilter filter, AsyncCallback_NotificationRequest_Void callback_); + [Throws] + async NotificationRequest getActiveNotificationByFilter(NotificationFilter filter); + [Throws] + void cancelGroup(String groupName, AsyncCallback_Void callback_); + [Throws] + async void cancelGroup(String groupName); + [Throws] + void removeGroupByBundle(BundleOption bundle, String groupName, AsyncCallback_Void callback_); + [Throws] + async void removeGroupByBundle(BundleOption bundle, String groupName); + [Throws] + void setDoNotDisturbDate(DoNotDisturbDate date, AsyncCallback_Void callback_); + [Throws] + async void setDoNotDisturbDate(DoNotDisturbDate date); + [Throws] + void setDoNotDisturbDate(DoNotDisturbDate date, number userId, AsyncCallback_Void callback_); + [Throws] + async void setDoNotDisturbDate(DoNotDisturbDate date, number userId); [Async, Synthetic] callback AsyncCallback_DoNotDisturbDate_Void = void (DoNotDisturbDate result); + [Throws] + void getDoNotDisturbDate(AsyncCallback_DoNotDisturbDate_Void callback_); + [Throws] + async DoNotDisturbDate getDoNotDisturbDate(); + [Throws] + void getDoNotDisturbDate(number userId, AsyncCallback_DoNotDisturbDate_Void callback_); + [Throws] + async DoNotDisturbDate getDoNotDisturbDate(number userId); + [Throws] + void isSupportDoNotDisturbMode(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isSupportDoNotDisturbMode(); + [Throws] + void isSupportTemplate(String templateName, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isSupportTemplate(String templateName); + [Deprecated, Throws] + void requestEnableNotification(AsyncCallback_Void callback_); + [Throws] + void requestEnableNotification(UIAbilityContext context, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void requestEnableNotification(); + [Throws] + async void requestEnableNotification(UIAbilityContext context); + [Throws] + void setDistributedEnable(boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setDistributedEnable(boolean enable); + [Throws] + void isDistributedEnabled(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isDistributedEnabled(); + [Throws] + void setDistributedEnableByBundle(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setDistributedEnableByBundle(BundleOption bundle, boolean enable); + [Throws] + async void setDistributedEnabledByBundle(BundleOption bundle, String deviceType, boolean enable); + [Throws] + void isDistributedEnabledByBundle(BundleOption bundle, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isDistributedEnabledByBundle(BundleOption bundle); + [Throws] + async boolean isDistributedEnabledByBundle(BundleOption bundle, String deviceType); + [Throws] + async void setDistributedEnableByBundles(sequence bundleEnableInfos, String deviceType); + [Throws] + async void setSmartReminderEnabled(String deviceType, boolean enable); + [Throws] + async boolean isSmartReminderEnabled(String deviceType); [Async, Synthetic] callback AsyncCallback_DeviceRemindType_Void = void (DeviceRemindType result); + [Throws] + void getDeviceRemindType(AsyncCallback_DeviceRemindType_Void callback_); + [Throws] + async DeviceRemindType getDeviceRemindType(); + [Throws] + void setNotificationEnableSlot(BundleOption bundle, SlotType type, boolean enable, AsyncCallback_Void callback_); + [Throws] + void setNotificationEnableSlot(BundleOption bundle, SlotType type, boolean enable, boolean isForceControl, AsyncCallback_Void callback_); + [Throws] + async void setNotificationEnableSlot(BundleOption bundle, SlotType type, boolean enable, optional boolean isForceControl); + [Throws] + void isNotificationSlotEnabled(BundleOption bundle, SlotType type, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isNotificationSlotEnabled(BundleOption bundle, SlotType type); + [Throws] + void setSyncNotificationEnabledWithoutApp(number userId, boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setSyncNotificationEnabledWithoutApp(number userId, boolean enable); + [Throws] + void getSyncNotificationEnabledWithoutApp(number userId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean getSyncNotificationEnabledWithoutApp(number userId); + [Throws] + void setBadgeNumber(number badgeNumber, AsyncCallback_Void callback_); + [Throws] + async void setBadgeNumber(number badgeNumber); + [Throws] + async void setBadgeNumberByBundle(BundleOption bundle, number badgeNumber); [Synthetic] callback Callback_NotificationCheckInfo_NotificationCheckResult = NotificationCheckResult (NotificationCheckInfo checkInfo); + [Throws, DtsName="on", DtsTag="'checkNotification'"] + void onCheckNotification(Callback_NotificationCheckInfo_NotificationCheckResult callback_); [Synthetic] callback onCheckNotification_callback = Promise (NotificationCheckInfo checkInfo); + [Throws, DtsName="on", DtsTag="'checkNotification'"] + void onCheckNotification(NotificationCheckRequest checkRequest, onCheckNotification_callback callback_); + [Throws, DtsName="off", DtsTag="'checkNotification'"] + void offCheckNotification(optional Callback_NotificationCheckInfo_NotificationCheckResult callback_); + [Throws] + async void triggerSystemLiveView(BundleOption bundle, number notificationId, ButtonOptions buttonOptions); + [Throws] + async void subscribeSystemLiveView(SystemLiveViewSubscriber subscriber); + [Throws] + async void setSlotFlagsByBundle(BundleOption bundle, number slotFlags); + [Throws] + async number getSlotFlagsByBundle(BundleOption bundle); + [Throws] + async NotificationSetting getNotificationSetting(); + [Throws] + async void addDoNotDisturbProfile(sequence templates); + [Throws] + async void removeDoNotDisturbProfile(sequence templates); + [Throws] + async number setAdditionalConfig(String key, String value); + [Throws] + async void openNotificationSettings(UIAbilityContext context); + [Throws] + async DoNotDisturbProfile getDoNotDisturbProfile(number id); + [Throws] + async void disableNotificationFeature(boolean disabled, sequence bundleList); + [Throws] + async void disableNotificationFeature(boolean disabled, sequence bundleList, number userId); + [Throws] + async void setTargetDeviceStatus(String deviceType, number status); + [Throws] + async void setDistributedEnabledBySlot(SlotType slot, String deviceType, boolean enabled); + [Throws] + async boolean isDistributedEnabledBySlot(SlotType slot, String deviceType); + [Throws] + async boolean isDistributedEnabled(String deviceType); + [Throws] + async void setDistributedEnabled(boolean enable, String deviceType); + [Throws] + async sequence getDistributedDeviceList(); + [Throws] + async void setSilentReminderEnabled(BundleOption bundle, boolean enabled); + [Throws] + async SwitchState isSilentReminderEnabled(BundleOption bundle); + dictionary SwitchState { + number USER_MODIFIED_OFF = 0; + number USER_MODIFIED_ON = 1; + number SYSTEM_DEFAULT_OFF = 2; + number SYSTEM_DEFAULT_ON = 3; + }; [Entity=Interface] interface ButtonOptions { - attribute String buttonName; - }; [Synthetic] callback Callback_Number_ButtonOptions_Void = void (number notificationId, ButtonOptions buttonOptions); [Entity=Interface] interface SystemLiveViewSubscriber { - [Optional] attribute Callback_Number_ButtonOptions_Void onResponse; - }; [Entity=Interface] interface NotificationCheckInfo { - attribute String bundleName; attribute number notificationId; [Optional] @@ -78,17 +344,18 @@ namespace notificationManager { attribute SlotType slotType; [Optional] attribute record extraInfos; - }; [Entity=Interface] interface NotificationCheckResult { - attribute number code; attribute String message; - + }; + [Entity=Interface] + interface NotificationSetting { + attribute boolean vibrationEnabled; + attribute boolean soundEnabled; }; dictionary SlotType { - number UNKNOWN_TYPE = 0; number SOCIAL_COMMUNICATION = 1; number SERVICE_INFORMATION = 2; @@ -97,10 +364,8 @@ namespace notificationManager { number CUSTOMER_SERVICE = 5; number EMERGENCY_INFORMATION = 10; number OTHER_TYPES = 65535; - }; dictionary ContentType { - number NOTIFICATION_CONTENT_BASIC_TEXT = 0; number NOTIFICATION_CONTENT_LONG_TEXT = 1; number NOTIFICATION_CONTENT_PICTURE = 2; @@ -108,66 +373,58 @@ namespace notificationManager { number NOTIFICATION_CONTENT_MULTILINE = 4; number NOTIFICATION_CONTENT_SYSTEM_LIVE_VIEW = 5; number NOTIFICATION_CONTENT_LIVE_VIEW = 6; - }; dictionary SlotLevel { - number LEVEL_NONE = 0; number LEVEL_MIN = 1; number LEVEL_LOW = 2; number LEVEL_DEFAULT = 3; number LEVEL_HIGH = 4; - }; dictionary DoNotDisturbType { - number TYPE_NONE = 0; number TYPE_ONCE = 1; number TYPE_DAILY = 2; number TYPE_CLEARLY = 3; - }; [Entity=Interface] interface DoNotDisturbDate { - attribute DoNotDisturbType type; - attribute Date begin; - attribute Date end; - + attribute date begin; + attribute date end; + }; + [Entity=Interface] + interface DistributedBundleEnableInfo { + attribute String bundleName; + attribute number uid; + [Optional] + attribute boolean enable; }; [Entity=Interface] interface DoNotDisturbProfile { - attribute number id; attribute String name; [Optional] attribute sequence trustlist; - }; dictionary DeviceRemindType { - number IDLE_DONOT_REMIND = 0; number IDLE_REMIND = 1; number ACTIVE_DONOT_REMIND = 2; number ACTIVE_REMIND = 3; - }; dictionary SourceType { - number TYPE_NORMAL = 0; number TYPE_CONTINUOUS = 1; number TYPE_TIMER = 2; - }; dictionary NotificationControlFlagStatus { - number NOTIFICATION_STATUS_CLOSE_SOUND = 1; number NOTIFICATION_STATUS_CLOSE_LOCKSCREEN = 2; number NOTIFICATION_STATUS_CLOSE_BANNER = 4; number NOTIFICATION_STATUS_CLOSE_LIGHT_SCREEN = 8; number NOTIFICATION_STATUS_CLOSE_VIBRATION = 16; number NOTIFICATION_STATUS_CLOSE_STATUSBAR_ICON = 32; - }; typedef _BundleOption BundleOption; typedef _NotificationActionButton NotificationActionButton; @@ -195,252 +452,4 @@ namespace notificationManager { typedef _NotificationButton NotificationButton; typedef _NotificationTime NotificationTime; typedef _NotificationProgress NotificationProgress; - [GlobalScope] - interface GlobalScope_notificationManager_ohos_notificationManager { - - [Throws] - static void publish(NotificationRequest request, AsyncCallback_Void callback_); - [Throws] - static async void publish(NotificationRequest request); - [Throws] - static void publish(NotificationRequest request, number userId, AsyncCallback_Void callback_); - [Throws] - static async void publish(NotificationRequest request, number userId); - [Throws] - static void publishAsBundle(NotificationRequest request, String representativeBundle, number userId, AsyncCallback_Void callback_); - [Throws] - static async void publishAsBundle(NotificationRequest request, String representativeBundle, number userId); - [Throws] - static async void publishAsBundle(BundleOption representativeBundle, NotificationRequest request); - [Throws] - static void cancel(number id, AsyncCallback_Void callback_); - [Throws] - static void cancel(number id, String label, AsyncCallback_Void callback_); - [Throws] - static async void cancel(number id, optional String label); - [Throws] - static async void cancel(BundleOption representativeBundle, number id); - [Throws] - static void cancelAsBundle(number id, String representativeBundle, number userId, AsyncCallback_Void callback_); - [Throws] - static async void cancelAsBundle(number id, String representativeBundle, number userId); - [Throws] - static async void cancelAsBundle(BundleOption representativeBundle, number id); - [Throws] - static void cancelAll(AsyncCallback_Void callback_); - [Throws] - static async void cancelAll(); - [Throws] - static void addSlot(NotificationSlot slot, AsyncCallback_Void callback_); - [Throws] - static async void addSlot(NotificationSlot slot); - [Throws] - static void addSlot(SlotType type, AsyncCallback_Void callback_); - [Throws] - static async void addSlot(SlotType type); - [Throws] - static void addSlots(sequence slots, AsyncCallback_Void callback_); - [Throws] - static async void addSlots(sequence slots); - [Throws] - static void getSlot(SlotType slotType, AsyncCallback_NotificationSlot_Void callback_); - [Throws] - static async NotificationSlot getSlot(SlotType slotType); - [Throws] - static void getSlots(AsyncCallback_Array_NotificationSlot_Void callback_); - [Throws] - static async sequence getSlots(); - [Throws] - static async sequence getAllNotificationEnabledBundles(); - [Throws] - static void removeSlot(SlotType slotType, AsyncCallback_Void callback_); - [Throws] - static async void removeSlot(SlotType slotType); - [Throws] - static void removeAllSlots(AsyncCallback_Void callback_); - [Throws] - static async void removeAllSlots(); - [Throws] - static void setNotificationEnable(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setNotificationEnable(BundleOption bundle, boolean enable); - [Throws] - static void isNotificationEnabled(BundleOption bundle, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isNotificationEnabled(BundleOption bundle); - [Throws] - static void isNotificationEnabled(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isNotificationEnabled(); - [Throws] - static boolean isNotificationEnabledSync(); - [Throws] - static void isNotificationEnabled(number userId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isNotificationEnabled(number userId); - [Throws] - static void displayBadge(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void displayBadge(BundleOption bundle, boolean enable); - [Throws] - static void isBadgeDisplayed(BundleOption bundle, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isBadgeDisplayed(BundleOption bundle); - [Throws] - static void setSlotByBundle(BundleOption bundle, NotificationSlot slot, AsyncCallback_Void callback_); - [Throws] - static async void setSlotByBundle(BundleOption bundle, NotificationSlot slot); - [Throws] - static void getSlotsByBundle(BundleOption bundle, AsyncCallback_Array_NotificationSlot_Void callback_); - [Throws] - static async NotificationSlot getSlotByBundle(BundleOption bundle, SlotType slotType); - [Throws] - static async sequence getSlotsByBundle(BundleOption bundle); - [Throws] - static void getSlotNumByBundle(BundleOption bundle, AsyncCallback_Number_Void callback_); - [Throws] - static async number getSlotNumByBundle(BundleOption bundle); - [Throws] - static void getAllActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); - [Throws] - static async sequence getAllActiveNotifications(); - [Throws] - static void getActiveNotificationCount(AsyncCallback_Number_Void callback_); - [Throws] - static async number getActiveNotificationCount(); - [Throws] - static void getActiveNotifications(AsyncCallback_Array_NotificationRequest_Void callback_); - [Throws] - static async sequence getActiveNotifications(); - [Throws] - static void getActiveNotificationByFilter(NotificationFilter filter, AsyncCallback_NotificationRequest_Void callback_); - [Throws] - static async NotificationRequest getActiveNotificationByFilter(NotificationFilter filter); - [Throws] - static void cancelGroup(String groupName, AsyncCallback_Void callback_); - [Throws] - static async void cancelGroup(String groupName); - [Throws] - static void removeGroupByBundle(BundleOption bundle, String groupName, AsyncCallback_Void callback_); - [Throws] - static async void removeGroupByBundle(BundleOption bundle, String groupName); - [Throws] - static void setDoNotDisturbDate(DoNotDisturbDate date, AsyncCallback_Void callback_); - [Throws] - static async void setDoNotDisturbDate(DoNotDisturbDate date); - [Throws] - static void setDoNotDisturbDate(DoNotDisturbDate date, number userId, AsyncCallback_Void callback_); - [Throws] - static async void setDoNotDisturbDate(DoNotDisturbDate date, number userId); - [Throws] - static void getDoNotDisturbDate(AsyncCallback_DoNotDisturbDate_Void callback_); - [Throws] - static async DoNotDisturbDate getDoNotDisturbDate(); - [Throws] - static void getDoNotDisturbDate(number userId, AsyncCallback_DoNotDisturbDate_Void callback_); - [Throws] - static async DoNotDisturbDate getDoNotDisturbDate(number userId); - [Throws] - static void isSupportDoNotDisturbMode(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isSupportDoNotDisturbMode(); - [Throws] - static void isSupportTemplate(String templateName, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isSupportTemplate(String templateName); - [Deprecated, Throws] - static void requestEnableNotification(AsyncCallback_Void callback_); - [Throws] - static void requestEnableNotification(UIAbilityContext context, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void requestEnableNotification(); - [Throws] - static async void requestEnableNotification(UIAbilityContext context); - [Throws] - static void setDistributedEnable(boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setDistributedEnable(boolean enable); - [Throws] - static void isDistributedEnabled(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isDistributedEnabled(); - [Throws] - static void setDistributedEnableByBundle(BundleOption bundle, boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setDistributedEnableByBundle(BundleOption bundle, boolean enable); - [Throws] - static async void setDistributedEnabledByBundle(BundleOption bundle, String deviceType, boolean enable); - [Throws] - static void isDistributedEnabledByBundle(BundleOption bundle, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isDistributedEnabledByBundle(BundleOption bundle); - [Throws] - static async boolean isDistributedEnabledByBundle(BundleOption bundle, String deviceType); - [Throws] - static async void setSmartReminderEnabled(String deviceType, boolean enable); - [Throws] - static async boolean isSmartReminderEnabled(String deviceType); - [Throws] - static void getDeviceRemindType(AsyncCallback_DeviceRemindType_Void callback_); - [Throws] - static async DeviceRemindType getDeviceRemindType(); - [Throws] - static void setNotificationEnableSlot(BundleOption bundle, SlotType type, boolean enable, AsyncCallback_Void callback_); - [Throws] - static void setNotificationEnableSlot(BundleOption bundle, SlotType type, boolean enable, boolean isForceControl, AsyncCallback_Void callback_); - [Throws] - static async void setNotificationEnableSlot(BundleOption bundle, SlotType type, boolean enable, optional boolean isForceControl); - [Throws] - static void isNotificationSlotEnabled(BundleOption bundle, SlotType type, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isNotificationSlotEnabled(BundleOption bundle, SlotType type); - [Throws] - static void setSyncNotificationEnabledWithoutApp(number userId, boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setSyncNotificationEnabledWithoutApp(number userId, boolean enable); - [Throws] - static void getSyncNotificationEnabledWithoutApp(number userId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean getSyncNotificationEnabledWithoutApp(number userId); - [Throws] - static void setBadgeNumber(number badgeNumber, AsyncCallback_Void callback_); - [Throws] - static async void setBadgeNumber(number badgeNumber); - [Throws] - static async void setBadgeNumberByBundle(BundleOption bundle, number badgeNumber); - [Throws, DtsName="on", DtsTag="'checkNotification'"] - static void onCheckNotification(Callback_NotificationCheckInfo_NotificationCheckResult callback_); - [Throws, DtsName="on", DtsTag="'checkNotification'"] - static void onCheckNotification(NotificationCheckRequest checkRequest, onCheckNotification_callback callback_); - [Throws, DtsName="off", DtsTag="'checkNotification'"] - static void offCheckNotification(optional Callback_NotificationCheckInfo_NotificationCheckResult callback_); - [Throws] - static async void triggerSystemLiveView(BundleOption bundle, number notificationId, ButtonOptions buttonOptions); - [Throws] - static async void subscribeSystemLiveView(SystemLiveViewSubscriber subscriber); - [Throws] - static async void setSlotFlagsByBundle(BundleOption bundle, number slotFlags); - [Throws] - static async number getSlotFlagsByBundle(BundleOption bundle); - [Throws] - static async void addDoNotDisturbProfile(sequence templates); - [Throws] - static async void removeDoNotDisturbProfile(sequence templates); - [Throws] - static async number setAdditionalConfig(String key, String value); - [Throws] - static async void openNotificationSettings(UIAbilityContext context); - [Throws] - static async DoNotDisturbProfile getDoNotDisturbProfile(number id); - [Throws] - static async void setTargetDeviceStatus(String deviceType, number status); - [Throws] - static async void disableNotificationFeature(boolean disabled, sequence bundleList); - [Throws] - static async void setDistributedEnabledBySlot(SlotType slot, String deviceType, boolean enabled); - [Throws] - static async boolean isDistributedEnabledBySlot(SlotType slot, String deviceType); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.notificationSubscribe.idl b/idl/@ohos.notificationSubscribe.idl index 1d2f186..53ce34f 100644 --- a/idl/@ohos.notificationSubscribe.idl +++ b/idl/@ohos.notificationSubscribe.idl @@ -1,37 +1,72 @@ -package ohos; +package ohos.notificationSubscribe; import ohos.base.AsyncCallback as AsyncCallback; import notification.NotificationCommonDef.BundleOption as _BundleOption; -import notification.NotificationSubscribeInfo as _NotificationSubscribeInfo; +import notification.notificationSubscribeInfo.NotificationSubscribeInfo as _NotificationSubscribeInfo; import notification.notificationSubscriber.NotificationSubscriber as _NotificationSubscriber; import notification.notificationSubscriber.SubscribeCallbackData as _SubscribeCallbackData; import notification.notificationSubscriber.EnabledNotificationCallbackData as _EnabledNotificationCallbackData; import notification.notificationSubscriber.BadgeNumberCallbackData as _BadgeNumberCallbackData; +import notification.notificationSubscriber.BadgeNumberCallbackData as _BadgeNumberCallbackData; +[DefaultExport] namespace notificationSubscribe { - [Entity=Interface] interface NotificationKey { - attribute number id; [Optional] attribute String label; - }; dictionary RemoveReason { - number CLICK_REASON_REMOVE = 1; number CANCEL_REASON_REMOVE = 2; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void subscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); + [Throws] + async void subscribeSelf(NotificationSubscriber subscriber); + [Throws] + void subscribe(NotificationSubscriber subscriber, NotificationSubscribeInfo info, AsyncCallback_Void callback_); + [Throws] + async void subscribe(NotificationSubscriber subscriber, optional NotificationSubscribeInfo info); + [Throws] + void unsubscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); + [Throws] + async void unsubscribe(NotificationSubscriber subscriber); + [Throws] + void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason, AsyncCallback_Void callback_); + [Throws] + async void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason); + [Throws] + void remove(String hashCode, RemoveReason reason, AsyncCallback_Void callback_); + [Throws] + void remove(sequence hashCodes, RemoveReason reason, AsyncCallback_Void callback_); + [Throws] + async void remove(String hashCode, RemoveReason reason); + [Throws] + async void remove(sequence hashCodes, RemoveReason reason); + [Throws] + void removeAll(BundleOption bundle, AsyncCallback_Void callback_); + [Throws] + void removeAll(AsyncCallback_Void callback_); + [Throws] + void removeAll(number userId, AsyncCallback_Void callback_); + [Throws] + async void removeAll(number userId); + [Throws] + async void removeAll(optional BundleOption bundle); + [Throws] + async void distributeOperation(String hashcode, optional OperationInfo operationInfo); [Entity=Interface] interface OperationInfo { - [Optional] attribute String actionName; [Optional] attribute String userInput; - + [Optional] + attribute number operationType; + [Optional] + attribute number buttonIndex; }; typedef _BundleOption BundleOption; typedef _NotificationSubscribeInfo NotificationSubscribeInfo; @@ -39,46 +74,4 @@ namespace notificationSubscribe { typedef _SubscribeCallbackData SubscribeCallbackData; typedef _EnabledNotificationCallbackData EnabledNotificationCallbackData; typedef _BadgeNumberCallbackData BadgeNumberCallbackData; - [GlobalScope] - interface GlobalScope_notificationSubscribe_ohos_notificationSubscribe { - - [Throws] - static void subscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); - [Throws] - static async void subscribeSelf(NotificationSubscriber subscriber); - [Throws] - static void subscribe(NotificationSubscriber subscriber, NotificationSubscribeInfo info, AsyncCallback_Void callback_); - [Throws] - static async void subscribe(NotificationSubscriber subscriber, optional NotificationSubscribeInfo info); - [Throws] - static void unsubscribe(NotificationSubscriber subscriber, AsyncCallback_Void callback_); - [Throws] - static async void unsubscribe(NotificationSubscriber subscriber); - [Throws] - static void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason, AsyncCallback_Void callback_); - [Throws] - static async void remove(BundleOption bundle, NotificationKey notificationKey, RemoveReason reason); - [Throws] - static void remove(String hashCode, RemoveReason reason, AsyncCallback_Void callback_); - [Throws] - static void remove(sequence hashCodes, RemoveReason reason, AsyncCallback_Void callback_); - [Throws] - static async void remove(String hashCode, RemoveReason reason); - [Throws] - static async void remove(sequence hashCodes, RemoveReason reason); - [Throws] - static void removeAll(BundleOption bundle, AsyncCallback_Void callback_); - [Throws] - static void removeAll(AsyncCallback_Void callback_); - [Throws] - static void removeAll(number userId, AsyncCallback_Void callback_); - [Throws] - static async void removeAll(number userId); - [Throws] - static async void removeAll(optional BundleOption bundle); - [Throws] - static async void distributeOperation(String hashcode, optional OperationInfo operationInfo); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.pasteboard.idl b/idl/@ohos.pasteboard.idl index db2b239..9792dde 100644 --- a/idl/@ohos.pasteboard.idl +++ b/idl/@ohos.pasteboard.idl @@ -1,49 +1,69 @@ -package ohos; +package ohos.pasteboard; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; -import ohos.multimedia.image as image; -import ohos.data.unifiedDataChannel as unifiedDataChannel; +import ohos.app.ability.Want.default as Want; +import ohos.multimedia.image.default as image; +import ohos.data.unifiedDataChannel.default as unifiedDataChannel; +[DefaultExport] namespace pasteboard { - + const number MAX_RECORD_NUM = 512; + const String MIMETYPE_TEXT_HTML = "text/html"; + const String MIMETYPE_TEXT_WANT = "text/want"; + const String MIMETYPE_TEXT_PLAIN = "text/plain"; + const String MIMETYPE_TEXT_URI = "text/uri"; + const String MIMETYPE_PIXELMAP = "pixelMap"; typedef (String or image.PixelMap or Want or buffer) ValueType; + [Deprecated] + PasteData createHtmlData(String htmlText); + [Deprecated] + PasteData createWantData(Want want); + [Deprecated] + PasteData createPlainTextData(String text); + [Deprecated] + PasteData createUriData(String uri); + [Throws] + PasteData createData(String mimeType, ValueType value); + [Throws] + PasteData createData(record data); + [Deprecated] + PasteDataRecord createHtmlTextRecord(String htmlText); + [Deprecated] + PasteDataRecord createWantRecord(Want want); + [Deprecated] + PasteDataRecord createPlainTextRecord(String text); + [Deprecated] + PasteDataRecord createUriRecord(String uri); + [Throws] + PasteDataRecord createRecord(String mimeType, ValueType value); + SystemPasteboard getSystemPasteboard(); dictionary ShareOption { - number INAPP = 0; number LOCALDEVICE = 1; [Deprecated] number CROSSDEVICE = 2; - }; dictionary Pattern { - number URL = 0; number NUMBER = 1; number EMAIL_ADDRESS = 2; - }; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] Object indexSignature(String key); - }; [Entity=Interface] interface PasteDataProperty { - attribute Literal_Empty additions; readonly attribute sequence mimeTypes; attribute String tag; readonly attribute number timestamp; attribute boolean localOnly; attribute ShareOption shareOption; - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Entity=Interface] interface PasteDataRecord { - attribute String htmlText; attribute Want want; attribute String mimeType; @@ -62,22 +82,20 @@ namespace pasteboard { sequence getValidTypes(sequence types); [Throws] async ValueType getData(String type); - }; [Entity=Interface] interface PasteData { - [Deprecated] void addHtmlRecord(String htmlText); [Deprecated] void addWantRecord(Want want); void addRecord(PasteDataRecord record_); + [Throws] + void addRecord(String mimeType, ValueType value); [Deprecated] void addTextRecord(String text); [Deprecated] void addUriRecord(String uri); - [Throws] - void addRecord(String mimeType, ValueType value); sequence getMimeTypes(); String getPrimaryHtml(); Want getPrimaryWant(); @@ -108,36 +126,26 @@ namespace pasteboard { void replaceRecord(number index, PasteDataRecord record_); void pasteStart(); void pasteComplete(); - }; dictionary FileConflictOptions { - number OVERWRITE = 0; number SKIP = 1; - }; dictionary ProgressIndicator { - number NONE = 0; number DEFAULT = 1; - }; [Entity=Interface] interface ProgressInfo { - attribute number progress; - }; callback ProgressListener = void (ProgressInfo progress); [Entity=Class] interface ProgressSignal { - void cancel(); - }; [Entity=Interface] interface GetDataParams { - [Optional] attribute String destUri; [Optional] @@ -147,7 +155,6 @@ namespace pasteboard { attribute ProgressListener progressListener; [Optional] attribute ProgressSignal progressSignal; - }; [Synthetic] callback Callback_Void = void (); @@ -159,7 +166,6 @@ namespace pasteboard { callback AsyncCallback_Boolean_Void = void (boolean result); [Entity=Interface] interface SystemPasteboard { - [Throws, DtsName="on", DtsTag="'update'"] void onUpdate(Callback_Void callback_); [Throws, DtsName="off", DtsTag="'update'"] @@ -226,41 +232,5 @@ namespace pasteboard { number getChangeCount(); [Throws] async PasteData getDataWithProgress(GetDataParams params); - - }; - [GlobalScope] - interface GlobalScope_pasteboard_ohos_pasteboard { - - const number MAX_RECORD_NUM = 512; - const String MIMETYPE_TEXT_HTML = "text/html"; - const String MIMETYPE_TEXT_WANT = "text/want"; - const String MIMETYPE_TEXT_PLAIN = "text/plain"; - const String MIMETYPE_TEXT_URI = "text/uri"; - const String MIMETYPE_PIXELMAP = "pixelMap"; - [Deprecated] - static PasteData createHtmlData(String htmlText); - [Deprecated] - static PasteData createWantData(Want want); - [Deprecated] - static PasteData createPlainTextData(String text); - [Deprecated] - static PasteData createUriData(String uri); - [Throws] - static PasteData createData(String mimeType, ValueType value); - [Throws] - static PasteData createData(record data); - [Deprecated] - static PasteDataRecord createHtmlTextRecord(String htmlText); - [Deprecated] - static PasteDataRecord createWantRecord(Want want); - [Deprecated] - static PasteDataRecord createPlainTextRecord(String text); - [Deprecated] - static PasteDataRecord createUriRecord(String uri); - [Throws] - static PasteDataRecord createRecord(String mimeType, ValueType value); - static SystemPasteboard getSystemPasteboard(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.pluginComponent.idl b/idl/@ohos.pluginComponent.idl index bdd72e9..ef7d1f3 100644 --- a/idl/@ohos.pluginComponent.idl +++ b/idl/@ohos.pluginComponent.idl @@ -1,41 +1,32 @@ package ohos.pluginComponent; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.Want as Want; +import ohos.app.ability.Want.default as Want; [Entity=Interface] interface PluginComponentTemplate { - attribute String source; attribute String ability; - }; +[DefaultExport] namespace pluginComponentManager { - [Entity=Tuple, Synthetic] interface Tuple_ { - - }; [Entity=Literal] interface KVObject { - [IndexSignature] (number or String or boolean or Tuple_ or KVObject) indexSignature(String key); - }; [Entity=Interface] interface PushParameters { - attribute Want want; attribute String name; attribute KVObject data; attribute KVObject extraData; [Optional] attribute String jsonPath; - }; [Entity=Interface] interface PushParameterForStage { - attribute Want owner; attribute Want target; attribute String name; @@ -43,63 +34,48 @@ namespace pluginComponentManager { attribute KVObject extraData; [Optional] attribute String jsonPath; - }; [Entity=Interface] interface RequestParameters { - attribute Want want; attribute String name; attribute KVObject data; [Optional] attribute String jsonPath; - }; [Entity=Interface] interface RequestParameterForStage { - attribute Want owner; attribute Want target; attribute String name; attribute KVObject data; [Optional] attribute String jsonPath; - }; [Entity=Interface] interface RequestCallbackParameters { - attribute PluginComponentTemplate componentTemplate; attribute KVObject data; attribute KVObject extraData; - }; [Entity=Interface] interface RequestEventResult { - [Optional] attribute String template; [Optional] attribute KVObject data; [Optional] attribute KVObject extraData; - }; callback OnPushEventCallback = void (Want source, PluginComponentTemplate template, KVObject data, KVObject extraData); callback OnRequestEventCallback = RequestEventResult (Want source, String name, KVObject data); [Async, Synthetic] callback AsyncCallback_Void = void (); + void push(PushParameters param, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_RequestCallbackParameters_Void = void (RequestCallbackParameters result); - [GlobalScope] - interface GlobalScope_pluginComponentManager_ohos_pluginComponent { - - static void push(PushParameters param, AsyncCallback_Void callback_); - static void request(RequestParameters param, AsyncCallback_RequestCallbackParameters_Void callback_); - static void push(PushParameterForStage param, AsyncCallback_Void callback_); - static void request(RequestParameterForStage param, AsyncCallback_RequestCallbackParameters_Void callback_); - static void on(String eventType, (OnPushEventCallback or OnRequestEventCallback) callback_); - - }; - + void request(RequestParameters param, AsyncCallback_RequestCallbackParameters_Void callback_); + void push(PushParameterForStage param, AsyncCallback_Void callback_); + void request(RequestParameterForStage param, AsyncCallback_RequestCallbackParameters_Void callback_); + void on(String eventType, (OnPushEventCallback or OnRequestEventCallback) callback_); }; \ No newline at end of file diff --git a/idl/@ohos.power.idl b/idl/@ohos.power.idl index a026321..17afe46 100644 --- a/idl/@ohos.power.idl +++ b/idl/@ohos.power.idl @@ -1,52 +1,43 @@ -package ohos; +package ohos.power; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; +[DefaultExport] namespace power { - + [Throws] + void shutdown(String reason); + [Deprecated] + void rebootDevice(String reason); + [Throws] + void reboot(String reason); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isScreenOn(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isScreenOn(); + boolean isActive(); + [Throws] + void wakeup(String detail); + [Throws] + void suspend(optional boolean isImmediate); + DevicePowerMode getPowerMode(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setPowerMode(DevicePowerMode mode, AsyncCallback_Void callback_); + [Throws] + async void setPowerMode(DevicePowerMode mode); + [Throws] + boolean isStandby(); + [Throws] + void hibernate(boolean clearMemory); + [Throws] + void setScreenOffTime(long timeout); dictionary DevicePowerMode { - number MODE_NORMAL = 600; number MODE_POWER_SAVE = 601; number MODE_PERFORMANCE = 602; number MODE_EXTREME_POWER_SAVE = 603; - + number MODE_CUSTOM_POWER_SAVE = 650; }; - [GlobalScope] - interface GlobalScope_power_ohos_power { - - [Throws] - static void shutdown(String reason); - [Deprecated] - static void rebootDevice(String reason); - [Throws] - static void reboot(String reason); - [Deprecated] - static void isScreenOn(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isScreenOn(); - [Throws] - static boolean isActive(); - [Throws] - static void wakeup(String detail); - [Throws] - static void suspend(optional boolean isImmediate); - [Throws] - static DevicePowerMode getPowerMode(); - [Throws] - static void setPowerMode(DevicePowerMode mode, AsyncCallback_Void callback_); - [Throws] - static async void setPowerMode(DevicePowerMode mode); - [Throws] - static boolean isStandby(); - [Throws] - static void hibernate(boolean clearMemory); - [Throws] - static void setScreenOffTime(number timeout); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.print.idl b/idl/@ohos.print.idl index af7af5d..4bfb77c 100644 --- a/idl/@ohos.print.idl +++ b/idl/@ohos.print.idl @@ -1,14 +1,13 @@ -package ohos; +package ohos.print; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; +import application.Context.default as Context; +[DefaultExport] namespace print { - [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface PrintTask { - [Throws, DtsName="on", DtsTag="'block'"] void onBlock(Callback_Void callback_); [Throws, DtsName="on", DtsTag="'succeed'"] @@ -25,24 +24,30 @@ namespace print { void offFail(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'cancel'"] void offCancel(optional Callback_Void callback_); - }; [Synthetic] callback Callback_String_PrintFileCreationState_Void = void (String jobId, PrintFileCreationState writeResult); [Entity=Interface] interface PrintDocumentAdapter { - [Throws] void onStartLayoutWrite(String jobId, PrintAttributes oldAttrs, PrintAttributes newAttrs, number fd, Callback_String_PrintFileCreationState_Void writeResultCallback); [Throws] void onJobStateChanged(String jobId, PrintDocumentAdapterState state); - }; [Async, Synthetic] callback AsyncCallback_PrintTask_Void = void (PrintTask result); + [Throws] + void print(sequence files, AsyncCallback_PrintTask_Void callback_); + [Throws] + async PrintTask print(sequence files); + [Throws] + void print(sequence files, Context context, AsyncCallback_PrintTask_Void callback_); + [Throws] + async PrintTask print(sequence files, Context context); + [Throws] + async PrintTask print(String jobName, PrintDocumentAdapter printAdapter, PrintAttributes printAttributes, Context context); [Entity=Interface] interface PrintAttributes { - [Optional] attribute number copyNumber; [Optional] @@ -55,22 +60,18 @@ namespace print { attribute PrintColorMode colorMode; [Optional] attribute PrintDuplexMode duplexMode; - }; [Entity=Interface] interface PrintPageRange { - [Optional] attribute number startPage; [Optional] attribute number endPage; [Optional] attribute sequence pages; - }; [Entity=Interface] interface PrintMargin { - [Optional] attribute number top; [Optional] @@ -79,47 +80,37 @@ namespace print { attribute number left; [Optional] attribute number right; - }; [Entity=Interface] interface PrinterRange { - [Optional] attribute number startPage; [Optional] attribute number endPage; [Optional] attribute sequence pages; - }; [Entity=Interface] interface PreviewAttribute { - attribute PrinterRange previewRange; [Optional] attribute number result; - }; [Entity=Interface] interface PrintResolution { - attribute String id; attribute number horizontalDpi; attribute number verticalDpi; - }; [Entity=Interface] interface PrintPageSize { - attribute String id; attribute String name; attribute number width; attribute number height; - }; [Entity=Interface] interface PrinterCapability { - attribute number colorMode; attribute number duplexMode; attribute sequence pageSize; @@ -129,11 +120,9 @@ namespace print { attribute PrintMargin minMargin; [Optional] attribute Object options; - }; [Entity=Interface] interface PrinterInfo { - attribute String printerId; attribute String printerName; attribute PrinterState printerState; @@ -145,11 +134,9 @@ namespace print { attribute PrinterCapability capability; [Optional] attribute Object options; - }; [Entity=Interface] interface PrintJob { - attribute sequence fdList; attribute String jobId; attribute String printerId; @@ -168,30 +155,22 @@ namespace print { attribute PreviewAttribute preview; [Optional] attribute Object options; - }; dictionary PrintDirectionMode { - number DIRECTION_MODE_AUTO = 0; number DIRECTION_MODE_PORTRAIT = 1; number DIRECTION_MODE_LANDSCAPE = 2; - }; dictionary PrintColorMode { - number COLOR_MODE_MONOCHROME = 0; number COLOR_MODE_COLOR = 1; - }; dictionary PrintDuplexMode { - number DUPLEX_MODE_NONE = 0; number DUPLEX_MODE_LONG_EDGE = 1; number DUPLEX_MODE_SHORT_EDGE = 2; - }; dictionary PrintPageType { - number PAGE_ISO_A3 = 0; number PAGE_ISO_A4 = 1; number PAGE_ISO_A5 = 2; @@ -204,45 +183,35 @@ namespace print { number PAGE_PHOTO_5X7 = 9; number PAGE_INT_DL_ENVELOPE = 10; number PAGE_B_TABLOID = 11; - }; dictionary PrintDocumentAdapterState { - number PREVIEW_DESTROY = 0; number PRINT_TASK_SUCCEED = 1; number PRINT_TASK_FAIL = 2; number PRINT_TASK_CANCEL = 3; number PRINT_TASK_BLOCK = 4; - }; dictionary PrintFileCreationState { - number PRINT_FILE_CREATED = 0; number PRINT_FILE_CREATION_FAILED = 1; number PRINT_FILE_CREATED_UNRENDERED = 2; - }; dictionary PrinterState { - number PRINTER_ADDED = 0; number PRINTER_REMOVED = 1; number PRINTER_CAPABILITY_UPDATED = 2; number PRINTER_CONNECTED = 3; number PRINTER_DISCONNECTED = 4; number PRINTER_RUNNING = 5; - }; dictionary PrintJobState { - number PRINT_JOB_PREPARE = 0; number PRINT_JOB_QUEUED = 1; number PRINT_JOB_RUNNING = 2; number PRINT_JOB_BLOCKED = 3; number PRINT_JOB_COMPLETED = 4; - }; dictionary PrintJobSubState { - number PRINT_JOB_COMPLETED_SUCCESS = 0; number PRINT_JOB_COMPLETED_FAILED = 1; number PRINT_JOB_COMPLETED_CANCELLED = 2; @@ -260,6 +229,7 @@ namespace print { number PRINT_JOB_BLOCK_LOW_ON_TONER = 14; number PRINT_JOB_BLOCK_REALLY_LOW_ON_INK = 15; number PRINT_JOB_BLOCK_BAD_CERTIFICATE = 16; + number PRINT_JOB_BLOCK_DRIVER_EXCEPTION = 17; number PRINT_JOB_BLOCK_ACCOUNT_ERROR = 18; number PRINT_JOB_BLOCK_PRINT_PERMISSION_ERROR = 19; number PRINT_JOB_BLOCK_PRINT_COLOR_PERMISSION_ERROR = 20; @@ -270,11 +240,13 @@ namespace print { number PRINT_JOB_BLOCK_SLOW_FILE_CONVERSION = 25; number PRINT_JOB_RUNNING_UPLOADING_FILES = 26; number PRINT_JOB_RUNNING_CONVERTING_FILES = 27; + number PRINT_JOB_BLOCK_FILE_UPLOADING_ERROR = 30; + number PRINT_JOB_BLOCK_DRIVER_MISSING = 34; + number PRINT_JOB_BLOCK_INTERRUPT = 35; + number PRINT_JOB_BLOCK_PRINTER_UNAVAILABLE = 98; number PRINT_JOB_BLOCK_UNKNOWN = 99; - }; dictionary PrintErrorCode { - number E_PRINT_NONE = 0; number E_PRINT_NO_PERMISSION = 201; number E_PRINT_INVALID_PARAMETER = 401; @@ -285,48 +257,151 @@ namespace print { number E_PRINT_INVALID_PRINTER = 13100005; number E_PRINT_INVALID_PRINT_JOB = 13100006; number E_PRINT_FILE_IO = 13100007; - + number E_PRINT_TOO_MANY_FILES = 13100010; }; dictionary ApplicationEvent { - number APPLICATION_CREATED = 0; number APPLICATION_CLOSED_FOR_STARTED = 1; number APPLICATION_CLOSED_FOR_CANCELED = 2; - }; [Entity=Interface] interface PrinterExtensionInfo { - attribute String extensionId; attribute String vendorId; attribute String vendorName; attribute number vendorIcon; attribute String version; - }; [Async, Synthetic] callback AsyncCallback_Array_PrinterExtensionInfo_Void = void (sequence result); + [Throws] + void queryAllPrinterExtensionInfos(AsyncCallback_Array_PrinterExtensionInfo_Void callback_); + [Throws] + async sequence queryAllPrinterExtensionInfos(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void startDiscoverPrinter(sequence extensionList, AsyncCallback_Void callback_); + [Throws] + async void startDiscoverPrinter(sequence extensionList); + [Throws] + void stopDiscoverPrinter(AsyncCallback_Void callback_); + [Throws] + async void stopDiscoverPrinter(); + [Throws] + void connectPrinter(String printerId, AsyncCallback_Void callback_); + [Throws] + async void connectPrinter(String printerId); + [Throws] + void disconnectPrinter(String printerId, AsyncCallback_Void callback_); + [Throws] + async void disconnectPrinter(String printerId); + [Throws] + void queryPrinterCapability(String printerId, AsyncCallback_Void callback_); + [Throws] + async void queryPrinterCapability(String printerId); + [Throws] + void startPrintJob(PrintJob jobInfo, AsyncCallback_Void callback_); + [Throws] + async void startPrintJob(PrintJob jobInfo); + [Throws] + void cancelPrintJob(String jobId, AsyncCallback_Void callback_); + [Throws] + async void cancelPrintJob(String jobId); + [Throws] + async void restartPrintJob(String jobId); [Synthetic] callback Callback_Number_Void = void (number parameter); + [Throws] + void requestPrintPreview(PrintJob jobInfo, Callback_Number_Void callback_); + [Throws] + async number requestPrintPreview(PrintJob jobInfo); [Synthetic] callback Callback_PrinterState_PrinterInfo_Void = void (PrinterState state, PrinterInfo info); + [Throws, DtsName="on", DtsTag="'printerStateChange'"] + void onPrinterStateChange(Callback_PrinterState_PrinterInfo_Void callback_); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="off", DtsTag="'printerStateChange'"] + void offPrinterStateChange(optional Callback_Boolean_Void callback_); [Synthetic] callback Callback_PrintJobState_PrintJob_Void = void (PrintJobState state, PrintJob job); + [Throws, DtsName="on", DtsTag="'jobStateChange'"] + void onJobStateChange(Callback_PrintJobState_PrintJob_Void callback_); + [Throws, DtsName="off", DtsTag="'jobStateChange'"] + void offJobStateChange(optional Callback_Boolean_Void callback_); [Synthetic] callback Callback_String_String_Void = void (String extensionId, String info); + [Throws, DtsName="on", DtsTag="'extInfoChange'"] + void onExtInfoChange(Callback_String_String_Void callback_); + [Throws, DtsName="off", DtsTag="'extInfoChange'"] + void offExtInfoChange(optional Callback_Boolean_Void callback_); + [Throws] + void addPrinters(sequence printers, AsyncCallback_Void callback_); + [Throws] + async void addPrinters(sequence printers); + [Throws] + void removePrinters(sequence printerIds, AsyncCallback_Void callback_); + [Throws] + async void removePrinters(sequence printerIds); + [Throws] + void updatePrinters(sequence printers, AsyncCallback_Void callback_); + [Throws] + async void updatePrinters(sequence printers); + [Throws] + void updatePrinterState(String printerId, PrinterState state, AsyncCallback_Void callback_); + [Throws] + async void updatePrinterState(String printerId, PrinterState state); + [Throws] + void updatePrintJobState(String jobId, PrintJobState state, PrintJobSubState subState, AsyncCallback_Void callback_); + [Throws] + async void updatePrintJobState(String jobId, PrintJobState state, PrintJobSubState subState); + [Throws] + void updateExtensionInfo(String info, AsyncCallback_Void callback_); + [Throws] + async void updateExtensionInfo(String info); + [Deprecated, Throws] + void queryAllPrintJobs(AsyncCallback_Void callback_); + [Deprecated, Throws] + async void queryAllPrintJobs(); + [Throws] + async sequence queryAllActivePrintJobs(); [Async, Synthetic] callback AsyncCallback_Array_PrintJob_Void = void (sequence result); + [Throws] + void queryPrintJobList(AsyncCallback_Array_PrintJob_Void callback_); + [Throws] + async sequence queryPrintJobList(); [Async, Synthetic] callback AsyncCallback_PrintJob_Void = void (PrintJob result); + [Throws] + void queryPrintJobById(String jobId, AsyncCallback_PrintJob_Void callback_); + [Throws] + async PrintJob queryPrintJobById(String jobId); [Synthetic] callback Callback_PrintFileCreationState_Void = void (PrintFileCreationState parameter); + [Throws] + void startGettingPrintFile(String jobId, PrintAttributes printAttributes, number fd, Callback_PrintFileCreationState_Void onFileStateChanged); + [Throws] + void notifyPrintService(String jobId, String type, AsyncCallback_Void callback_); + [Throws] + async void notifyPrintService(String jobId, String type); + [Throws] + async sequence getAddedPrinters(); + [Throws] + async PrinterInfo getPrinterInfoById(String printerId); + [Throws] + async void notifyPrintServiceEvent(ApplicationEvent event); + [Throws] + async void addPrinterToDiscovery(PrinterInformation printerInformation); + [Throws] + async void updatePrinterInDiscovery(PrinterInformation printerInformation); + [Throws] + async void removePrinterFromDiscovery(String printerId); + [Throws] + async PrinterInformation getPrinterInformationById(String printerId); [Entity=Interface] interface PrinterInformation { - attribute String printerId; attribute String printerName; attribute PrinterStatus printerStatus; @@ -339,12 +414,14 @@ namespace print { [Optional] attribute String printerMake; [Optional] + attribute PrinterPreferences preferences; + [Optional] + attribute String alias; + [Optional] attribute String options; - }; [Entity=Interface] interface PrinterCapabilities { - attribute sequence supportedPageSizes; attribute sequence supportedColorModes; attribute sequence supportedDuplexModes; @@ -356,149 +433,66 @@ namespace print { attribute sequence supportedOrientations; [Optional] attribute String options; - }; dictionary PrintQuality { - number QUALITY_DRAFT = 3; number QUALITY_NORMAL = 4; number QUALITY_HIGH = 5; - }; dictionary PrintOrientationMode { - number ORIENTATION_MODE_PORTRAIT = 0; number ORIENTATION_MODE_LANDSCAPE = 1; number ORIENTATION_MODE_REVERSE_LANDSCAPE = 2; number ORIENTATION_MODE_REVERSE_PORTRAIT = 3; number ORIENTATION_MODE_NONE = 4; - }; dictionary PrinterStatus { - number PRINTER_IDLE = 0; number PRINTER_BUSY = 1; number PRINTER_UNAVAILABLE = 2; - }; - [GlobalScope] - interface GlobalScope_print_ohos_print { - - [Throws] - static void print(sequence files, AsyncCallback_PrintTask_Void callback_); - [Throws] - static async PrintTask print(sequence files); - [Throws] - static void print(sequence files, Context context, AsyncCallback_PrintTask_Void callback_); - [Throws] - static async PrintTask print(sequence files, Context context); - [Throws] - static async PrintTask print(String jobName, PrintDocumentAdapter printAdapter, PrintAttributes printAttributes, Context context); - [Throws] - static void queryAllPrinterExtensionInfos(AsyncCallback_Array_PrinterExtensionInfo_Void callback_); - [Throws] - static async sequence queryAllPrinterExtensionInfos(); - [Throws] - static void startDiscoverPrinter(sequence extensionList, AsyncCallback_Void callback_); - [Throws] - static async void startDiscoverPrinter(sequence extensionList); - [Throws] - static void stopDiscoverPrinter(AsyncCallback_Void callback_); - [Throws] - static async void stopDiscoverPrinter(); - [Throws] - static void connectPrinter(String printerId, AsyncCallback_Void callback_); - [Throws] - static async void connectPrinter(String printerId); - [Throws] - static void disconnectPrinter(String printerId, AsyncCallback_Void callback_); - [Throws] - static async void disconnectPrinter(String printerId); - [Throws] - static void queryPrinterCapability(String printerId, AsyncCallback_Void callback_); - [Throws] - static async void queryPrinterCapability(String printerId); - [Throws] - static void startPrintJob(PrintJob jobInfo, AsyncCallback_Void callback_); - [Throws] - static async void startPrintJob(PrintJob jobInfo); - [Throws] - static void cancelPrintJob(String jobId, AsyncCallback_Void callback_); - [Throws] - static async void cancelPrintJob(String jobId); - [Throws] - static void requestPrintPreview(PrintJob jobInfo, Callback_Number_Void callback_); - [Throws] - static async number requestPrintPreview(PrintJob jobInfo); - [Throws, DtsName="on", DtsTag="'printerStateChange'"] - static void onPrinterStateChange(Callback_PrinterState_PrinterInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'printerStateChange'"] - static void offPrinterStateChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'jobStateChange'"] - static void onJobStateChange(Callback_PrintJobState_PrintJob_Void callback_); - [Throws, DtsName="off", DtsTag="'jobStateChange'"] - static void offJobStateChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'extInfoChange'"] - static void onExtInfoChange(Callback_String_String_Void callback_); - [Throws, DtsName="off", DtsTag="'extInfoChange'"] - static void offExtInfoChange(optional Callback_Boolean_Void callback_); - [Throws] - static void addPrinters(sequence printers, AsyncCallback_Void callback_); - [Throws] - static async void addPrinters(sequence printers); - [Throws] - static void removePrinters(sequence printerIds, AsyncCallback_Void callback_); - [Throws] - static async void removePrinters(sequence printerIds); - [Throws] - static void updatePrinters(sequence printers, AsyncCallback_Void callback_); - [Throws] - static async void updatePrinters(sequence printers); - [Throws] - static void updatePrinterState(String printerId, PrinterState state, AsyncCallback_Void callback_); - [Throws] - static async void updatePrinterState(String printerId, PrinterState state); - [Throws] - static void updatePrintJobState(String jobId, PrintJobState state, PrintJobSubState subState, AsyncCallback_Void callback_); - [Throws] - static async void updatePrintJobState(String jobId, PrintJobState state, PrintJobSubState subState); - [Throws] - static void updateExtensionInfo(String info, AsyncCallback_Void callback_); - [Throws] - static async void updateExtensionInfo(String info); - [Deprecated, Throws] - static void queryAllPrintJobs(AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void queryAllPrintJobs(); - [Throws] - static void queryPrintJobList(AsyncCallback_Array_PrintJob_Void callback_); - [Throws] - static async sequence queryPrintJobList(); - [Throws] - static void queryPrintJobById(String jobId, AsyncCallback_PrintJob_Void callback_); - [Throws] - static async PrintJob queryPrintJobById(String jobId); - [Throws] - static void startGettingPrintFile(String jobId, PrintAttributes printAttributes, number fd, Callback_PrintFileCreationState_Void onFileStateChanged); - [Throws] - static void notifyPrintService(String jobId, String type, AsyncCallback_Void callback_); - [Throws] - static async void notifyPrintService(String jobId, String type); - [Throws] - static async sequence getAddedPrinters(); - [Throws] - static async PrinterInfo getPrinterInfoById(String printerId); - [Throws] - static async void notifyPrintServiceEvent(ApplicationEvent event); - [Throws] - static async void addPrinterToDiscovery(PrinterInformation printerInformation); - [Throws] - static async void updatePrinterInDiscovery(PrinterInformation printerInformation); - [Throws] - static async void removePrinterFromDiscovery(String printerId); - [Throws] - static async PrinterInformation getPrinterInformationById(String printerId); - + [Entity=Interface] + interface PrinterPreferences { + [Optional] + attribute PrintDuplexMode defaultDuplexMode; + [Optional] + attribute PrintQuality defaultPrintQuality; + [Optional] + attribute String defaultMediaType; + [Optional] + attribute String defaultPageSizeId; + [Optional] + attribute PrintOrientationMode defaultOrientation; + [Optional] + attribute boolean borderless; + [Optional] + attribute String options; + }; + dictionary PrinterEvent { + number PRINTER_EVENT_ADDED = 0; + number PRINTER_EVENT_DELETED = 1; + number PRINTER_EVENT_STATE_CHANGED = 2; + number PRINTER_EVENT_INFO_CHANGED = 3; + number PRINTER_EVENT_PREFERENCE_CHANGED = 4; + number PRINTER_EVENT_LAST_USED_PRINTER_CHANGED = 5; + }; + dictionary DefaultPrinterType { + number DEFAULT_PRINTER_TYPE_SET_BY_USER = 0; + number DEFAULT_PRINTER_TYPE_LAST_USED_PRINTER = 1; }; - + [Throws] + async void updatePrinterInformation(PrinterInformation printerInformation); + [Throws] + async void setPrinterPreferences(String printerId, PrinterPreferences printerPreferences); + [Throws] + async sequence discoverUsbPrinters(); + [Throws] + async void setDefaultPrinter(String printerId, DefaultPrinterType type); + [Throws] + async void notifyPrintServiceEvent(ApplicationEvent event, String jobId); + callback PrinterChangeCallback = void (PrinterEvent event, PrinterInformation printerInformation); + [Throws, DtsName="on", DtsTag="'printerChange'"] + void onPrinterChange(PrinterChangeCallback callback_); + [Throws, DtsName="off", DtsTag="'printerChange'"] + void offPrinterChange(optional PrinterChangeCallback callback_); }; \ No newline at end of file diff --git a/idl/@ohos.privacyManager.idl b/idl/@ohos.privacyManager.idl index d022386..e4c1508 100644 --- a/idl/@ohos.privacyManager.idl +++ b/idl/@ohos.privacyManager.idl @@ -1,44 +1,67 @@ -package ohos; +package ohos.privacyManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import Permissions as Permissions; +import permissions.Permissions as Permissions; +[DefaultExport] namespace privacyManager { - + [Throws] + async void addPermissionUsedRecord(i32 tokenID, Permissions permissionName, i32 successCount, i32 failCount, optional AddPermissionUsedRecordOptions options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void addPermissionUsedRecord(i32 tokenID, Permissions permissionName, i32 successCount, i32 failCount, AsyncCallback_Void callback_); + [Throws] + async PermissionUsedResponse getPermissionUsedRecord(PermissionUsedRequest request); [Async, Synthetic] callback AsyncCallback_PermissionUsedResponse_Void = void (PermissionUsedResponse result); + [Throws] + void getPermissionUsedRecord(PermissionUsedRequest request, AsyncCallback_PermissionUsedResponse_Void callback_); + [Throws] + async void startUsingPermission(number tokenID, Permissions permissionName); + [Throws] + async void startUsingPermission(number tokenID, Permissions permissionName, optional number pid, optional PermissionUsedType usedType); + [Throws] + void startUsingPermission(number tokenID, Permissions permissionName, AsyncCallback_Void callback_); + [Throws] + async void stopUsingPermission(number tokenID, Permissions permissionName); + [Throws] + async void stopUsingPermission(number tokenID, Permissions permissionName, optional number pid); + [Throws] + void stopUsingPermission(number tokenID, Permissions permissionName, AsyncCallback_Void callback_); [Synthetic] callback Callback_ActiveChangeResponse_Void = void (ActiveChangeResponse parameter); + [Throws, DtsName="on", DtsTag="'activeStateChange'"] + void onActiveStateChange(sequence permissionList, Callback_ActiveChangeResponse_Void callback_); + [Throws, DtsName="off", DtsTag="'activeStateChange'"] + void offActiveStateChange(sequence permissionList, optional Callback_ActiveChangeResponse_Void callback_); + [Throws] + async sequence getPermissionUsedTypeInfos(optional (i32 or undefined) tokenId, optional Permissions permissionName); + [Throws] + async void setPermissionUsedRecordToggleStatus(boolean status); + [Throws] + async boolean getPermissionUsedRecordToggleStatus(); dictionary PermissionActiveStatus { - number PERM_INACTIVE = 0; number PERM_ACTIVE_IN_FOREGROUND = 1; number PERM_ACTIVE_IN_BACKGROUND = 2; - }; [Entity=Interface] interface ActiveChangeResponse { - [Optional] - attribute number callingTokenId; - attribute number tokenId; + attribute i32 callingTokenId; + attribute i32 tokenId; attribute Permissions permissionName; attribute String deviceId; attribute PermissionActiveStatus activeStatus; [Optional] attribute PermissionUsedType usedType; - }; dictionary PermissionUsageFlag { - number FLAG_PERMISSION_USAGE_SUMMARY = 0; number FLAG_PERMISSION_USAGE_DETAIL = 1; - }; [Entity=Interface] interface PermissionUsedRequest { - [Optional] attribute number tokenId; [Optional] @@ -54,29 +77,23 @@ namespace privacyManager { [Optional] attribute number endTime; attribute PermissionUsageFlag flag; - }; [Entity=Interface] interface PermissionUsedResponse { - attribute number beginTime; attribute number endTime; attribute sequence bundleRecords; - }; [Entity=Interface] interface BundleUsedRecord { - attribute number tokenId; attribute boolean isRemote; attribute String deviceId; attribute String bundleName; attribute sequence permissionRecords; - }; [Entity=Interface] interface PermissionUsedRecord { - attribute Permissions permissionName; attribute number accessCount; attribute number rejectCount; @@ -85,11 +102,9 @@ namespace privacyManager { attribute number lastAccessDuration; attribute sequence accessRecords; attribute sequence rejectRecords; - }; [Entity=Interface] interface UsedRecordDetail { - attribute number status; [Optional] attribute number lockScreenStatus; @@ -99,64 +114,21 @@ namespace privacyManager { attribute number accessDuration; [Optional] attribute PermissionUsedType usedType; - }; dictionary PermissionUsedType { - number NORMAL_TYPE = 0; number PICKER_TYPE = 1; number SECURITY_COMPONENT_TYPE = 2; - }; [Entity=Interface] interface PermissionUsedTypeInfo { - attribute number tokenId; attribute Permissions permissionName; attribute PermissionUsedType usedType; - }; [Entity=Interface] interface AddPermissionUsedRecordOptions { - [Optional] attribute PermissionUsedType usedType; - - }; - [GlobalScope] - interface GlobalScope_privacyManager_ohos_privacyManager { - - [Throws] - static async void addPermissionUsedRecord(number tokenID, Permissions permissionName, number successCount, number failCount, optional AddPermissionUsedRecordOptions options); - [Throws] - static void addPermissionUsedRecord(number tokenID, Permissions permissionName, number successCount, number failCount, AsyncCallback_Void callback_); - [Throws] - static async PermissionUsedResponse getPermissionUsedRecord(PermissionUsedRequest request); - [Throws] - static void getPermissionUsedRecord(PermissionUsedRequest request, AsyncCallback_PermissionUsedResponse_Void callback_); - [Throws] - static async void startUsingPermission(number tokenID, Permissions permissionName); - [Throws] - static async void startUsingPermission(number tokenID, Permissions permissionName, optional number pid, optional PermissionUsedType usedType); - [Throws] - static void startUsingPermission(number tokenID, Permissions permissionName, AsyncCallback_Void callback_); - [Throws] - static async void stopUsingPermission(number tokenID, Permissions permissionName); - [Throws] - static async void stopUsingPermission(number tokenID, Permissions permissionName, optional number pid); - [Throws] - static void stopUsingPermission(number tokenID, Permissions permissionName, AsyncCallback_Void callback_); - [Throws, DtsName="on", DtsTag="'activeStateChange'"] - static void onActiveStateChange(sequence permissionList, Callback_ActiveChangeResponse_Void callback_); - [Throws, DtsName="off", DtsTag="'activeStateChange'"] - static void offActiveStateChange(sequence permissionList, optional Callback_ActiveChangeResponse_Void callback_); - [Throws] - static async sequence getPermissionUsedTypeInfos(optional number tokenId, optional Permissions permissionName); - [Throws] - static async void setPermissionUsedRecordToggleStatus(boolean status); - [Throws] - static async boolean getPermissionUsedRecordToggleStatus(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.process.idl b/idl/@ohos.process.idl index baf2977..e7bd77c 100644 --- a/idl/@ohos.process.idl +++ b/idl/@ohos.process.idl @@ -1,9 +1,8 @@ -package ohos; +package ohos.process; +[DefaultExport] namespace process { - [Entity=Interface] interface ChildProcess { - readonly attribute number pid; readonly attribute number ppid; readonly attribute number exitCode; @@ -13,11 +12,9 @@ namespace process { async buffer getErrorOutput(); void close(); void kill((number or String) signal); - }; [Entity=Class] interface ProcessManager { - [Throws] boolean isAppUid(number v); [Throws] @@ -32,49 +29,40 @@ namespace process { void exit(number code); [Throws] boolean kill(number signal, number pid); - }; + boolean isIsolatedProcess(); + [Deprecated] + boolean isAppUid(number v); + boolean is64Bit(); + [Deprecated] + number getUidForName(String v); + [Deprecated] + number getThreadPriority(number v); + number getStartRealtime(); + number getPastCpuTime(); + [Deprecated] + number getSystemConfig(number name); + [Deprecated] + String getEnvironmentVar(String name); callback EventListener = void (Object evt); [Entity=Interface] interface ConditionType { - [Optional] attribute number timeout; [Optional] attribute (number or String) killSignal; [Optional] attribute number maxBuffer; - }; - [GlobalScope] - interface GlobalScope_process_ohos_process { - - static boolean isIsolatedProcess(); - [Deprecated] - static boolean isAppUid(number v); - static boolean is64Bit(); - [Deprecated] - static number getUidForName(String v); - [Deprecated] - static number getThreadPriority(number v); - static number getStartRealtime(); - static number getPastCpuTime(); - [Deprecated] - static number getSystemConfig(number name); - [Deprecated] - static String getEnvironmentVar(String name); - static ChildProcess runCmd(String command, optional ConditionType options); - static void abort(); - static void on(String type, EventListener listener); - static boolean off(String type); - [Deprecated] - static void exit(number code); - static String cwd(); - static void chdir(String dir); - static number uptime(); - [Deprecated] - static boolean kill(number signal, number pid); - - }; - + ChildProcess runCmd(String command, optional ConditionType options); + void abort(); + void on(String type, EventListener listener); + boolean off(String type); + [Deprecated] + void exit(number code); + String cwd(); + void chdir(String dir); + number uptime(); + [Deprecated] + boolean kill(number signal, number pid); }; \ No newline at end of file diff --git a/idl/@ohos.prompt.idl b/idl/@ohos.prompt.idl index e52569a..7f2ae9e 100644 --- a/idl/@ohos.prompt.idl +++ b/idl/@ohos.prompt.idl @@ -1,65 +1,52 @@ -package ohos; +package ohos.prompt; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace prompt { - [Entity=Interface, Deprecated] interface ShowToastOptions { - [Deprecated] attribute String message; [Optional, Deprecated] attribute number duration; [Optional, Deprecated] attribute (String or number) bottom; - }; [Entity=Interface, Deprecated] interface Button { - [Deprecated] attribute String text; [Deprecated] attribute String color; - }; [Entity=Interface, Deprecated] interface ShowDialogSuccessResponse { - [Deprecated] attribute number index; - }; [Entity=Tuple, Synthetic] interface Tuple_Button_Button_Button { - attribute Button value0; [Optional] attribute Button value1; [Optional] attribute Button value2; - }; [Entity=Interface, Deprecated] interface ShowDialogOptions { - [Optional, Deprecated] attribute String title; [Optional, Deprecated] attribute String message; [Optional, Deprecated] attribute Tuple_Button_Button_Button buttons; - }; [Entity=Interface, Deprecated] interface ActionMenuSuccessResponse { - [Deprecated] attribute number index; - }; [Entity=Tuple, Synthetic] interface Tuple_Button_Button_Button_Button_Button_Button { - attribute Button value0; [Optional] attribute Button value1; @@ -71,35 +58,26 @@ namespace prompt { attribute Button value4; [Optional] attribute Button value5; - }; [Entity=Interface, Deprecated] interface ActionMenuOptions { - [Optional, Deprecated] attribute String title; [Deprecated] attribute Tuple_Button_Button_Button_Button_Button_Button buttons; - }; + [Deprecated] + void showToast(ShowToastOptions options); [Async, Synthetic] callback AsyncCallback_ShowDialogSuccessResponse_Void = void (ShowDialogSuccessResponse result); + [Deprecated] + void showDialog(ShowDialogOptions options, AsyncCallback_ShowDialogSuccessResponse_Void callback_); + [Deprecated] + async ShowDialogSuccessResponse showDialog(ShowDialogOptions options); [Async, Synthetic] callback AsyncCallback_ActionMenuSuccessResponse_Void = void (ActionMenuSuccessResponse result); - [GlobalScope] - interface GlobalScope_prompt_ohos_prompt { - - [Deprecated] - static void showToast(ShowToastOptions options); - [Deprecated] - static void showDialog(ShowDialogOptions options, AsyncCallback_ShowDialogSuccessResponse_Void callback_); - [Deprecated] - static async ShowDialogSuccessResponse showDialog(ShowDialogOptions options); - [Deprecated] - static void showActionMenu(ActionMenuOptions options, AsyncCallback_ActionMenuSuccessResponse_Void callback_); - [Deprecated] - static async ActionMenuSuccessResponse showActionMenu(ActionMenuOptions options); - - }; - + [Deprecated] + void showActionMenu(ActionMenuOptions options, AsyncCallback_ActionMenuSuccessResponse_Void callback_); + [Deprecated] + async ActionMenuSuccessResponse showActionMenu(ActionMenuOptions options); }; \ No newline at end of file diff --git a/idl/@ohos.promptAction.idl b/idl/@ohos.promptAction.idl index b197750..03a01c5 100644 --- a/idl/@ohos.promptAction.idl +++ b/idl/@ohos.promptAction.idl @@ -1,29 +1,47 @@ -package ohos; +package ohos.promptAction; import ohos.base.AsyncCallback as AsyncCallback; +import arkui.component.units.ResourceColor as ResourceColor; +import arkui.component.units.Offset as Offset; +import arkui.component.units.Dimension as Dimension; +import arkui.component.units.EdgeStyles as EdgeStyles; +import arkui.component.units.EdgeColors as EdgeColors; +import arkui.component.units.EdgeWidths as EdgeWidths; +import arkui.component.units.BorderRadiuses as BorderRadiuses; +import ohos.base.AsyncCallback as AsyncCallback; +import ohos.base.Callback as Callback; +import arkui.component.common.BlurStyle as BlurStyle; +import arkui.component.common.ShadowOptions as ShadowOptions; +import arkui.component.common.ShadowStyle as ShadowStyle; +import arkui.component.common.HoverModeAreaType as HoverModeAreaType; +import arkui.component.common.Rectangle as Rectangle; +import arkui.component.common.TransitionEffect as TransitionEffect; +import arkui.component.common.KeyboardAvoidMode as KeyboardAvoidMode; +import arkui.component.common.DismissReason as DismissReason; +import arkui.component.common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import arkui.component.common.BackgroundEffectOptions as BackgroundEffectOptions; +import arkui.component.builder.CustomBuilder as CustomBuilder; +import DialogAlignment as DialogAlignment; +import arkui.component.enums.BorderStyle as BorderStyle; +import arkui.component.enums.Alignment as Alignment; +import resource.Resource as Resource; +import arkui.Graphics.LengthMetrics as LengthMetrics; dictionary LevelMode { - number OVERLAY = 0; number EMBEDDED = 1; - }; dictionary ImmersiveMode { - number DEFAULT = 0; number EXTEND = 1; - }; [Entity=Class] interface LevelOrder { - static LevelOrder clamp(number order); number getOrder(); - }; +[DefaultExport] namespace promptAction { - [Entity=Interface] interface ShowToastOptions { - attribute (String or Resource) message; [Optional] attribute number duration; @@ -47,35 +65,66 @@ namespace promptAction { attribute boolean enableHoverMode; [Optional] attribute HoverModeAreaType hoverModeArea; - }; dictionary ToastShowMode { - number DEFAULT = 0; number TOP_MOST = 1; number SYSTEM_TOP_MOST = 2; - }; [Entity=Interface] interface Button { - attribute (String or Resource) text; attribute (String or Resource) color; [Optional] attribute boolean primary; - + }; + [Entity=Tuple] + interface PromptActionSingleButton { + attribute Button value0; + }; + [Entity=Tuple] + interface PromptActionDoubleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + }; + [Entity=Tuple] + interface PromptActionTripleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + }; + [Entity=Tuple] + interface PromptActionQuadrupleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + attribute (Button or undefined) value3; + }; + [Entity=Tuple] + interface PromptActionQuintupleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + attribute (Button or undefined) value3; + attribute (Button or undefined) value4; + }; + [Entity=Tuple] + interface PromptActionSextupleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + attribute (Button or undefined) value3; + attribute (Button or undefined) value4; + attribute (Button or undefined) value5; }; [Entity=Interface] interface ShowDialogSuccessResponse { - attribute number index; - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface ShowDialogOptions { - [Optional] attribute (String or Resource) title; [Optional] @@ -122,25 +171,28 @@ namespace promptAction { attribute ImmersiveMode immersiveMode; [Optional] attribute LevelOrder levelOrder; - + }; + dictionary CommonState { + number UNINITIALIZED = 0; + number INITIALIZED = 1; + number APPEARING = 2; + number APPEARED = 3; + number DISAPPEARING = 4; + number DISAPPEARED = 5; }; [Entity=Class] interface CommonController { - constructor(); void close(); - + CommonState getState(); }; [Entity=Class] - interface DialogController: CommonController { - - + interface DialogController: [Extends] CommonController { }; [Synthetic] callback Callback_DismissDialogAction_Void = void (DismissDialogAction parameter); [Entity=Interface] interface BaseDialogOptions { - [Optional] attribute Rectangle maskRect; [Optional] @@ -191,11 +243,11 @@ namespace promptAction { attribute ImmersiveMode immersiveMode; [Optional] attribute LevelOrder levelOrder; - + [Optional] + attribute boolean focusable; }; [Entity=Interface] interface CustomDialogOptions: BaseDialogOptions { - attribute CustomBuilder builder; [Optional] attribute ResourceColor backgroundColor; @@ -215,7 +267,6 @@ namespace promptAction { attribute (ShadowOptions or ShadowStyle) shadow; [Optional] attribute BlurStyle backgroundBlurStyle; - }; typedef (Dimension or BorderRadiuses) DialogOptionsCornerRadius; typedef (Dimension or EdgeWidths) DialogOptionsBorderWidth; @@ -224,7 +275,6 @@ namespace promptAction { typedef (ShadowOptions or ShadowStyle) DialogOptionsShadow; [Entity=Interface] interface DialogOptions: BaseDialogOptions { - [Optional] attribute ResourceColor backgroundColor; [Optional] @@ -243,17 +293,13 @@ namespace promptAction { attribute DialogOptionsShadow shadow; [Optional] attribute BlurStyle backgroundBlurStyle; - }; [Entity=Interface] interface ActionMenuSuccessResponse { - attribute number index; - }; [Entity=Tuple, Synthetic] interface Tuple_Button_Button_Button_Button_Button_Button { - attribute Button value0; [Optional] attribute Button value1; @@ -265,14 +311,13 @@ namespace promptAction { attribute Button value4; [Optional] attribute Button value5; - }; [Entity=Interface] interface ActionMenuOptions { - [Optional] attribute (String or Resource) title; attribute Tuple_Button_Button_Button_Button_Button_Button buttons; + attribute (PromptActionSingleButton or PromptActionDoubleButtons or PromptActionTripleButtons or PromptActionQuadrupleButtons or PromptActionQuintupleButtons or PromptActionSextupleButtons) buttons; [Optional] attribute boolean showInSubWindow; [Optional] @@ -283,41 +328,42 @@ namespace promptAction { attribute number levelUniqueId; [Optional] attribute ImmersiveMode immersiveMode; - + [Optional] + attribute Callback_Void onDidAppear; + [Optional] + attribute Callback_Void onDidDisappear; + [Optional] + attribute Callback_Void onWillAppear; + [Optional] + attribute Callback_Void onWillDisappear; }; + [Deprecated, Throws] + void showToast(ShowToastOptions options); + [Throws] + async number openToast(ShowToastOptions options); + [Throws] + void closeToast(number toastId); [Async, Synthetic] callback AsyncCallback_ShowDialogSuccessResponse_Void = void (ShowDialogSuccessResponse result); + [Deprecated, Throws] + void showDialog(ShowDialogOptions options, AsyncCallback_ShowDialogSuccessResponse_Void callback_); + [Deprecated, Throws] + async ShowDialogSuccessResponse showDialog(ShowDialogOptions options); + [Deprecated, Throws] + async number openCustomDialog(CustomDialogOptions options); + [Deprecated, Throws] + void closeCustomDialog(number dialogId); [Async, Synthetic] callback AsyncCallback_ActionMenuSuccessResponse_Void = void (ActionMenuSuccessResponse result); - [GlobalScope] - interface GlobalScope_promptAction_ohos_promptAction { - - [Throws] - static void showToast(ShowToastOptions options); - [Throws] - static async number openToast(ShowToastOptions options); - [Throws] - static void closeToast(number toastId); - [Throws] - static void showDialog(ShowDialogOptions options, AsyncCallback_ShowDialogSuccessResponse_Void callback_); - [Throws] - static async ShowDialogSuccessResponse showDialog(ShowDialogOptions options); - [Throws] - static async number openCustomDialog(CustomDialogOptions options); - [Throws] - static void closeCustomDialog(number dialogId); - [Throws] - static void showActionMenu(ActionMenuOptions options, AsyncCallback_ActionMenuSuccessResponse_Void callback_); - [Throws] - static async ActionMenuSuccessResponse showActionMenu(ActionMenuOptions options); - - }; - + [Deprecated, Throws] + void showActionMenu(ActionMenuOptions options, AsyncCallback_ActionMenuSuccessResponse_Void callback_); + [Deprecated, Throws] + async ActionMenuSuccessResponse showActionMenu(ActionMenuOptions options); }; +[Synthetic] +callback Callback_Void = void (); [Entity=Interface] interface DismissDialogAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - }; \ No newline at end of file diff --git a/idl/@ohos.reminderAgent.idl b/idl/@ohos.reminderAgent.idl index 8b17396..494df82 100644 --- a/idl/@ohos.reminderAgent.idl +++ b/idl/@ohos.reminderAgent.idl @@ -1,74 +1,85 @@ -package ohos; +package ohos.reminderAgent; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.notification as notification; -import notification.NotificationSlot as NotificationSlot; +import ohos.notification.default as notification; +import notification.notificationSlot.NotificationSlot as NotificationSlot; +[DefaultExport] namespace reminderAgent { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void publishReminder(ReminderRequest reminderReq, AsyncCallback_Number_Void callback_); + [Deprecated] + async number publishReminder(ReminderRequest reminderReq); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void cancelReminder(number reminderId, AsyncCallback_Void callback_); + [Deprecated] + async void cancelReminder(number reminderId); [Async, Synthetic] callback AsyncCallback_Array_ReminderRequest_Void = void (sequence result); [Deprecated] + void getValidReminders(AsyncCallback_Array_ReminderRequest_Void callback_); + [Deprecated] + async sequence getValidReminders(); + [Deprecated] + void cancelAllReminders(AsyncCallback_Void callback_); + [Deprecated] + async void cancelAllReminders(); + [Deprecated] + void addNotificationSlot(NotificationSlot slot, AsyncCallback_Void callback_); + [Deprecated] + async void addNotificationSlot(NotificationSlot slot); + [Deprecated] + void removeNotificationSlot(notification.SlotType slotType, AsyncCallback_Void callback_); + [Deprecated] + async void removeNotificationSlot(notification.SlotType slotType); + [Deprecated] dictionary ActionButtonType { - [Deprecated] number ACTION_BUTTON_TYPE_CLOSE = 0; [Deprecated] number ACTION_BUTTON_TYPE_SNOOZE = 1; - }; [Deprecated] dictionary ReminderType { - [Deprecated] number REMINDER_TYPE_TIMER = 0; [Deprecated] number REMINDER_TYPE_CALENDAR = 1; [Deprecated] number REMINDER_TYPE_ALARM = 2; - }; [Entity=Interface, Deprecated] interface ActionButton { - [Deprecated] attribute String title; [Deprecated] attribute ActionButtonType type; - }; [Entity=Interface, Deprecated] interface WantAgent { - [Deprecated] attribute String pkgName; [Deprecated] attribute String abilityName; - }; [Entity=Interface, Deprecated] interface MaxScreenWantAgent { - [Deprecated] attribute String pkgName; [Deprecated] attribute String abilityName; - }; [Entity=Tuple, Synthetic] interface Tuple_ActionButton_ActionButton { - [Optional] attribute ActionButton value0; [Optional] attribute ActionButton value1; - }; [Entity=Interface, Deprecated] interface ReminderRequest { - [Deprecated] attribute ReminderType reminderType; [Optional, Deprecated] @@ -95,40 +106,32 @@ namespace reminderAgent { attribute number notificationId; [Optional, Deprecated] attribute notification.SlotType slotType; - }; [Entity=Interface, Deprecated] interface ReminderRequestCalendar: ReminderRequest { - [Deprecated] attribute LocalDateTime dateTime; [Optional, Deprecated] attribute sequence repeatMonths; [Optional, Deprecated] attribute sequence repeatDays; - }; [Entity=Interface, Deprecated] interface ReminderRequestAlarm: ReminderRequest { - [Deprecated] attribute number hour; [Deprecated] attribute number minute; [Optional, Deprecated] attribute sequence daysOfWeek; - }; [Entity=Interface, Deprecated] interface ReminderRequestTimer: ReminderRequest { - [Deprecated] attribute number triggerTimeInSeconds; - }; [Entity=Interface, Deprecated] interface LocalDateTime { - [Deprecated] attribute number year; [Deprecated] @@ -141,36 +144,5 @@ namespace reminderAgent { attribute number minute; [Optional, Deprecated] attribute number second; - - }; - [GlobalScope] - interface GlobalScope_reminderAgent_ohos_reminderAgent { - - [Deprecated] - static void publishReminder(ReminderRequest reminderReq, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number publishReminder(ReminderRequest reminderReq); - [Deprecated] - static void cancelReminder(number reminderId, AsyncCallback_Void callback_); - [Deprecated] - static async void cancelReminder(number reminderId); - [Deprecated] - static void getValidReminders(AsyncCallback_Array_ReminderRequest_Void callback_); - [Deprecated] - static async sequence getValidReminders(); - [Deprecated] - static void cancelAllReminders(AsyncCallback_Void callback_); - [Deprecated] - static async void cancelAllReminders(); - [Deprecated] - static void addNotificationSlot(NotificationSlot slot, AsyncCallback_Void callback_); - [Deprecated] - static async void addNotificationSlot(NotificationSlot slot); - [Deprecated] - static void removeNotificationSlot(notification.SlotType slotType, AsyncCallback_Void callback_); - [Deprecated] - static async void removeNotificationSlot(notification.SlotType slotType); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.reminderAgentManager.idl b/idl/@ohos.reminderAgentManager.idl index e82ed2a..1acb229 100644 --- a/idl/@ohos.reminderAgentManager.idl +++ b/idl/@ohos.reminderAgentManager.idl @@ -1,33 +1,62 @@ -package ohos; +package ohos.reminderAgentManager; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.notification as notification; -import notification.NotificationSlot as NotificationSlot; -import ohos.data.ValuesBucket as ValuesBucket; +import ohos.notificationManager.default as notification; +import notification.notificationSlot.NotificationSlot as NotificationSlot; +import ohos.data.ValuesBucket.ValuesBucket as ValuesBucket; +[DefaultExport] namespace reminderAgentManager { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void publishReminder(ReminderRequest reminderReq, AsyncCallback_Number_Void callback_); + [Throws] + async number publishReminder(ReminderRequest reminderReq); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void cancelReminder(number reminderId, AsyncCallback_Void callback_); + [Throws] + async void cancelReminder(number reminderId); [Async, Synthetic] callback AsyncCallback_Array_ReminderRequest_Void = void (sequence result); + [Throws] + void getValidReminders(AsyncCallback_Array_ReminderRequest_Void callback_); + [Throws] + async sequence getValidReminders(); + [Throws] + void cancelAllReminders(AsyncCallback_Void callback_); + [Throws] + async void cancelAllReminders(); + [Throws] + void addNotificationSlot(NotificationSlot slot, AsyncCallback_Void callback_); + [Throws] + async void addNotificationSlot(NotificationSlot slot); + [Throws] + void removeNotificationSlot(notification.SlotType slotType, AsyncCallback_Void callback_); + [Throws] + async void removeNotificationSlot(notification.SlotType slotType); + [Throws] + async void addExcludeDate(number reminderId, date date); + [Throws] + async void deleteExcludeDates(number reminderId); + [Throws] + async sequence getExcludeDates(number reminderId); + [Throws] + async sequence getAllValidReminders(); + [Throws] + async void updateReminder(number reminderId, ReminderRequest reminderReq); dictionary ActionButtonType { - number ACTION_BUTTON_TYPE_CLOSE = 0; number ACTION_BUTTON_TYPE_SNOOZE = 1; number ACTION_BUTTON_TYPE_CUSTOM = 2; - }; dictionary ReminderType { - number REMINDER_TYPE_TIMER = 0; number REMINDER_TYPE_CALENDAR = 1; number REMINDER_TYPE_ALARM = 2; - }; [Entity=Interface] interface ActionButton { - attribute String title; [Optional] attribute String titleResource; @@ -36,48 +65,42 @@ namespace reminderAgentManager { attribute WantAgent wantAgent; [Optional] attribute DataShareUpdate dataShareUpdate; - }; [Entity=Interface] interface WantAgent { - attribute String pkgName; attribute String abilityName; [Optional] attribute String uri; [Optional] attribute record parameters; - }; [Entity=Interface] interface DataShareUpdate { - attribute String uri; attribute record equalTo; attribute ValuesBucket value; - }; [Entity=Interface] interface MaxScreenWantAgent { - attribute String pkgName; attribute String abilityName; - + }; + dictionary RingChannel { + number RING_CHANNEL_ALARM = 0; + number RING_CHANNEL_MEDIA = 1; }; [Entity=Tuple, Synthetic] interface Tuple_ActionButton_ActionButton_ActionButton { - [Optional] attribute ActionButton value0; [Optional] attribute ActionButton value1; [Optional] attribute ActionButton value2; - }; [Entity=Interface] interface ReminderRequest { - attribute ReminderType reminderType; [Optional] attribute Tuple_ActionButton_ActionButton_ActionButton actionButton; @@ -88,6 +111,8 @@ namespace reminderAgentManager { [Optional] attribute number ringDuration; [Optional] + attribute RingChannel ringChannel; + [Optional] attribute number snoozeTimes; [Optional] attribute number timeInterval; @@ -121,11 +146,9 @@ namespace reminderAgentManager { attribute notification.SlotType snoozeSlotType; [Optional] attribute String customRingUri; - }; [Entity=Interface] interface ReminderRequestCalendar: ReminderRequest { - attribute LocalDateTime dateTime; [Optional] attribute sequence repeatMonths; @@ -137,33 +160,25 @@ namespace reminderAgentManager { attribute LocalDateTime endDateTime; [Optional] attribute WantAgent rruleWantAgent; - }; [Entity=Interface] interface ReminderRequestAlarm: ReminderRequest { - attribute number hour; attribute number minute; [Optional] attribute sequence daysOfWeek; - }; [Entity=Interface] interface ReminderRequestTimer: ReminderRequest { - attribute number triggerTimeInSeconds; - }; [Entity=Interface] interface ReminderInfo { - attribute number reminderId; attribute ReminderRequest reminderReq; - }; [Entity=Interface] interface LocalDateTime { - attribute number year; attribute number month; attribute number day; @@ -171,44 +186,5 @@ namespace reminderAgentManager { attribute number minute; [Optional] attribute number second; - - }; - [GlobalScope] - interface GlobalScope_reminderAgentManager_ohos_reminderAgentManager { - - [Throws] - static void publishReminder(ReminderRequest reminderReq, AsyncCallback_Number_Void callback_); - [Throws] - static async number publishReminder(ReminderRequest reminderReq); - [Throws] - static void cancelReminder(number reminderId, AsyncCallback_Void callback_); - [Throws] - static async void cancelReminder(number reminderId); - [Throws] - static void getValidReminders(AsyncCallback_Array_ReminderRequest_Void callback_); - [Throws] - static async sequence getValidReminders(); - [Throws] - static void cancelAllReminders(AsyncCallback_Void callback_); - [Throws] - static async void cancelAllReminders(); - [Throws] - static void addNotificationSlot(NotificationSlot slot, AsyncCallback_Void callback_); - [Throws] - static async void addNotificationSlot(NotificationSlot slot); - [Throws] - static void removeNotificationSlot(notification.SlotType slotType, AsyncCallback_Void callback_); - [Throws] - static async void removeNotificationSlot(notification.SlotType slotType); - [Throws] - static async void addExcludeDate(number reminderId, Date date); - [Throws] - static async void deleteExcludeDates(number reminderId); - [Throws] - static async sequence getExcludeDates(number reminderId); - [Throws] - static async sequence getAllValidReminders(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.request.cacheDownload.idl b/idl/@ohos.request.cacheDownload.idl new file mode 100644 index 0000000..dc49938 --- /dev/null +++ b/idl/@ohos.request.cacheDownload.idl @@ -0,0 +1,45 @@ +package ohos.request.cacheDownload; +import ohos.base.BusinessError as BusinessError; +[DefaultExport] +namespace cacheDownload { + [Entity=Interface] + interface CacheDownloadOptions { + [Optional] + attribute record headers; + }; + [Entity=Interface] + interface ResourceInfo { + readonly attribute number size; + }; + [Entity=Interface] + interface NetworkInfo { + readonly attribute sequence dnsServers; + }; + [Entity=Interface] + interface PerformanceInfo { + readonly attribute number dnsTime; + readonly attribute number connectTime; + readonly attribute number tlsTime; + readonly attribute number firstSendTime; + readonly attribute number firstReceiveTime; + readonly attribute number totalTime; + readonly attribute number redirectTime; + }; + [Entity=Interface] + interface DownloadInfo { + readonly attribute ResourceInfo resource; + readonly attribute NetworkInfo network; + readonly attribute PerformanceInfo performance; + }; + [Throws] + void download(String url, CacheDownloadOptions options); + [Throws] + void cancel(String url); + [Throws] + void setMemoryCacheSize(number bytes); + [Throws] + void setFileCacheSize(number bytes); + [Throws] + (DownloadInfo or undefined) getDownloadInfo(String url); + void setDownloadInfoListSize(number size); +}; \ No newline at end of file diff --git a/idl/@ohos.request.idl b/idl/@ohos.request.idl index 9eb7394..1909da8 100644 --- a/idl/@ohos.request.idl +++ b/idl/@ohos.request.idl @@ -1,16 +1,31 @@ -package ohos; +package ohos.request; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.BaseContext as BaseContext; +import application.BaseContext.default as BaseContext; +[DefaultExport] namespace request { - [Async, Synthetic] callback AsyncCallback_DownloadTask_Void = void (DownloadTask result); + [Deprecated, Throws] + void download(DownloadConfig config, AsyncCallback_DownloadTask_Void callback_); + [Throws] + void downloadFile(BaseContext context, DownloadConfig config, AsyncCallback_DownloadTask_Void callback_); + [Deprecated, Throws] + async DownloadTask download(DownloadConfig config); + [Throws] + async DownloadTask downloadFile(BaseContext context, DownloadConfig config); [Async, Synthetic] callback AsyncCallback_UploadTask_Void = void (UploadTask result); + [Deprecated, Throws] + void upload(UploadConfig config, AsyncCallback_UploadTask_Void callback_); + [Throws] + void uploadFile(BaseContext context, UploadConfig config, AsyncCallback_UploadTask_Void callback_); + [Deprecated, Throws] + async UploadTask upload(UploadConfig config); + [Throws] + async UploadTask uploadFile(BaseContext context, UploadConfig config); [Entity=Interface] interface DownloadConfig { - attribute String url; [Optional] attribute Object header; @@ -28,11 +43,9 @@ namespace request { attribute String title; [Optional] attribute boolean background; - }; [Entity=Interface] interface DownloadInfo { - attribute String description; attribute number downloadedBytes; attribute number downloadId; @@ -44,7 +57,6 @@ namespace request { attribute String targetURI; attribute String downloadTitle; attribute number downloadTotalBytes; - }; [Synthetic] callback Callback_Number_Number_Void = void (number receivedSize, number totalSize); @@ -62,17 +74,16 @@ namespace request { callback AsyncCallback_String_Void = void (String result); [Entity=Interface] interface DownloadTask { - [Throws, DtsName="on", DtsTag="'progress'"] void onProgress(Callback_Number_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'progress'"] - void offProgress(optional Callback_Number_Number_Void callback_); [Throws] void on(String type, Callback_Void callback_); - [Throws] - void off(String type, optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'fail'"] void onFail(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'progress'"] + void offProgress(optional Callback_Number_Number_Void callback_); + [Throws] + void off(String type, optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'fail'"] void offFail(optional Callback_Number_Void callback_); [Deprecated, Throws] @@ -115,27 +126,21 @@ namespace request { void getTaskMimeType(AsyncCallback_String_Void callback_); [Throws] async String getTaskMimeType(); - }; [Entity=Interface] interface File { - attribute String filename; attribute String name; attribute String uri; attribute String type; - }; [Entity=Interface] interface RequestData { - attribute String name; attribute String value; - }; [Entity=Interface] interface UploadConfig { - attribute String url; attribute Object header; attribute String method; @@ -147,15 +152,12 @@ namespace request { attribute number ends; attribute sequence files; attribute sequence data; - }; [Entity=Interface] interface TaskState { - attribute String path; attribute number responseCode; attribute String message; - }; [Synthetic] callback Callback_Object_Void = void (Object header); @@ -163,17 +165,16 @@ namespace request { callback Callback_Array_TaskState_Void = void (sequence parameter); [Entity=Interface] interface UploadTask { - [Throws, DtsName="on", DtsTag="'progress'"] void onProgress(Callback_Number_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'progress'"] - void offProgress(optional Callback_Number_Number_Void callback_); [Throws, DtsName="on", DtsTag="'headerReceive'"] void onHeaderReceive(Callback_Object_Void callback_); - [Throws, DtsName="off", DtsTag="'headerReceive'"] - void offHeaderReceive(optional Callback_Object_Void callback_); [Throws] void on(String type, Callback_Array_TaskState_Void callback_); + [Throws, DtsName="off", DtsTag="'progress'"] + void offProgress(optional Callback_Number_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'headerReceive'"] + void offHeaderReceive(optional Callback_Object_Void callback_); [Throws] void off(String type, optional Callback_Array_TaskState_Void callback_); [Deprecated, Throws] @@ -184,65 +185,64 @@ namespace request { void delete(AsyncCallback_Boolean_Void callback_); [Throws] async boolean delete(); - }; namespace agent { - dictionary Action { - number DOWNLOAD = 0; number UPLOAD = 1; - }; dictionary Mode { - number BACKGROUND = 0; number FOREGROUND = 1; - }; dictionary Network { - number ANY = 0; number WIFI = 1; number CELLULAR = 2; - }; dictionary BroadcastEvent { - String COMPLETE = "ohos.request.event.COMPLETE"; - }; [Entity=Interface] interface FileSpec { - attribute String path; - [Optional] + [Optional, Deprecated] attribute String mimeType; [Optional] + attribute String contentType; + [Optional] attribute String filename; [Optional] attribute Object extras; - }; [Entity=Interface] interface FormItem { - attribute String name; attribute (String or FileSpec or sequence) value; - }; [Entity=Interface] interface Notification { - [Optional] attribute String title; [Optional] attribute String text; - + [Optional] + attribute boolean disable; + }; + [Entity=Interface] + interface MinSpeed { + attribute number speed; + attribute number duration; + }; + [Entity=Interface] + interface Timeout { + [Optional] + attribute number connectionTimeout; + [Optional] + attribute number totalTimeout; }; [Entity=Interface] interface Config { - attribute Action action; attribute String url; [Optional] @@ -293,10 +293,12 @@ namespace request { attribute boolean multipart; [Optional] attribute Notification notification; - + [Optional] + attribute MinSpeed minSpeed; + [Optional] + attribute Timeout timeout; }; dictionary State { - number INITIALIZED = 0; number WAITING = 16; number RUNNING = 32; @@ -306,21 +308,17 @@ namespace request { number COMPLETED = 64; number FAILED = 65; number REMOVED = 80; - }; [Entity=Interface] interface Progress { - readonly attribute State state; readonly attribute number index; readonly attribute number processed; readonly attribute sequence sizes; [Optional] readonly attribute Object extras; - }; dictionary Faults { - number OTHERS = 255; number DISCONNECTED = 0; number TIMEOUT = 16; @@ -331,11 +329,10 @@ namespace request { number TCP = 96; number SSL = 112; number REDIRECT = 128; - + number LOW_SPEED = 144; }; [Entity=Interface] interface Filter { - [Optional] attribute String bundle; [Optional] @@ -348,11 +345,9 @@ namespace request { attribute Action action; [Optional] attribute Mode mode; - }; [Entity=Interface] interface TaskInfo { - [Optional] readonly attribute String uid; [Optional] @@ -380,54 +375,70 @@ namespace request { readonly attribute String reason; [Optional] readonly attribute Object extras; - }; [Entity=Interface] interface HttpResponse { - readonly attribute String version; readonly attribute number statusCode; readonly attribute String reason; readonly attribute record> headers; - + }; + dictionary WaitingReason { + number TASK_QUEUE_FULL = 0; + number NETWORK_NOT_MATCH = 1; + number APP_BACKGROUND = 2; + number USER_INACTIVATED = 3; }; [Synthetic] callback Callback_Progress_Void = void (Progress progress); [Synthetic] callback Callback_HttpResponse_Void = void (HttpResponse parameter); + [Synthetic] + callback Callback_Faults_Void = void (Faults parameter); + [Synthetic] + callback Callback_WaitingReason_Void = void (WaitingReason parameter); + [Async, Synthetic] + callback AsyncCallback_Void = void (); [Entity=Interface] interface Task { - readonly attribute String tid; attribute Config config; [Throws, DtsName="on", DtsTag="0|event|'progress'"] void onProgress(Callback_Progress_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'progress'"] - void offProgress(optional Callback_Progress_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'completed'"] void onCompleted(Callback_Progress_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'completed'"] - void offCompleted(optional Callback_Progress_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'failed'"] void onFailed(Callback_Progress_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'failed'"] - void offFailed(optional Callback_Progress_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'pause'"] void onPause(Callback_Progress_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'pause'"] - void offPause(optional Callback_Progress_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'resume'"] void onResume(Callback_Progress_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'resume'"] - void offResume(optional Callback_Progress_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'remove'"] void onRemove(Callback_Progress_Void callback_); - [Throws, DtsName="off", DtsTag="0|event|'remove'"] - void offRemove(optional Callback_Progress_Void callback_); [Throws, DtsName="on", DtsTag="0|event|'response'"] void onResponse(Callback_HttpResponse_Void callback_); + [Throws, DtsName="on", DtsTag="0|event|'faultOccur'"] + void onFaultOccur(Callback_Faults_Void callback_); + [Throws, DtsName="on", DtsTag="0|event|'wait'"] + void onWait(Callback_WaitingReason_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'progress'"] + void offProgress(optional Callback_Progress_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'completed'"] + void offCompleted(optional Callback_Progress_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'failed'"] + void offFailed(optional Callback_Progress_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'pause'"] + void offPause(optional Callback_Progress_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'resume'"] + void offResume(optional Callback_Progress_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'remove'"] + void offRemove(optional Callback_Progress_Void callback_); [Throws, DtsName="off", DtsTag="0|event|'response'"] void offResponse(optional Callback_HttpResponse_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'faultOccur'"] + void offFaultOccur(optional Callback_Faults_Void callback_); + [Throws, DtsName="off", DtsTag="0|event|'wait'"] + void offWait(optional Callback_WaitingReason_Void callback_); [Throws] void start(AsyncCallback_Void callback_); [Throws] @@ -446,83 +457,52 @@ namespace request { async void stop(); [Throws] async void setMaxSpeed(number speed); - }; [Async, Synthetic] callback AsyncCallback_Task_Void = void (Task result); + [Throws] + void create(BaseContext context, Config config, AsyncCallback_Task_Void callback_); + [Throws] + async Task create(BaseContext context, Config config); + [Throws] + async Task getTask(BaseContext context, String id, optional String token); + [Throws] + void remove(String id, AsyncCallback_Void callback_); + [Throws] + async void remove(String id); [Async, Synthetic] callback AsyncCallback_TaskInfo_Void = void (TaskInfo result); + [Throws] + void show(String id, AsyncCallback_TaskInfo_Void callback_); + [Throws] + async TaskInfo show(String id); + [Throws] + void touch(String id, String token, AsyncCallback_TaskInfo_Void callback_); + [Throws] + async TaskInfo touch(String id, String token); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void search(AsyncCallback_Array_String_Void callback_); + [Throws] + void search(Filter filter, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence search(optional Filter filter); + [Throws] + void query(String id, AsyncCallback_TaskInfo_Void callback_); + [Throws] + async TaskInfo query(String id); [Entity=Interface] interface GroupConfig { - [Optional] attribute boolean gauge; attribute Notification notification; - - }; - [GlobalScope] - interface GlobalScope_request.agent_ohos_request { - - [Throws] - static void create(BaseContext context, Config config, AsyncCallback_Task_Void callback_); - [Throws] - static async Task create(BaseContext context, Config config); - [Throws] - static async Task getTask(BaseContext context, String id, optional String token); - [Throws] - static void remove(String id, AsyncCallback_Void callback_); - [Throws] - static async void remove(String id); - [Throws] - static void show(String id, AsyncCallback_TaskInfo_Void callback_); - [Throws] - static async TaskInfo show(String id); - [Throws] - static void touch(String id, String token, AsyncCallback_TaskInfo_Void callback_); - [Throws] - static async TaskInfo touch(String id, String token); - [Throws] - static void search(AsyncCallback_Array_String_Void callback_); - [Throws] - static void search(Filter filter, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence search(optional Filter filter); - [Throws] - static void query(String id, AsyncCallback_TaskInfo_Void callback_); - [Throws] - static async TaskInfo query(String id); - [Throws] - static async String createGroup(GroupConfig config); - [Throws] - static async void attachGroup(String gid, sequence tids); - [Throws] - static async void deleteGroup(String gid); - }; - - }; - [GlobalScope] - interface GlobalScope_request_ohos_request { - - [Deprecated, Throws] - static void download(DownloadConfig config, AsyncCallback_DownloadTask_Void callback_); [Throws] - static void downloadFile(BaseContext context, DownloadConfig config, AsyncCallback_DownloadTask_Void callback_); - [Deprecated, Throws] - static async DownloadTask download(DownloadConfig config); + async String createGroup(GroupConfig config); [Throws] - static async DownloadTask downloadFile(BaseContext context, DownloadConfig config); - [Deprecated, Throws] - static void upload(UploadConfig config, AsyncCallback_UploadTask_Void callback_); - [Throws] - static void uploadFile(BaseContext context, UploadConfig config, AsyncCallback_UploadTask_Void callback_); - [Deprecated, Throws] - static async UploadTask upload(UploadConfig config); + async void attachGroup(String gid, sequence tids); [Throws] - static async UploadTask uploadFile(BaseContext context, UploadConfig config); - + async void deleteGroup(String gid); }; - }; \ No newline at end of file diff --git a/idl/@ohos.resourceManager.idl b/idl/@ohos.resourceManager.idl index 6732959..90df044 100644 --- a/idl/@ohos.resourceManager.idl +++ b/idl/@ohos.resourceManager.idl @@ -1,18 +1,15 @@ -package ohos; -import RawFileDescriptor as _RawFileDescriptor; -import Resource as _Resource; +package ohos.resourceManager; +import rawFileDescriptor.RawFileDescriptor as _RawFileDescriptor; +import resource.Resource as _Resource; import ohos.base.AsyncCallback as _AsyncCallback; import ohos.arkui.drawableDescriptor.DrawableDescriptor as DrawableDescriptor; +[DefaultExport] namespace resourceManager { - dictionary Direction { - number DIRECTION_VERTICAL = 0; number DIRECTION_HORIZONTAL = 1; - }; dictionary DeviceType { - number DEVICE_TYPE_PHONE = 0; number DEVICE_TYPE_TABLET = 1; number DEVICE_TYPE_CAR = 2; @@ -20,27 +17,21 @@ namespace resourceManager { number DEVICE_TYPE_TV = 4; number DEVICE_TYPE_WEARABLE = 6; number DEVICE_TYPE_2IN1 = 7; - }; dictionary ScreenDensity { - number SCREEN_SDPI = 120; number SCREEN_MDPI = 160; number SCREEN_LDPI = 240; number SCREEN_XLDPI = 320; number SCREEN_XXLDPI = 480; number SCREEN_XXXLDPI = 640; - }; dictionary ColorMode { - number DARK = 0; number LIGHT = 1; - }; [Entity=Class] interface Configuration { - attribute Direction direction; attribute String locale; attribute DeviceType deviceType; @@ -48,24 +39,27 @@ namespace resourceManager { attribute ColorMode colorMode; attribute number mcc; attribute number mnc; - }; [Entity=Class] interface DeviceCapability { - attribute ScreenDensity screenDensity; attribute DeviceType deviceType; - }; [Entity=Interface, Deprecated, TypeParameters="T"] interface AsyncCallback { - [Deprecated, CallSignature] void invoke(Error err, T data); - }; [Async, Synthetic] callback AsyncCallback_ResourceManager_Void = void (ResourceManager result); + void getResourceManager(AsyncCallback_ResourceManager_Void callback_); + void getResourceManager(String bundleName, AsyncCallback_ResourceManager_Void callback_); + async ResourceManager getResourceManager(); + async ResourceManager getResourceManager(String bundleName); + [Deprecated, Throws] + ResourceManager getSystemResourceManager(); + [Throws] + ResourceManager getSysResourceManager(); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Async, Synthetic] @@ -78,47 +72,70 @@ namespace resourceManager { callback AsyncCallback_Void = void (); [Entity=Interface] interface ResourceManager { - [Deprecated] void getString(number resId, AsyncCallback_String_Void callback_); [Deprecated] async String getString(number resId); - [Throws] + [Deprecated, Throws] void getStringValue(Resource resource, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async String getStringValue(Resource resource); + [Throws] + void getStringValue(number resId, [TypeArguments="String"] _AsyncCallback callback_); + [Throws] + async String getStringValue(number resId); [Deprecated] void getStringArray(number resId, AsyncCallback_Array_String_Void callback_); [Deprecated] async sequence getStringArray(number resId); - [Throws] + [Deprecated, Throws] void getStringArrayValue(Resource resource, [TypeArguments="sequence"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async sequence getStringArrayValue(Resource resource); + [Throws] + void getStringArrayValue(number resId, [TypeArguments="sequence"] _AsyncCallback callback_); + [Throws] + async sequence getStringArrayValue(number resId); [Deprecated] void getMedia(number resId, AsyncCallback_Buffer_Void callback_); [Deprecated] async buffer getMedia(number resId); - [Throws] + [Deprecated, Throws] void getMediaContent(Resource resource, [TypeArguments="buffer"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] void getMediaContent(Resource resource, number density, [TypeArguments="buffer"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async buffer getMediaContent(Resource resource); - [Throws] + [Deprecated, Throws] async buffer getMediaContent(Resource resource, number density); + [Throws] + void getMediaContent(number resId, [TypeArguments="buffer"] _AsyncCallback callback_); + [Throws] + void getMediaContent(number resId, number density, [TypeArguments="buffer"] _AsyncCallback callback_); + [Throws] + async buffer getMediaContent(number resId); + [Throws] + async buffer getMediaContent(number resId, number density); [Deprecated] void getMediaBase64(number resId, AsyncCallback_String_Void callback_); [Deprecated] async String getMediaBase64(number resId); - [Throws] + [Deprecated, Throws] void getMediaContentBase64(Resource resource, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] void getMediaContentBase64(Resource resource, number density, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async String getMediaContentBase64(Resource resource); - [Throws] + [Deprecated, Throws] async String getMediaContentBase64(Resource resource, number density); + [Throws] + void getMediaContentBase64(number resId, [TypeArguments="String"] _AsyncCallback callback_); + [Throws] + void getMediaContentBase64(number resId, number density, [TypeArguments="String"] _AsyncCallback callback_); + [Throws] + async String getMediaContentBase64(number resId); + [Throws] + async String getMediaContentBase64(number resId, number density); void getDeviceCapability([TypeArguments="DeviceCapability"] _AsyncCallback callback_); async DeviceCapability getDeviceCapability(); void getConfiguration([TypeArguments="Configuration"] _AsyncCallback callback_); @@ -127,10 +144,14 @@ namespace resourceManager { void getPluralString(number resId, number num, AsyncCallback_String_Void callback_); [Deprecated] async String getPluralString(number resId, number num); - [Throws] + [Deprecated, Throws] void getPluralStringValue(Resource resource, number num, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async String getPluralStringValue(Resource resource, number num); + [Deprecated, Throws] + void getPluralStringValue(number resId, number num, [TypeArguments="String"] _AsyncCallback callback_); + [Deprecated, Throws] + async String getPluralStringValue(number resId, number num); [Deprecated] void getRawFile(String path, AsyncCallback_Buffer_Void callback_); [Deprecated] @@ -167,17 +188,17 @@ namespace resourceManager { async String getMediaBase64ByName(String resName); [Throws] async String getMediaBase64ByName(String resName, number density); - [Throws] + [Deprecated, Throws] void getPluralStringByName(String resName, number num, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async String getPluralStringByName(String resName, number num); [Throws] String getStringSync(number resId); [Throws] String getStringSync(number resId, sequence<(String or number)>... args); - [Throws] + [Deprecated, Throws] String getStringSync(Resource resource); - [Throws] + [Deprecated, Throws] String getStringSync(Resource resource, sequence<(String or number)>... args); [Throws] String getStringByNameSync(String resName); @@ -185,46 +206,30 @@ namespace resourceManager { String getStringByNameSync(String resName, sequence<(String or number)>... args); [Throws] boolean getBoolean(number resId); - [Throws] + [Deprecated, Throws] boolean getBoolean(Resource resource); [Throws] boolean getBooleanByName(String resName); [Throws] number getNumber(number resId); - [Throws] + [Deprecated, Throws] number getNumber(Resource resource); [Throws] number getNumberByName(String resName); [Deprecated] - undefined release(); - [Throws] - void getStringValue(number resId, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] - async String getStringValue(number resId); - [Throws] - void getStringArrayValue(number resId, [TypeArguments="sequence"] _AsyncCallback callback_); - [Throws] - async sequence getStringArrayValue(number resId); - [Throws] - void getPluralStringValue(number resId, number num, [TypeArguments="String"] _AsyncCallback callback_); - [Throws] - async String getPluralStringValue(number resId, number num); - [Throws] - void getMediaContent(number resId, [TypeArguments="buffer"] _AsyncCallback callback_); - [Throws] - void getMediaContent(number resId, number density, [TypeArguments="buffer"] _AsyncCallback callback_); - [Throws] - async buffer getMediaContent(number resId); + void release(); [Throws] - async buffer getMediaContent(number resId, number density); + String getIntPluralStringValueSync(number resId, number num, sequence<(String or number)>... args); + [Deprecated, Throws] + String getIntPluralStringValueSync(Resource resource, number num, sequence<(String or number)>... args); [Throws] - void getMediaContentBase64(number resId, [TypeArguments="String"] _AsyncCallback callback_); + String getIntPluralStringByNameSync(String resName, number num, sequence<(String or number)>... args); [Throws] - void getMediaContentBase64(number resId, number density, [TypeArguments="String"] _AsyncCallback callback_); + String getDoublePluralStringValueSync(number resId, number num, sequence<(String or number)>... args); + [Deprecated, Throws] + String getDoublePluralStringValueSync(Resource resource, number num, sequence<(String or number)>... args); [Throws] - async String getMediaContentBase64(number resId); - [Throws] - async String getMediaContentBase64(number resId, number density); + String getDoublePluralStringByNameSync(String resName, number num, sequence<(String or number)>... args); [Throws] void getRawFileContent(String path, [TypeArguments="buffer"] _AsyncCallback callback_); [Throws] @@ -239,11 +244,11 @@ namespace resourceManager { async void closeRawFd(String path); [Throws] DrawableDescriptor getDrawableDescriptor(number resId, optional number density, optional number type); + [Deprecated, Throws] + DrawableDescriptor getDrawableDescriptor(Resource resource, optional number density, optional number type); [Throws] DrawableDescriptor getDrawableDescriptorByName(String resName, optional number density, optional number type); [Throws] - DrawableDescriptor getDrawableDescriptor(Resource resource, optional number density, optional number type); - [Throws] void getRawFileList(String path, [TypeArguments="sequence"] _AsyncCallback callback_); [Throws] async sequence getRawFileList(String path); @@ -251,9 +256,9 @@ namespace resourceManager { void getColor(number resId, [TypeArguments="number"] _AsyncCallback callback_); [Throws] async number getColor(number resId); - [Throws] + [Deprecated, Throws] void getColor(Resource resource, [TypeArguments="number"] _AsyncCallback callback_); - [Throws] + [Deprecated, Throws] async number getColor(Resource resource); [Throws] void getColorByName(String resName, [TypeArguments="number"] _AsyncCallback callback_); @@ -261,7 +266,7 @@ namespace resourceManager { async number getColorByName(String resName); [Throws] number getColorSync(number resId); - [Throws] + [Deprecated, Throws] number getColorSync(Resource resource); [Throws] number getColorByNameSync(String resName); @@ -279,21 +284,21 @@ namespace resourceManager { buffer getRawFileContentSync(String path); [Throws] buffer getMediaContentSync(number resId, optional number density); - [Throws] + [Deprecated, Throws] buffer getMediaContentSync(Resource resource, optional number density); [Throws] String getMediaContentBase64Sync(number resId, optional number density); - [Throws] + [Deprecated, Throws] String getMediaContentBase64Sync(Resource resource, optional number density); - [Throws] + [Deprecated, Throws] String getPluralStringValueSync(number resId, number num); - [Throws] + [Deprecated, Throws] String getPluralStringValueSync(Resource resource, number num); [Throws] sequence getStringArrayValueSync(number resId); - [Throws] + [Deprecated, Throws] sequence getStringArrayValueSync(Resource resource); - [Throws] + [Deprecated, Throws] String getPluralStringByNameSync(String resName, number num); [Throws] buffer getMediaByNameSync(String resName, optional number density); @@ -307,7 +312,7 @@ namespace resourceManager { sequence getLocales(optional boolean includeSystem); [Throws] number getSymbol(number resId); - [Throws] + [Deprecated, Throws] number getSymbol(Resource resource); [Throws] number getSymbolByName(String resName); @@ -318,20 +323,7 @@ namespace resourceManager { Configuration getOverrideConfiguration(); [Throws] void updateOverrideConfiguration(Configuration configuration); - }; typedef _RawFileDescriptor RawFileDescriptor; typedef _Resource Resource; - [GlobalScope] - interface GlobalScope_resourceManager_ohos_resourceManager { - - static void getResourceManager(AsyncCallback_ResourceManager_Void callback_); - static void getResourceManager(String bundleName, AsyncCallback_ResourceManager_Void callback_); - static async ResourceManager getResourceManager(); - static async ResourceManager getResourceManager(String bundleName); - [Throws] - static ResourceManager getSystemResourceManager(); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.resourceschedule.backgroundProcessManager.idl b/idl/@ohos.resourceschedule.backgroundProcessManager.idl new file mode 100644 index 0000000..eb3904f --- /dev/null +++ b/idl/@ohos.resourceschedule.backgroundProcessManager.idl @@ -0,0 +1,19 @@ +package ohos.resourceschedule.backgroundProcessManager; +[DefaultExport] +namespace backgroundProcessManager { + dictionary ProcessPriority { + number PROCESS_BACKGROUND = 1; + number PROCESS_INACTIVE = 2; + }; + dictionary PowerSaveMode { + number EFFICIENCY_MODE = 1; + number DEFAULT_MODE = 2; + }; + [Throws] + async void setProcessPriority(number pid, ProcessPriority priority); + async void resetProcessPriority(number pid); + [Throws] + async void setPowerSaveMode(number pid, PowerSaveMode powerSaveMode); + [Throws] + async boolean isPowerSaveMode(number pid); +}; \ No newline at end of file diff --git a/idl/@ohos.resourceschedule.backgroundTaskManager.idl b/idl/@ohos.resourceschedule.backgroundTaskManager.idl index 003d73b..0368349 100644 --- a/idl/@ohos.resourceschedule.backgroundTaskManager.idl +++ b/idl/@ohos.resourceschedule.backgroundTaskManager.idl @@ -1,45 +1,126 @@ -package ohos.resourceschedule; +package ohos.resourceschedule.backgroundTaskManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.WantAgent as WantAgent; -import application.Context as Context; -import ohos.notificationManager as notificationManager; +import ohos.wantAgent.WantAgent as WantAgent; +import application.BaseContext.default as Context; +import ohos.notificationManager.default as notificationManager; +[DefaultExport] namespace backgroundTaskManager { - [Entity=Interface] interface DelaySuspendInfo { - attribute number requestId; attribute number actualDelayTime; - + }; + [Entity=Interface] + interface TransientTaskInfo { + attribute number remainingQuota; + attribute sequence transientTasks; }; [Entity=Interface] interface ContinuousTaskNotification { - attribute notificationManager.SlotType slotType; attribute notificationManager.ContentType contentType; attribute number notificationId; [Optional] attribute number continuousTaskId; - }; [Entity=Interface] interface ContinuousTaskCancelInfo { - attribute ContinuousTaskCancelReason reason; attribute number id; - }; + [Entity=Interface] + interface ContinuousTaskActiveInfo { + attribute number id; + }; + [Entity=Interface] + interface ContinuousTaskInfo { + attribute String abilityName; + attribute number uid; + attribute number pid; + attribute boolean isFromWebView; + attribute sequence backgroundModes; + attribute sequence backgroundSubModes; + attribute number notificationId; + attribute number continuousTaskId; + attribute number abilityId; + attribute String wantAgentBundleName; + attribute String wantAgentAbilityName; + attribute boolean suspendState; + }; + [Entity=Interface] + interface ContinuousTaskSuspendInfo { + attribute number continuousTaskId; + attribute boolean suspendState; + attribute ContinuousTaskSuspendReason suspendReason; + }; + [Entity=Interface] + interface EfficiencyResourcesInfo { + attribute number resourceTypes; + attribute number timeout; + attribute boolean isPersistent; + attribute boolean isForProcess; + attribute String reason; + attribute number uid; + attribute number pid; + }; + [Throws] + void cancelSuspendDelay(number requestId); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getRemainingDelayTime(number requestId, AsyncCallback_Number_Void callback_); + [Throws] + async number getRemainingDelayTime(number requestId); [Synthetic] callback Callback_Void = void (); + [Throws] + DelaySuspendInfo requestSuspendDelay(String reason, Callback_Void callback_); + [Throws] + async TransientTaskInfo getTransientTaskInfo(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent, AsyncCallback_Void callback_); + [Throws] + async void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent); + [Throws] + async ContinuousTaskNotification startBackgroundRunning(Context context, sequence bgModes, WantAgent wantAgent); + [Throws] + async ContinuousTaskNotification updateBackgroundRunning(Context context, sequence bgModes); + [Throws] + void stopBackgroundRunning(Context context, AsyncCallback_Void callback_); + [Throws] + async void stopBackgroundRunning(Context context); + [Throws] + async sequence getAllContinuousTasks(Context context); + [Throws] + async sequence getAllContinuousTasks(Context context, boolean includeSuspended); + [Throws] + void applyEfficiencyResources(EfficiencyResourcesRequest request); + [Throws] + void resetAllEfficiencyResources(); + [Throws] + async sequence getAllEfficiencyResources(); [Synthetic] callback Callback_ContinuousTaskCancelInfo_Void = void (ContinuousTaskCancelInfo parameter); + [Throws, DtsName="on", DtsTag="'continuousTaskCancel'"] + void onContinuousTaskCancel(Callback_ContinuousTaskCancelInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'continuousTaskCancel'"] + void offContinuousTaskCancel(optional Callback_ContinuousTaskCancelInfo_Void callback_); + [Synthetic] + callback Callback_ContinuousTaskSuspendInfo_Void = void (ContinuousTaskSuspendInfo parameter); + [Throws, DtsName="on", DtsTag="'continuousTaskSuspend'"] + void onContinuousTaskSuspend(Callback_ContinuousTaskSuspendInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'continuousTaskSuspend'"] + void offContinuousTaskSuspend(optional Callback_ContinuousTaskSuspendInfo_Void callback_); + [Synthetic] + callback Callback_ContinuousTaskActiveInfo_Void = void (ContinuousTaskActiveInfo parameter); + [Throws, DtsName="on", DtsTag="'continuousTaskActive'"] + void onContinuousTaskActive(Callback_ContinuousTaskActiveInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'continuousTaskActive'"] + void offContinuousTaskActive(optional Callback_ContinuousTaskActiveInfo_Void callback_); dictionary BackgroundMode { - number DATA_TRANSFER = 1; number AUDIO_PLAYBACK = 2; number AUDIO_RECORDING = 3; @@ -49,10 +130,8 @@ namespace backgroundTaskManager { number WIFI_INTERACTION = 7; number VOIP = 8; number TASK_KEEPING = 9; - }; dictionary ResourceType { - number CPU = 1; number COMMON_EVENT = 2; number TIMER = 4; @@ -62,11 +141,9 @@ namespace backgroundTaskManager { number AUDIO = 64; number RUNNING_LOCK = 128; number SENSOR = 256; - }; [Entity=Interface] interface EfficiencyResourcesRequest { - attribute number resourceTypes; attribute boolean isApply; attribute number timeOut; @@ -75,10 +152,8 @@ namespace backgroundTaskManager { [Optional] attribute boolean isProcess; attribute String reason; - }; dictionary ContinuousTaskCancelReason { - number USER_CANCEL = 1; number SYSTEM_CANCEL = 2; number USER_CANCEL_REMOVE_NOTIFICATION = 3; @@ -90,40 +165,22 @@ namespace backgroundTaskManager { number SYSTEM_CANCEL_NOT_USE_BLUETOOTH = 9; number SYSTEM_CANCEL_NOT_USE_MULTI_DEVICE = 10; number SYSTEM_CANCEL_USE_ILLEGALLY = 11; - }; - [GlobalScope] - interface GlobalScope_backgroundTaskManager_ohos_resourceschedule_backgroundTaskManager { - - [Throws] - static void cancelSuspendDelay(number requestId); - [Throws] - static void getRemainingDelayTime(number requestId, AsyncCallback_Number_Void callback_); - [Throws] - static async number getRemainingDelayTime(number requestId); - [Throws] - static DelaySuspendInfo requestSuspendDelay(String reason, Callback_Void callback_); - [Throws] - static void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent, AsyncCallback_Void callback_); - [Throws] - static async void startBackgroundRunning(Context context, BackgroundMode bgMode, WantAgent wantAgent); - [Throws] - static async ContinuousTaskNotification startBackgroundRunning(Context context, sequence bgModes, WantAgent wantAgent); - [Throws] - static async ContinuousTaskNotification updateBackgroundRunning(Context context, sequence bgModes); - [Throws] - static void stopBackgroundRunning(Context context, AsyncCallback_Void callback_); - [Throws] - static async void stopBackgroundRunning(Context context); - [Throws] - static void applyEfficiencyResources(EfficiencyResourcesRequest request); - [Throws] - static void resetAllEfficiencyResources(); - [Throws, DtsName="on", DtsTag="'continuousTaskCancel'"] - static void onContinuousTaskCancel(Callback_ContinuousTaskCancelInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'continuousTaskCancel'"] - static void offContinuousTaskCancel(optional Callback_ContinuousTaskCancelInfo_Void callback_); - + dictionary BackgroundSubMode { + number CAR_KEY = 1; + }; + dictionary BackgroundModeType { + String SUB_MODE = "subMode"; + }; + dictionary ContinuousTaskSuspendReason { + number SYSTEM_SUSPEND_DATA_TRANSFER_LOW_SPEED = 4; + number SYSTEM_SUSPEND_AUDIO_PLAYBACK_NOT_USE_AVSESSION = 5; + number SYSTEM_SUSPEND_AUDIO_PLAYBACK_NOT_RUNNING = 6; + number SYSTEM_SUSPEND_AUDIO_RECORDING_NOT_RUNNING = 7; + number SYSTEM_SUSPEND_LOCATION_NOT_USED = 8; + number SYSTEM_SUSPEND_BLUETOOTH_NOT_USED = 9; + number SYSTEM_SUSPEND_MULTI_DEVICE_NOT_USED = 10; + number SYSTEM_SUSPEND_USED_ILLEGALLY = 11; + number SYSTEM_SUSPEND_SYSTEM_LOAD_WARNING = 12; }; - }; \ No newline at end of file diff --git a/idl/@ohos.resourceschedule.deviceStandby.idl b/idl/@ohos.resourceschedule.deviceStandby.idl index 73be3b6..291ee3d 100644 --- a/idl/@ohos.resourceschedule.deviceStandby.idl +++ b/idl/@ohos.resourceschedule.deviceStandby.idl @@ -1,11 +1,18 @@ -package ohos.resourceschedule; +package ohos.resourceschedule.deviceStandby; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace deviceStandby { - [Async, Synthetic] callback AsyncCallback_Array_ExemptedAppInfo_Void = void (sequence result); + [Throws] + void getExemptedApps(number resourceTypes, AsyncCallback_Array_ExemptedAppInfo_Void callback_); + [Throws] + async sequence getExemptedApps(number resourceTypes); + [Throws] + void requestExemptionResource(ResourceRequest request); + [Throws] + void releaseExemptionResource(ResourceRequest request); dictionary ResourceType { - number NETWORK = 1; number RUNNING_LOCK = 2; number TIMER = 4; @@ -13,38 +20,19 @@ namespace deviceStandby { number AUTO_SYNC = 16; number PUSH = 32; number FREEZE = 64; - }; [Entity=Interface] interface ExemptedAppInfo { - attribute number resourceTypes; attribute String name; attribute number duration; - }; [Entity=Interface] interface ResourceRequest { - attribute number resourceTypes; attribute number uid; attribute String name; attribute number duration; attribute String reason; - }; - [GlobalScope] - interface GlobalScope_deviceStandby_ohos_resourceschedule_deviceStandby { - - [Throws] - static void getExemptedApps(number resourceTypes, AsyncCallback_Array_ExemptedAppInfo_Void callback_); - [Throws] - static async sequence getExemptedApps(number resourceTypes); - [Throws] - static void requestExemptionResource(ResourceRequest request); - [Throws] - static void releaseExemptionResource(ResourceRequest request); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.resourceschedule.systemload.idl b/idl/@ohos.resourceschedule.systemload.idl index ec52cb7..c5b5f69 100644 --- a/idl/@ohos.resourceschedule.systemload.idl +++ b/idl/@ohos.resourceschedule.systemload.idl @@ -1,9 +1,8 @@ -package ohos.resourceschedule; +package ohos.resourceschedule.systemload; import ohos.base.Callback as Callback; +[DefaultExport] namespace systemLoad { - dictionary SystemLoadLevel { - number LOW = 0; number NORMAL = 1; number MEDIUM = 2; @@ -12,19 +11,12 @@ namespace systemLoad { number WARNING = 5; number EMERGENCY = 6; number ESCAPE = 7; - }; [Synthetic] callback Callback_SystemLoadLevel_Void = void (SystemLoadLevel parameter); - [GlobalScope] - interface GlobalScope_systemLoad_ohos_resourceschedule_systemload { - - [Throws, DtsName="on", DtsTag="'systemLoadChange'"] - static void onSystemLoadChange(Callback_SystemLoadLevel_Void callback_); - [Throws, DtsName="off", DtsTag="'systemLoadChange'"] - static void offSystemLoadChange(optional Callback_SystemLoadLevel_Void callback_); - static async SystemLoadLevel getLevel(); - - }; - + [Throws, DtsName="on", DtsTag="'systemLoadChange'"] + void onSystemLoadChange(Callback_SystemLoadLevel_Void callback_); + [Throws, DtsName="off", DtsTag="'systemLoadChange'"] + void offSystemLoadChange(optional Callback_SystemLoadLevel_Void callback_); + async SystemLoadLevel getLevel(); }; \ No newline at end of file diff --git a/idl/@ohos.resourceschedule.usageStatistics.idl b/idl/@ohos.resourceschedule.usageStatistics.idl index 528032a..5b127b6 100644 --- a/idl/@ohos.resourceschedule.usageStatistics.idl +++ b/idl/@ohos.resourceschedule.usageStatistics.idl @@ -1,11 +1,10 @@ -package ohos.resourceschedule; +package ohos.resourceschedule.usageStatistics; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace usageStatistics { - [Entity=Interface] interface BundleStatsInfo { - attribute number id; [Optional] attribute number abilityInFgTotalTime; @@ -27,21 +26,17 @@ namespace usageStatistics { attribute number infosEndTime; [Optional] attribute number appIndex; - }; [Entity=Interface] interface HapFormInfo { - attribute String formName; attribute number formDimension; attribute number formId; attribute number formLastUsedTime; attribute number count; - }; [Entity=Interface] interface HapModuleInfo { - [Optional] attribute String deviceId; attribute String bundleName; @@ -63,19 +58,15 @@ namespace usageStatistics { attribute number launchedCount; attribute number lastModuleUsedTime; attribute sequence formRecords; - }; [Entity=Interface] interface DeviceEventStats { - attribute String name; attribute number eventId; attribute number count; - }; [Entity=Interface] interface BundleEvents { - [Optional] attribute number appGroup; [Optional] @@ -88,127 +79,114 @@ namespace usageStatistics { attribute number eventOccurredTime; [Optional] attribute number eventId; - }; [Entity=Interface] interface AppGroupCallbackInfo { - attribute number appOldGroup; attribute number appNewGroup; attribute number userId; attribute number changeReason; attribute String bundleName; - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isIdleState(String bundleName, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isIdleState(String bundleName); + [Throws] + boolean isIdleStateSync(String bundleName); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void queryAppGroup(AsyncCallback_Number_Void callback_); + [Throws] + async number queryAppGroup(); + [Throws] + number queryAppGroupSync(); + [Throws] + void queryAppGroup(String bundleName, AsyncCallback_Number_Void callback_); + [Throws] + async number queryAppGroup(String bundleName); + [Throws] + number queryAppGroupSync(String bundleName); typedef record BundleStatsMap; [Async, Synthetic] callback AsyncCallback_BundleStatsMap_Void = void (BundleStatsMap result); + [Throws] + void queryBundleStatsInfos(number begin, number end, AsyncCallback_BundleStatsMap_Void callback_); + [Throws] + async BundleStatsMap queryBundleStatsInfos(number begin, number end); typedef record> AppStatsMap; + [Throws] + async AppStatsMap queryAppStatsInfos(number begin, number end); + [Throws] + async AppStatsMap queryLastUseTime(record> appInfo); dictionary IntervalType { - number BY_OPTIMIZED = 0; number BY_DAILY = 1; number BY_WEEKLY = 2; number BY_MONTHLY = 3; number BY_ANNUALLY = 4; - }; [Async, Synthetic] callback AsyncCallback_Array_BundleStatsInfo_Void = void (sequence result); + [Throws] + void queryBundleStatsInfoByInterval(IntervalType byInterval, number begin, number end, AsyncCallback_Array_BundleStatsInfo_Void callback_); + [Throws] + async sequence queryBundleStatsInfoByInterval(IntervalType byInterval, number begin, number end); [Async, Synthetic] callback AsyncCallback_Array_BundleEvents_Void = void (sequence result); + [Throws] + void queryBundleEvents(number begin, number end, AsyncCallback_Array_BundleEvents_Void callback_); + [Throws] + async sequence queryBundleEvents(number begin, number end); + [Throws] + void queryCurrentBundleEvents(number begin, number end, AsyncCallback_Array_BundleEvents_Void callback_); + [Throws] + async sequence queryCurrentBundleEvents(number begin, number end); [Async, Synthetic] callback AsyncCallback_Array_HapModuleInfo_Void = void (sequence result); + [Throws] + void queryModuleUsageRecords(number maxNum, AsyncCallback_Array_HapModuleInfo_Void callback_); + [Throws] + async sequence queryModuleUsageRecords(number maxNum); + [Throws] + void queryModuleUsageRecords(AsyncCallback_Array_HapModuleInfo_Void callback_); + [Throws] + async sequence queryModuleUsageRecords(); dictionary GroupType { - number ALIVE_GROUP = 10; number DAILY_GROUP = 20; number FIXED_GROUP = 30; number RARE_GROUP = 40; number LIMITED_GROUP = 50; number NEVER_GROUP = 60; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setAppGroup(String bundleName, GroupType newGroup, AsyncCallback_Void callback_); + [Throws] + async void setAppGroup(String bundleName, GroupType newGroup); [Synthetic] callback Callback_AppGroupCallbackInfo_Void = void (AppGroupCallbackInfo parameter); + [Throws] + void registerAppGroupCallBack(Callback_AppGroupCallbackInfo_Void groupCallback, AsyncCallback_Void callback_); + [Throws] + async void registerAppGroupCallBack(Callback_AppGroupCallbackInfo_Void groupCallback); + [Throws] + void unregisterAppGroupCallBack(AsyncCallback_Void callback_); + [Throws] + async void unregisterAppGroupCallBack(); [Async, Synthetic] callback AsyncCallback_Array_DeviceEventStats_Void = void (sequence result); - [GlobalScope] - interface GlobalScope_usageStatistics_ohos_resourceschedule_usageStatistics { - - [Throws] - static void isIdleState(String bundleName, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isIdleState(String bundleName); - [Throws] - static boolean isIdleStateSync(String bundleName); - [Throws] - static void queryAppGroup(AsyncCallback_Number_Void callback_); - [Throws] - static async number queryAppGroup(); - [Throws] - static number queryAppGroupSync(); - [Throws] - static void queryAppGroup(String bundleName, AsyncCallback_Number_Void callback_); - [Throws] - static async number queryAppGroup(String bundleName); - [Throws] - static number queryAppGroupSync(String bundleName); - [Throws] - static void queryBundleStatsInfos(number begin, number end, AsyncCallback_BundleStatsMap_Void callback_); - [Throws] - static async BundleStatsMap queryBundleStatsInfos(number begin, number end); - [Throws] - static async AppStatsMap queryAppStatsInfos(number begin, number end); - [Throws] - static async AppStatsMap queryLastUseTime(record> appInfo); - [Throws] - static void queryBundleStatsInfoByInterval(IntervalType byInterval, number begin, number end, AsyncCallback_Array_BundleStatsInfo_Void callback_); - [Throws] - static async sequence queryBundleStatsInfoByInterval(IntervalType byInterval, number begin, number end); - [Throws] - static void queryBundleEvents(number begin, number end, AsyncCallback_Array_BundleEvents_Void callback_); - [Throws] - static async sequence queryBundleEvents(number begin, number end); - [Throws] - static void queryCurrentBundleEvents(number begin, number end, AsyncCallback_Array_BundleEvents_Void callback_); - [Throws] - static async sequence queryCurrentBundleEvents(number begin, number end); - [Throws] - static void queryModuleUsageRecords(number maxNum, AsyncCallback_Array_HapModuleInfo_Void callback_); - [Throws] - static async sequence queryModuleUsageRecords(number maxNum); - [Throws] - static void queryModuleUsageRecords(AsyncCallback_Array_HapModuleInfo_Void callback_); - [Throws] - static async sequence queryModuleUsageRecords(); - [Throws] - static void setAppGroup(String bundleName, GroupType newGroup, AsyncCallback_Void callback_); - [Throws] - static async void setAppGroup(String bundleName, GroupType newGroup); - [Throws] - static void registerAppGroupCallBack(Callback_AppGroupCallbackInfo_Void groupCallback, AsyncCallback_Void callback_); - [Throws] - static async void registerAppGroupCallBack(Callback_AppGroupCallbackInfo_Void groupCallback); - [Throws] - static void unregisterAppGroupCallBack(AsyncCallback_Void callback_); - [Throws] - static async void unregisterAppGroupCallBack(); - [Throws] - static void queryDeviceEventStats(number begin, number end, AsyncCallback_Array_DeviceEventStats_Void callback_); - [Throws] - static async sequence queryDeviceEventStats(number begin, number end); - [Throws] - static void queryNotificationEventStats(number begin, number end, AsyncCallback_Array_DeviceEventStats_Void callback_); - [Throws] - static async sequence queryNotificationEventStats(number begin, number end); - - }; - + [Throws] + void queryDeviceEventStats(number begin, number end, AsyncCallback_Array_DeviceEventStats_Void callback_); + [Throws] + async sequence queryDeviceEventStats(number begin, number end); + [Throws] + void queryNotificationEventStats(number begin, number end, AsyncCallback_Array_DeviceEventStats_Void callback_); + [Throws] + async sequence queryNotificationEventStats(number begin, number end); }; \ No newline at end of file diff --git a/idl/@ohos.resourceschedule.workScheduler.idl b/idl/@ohos.resourceschedule.workScheduler.idl index b0ad5e0..3bdcc56 100644 --- a/idl/@ohos.resourceschedule.workScheduler.idl +++ b/idl/@ohos.resourceschedule.workScheduler.idl @@ -1,10 +1,9 @@ -package ohos.resourceschedule; +package ohos.resourceschedule.workScheduler; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace workScheduler { - [Entity=Interface] interface WorkInfo { - attribute number workId; attribute String bundleName; attribute String abilityName; @@ -34,74 +33,59 @@ namespace workScheduler { attribute number idleWaitTime; [Optional] attribute record parameters; - }; + [Throws] + void startWork(WorkInfo work); + [Throws] + void stopWork(WorkInfo work, optional boolean needCancel); [Async, Synthetic] callback AsyncCallback_WorkInfo_Void = void (WorkInfo result); + [Throws] + void getWorkStatus(number workId, AsyncCallback_WorkInfo_Void callback_); + [Throws] + async WorkInfo getWorkStatus(number workId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated, Throws] + sequence obtainAllWorks(AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_Array_WorkInfo_Void = void (sequence result); + [Throws] + void obtainAllWorks(AsyncCallback_Array_WorkInfo_Void callback_); + [Throws] + async sequence obtainAllWorks(); + [Throws] + void stopAndClearWorks(); + [Deprecated, Throws] + boolean isLastWorkTimeOut(number workId, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isLastWorkTimeOut(number workId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isLastWorkTimeOut(number workId); dictionary NetworkType { - number NETWORK_TYPE_ANY = 0; number NETWORK_TYPE_MOBILE = 1; number NETWORK_TYPE_WIFI = 2; number NETWORK_TYPE_BLUETOOTH = 3; number NETWORK_TYPE_WIFI_P2P = 4; number NETWORK_TYPE_ETHERNET = 5; - }; dictionary ChargingType { - number CHARGING_PLUGGED_ANY = 0; number CHARGING_PLUGGED_AC = 1; number CHARGING_PLUGGED_USB = 2; number CHARGING_PLUGGED_WIRELESS = 3; - }; dictionary BatteryStatus { - number BATTERY_STATUS_LOW = 0; number BATTERY_STATUS_OKAY = 1; number BATTERY_STATUS_LOW_OR_OKAY = 2; - }; dictionary StorageRequest { - number STORAGE_LEVEL_LOW = 0; number STORAGE_LEVEL_OKAY = 1; number STORAGE_LEVEL_LOW_OR_OKAY = 2; - }; - [GlobalScope] - interface GlobalScope_workScheduler_ohos_resourceschedule_workScheduler { - - [Throws] - static void startWork(WorkInfo work); - [Throws] - static void stopWork(WorkInfo work, optional boolean needCancel); - [Throws] - static void getWorkStatus(number workId, AsyncCallback_WorkInfo_Void callback_); - [Throws] - static async WorkInfo getWorkStatus(number workId); - [Deprecated, Throws] - static sequence obtainAllWorks(AsyncCallback_Void callback_); - [Throws] - static void obtainAllWorks(AsyncCallback_Array_WorkInfo_Void callback_); - [Throws] - static async sequence obtainAllWorks(); - [Throws] - static void stopAndClearWorks(); - [Deprecated, Throws] - static boolean isLastWorkTimeOut(number workId, AsyncCallback_Void callback_); - [Throws] - static void isLastWorkTimeOut(number workId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isLastWorkTimeOut(number workId); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.router.idl b/idl/@ohos.router.idl index 76b4b47..aea9ce4 100644 --- a/idl/@ohos.router.idl +++ b/idl/@ohos.router.idl @@ -1,108 +1,101 @@ -package ohos; +package ohos.router; import ohos.base.Callback as Callback; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace router { - dictionary RouterMode { - [OriginalEnumMemberName=Standard] number STANDARD = 0; [OriginalEnumMemberName=Single] number SINGLE = 1; - }; [Entity=Interface] interface RouterOptions { - attribute String url; [Optional] attribute Object params; [Optional] attribute boolean recoverable; - }; [Entity=Interface] interface RouterState { - attribute number index; attribute String name; attribute String path; attribute Object params; - }; [Entity=Interface] interface EnableAlertOptions { - attribute String message; - }; + [Deprecated] + void push(RouterOptions options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated, Throws] + void pushUrl(RouterOptions options, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void pushUrl(RouterOptions options); + [Deprecated, Throws] + void pushUrl(RouterOptions options, RouterMode mode, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void pushUrl(RouterOptions options, RouterMode mode); + [Deprecated] + void replace(RouterOptions options); + [Deprecated, Throws] + void replaceUrl(RouterOptions options, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void replaceUrl(RouterOptions options); + [Deprecated, Throws] + void replaceUrl(RouterOptions options, RouterMode mode, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void replaceUrl(RouterOptions options, RouterMode mode); + [Deprecated] + void back(optional RouterOptions options); + [Deprecated] + void back(number index, optional Object params); + [Deprecated] + void clear(); + [Deprecated] + String getLength(); + [Deprecated] + RouterState getState(); + [Deprecated] + (RouterState or undefined) getStateByIndex(number index); + [Deprecated] + sequence getStateByUrl(String url); + [Deprecated] + void enableAlertBeforeBackPage(EnableAlertOptions options); + [Deprecated, Throws] + void showAlertBeforeBackPage(EnableAlertOptions options); + [Deprecated] + void disableAlertBeforeBackPage(); + [Deprecated] + void hideAlertBeforeBackPage(); + [Deprecated] + Object getParams(); [Entity=Interface] interface NamedRouterOptions { - attribute String name; [Optional] attribute Object params; [Optional] attribute boolean recoverable; - }; - [GlobalScope] - interface GlobalScope_router_ohos_router { - - [Deprecated] - static void push(RouterOptions options); - [Throws] - static void pushUrl(RouterOptions options, AsyncCallback_Void callback_); - [Throws] - static async void pushUrl(RouterOptions options); - [Throws] - static void pushUrl(RouterOptions options, RouterMode mode, AsyncCallback_Void callback_); - [Throws] - static async void pushUrl(RouterOptions options, RouterMode mode); - [Deprecated] - static void replace(RouterOptions options); - [Throws] - static void replaceUrl(RouterOptions options, AsyncCallback_Void callback_); - [Throws] - static async void replaceUrl(RouterOptions options); - [Throws] - static void replaceUrl(RouterOptions options, RouterMode mode, AsyncCallback_Void callback_); - [Throws] - static async void replaceUrl(RouterOptions options, RouterMode mode); - static void back(optional RouterOptions options); - static void back(number index, optional Object params); - static void clear(); - static String getLength(); - static RouterState getState(); - static (RouterState or undefined) getStateByIndex(number index); - static sequence getStateByUrl(String url); - [Deprecated] - static void enableAlertBeforeBackPage(EnableAlertOptions options); - [Throws] - static void showAlertBeforeBackPage(EnableAlertOptions options); - [Deprecated] - static void disableAlertBeforeBackPage(); - static void hideAlertBeforeBackPage(); - static Object getParams(); - [Throws] - static void pushNamedRoute(NamedRouterOptions options, AsyncCallback_Void callback_); - [Throws] - static async void pushNamedRoute(NamedRouterOptions options); - [Throws] - static void pushNamedRoute(NamedRouterOptions options, RouterMode mode, AsyncCallback_Void callback_); - [Throws] - static async void pushNamedRoute(NamedRouterOptions options, RouterMode mode); - [Throws] - static void replaceNamedRoute(NamedRouterOptions options, AsyncCallback_Void callback_); - [Throws] - static async void replaceNamedRoute(NamedRouterOptions options); - [Throws] - static void replaceNamedRoute(NamedRouterOptions options, RouterMode mode, AsyncCallback_Void callback_); - [Throws] - static async void replaceNamedRoute(NamedRouterOptions options, RouterMode mode); - - }; - + [Deprecated, Throws] + void pushNamedRoute(NamedRouterOptions options, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void pushNamedRoute(NamedRouterOptions options); + [Deprecated, Throws] + void pushNamedRoute(NamedRouterOptions options, RouterMode mode, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void pushNamedRoute(NamedRouterOptions options, RouterMode mode); + [Deprecated, Throws] + void replaceNamedRoute(NamedRouterOptions options, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void replaceNamedRoute(NamedRouterOptions options); + [Deprecated, Throws] + void replaceNamedRoute(NamedRouterOptions options, RouterMode mode, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void replaceNamedRoute(NamedRouterOptions options, RouterMode mode); }; \ No newline at end of file diff --git a/idl/@ohos.rpc.idl b/idl/@ohos.rpc.idl index a48e1a7..252186b 100644 --- a/idl/@ohos.rpc.idl +++ b/idl/@ohos.rpc.idl @@ -1,9 +1,8 @@ -package ohos; +package ohos.rpc; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace rpc { - dictionary ErrorCode { - number CHECK_PARAM_ERROR = 401; number OS_MMAP_ERROR = 1900001; number OS_IOCTL_ERROR = 1900002; @@ -18,10 +17,8 @@ namespace rpc { number PARCEL_MEMORY_ALLOC_ERROR = 1900011; number CALL_JS_METHOD_ERROR = 1900012; number OS_DUP_ERROR = 1900013; - }; dictionary TypeCode { - number INT8_ARRAY = 0; number UINT8_ARRAY = 1; number INT16_ARRAY = 2; @@ -32,11 +29,9 @@ namespace rpc { number FLOAT64_ARRAY = 7; number BIGINT64_ARRAY = 8; number BIGUINT64_ARRAY = 9; - }; [Entity=Class, Deprecated] interface MessageParcel { - [Deprecated] static MessageParcel create(); [Deprecated] @@ -197,11 +192,9 @@ namespace rpc { boolean writeRawData(sequence rawData, number size); [Deprecated] sequence readRawData(number size); - }; [Entity=Class] interface MessageSequence { - static MessageSequence create(); void reclaim(); [Throws] @@ -360,27 +353,21 @@ namespace rpc { void writeArrayBuffer(buffer buf, TypeCode typeCode); [Throws] buffer readArrayBuffer(TypeCode typeCode); - }; [Entity=Interface, Deprecated] interface Sequenceable { - [Deprecated] boolean marshalling(MessageParcel dataOut); [Deprecated] boolean unmarshalling(MessageParcel dataIn); - }; [Entity=Interface] interface Parcelable { - boolean marshalling(MessageSequence dataOut); boolean unmarshalling(MessageSequence dataIn); - }; [Entity=Interface, Deprecated] interface SendRequestResult { - [Deprecated] attribute number errCode; [Deprecated] @@ -389,16 +376,13 @@ namespace rpc { attribute MessageParcel data; [Deprecated] attribute MessageParcel reply; - }; [Entity=Interface] interface RequestResult { - attribute number errCode; attribute number code; attribute MessageSequence data; attribute MessageSequence reply; - }; [Async, Synthetic] callback AsyncCallback_SendRequestResult_Void = void (SendRequestResult result); @@ -406,7 +390,6 @@ namespace rpc { callback AsyncCallback_RequestResult_Void = void (RequestResult result); [Entity=Class] interface IRemoteObject { - [Deprecated] IRemoteBroker queryLocalInterface(String descriptor); [Throws] @@ -415,11 +398,11 @@ namespace rpc { boolean sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options); [Deprecated] async SendRequestResult sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options); - [Throws] - async RequestResult sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options); [Deprecated] void sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options, AsyncCallback_SendRequestResult_Void callback_); [Throws] + async RequestResult sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options); + [Throws] void sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options, AsyncCallback_RequestResult_Void callback_); [Deprecated] boolean addDeathRecipient(DeathRecipient recipient, number flags); @@ -434,40 +417,33 @@ namespace rpc { [Throws] String getDescriptor(); boolean isObjectDead(); - }; [Entity=Interface] interface IRemoteBroker { - IRemoteObject asObject(); - }; [Entity=Interface] interface DeathRecipient { - void onRemoteDied(); - }; [Entity=Class] interface MessageOption { - constructor(optional number syncFlags, optional number waitTime); constructor(optional boolean async); - attribute number TF_SYNC; - attribute number TF_ASYNC; - attribute number TF_ACCEPT_FDS; - attribute number TF_WAIT_TIME; + constructor(boolean isAsync); + static attribute number TF_SYNC; + static attribute number TF_ASYNC; + static attribute number TF_ACCEPT_FDS; + static attribute number TF_WAIT_TIME; number getFlags(); void setFlags(number flags); boolean isAsync(); void setAsync(boolean async); number getWaitTime(); void setWaitTime(number waitTime); - }; [Entity=Class] - interface RemoteObject: IRemoteObject { - + interface RemoteObject: [Extends] IRemoteObject { constructor(String descriptor); [Deprecated] IRemoteBroker queryLocalInterface(String descriptor); @@ -484,11 +460,11 @@ namespace rpc { boolean sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options); [Deprecated] async SendRequestResult sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options); - [Throws] - async RequestResult sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options); [Deprecated] void sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options, AsyncCallback_SendRequestResult_Void callback_); [Throws] + async RequestResult sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options); + [Throws] void sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options, AsyncCallback_RequestResult_Void callback_); number getCallingPid(); number getCallingUid(); @@ -496,16 +472,14 @@ namespace rpc { void attachLocalInterface(IRemoteBroker localInterface, String descriptor); [Throws] void modifyLocalInterface(IRemoteBroker localInterface, String descriptor); - }; [Entity=Class] - interface RemoteProxy: IRemoteObject { - - attribute number PING_TRANSACTION; - attribute number DUMP_TRANSACTION; - attribute number INTERFACE_TRANSACTION; - attribute number MIN_TRANSACTION_ID; - attribute number MAX_TRANSACTION_ID; + interface RemoteProxy: [Extends] IRemoteObject { + static attribute number PING_TRANSACTION; + static attribute number DUMP_TRANSACTION; + static attribute number INTERFACE_TRANSACTION; + static attribute number MIN_TRANSACTION_ID; + static attribute number MAX_TRANSACTION_ID; [Deprecated] IRemoteBroker queryLocalInterface(String interface_); [Throws] @@ -526,18 +500,16 @@ namespace rpc { boolean sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options); [Deprecated] async SendRequestResult sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options); - [Throws] - async RequestResult sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options); [Deprecated] void sendRequest(number code, MessageParcel data, MessageParcel reply, MessageOption options, AsyncCallback_SendRequestResult_Void callback_); [Throws] + async RequestResult sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options); + [Throws] void sendMessageRequest(number code, MessageSequence data, MessageSequence reply, MessageOption options, AsyncCallback_RequestResult_Void callback_); boolean isObjectDead(); - }; [Entity=Class] interface IPCSkeleton { - static IRemoteObject getContextObject(); static number getCallingPid(); static number getCallingUid(); @@ -554,23 +526,21 @@ namespace rpc { static boolean setCallingIdentity(String identity); [Throws] static void restoreCallingIdentity(String identity); - }; [Entity=Class] interface Ashmem { - - attribute number PROT_EXEC; - attribute number PROT_NONE; - attribute number PROT_READ; - attribute number PROT_WRITE; + static attribute number PROT_EXEC; + static attribute number PROT_NONE; + static attribute number PROT_READ; + static attribute number PROT_WRITE; [Deprecated] static Ashmem createAshmem(String name, number size); [Throws] static Ashmem create(String name, number size); - [Deprecated] - static Ashmem createAshmemFromExisting(Ashmem ashmem); [Throws] static Ashmem create(Ashmem ashmem); + [Deprecated] + static Ashmem createAshmemFromExisting(Ashmem ashmem); void closeAshmem(); void unmapAshmem(); number getAshmemSize(); @@ -602,7 +572,5 @@ namespace rpc { sequence readAshmem(number size, number offset); [Throws] buffer readDataFromAshmem(number size, number offset); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.runningLock.idl b/idl/@ohos.runningLock.idl index 1645b47..17a5e8b 100644 --- a/idl/@ohos.runningLock.idl +++ b/idl/@ohos.runningLock.idl @@ -1,54 +1,43 @@ -package ohos; +package ohos.runningLock; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; +[DefaultExport] namespace runningLock { - [Entity=Class] interface RunningLock { - [Deprecated] void lock(number timeout); [Throws] - void hold(number timeout); + void hold(i32 timeout); [Deprecated] boolean isUsed(); - [Throws] boolean isHolding(); [Deprecated] void unlock(); [Throws] void unhold(); - }; dictionary RunningLockType { - [Deprecated] number BACKGROUND = 1; number PROXIMITY_SCREEN_CONTROL = 2; - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isRunningLockTypeSupported(RunningLockType type, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isRunningLockTypeSupported(RunningLockType type); + [Throws] + boolean isSupported(RunningLockType type); [Async, Synthetic] callback AsyncCallback_RunningLock_Void = void (RunningLock result); - [GlobalScope] - interface GlobalScope_runningLock_ohos_runningLock { - - [Deprecated] - static void isRunningLockTypeSupported(RunningLockType type, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isRunningLockTypeSupported(RunningLockType type); - [Throws] - static boolean isSupported(RunningLockType type); - [Deprecated] - static void createRunningLock(String name, RunningLockType type, AsyncCallback_RunningLock_Void callback_); - [Deprecated] - static async RunningLock createRunningLock(String name, RunningLockType type); - [Throws] - static void create(String name, RunningLockType type, AsyncCallback_RunningLock_Void callback_); - [Throws] - static async RunningLock create(String name, RunningLockType type); - - }; - + [Deprecated] + void createRunningLock(String name, RunningLockType type, AsyncCallback_RunningLock_Void callback_); + [Deprecated] + async RunningLock createRunningLock(String name, RunningLockType type); + [Throws] + void create(String name, RunningLockType type, AsyncCallback_RunningLock_Void callback_); + [Throws] + async RunningLock create(String name, RunningLockType type); }; \ No newline at end of file diff --git a/idl/@ohos.screen.idl b/idl/@ohos.screen.idl index f97750a..8df818e 100644 --- a/idl/@ohos.screen.idl +++ b/idl/@ohos.screen.idl @@ -1,63 +1,107 @@ -package ohos; +package ohos.screen; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace screen { - [Async, Synthetic] callback AsyncCallback_Array_Screen_Void = void (sequence result); + [Throws] + void getAllScreens(AsyncCallback_Array_Screen_Void callback_); + [Throws] + async sequence getAllScreens(); [Synthetic] callback Callback_Number_Void = void (number parameter); + [Throws] + void on(String eventType, Callback_Number_Void callback_); + [Throws] + void off(String eventType, optional Callback_Number_Void callback_); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated, Throws] + void makeExpand(sequence options, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number makeExpand(sequence options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated, Throws] + void stopExpand(sequence expandScreen, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void stopExpand(sequence expandScreen); + [Throws] + void makeMirror(number mainScreen, sequence mirrorScreen, AsyncCallback_Number_Void callback_); + [Throws] + async number makeMirror(number mainScreen, sequence mirrorScreen); + [Throws] + async number makeMirrorWithRegion(number mainScreen, sequence mirrorScreen, Rect mainScreenRegion); + [Throws] + void stopMirror(sequence mirrorScreen, AsyncCallback_Void callback_); + [Throws] + async void stopMirror(sequence mirrorScreen); + [Throws] + async sequence makeUnique(sequence uniqueScreen); [Async, Synthetic] callback AsyncCallback_Screen_Void = void (Screen result); + [Throws] + void createVirtualScreen(VirtualScreenOption options, AsyncCallback_Screen_Void callback_); + [Throws] + async Screen createVirtualScreen(VirtualScreenOption options); + [Throws] + void destroyVirtualScreen(number screenId, AsyncCallback_Void callback_); + [Throws] + async void destroyVirtualScreen(number screenId); + [Throws] + void setVirtualScreenSurface(number screenId, String surfaceId, AsyncCallback_Void callback_); + [Throws] + async void setVirtualScreenSurface(number screenId, String surfaceId); + [Throws] + async void setScreenPrivacyMaskImage(number screenId, optional image.PixelMap image); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isScreenRotationLocked(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isScreenRotationLocked(); + [Throws] + void setScreenRotationLocked(boolean isLocked, AsyncCallback_Void callback_); + [Throws] + async void setScreenRotationLocked(boolean isLocked); + [Throws] + async void setMultiScreenMode(number primaryScreenId, number secondaryScreenId, MultiScreenMode secondaryScreenMode); + [Throws] + async void setMultiScreenRelativePosition(MultiScreenPositionOptions mainScreenOptions, MultiScreenPositionOptions secondaryScreenOptions); dictionary MultiScreenMode { - number SCREEN_MIRROR = 0; number SCREEN_EXTEND = 1; - }; [Entity=Interface] interface MultiScreenPositionOptions { - attribute number id; attribute number startX; attribute number startY; - }; [Entity=Interface] interface ExpandOption { - attribute number screenId; attribute number startX; attribute number startY; - }; [Entity=Interface] interface VirtualScreenOption { - attribute String name; attribute number width; attribute number height; attribute number density; attribute String surfaceId; - }; dictionary ScreenSourceMode { - number SCREEN_MAIN = 0; number SCREEN_MIRROR = 1; number SCREEN_EXTEND = 2; number SCREEN_ALONE = 3; - }; [Entity=Interface] interface Screen { - readonly attribute number id; readonly attribute number parent; readonly attribute sequence supportedModeInfo; @@ -78,91 +122,26 @@ namespace screen { void setDensityDpi(number densityDpi, AsyncCallback_Void callback_); [Throws] async void setDensityDpi(number densityDpi); - }; dictionary Orientation { - number UNSPECIFIED = 0; number VERTICAL = 1; number HORIZONTAL = 2; number REVERSE_VERTICAL = 3; number REVERSE_HORIZONTAL = 4; - }; [Entity=Interface] interface ScreenModeInfo { - attribute number id; attribute number width; attribute number height; attribute number refreshRate; - }; [Entity=Interface] interface Rect { - attribute number left; attribute number top; attribute number width; attribute number height; - }; - [GlobalScope] - interface GlobalScope_screen_ohos_screen { - - [Throws] - static void getAllScreens(AsyncCallback_Array_Screen_Void callback_); - [Throws] - static async sequence getAllScreens(); - [Throws] - static void on(String eventType, Callback_Number_Void callback_); - [Throws] - static void off(String eventType, optional Callback_Number_Void callback_); - [Throws] - static void makeExpand(sequence options, AsyncCallback_Number_Void callback_); - [Throws] - static async number makeExpand(sequence options); - [Throws] - static void stopExpand(sequence expandScreen, AsyncCallback_Void callback_); - [Throws] - static async void stopExpand(sequence expandScreen); - [Throws] - static void makeMirror(number mainScreen, sequence mirrorScreen, AsyncCallback_Number_Void callback_); - [Throws] - static async number makeMirror(number mainScreen, sequence mirrorScreen); - [Throws] - static async number makeMirrorWithRegion(number mainScreen, sequence mirrorScreen, Rect mainScreenRegion); - [Throws] - static void stopMirror(sequence mirrorScreen, AsyncCallback_Void callback_); - [Throws] - static async void stopMirror(sequence mirrorScreen); - [Throws] - static async sequence makeUnique(sequence uniqueScreen); - [Throws] - static void createVirtualScreen(VirtualScreenOption options, AsyncCallback_Screen_Void callback_); - [Throws] - static async Screen createVirtualScreen(VirtualScreenOption options); - [Throws] - static void destroyVirtualScreen(number screenId, AsyncCallback_Void callback_); - [Throws] - static async void destroyVirtualScreen(number screenId); - [Throws] - static void setVirtualScreenSurface(number screenId, String surfaceId, AsyncCallback_Void callback_); - [Throws] - static async void setVirtualScreenSurface(number screenId, String surfaceId); - [Throws] - static void isScreenRotationLocked(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isScreenRotationLocked(); - [Throws] - static void setScreenRotationLocked(boolean isLocked, AsyncCallback_Void callback_); - [Throws] - static async void setScreenRotationLocked(boolean isLocked); - [Throws] - static async void setMultiScreenMode(number primaryScreenId, number secondaryScreenId, MultiScreenMode secondaryScreenMode); - [Throws] - static async void setMultiScreenRelativePosition(MultiScreenPositionOptions mainScreenOptions, MultiScreenPositionOptions secondaryScreenOptions); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.screenLock.idl b/idl/@ohos.screenLock.idl index 62d2469..3e73ccf 100644 --- a/idl/@ohos.screenLock.idl +++ b/idl/@ohos.screenLock.idl @@ -1,24 +1,43 @@ -package ohos; +package ohos.screenLock; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace screenLock { - [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isScreenLocked(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isScreenLocked(); + [Throws] + boolean isLocked(); + [Deprecated] + void isSecureMode(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isSecureMode(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void unlockScreen(AsyncCallback_Void callback_); + [Deprecated] + async void unlockScreen(); + [Throws] + void unlock(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean unlock(); + [Throws] + void lock(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean lock(); typedef String EventType; dictionary StrongAuthReasonFlags { - number NONE = 0; number AFTER_BOOT = 1; number AFTER_TIMEOUT = 2; number ACTIVE_REQUEST = 4; number POLICY_RESTRICTION = 8; - }; dictionary AuthState { - number NOT_AUTHED = 0; number PRE_AUTHED_BY_CREDENTIAL = 1; number PRE_AUTHED_BY_FINGERPRINT = 2; @@ -26,63 +45,32 @@ namespace screenLock { number AUTHED_BY_CREDENTIAL = 4; number AUTHED_BY_FINGERPRINT = 5; number AUTHED_BY_FACE = 6; - }; [Entity=Interface] interface SystemEvent { - attribute EventType eventType; attribute String params; - }; [Synthetic] callback Callback_SystemEvent_Void = void (SystemEvent parameter); - [GlobalScope] - interface GlobalScope_screenLock_ohos_screenLock { - - [Deprecated] - static void isScreenLocked(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isScreenLocked(); - [Throws] - static boolean isLocked(); - [Deprecated] - static void isSecureMode(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isSecureMode(); - [Deprecated] - static void unlockScreen(AsyncCallback_Void callback_); - [Deprecated] - static async void unlockScreen(); - [Throws] - static void unlock(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean unlock(); - [Throws] - static void lock(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean lock(); - [Throws] - static boolean onSystemEvent(Callback_SystemEvent_Void callback_); - [Throws] - static void sendScreenLockEvent(String event, number parameter, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean sendScreenLockEvent(String event, number parameter); - [Throws] - static async void requestStrongAuth(StrongAuthReasonFlags reasonFlag, number userId); - [Throws] - static number getStrongAuth(number userId); - [Throws] - static async boolean setScreenLockDisabled(boolean disable, number userId); - [Throws] - static boolean isScreenLockDisabled(number userId); - [Throws] - static async boolean setScreenLockAuthState(AuthState state, number userId, buffer authToken); - [Throws] - static AuthState getScreenLockAuthState(number userId); - [Throws] - static boolean isDeviceLocked(number userId); - - }; - + [Throws] + boolean onSystemEvent(Callback_SystemEvent_Void callback_); + [Throws] + void sendScreenLockEvent(String event, number parameter, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean sendScreenLockEvent(String event, number parameter); + [Throws] + async void requestStrongAuth(StrongAuthReasonFlags reasonFlag, number userId); + [Throws] + number getStrongAuth(number userId); + [Throws] + async boolean setScreenLockDisabled(boolean disable, number userId); + [Throws] + boolean isScreenLockDisabled(number userId); + [Throws] + async boolean setScreenLockAuthState(AuthState state, number userId, buffer authToken); + [Throws] + AuthState getScreenLockAuthState(number userId); + [Throws] + boolean isDeviceLocked(number userId); }; \ No newline at end of file diff --git a/idl/@ohos.screenshot.idl b/idl/@ohos.screenshot.idl index 01893ac..25774e3 100644 --- a/idl/@ohos.screenshot.idl +++ b/idl/@ohos.screenshot.idl @@ -1,44 +1,47 @@ -package ohos; +package ohos.screenshot; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.ErrorCallback as ErrorCallback; -import ohos.multimedia.image as image; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace screenshot { - [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); + [Throws] + void save(ScreenshotOptions options, AsyncCallback_Image_PixelMap_Void callback_); + [Throws] + async sequence saveHdrPicture(optional HdrScreenshotOptions options); + [Throws] + void save(AsyncCallback_Image_PixelMap_Void callback_); + [Throws] + async image.PixelMap save(optional ScreenshotOptions options); + [Throws] + async image.PixelMap capture(optional CaptureOption options); + [Throws] + async PickInfo pick(); [Entity=Interface] interface PickInfo { - attribute Rect pickRect; attribute image.PixelMap pixelMap; - }; [Entity=Interface] interface Rect { - attribute number left; attribute number top; attribute number width; attribute number height; - }; [Entity=Interface] interface Size { - attribute number width; attribute number height; - }; [Entity=Interface] interface CaptureOption { - [Optional] attribute number displayId; - }; [Entity=Interface] interface ScreenshotOptions { - [Optional] attribute Rect screenRect; [Optional] @@ -50,23 +53,15 @@ namespace screenshot { [Optional] attribute boolean isNotificationNeeded; [Optional] - attribute boolean isPointerNeeded; - + attribute boolean isCaptureFullOfScreen; }; - [GlobalScope] - interface GlobalScope_screenshot_ohos_screenshot { - - [Throws] - static void save(ScreenshotOptions options, AsyncCallback_image_PixelMap_Void callback_); - [Throws] - static void save(AsyncCallback_image_PixelMap_Void callback_); - [Throws] - static async image.PixelMap save(optional ScreenshotOptions options); - [Throws] - static async image.PixelMap capture(optional CaptureOption options); - [Throws] - static async PickInfo pick(); - + [Entity=Interface] + interface HdrScreenshotOptions { + [Optional] + attribute number displayId; + [Optional] + attribute boolean isNotificationNeeded; + [Optional] + attribute boolean isCaptureFullOfScreen; }; - }; \ No newline at end of file diff --git a/idl/@ohos.secureElement.idl b/idl/@ohos.secureElement.idl index 463db75..9d3150f 100644 --- a/idl/@ohos.secureElement.idl +++ b/idl/@ohos.secureElement.idl @@ -1,13 +1,20 @@ package ohos.secureElement; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace omapi { - [Synthetic] callback Callback_ServiceState_Void = void (ServiceState parameter); + [Deprecated, Throws, DtsName="newSEService", DtsTag="'serviceState'"] + SEService newSEServiceServiceState(Callback_ServiceState_Void callback_); + [Throws] + async SEService createService(); + [Throws, DtsName="on", DtsTag="'stateChanged'"] + void onStateChanged(Callback_ServiceState_Void callback_); + [Throws, DtsName="off", DtsTag="'stateChanged'"] + void offStateChanged(optional Callback_ServiceState_Void callback_); [Entity=Interface] interface SEService { - [Throws] sequence getReaders(); [Throws] @@ -16,11 +23,9 @@ namespace omapi { void shutdown(); [Throws] String getVersion(); - }; [Entity=Interface] interface Reader { - [Throws] String getName(); [Throws] @@ -29,13 +34,11 @@ namespace omapi { Session openSession(); [Throws] void closeSessions(); - }; [Async, Synthetic] callback AsyncCallback_Channel_Void = void (Channel result); [Entity=Interface] interface Session { - [Throws] Reader getReader(); [Throws] @@ -62,13 +65,11 @@ namespace omapi { async Channel openLogicalChannel(sequence aid, number p2); [Throws] void openLogicalChannel(sequence aid, number p2, AsyncCallback_Channel_Void callback_); - }; [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); [Entity=Interface] interface Channel { - [Throws] Session getSession(); [Throws] @@ -83,26 +84,9 @@ namespace omapi { async sequence transmit(sequence command); [Throws] void transmit(sequence command, AsyncCallback_Array_Number_Void callback_); - }; dictionary ServiceState { - number DISCONNECTED = 0; number CONNECTED = 1; - }; - [GlobalScope] - interface GlobalScope_omapi_ohos_secureElement { - - [Deprecated, Throws, DtsName="newSEService", DtsTag="'serviceState'"] - static SEService newSEServiceServiceState(Callback_ServiceState_Void callback_); - [Throws] - static async SEService createService(); - [Throws, DtsName="on", DtsTag="'stateChanged'"] - static void onStateChanged(Callback_ServiceState_Void callback_); - [Throws, DtsName="off", DtsTag="'stateChanged'"] - static void offStateChanged(optional Callback_ServiceState_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.security.asset.idl b/idl/@ohos.security.asset.idl index 3d15e71..58bf4f4 100644 --- a/idl/@ohos.security.asset.idl +++ b/idl/@ohos.security.asset.idl @@ -1,62 +1,91 @@ -package ohos.security; +package ohos.security.asset; +[DefaultExport] namespace asset { - + [Throws] + async void add(AssetMap attributes); + [Throws] + async void addAsUser(number userId, AssetMap attributes); + [Throws] + void addSync(AssetMap attributes); + [Throws] + async void remove(AssetMap query); + [Throws] + async void removeAsUser(number userId, AssetMap query); + [Throws] + void removeSync(AssetMap query); + [Throws] + async void update(AssetMap query, AssetMap attributesToUpdate); + [Throws] + async void updateAsUser(number userId, AssetMap query, AssetMap attributesToUpdate); + [Throws] + void updateSync(AssetMap query, AssetMap attributesToUpdate); + [Throws] + async buffer preQuery(AssetMap query); + [Throws] + async buffer preQueryAsUser(number userId, AssetMap query); + [Throws] + buffer preQuerySync(AssetMap query); + [Throws] + async sequence query(AssetMap query); + [Throws] + async sequence queryAsUser(number userId, AssetMap query); + [Throws] + sequence querySync(AssetMap query); + [Throws] + async void postQuery(AssetMap handle); + [Throws] + async void postQueryAsUser(number userId, AssetMap handle); + [Throws] + void postQuerySync(AssetMap handle); + [Throws] + async SyncResult querySyncResult(AssetMap query); typedef record AssetMap; typedef (boolean or number or buffer) Value; dictionary Accessibility { - number DEVICE_POWERED_ON = 0; number DEVICE_FIRST_UNLOCKED = 1; number DEVICE_UNLOCKED = 2; - }; dictionary AuthType { - number NONE = 0; number ANY = 255; - }; dictionary SyncType { - number NEVER = 0; number THIS_DEVICE = 1; number TRUSTED_DEVICE = 2; number TRUSTED_ACCOUNT = 4; - }; dictionary WrapType { - number NEVER = 0; number TRUSTED_ACCOUNT = 1; - }; dictionary ConflictResolution { - number OVERWRITE = 0; number THROW_ERROR = 1; - }; dictionary ReturnType { - number ALL = 0; number ATTRIBUTES = 1; - }; dictionary OperationType { - number NEED_SYNC = 0; number NEED_LOGOUT = 1; - + }; + [Entity=Interface] + interface SyncResult { + readonly attribute number resultCode; + [Optional] + readonly attribute number totalCount; + [Optional] + readonly attribute number failedCount; }; dictionary TagType { - number BOOL = 268435456; number NUMBER = 536870912; number BYTES = 805306368; - }; dictionary Tag { - number SECRET = 805306369; number ALIAS = 805306370; number ACCESSIBILITY = 536870915; @@ -89,10 +118,8 @@ namespace asset { number REQUIRE_ATTR_ENCRYPTED = 268435527; number GROUP_ID = 805306440; number WRAP_TYPE = 536870985; - }; dictionary ErrorCode { - number PERMISSION_DENIED = 201; number NOT_SYSTEM_APPLICATION = 202; number INVALID_ARGUMENT = 401; @@ -113,48 +140,6 @@ namespace asset { number GET_SYSTEM_TIME_ERROR = 24000015; number LIMIT_EXCEEDED = 24000016; number UNSUPPORTED = 24000017; - - }; - [GlobalScope] - interface GlobalScope_asset_ohos_security_asset { - - [Throws] - static async void add(AssetMap attributes); - [Throws] - static async void addAsUser(number userId, AssetMap attributes); - [Throws] - static void addSync(AssetMap attributes); - [Throws] - static async void remove(AssetMap query); - [Throws] - static async void removeAsUser(number userId, AssetMap query); - [Throws] - static void removeSync(AssetMap query); - [Throws] - static async void update(AssetMap query, AssetMap attributesToUpdate); - [Throws] - static async void updateAsUser(number userId, AssetMap query, AssetMap attributesToUpdate); - [Throws] - static void updateSync(AssetMap query, AssetMap attributesToUpdate); - [Throws] - static async buffer preQuery(AssetMap query); - [Throws] - static async buffer preQueryAsUser(number userId, AssetMap query); - [Throws] - static buffer preQuerySync(AssetMap query); - [Throws] - static async sequence query(AssetMap query); - [Throws] - static async sequence queryAsUser(number userId, AssetMap query); - [Throws] - static sequence querySync(AssetMap query); - [Throws] - static async void postQuery(AssetMap handle); - [Throws] - static async void postQueryAsUser(number userId, AssetMap handle); - [Throws] - static void postQuerySync(AssetMap handle); - + number PARAM_VERIFICATION_FAILED = 24000018; }; - }; \ No newline at end of file diff --git a/idl/@ohos.security.cert.idl b/idl/@ohos.security.cert.idl index 3dff32e..1dc0033 100644 --- a/idl/@ohos.security.cert.idl +++ b/idl/@ohos.security.cert.idl @@ -1,14 +1,14 @@ -package ohos.security; +package ohos.security.cert; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.security.cryptoFramework as cryptoFramework; +import ohos.security.cryptoFramework.default as cryptoFramework; +[DefaultExport] namespace cert { - dictionary CertResult { - number INVALID_PARAMS = 401; number NOT_SUPPORT = 801; number ERR_OUT_OF_MEMORY = 19020001; number ERR_RUNTIME_ERROR = 19020002; + number ERR_PARAMETER_CHECK_FAILED = 19020003; number ERR_CRYPTO_OPERATION = 19030001; number ERR_CERT_SIGNATURE_FAILURE = 19030002; number ERR_CERT_NOT_YET_VALID = 19030003; @@ -17,69 +17,50 @@ namespace cert { number ERR_KEYUSAGE_NO_CERTSIGN = 19030006; number ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE = 19030007; number ERR_MAYBE_WRONG_PASSWORD = 19030008; - }; [Entity=Interface] interface DataBlob { - attribute buffer data; - }; [Entity=Interface] interface DataArray { - attribute sequence data; - }; dictionary EncodingFormat { - number FORMAT_DER = 0; number FORMAT_PEM = 1; number FORMAT_PKCS7 = 2; - }; dictionary CertItemType { - number CERT_ITEM_TYPE_TBS = 0; number CERT_ITEM_TYPE_PUBLIC_KEY = 1; number CERT_ITEM_TYPE_ISSUER_UNIQUE_ID = 2; number CERT_ITEM_TYPE_SUBJECT_UNIQUE_ID = 3; number CERT_ITEM_TYPE_EXTENSIONS = 4; - }; dictionary ExtensionOidType { - number EXTENSION_OID_TYPE_ALL = 0; number EXTENSION_OID_TYPE_CRITICAL = 1; number EXTENSION_OID_TYPE_UNCRITICAL = 2; - }; dictionary ExtensionEntryType { - number EXTENSION_ENTRY_TYPE_ENTRY = 0; number EXTENSION_ENTRY_TYPE_ENTRY_CRITICAL = 1; number EXTENSION_ENTRY_TYPE_ENTRY_VALUE = 2; - }; [Entity=Interface] interface EncodingBlob { - attribute buffer data; attribute EncodingFormat encodingFormat; - }; [Entity=Interface] interface CertChainData { - attribute buffer data; attribute number count; attribute EncodingFormat encodingFormat; - }; dictionary EncodingType { - number ENCODING_UTF8 = 0; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); @@ -87,7 +68,6 @@ namespace cert { callback AsyncCallback_EncodingBlob_Void = void (EncodingBlob result); [Entity=Interface] interface X509Cert { - [Throws] void verify(cryptoFramework.PubKey key, AsyncCallback_Void callback_); [Throws] @@ -108,6 +88,8 @@ namespace cert { [Throws] DataBlob getIssuerName(); [Throws] + String getIssuerName(EncodingType encodingType); + [Throws] DataBlob getSubjectName(optional EncodingType encodingType); [Throws] String getNotBeforeTime(); @@ -142,17 +124,21 @@ namespace cert { X500DistinguishedName getSubjectX500DistinguishedName(); [Throws, DtsName="toString"] String toString_(); + [Throws, DtsName="toString"] + String toString_(EncodingType encodingType); [Throws] buffer hashCode(); [Throws] CertExtension getExtensionsObject(); - }; [Async, Synthetic] callback AsyncCallback_X509Cert_Void = void (X509Cert result); + [Throws] + void createX509Cert(EncodingBlob inStream, AsyncCallback_X509Cert_Void callback_); + [Throws] + async X509Cert createX509Cert(EncodingBlob inStream); [Entity=Interface] interface CertExtension { - [Throws] EncodingBlob getEncoded(); [Throws] @@ -163,13 +149,15 @@ namespace cert { number checkCA(); [Throws] boolean hasUnsupportedCriticalExtension(); - }; [Async, Synthetic] callback AsyncCallback_CertExtension_Void = void (CertExtension result); + [Throws] + void createCertExtension(EncodingBlob inStream, AsyncCallback_CertExtension_Void callback_); + [Throws] + async CertExtension createCertExtension(EncodingBlob inStream); [Entity=Interface, Deprecated] interface X509CrlEntry { - [Deprecated, Throws] void getEncoded(AsyncCallback_EncodingBlob_Void callback_); [Deprecated, Throws] @@ -180,11 +168,9 @@ namespace cert { DataBlob getCertIssuer(); [Deprecated, Throws] String getRevocationDate(); - }; [Entity=Interface] interface X509CRLEntry { - [Throws] void getEncoded(AsyncCallback_EncodingBlob_Void callback_); [Throws] @@ -194,6 +180,8 @@ namespace cert { [Throws] DataBlob getCertIssuer(); [Throws] + String getCertIssuer(EncodingType encodingType); + [Throws] String getRevocationDate(); [Throws] DataBlob getExtensions(); @@ -207,13 +195,11 @@ namespace cert { buffer hashCode(); [Throws] CertExtension getExtensionsObject(); - }; [Async, Synthetic] callback AsyncCallback_Array_X509CrlEntry_Void = void (sequence result); [Entity=Interface, Deprecated] interface X509Crl { - [Deprecated, Throws] boolean isRevoked(X509Cert cert); [Deprecated] @@ -252,15 +238,17 @@ namespace cert { String getSignatureAlgOid(); [Deprecated, Throws] DataBlob getSignatureAlgParams(); - }; [Async, Synthetic] callback AsyncCallback_X509Crl_Void = void (X509Crl result); + [Deprecated, Throws] + void createX509Crl(EncodingBlob inStream, AsyncCallback_X509Crl_Void callback_); + [Deprecated, Throws] + async X509Crl createX509Crl(EncodingBlob inStream); [Async, Synthetic] callback AsyncCallback_Array_X509CRLEntry_Void = void (sequence result); [Entity=Interface] interface X509CRL { - [Throws] boolean isRevoked(X509Cert cert); String getType(); @@ -276,6 +264,8 @@ namespace cert { [Throws] DataBlob getIssuerName(); [Throws] + String getIssuerName(EncodingType encodingType); + [Throws] String getLastUpdate(); [Throws] String getNextUpdate(); @@ -305,26 +295,30 @@ namespace cert { X500DistinguishedName getIssuerX500DistinguishedName(); [Throws, DtsName="toString"] String toString_(); + [Throws, DtsName="toString"] + String toString_(EncodingType encodingType); [Throws] buffer hashCode(); [Throws] CertExtension getExtensionsObject(); - }; [Async, Synthetic] callback AsyncCallback_X509CRL_Void = void (X509CRL result); + [Throws] + void createX509CRL(EncodingBlob inStream, AsyncCallback_X509CRL_Void callback_); + [Throws] + async X509CRL createX509CRL(EncodingBlob inStream); [Entity=Interface] interface CertChainValidator { - readonly attribute String algorithm; [Throws] void validate(CertChainData certChain, AsyncCallback_Void callback_); [Throws] async void validate(CertChainData certChain); - }; + [Throws] + CertChainValidator createCertChainValidator(String algorithm); dictionary GeneralNameType { - number GENERAL_NAME_TYPE_OTHER_NAME = 0; number GENERAL_NAME_TYPE_RFC822_NAME = 1; number GENERAL_NAME_TYPE_DNS_NAME = 2; @@ -334,19 +328,15 @@ namespace cert { number GENERAL_NAME_TYPE_UNIFORM_RESOURCE_ID = 6; number GENERAL_NAME_TYPE_IP_ADDRESS = 7; number GENERAL_NAME_TYPE_REGISTERED_ID = 8; - }; [Entity=Interface] interface GeneralName { - attribute GeneralNameType type; [Optional] attribute buffer name; - }; [Entity=Interface] interface X509CertMatchParameters { - [Optional] attribute sequence subjectAlternativeNames; [Optional] @@ -381,11 +371,9 @@ namespace cert { attribute DataBlob publicKey; [Optional] attribute String publicKeyAlgID; - }; [Entity=Interface] interface X509CRLMatchParameters { - [Optional] attribute sequence issuer; [Optional] @@ -396,7 +384,6 @@ namespace cert { attribute bigint maxCRL; [Optional] attribute bigint minCRL; - }; [Async, Synthetic] callback AsyncCallback_Array_X509Cert_Void = void (sequence result); @@ -404,7 +391,6 @@ namespace cert { callback AsyncCallback_Array_X509CRL_Void = void (sequence result); [Entity=Interface] interface CertCRLCollection { - [Throws] async sequence selectCerts(X509CertMatchParameters param); [Throws] @@ -413,13 +399,13 @@ namespace cert { async sequence selectCRLs(X509CRLMatchParameters param); [Throws] void selectCRLs(X509CRLMatchParameters param, AsyncCallback_Array_X509CRL_Void callback_); - }; + [Throws] + CertCRLCollection createCertCRLCollection(sequence certs, optional sequence crls); [Async, Synthetic] callback AsyncCallback_CertChainValidationResult_Void = void (CertChainValidationResult result); [Entity=Interface] interface X509CertChain { - [Throws] sequence getCertList(); [Throws] @@ -430,30 +416,32 @@ namespace cert { String toString_(); [Throws] buffer hashCode(); - }; + [Throws] + async X509CertChain createX509CertChain(EncodingBlob inStream); [Async, Synthetic] callback AsyncCallback_X509CertChain_Void = void (X509CertChain result); + [Throws] + void createX509CertChain(EncodingBlob inStream, AsyncCallback_X509CertChain_Void callback_); + [Throws] + X509CertChain createX509CertChain(sequence certs); + [Throws] + async CertChainBuildResult buildX509CertChain(CertChainBuildParameters param); dictionary EncodingBaseFormat { - number PEM = 0; number DER = 1; - }; [Entity=Interface] interface Pkcs12Data { - [Optional] attribute (String or buffer) privateKey; [Optional] attribute X509Cert cert; [Optional] attribute sequence otherCerts; - }; [Entity=Interface] interface Pkcs12ParsingConfig { - attribute String password; [Optional] attribute boolean needsPrivateKey; @@ -463,22 +451,28 @@ namespace cert { attribute boolean needsCert; [Optional] attribute boolean needsOtherCerts; - }; + [Throws] + Pkcs12Data parsePkcs12(buffer data, Pkcs12ParsingConfig config); + [Throws] + async sequence createTrustAnchorsWithKeyStore(buffer keystore, String pwd); + [Throws] + async X500DistinguishedName createX500DistinguishedName(String nameStr); + [Throws] + async X500DistinguishedName createX500DistinguishedName(buffer nameDer); [Entity=Interface] interface X500DistinguishedName { - [Throws] String getName(); [Throws] + String getName(EncodingType encodingType); + [Throws] sequence getName(String type); [Throws] EncodingBlob getEncoded(); - }; [Entity=Interface] interface X509TrustAnchor { - [Optional] attribute X509Cert CACert; [Optional] @@ -487,24 +481,18 @@ namespace cert { attribute buffer CASubject; [Optional] attribute buffer nameConstraints; - }; dictionary RevocationCheckOptions { - number REVOCATION_CHECK_OPTION_PREFER_OCSP = 0; number REVOCATION_CHECK_OPTION_ACCESS_NETWORK = 1; number REVOCATION_CHECK_OPTION_FALLBACK_NO_PREFER = 2; number REVOCATION_CHECK_OPTION_FALLBACK_LOCAL = 3; - }; dictionary ValidationPolicyType { - number VALIDATION_POLICY_TYPE_X509 = 0; number VALIDATION_POLICY_TYPE_SSL = 1; - }; dictionary KeyUsageType { - number KEYUSAGE_DIGITAL_SIGNATURE = 0; number KEYUSAGE_NON_REPUDIATION = 1; number KEYUSAGE_KEY_ENCIPHERMENT = 2; @@ -514,11 +502,9 @@ namespace cert { number KEYUSAGE_CRL_SIGN = 6; number KEYUSAGE_ENCIPHER_ONLY = 7; number KEYUSAGE_DECIPHER_ONLY = 8; - }; [Entity=Interface] interface RevocationCheckParameter { - [Optional] attribute sequence ocspRequestExtension; [Optional] @@ -533,15 +519,15 @@ namespace cert { attribute sequence options; [Optional] attribute String ocspDigest; - }; [Entity=Interface] interface CertChainValidationParameters { - [Optional] attribute String date; attribute sequence trustAnchors; [Optional] + attribute boolean trustSystemCa; + [Optional] attribute sequence certCRLs; [Optional] attribute RevocationCheckParameter revocationCheckParam; @@ -551,59 +537,43 @@ namespace cert { attribute String sslHostname; [Optional] attribute sequence keyUsage; - }; [Entity=Interface] interface CertChainValidationResult { - readonly attribute X509TrustAnchor trustAnchor; readonly attribute X509Cert entityCert; - }; [Entity=Interface] interface CertChainBuildParameters { - attribute X509CertMatchParameters certMatchParameters; [Optional] attribute number maxLength; attribute CertChainValidationParameters validationParameters; - }; [Entity=Interface] interface CertChainBuildResult { - readonly attribute X509CertChain certChain; readonly attribute CertChainValidationResult validationResult; - }; dictionary CmsContentType { - number SIGNED_DATA = 0; - }; dictionary CmsContentDataFormat { - number BINARY = 0; number TEXT = 1; - }; dictionary CmsFormat { - number PEM = 0; number DER = 1; - }; [Entity=Interface] interface PrivateKeyInfo { - attribute (String or buffer) key; [Optional] attribute String password; - }; [Entity=Interface] interface CmsSignerConfig { - attribute String mdName; [Optional] attribute boolean addCert; @@ -611,22 +581,18 @@ namespace cert { attribute boolean addAttr; [Optional] attribute boolean addSmimeCapAttr; - }; [Entity=Interface] interface CmsGeneratorOptions { - [Optional] attribute CmsContentDataFormat contentDataFormat; [Optional] attribute CmsFormat outFormat; [Optional] attribute boolean isDetached; - }; [Entity=Interface] interface CmsGenerator { - [Throws] void addSigner(X509Cert cert, PrivateKeyInfo keyInfo, CmsSignerConfig config); [Throws] @@ -635,70 +601,23 @@ namespace cert { async (buffer or String) doFinal(buffer data, optional CmsGeneratorOptions options); [Throws] (buffer or String) doFinalSync(buffer data, optional CmsGeneratorOptions options); - }; + [Throws] + CmsGenerator createCmsGenerator(CmsContentType contentType); [Entity=Interface] interface CsrAttribute { - attribute String type; attribute String value; - }; [Entity=Interface] interface CsrGenerationConfig { - attribute X500DistinguishedName subject; attribute String mdName; [Optional] attribute sequence attributes; [Optional] attribute EncodingBaseFormat outFormat; - - }; - [GlobalScope] - interface GlobalScope_cert_ohos_security_cert { - - [Throws] - static void createX509Cert(EncodingBlob inStream, AsyncCallback_X509Cert_Void callback_); - [Throws] - static async X509Cert createX509Cert(EncodingBlob inStream); - [Throws] - static void createCertExtension(EncodingBlob inStream, AsyncCallback_CertExtension_Void callback_); - [Throws] - static async CertExtension createCertExtension(EncodingBlob inStream); - [Deprecated, Throws] - static void createX509Crl(EncodingBlob inStream, AsyncCallback_X509Crl_Void callback_); - [Deprecated, Throws] - static async X509Crl createX509Crl(EncodingBlob inStream); - [Throws] - static void createX509CRL(EncodingBlob inStream, AsyncCallback_X509CRL_Void callback_); - [Throws] - static async X509CRL createX509CRL(EncodingBlob inStream); - [Throws] - static CertChainValidator createCertChainValidator(String algorithm); - [Throws] - static CertCRLCollection createCertCRLCollection(sequence certs, optional sequence crls); - [Throws] - static async X509CertChain createX509CertChain(EncodingBlob inStream); - [Throws] - static void createX509CertChain(EncodingBlob inStream, AsyncCallback_X509CertChain_Void callback_); - [Throws] - static X509CertChain createX509CertChain(sequence certs); - [Throws] - static async CertChainBuildResult buildX509CertChain(CertChainBuildParameters param); - [Throws] - static Pkcs12Data parsePkcs12(buffer data, Pkcs12ParsingConfig config); - [Throws] - static async sequence createTrustAnchorsWithKeyStore(buffer keystore, String pwd); - [Throws] - static async X500DistinguishedName createX500DistinguishedName(String nameStr); - [Throws] - static async X500DistinguishedName createX500DistinguishedName(buffer nameDer); - [Throws] - static CmsGenerator createCmsGenerator(CmsContentType contentType); - [Throws] - static (String or buffer) generateCsr(PrivateKeyInfo keyInfo, CsrGenerationConfig config); - }; - + [Throws] + (String or buffer) generateCsr(PrivateKeyInfo keyInfo, CsrGenerationConfig config); }; \ No newline at end of file diff --git a/idl/@ohos.security.certManager.idl b/idl/@ohos.security.certManager.idl index 48c67ef..cad7211 100644 --- a/idl/@ohos.security.certManager.idl +++ b/idl/@ohos.security.certManager.idl @@ -1,9 +1,8 @@ package ohos.security.certManager; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace certificateManager { - dictionary CMErrorCode { - number CM_ERROR_NO_PERMISSION = 201; number CM_ERROR_NOT_SYSTEM_APP = 202; number CM_ERROR_INVALID_PARAMS = 401; @@ -13,11 +12,10 @@ namespace certificateManager { number CM_ERROR_MAX_CERT_COUNT_REACHED = 17500004; number CM_ERROR_NO_AUTHORIZATION = 17500005; number CM_ERROR_DEVICE_ENTER_ADVSECMODE = 17500007; - + number CM_ERROR_STORE_PATH_NOT_SUPPORTED = 17500009; }; [Entity=Interface] interface CertInfo { - attribute String uri; attribute String certAlias; attribute boolean state; @@ -28,39 +26,31 @@ namespace certificateManager { attribute String notAfter; attribute String fingerprintSha256; attribute buffer cert; - }; [Entity=Interface] interface CertAbstract { - attribute String uri; attribute String certAlias; attribute boolean state; attribute String subjectName; - }; [Entity=Interface] interface Credential { - attribute String type; attribute String alias; attribute String keyUri; attribute number certNum; attribute number keyNum; attribute buffer credentialData; - }; [Entity=Interface] interface CredentialAbstract { - attribute String type; attribute String alias; attribute String keyUri; - }; [Entity=Interface] interface CMResult { - [Optional] attribute sequence certList; [Optional] @@ -75,16 +65,12 @@ namespace certificateManager { attribute String uri; [Optional] attribute buffer outData; - }; dictionary CmKeyPurpose { - number CM_KEY_PURPOSE_SIGN = 4; number CM_KEY_PURPOSE_VERIFY = 8; - }; dictionary CmKeyDigest { - number CM_DIGEST_NONE = 0; number CM_DIGEST_MD5 = 1; number CM_DIGEST_SHA1 = 2; @@ -93,124 +79,109 @@ namespace certificateManager { number CM_DIGEST_SHA384 = 5; number CM_DIGEST_SHA512 = 6; number CM_DIGEST_SM3 = 7; - }; dictionary CmKeyPadding { - number CM_PADDING_NONE = 0; number CM_PADDING_PSS = 1; number CM_PADDING_PKCS1_V1_5 = 2; - }; [Entity=Interface] interface CMSignatureSpec { - attribute CmKeyPurpose purpose; [Optional] attribute CmKeyPadding padding; [Optional] attribute CmKeyDigest digest; - }; [Entity=Interface] interface CMHandle { - attribute buffer handle; - }; [Async, Synthetic] callback AsyncCallback_CMResult_Void = void (CMResult result); + [Throws] + void installPrivateCertificate(buffer keystore, String keystorePwd, String certAlias, AsyncCallback_CMResult_Void callback_); + [Throws] + async CMResult installPrivateCertificate(buffer keystore, String keystorePwd, String certAlias); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void uninstallPrivateCertificate(String keyUri, AsyncCallback_Void callback_); + [Throws] + async void uninstallPrivateCertificate(String keyUri); + [Throws] + void getAllAppPrivateCertificates(AsyncCallback_CMResult_Void callback_); + [Throws] + async CMResult getAllAppPrivateCertificates(); + [Throws] + void getPrivateCertificate(String keyUri, AsyncCallback_CMResult_Void callback_); + [Throws] + async CMResult getPrivateCertificate(String keyUri); [Async, Synthetic] callback AsyncCallback_CMHandle_Void = void (CMHandle result); + [Throws] + void init(String authUri, CMSignatureSpec spec, AsyncCallback_CMHandle_Void callback_); + [Throws] + async CMHandle init(String authUri, CMSignatureSpec spec); + [Throws] + void update(buffer handle, buffer data, AsyncCallback_Void callback_); + [Throws] + async void update(buffer handle, buffer data); + [Throws] + void finish(buffer handle, AsyncCallback_CMResult_Void callback_); + [Throws] + void finish(buffer handle, buffer signature, AsyncCallback_CMResult_Void callback_); + [Throws] + async CMResult finish(buffer handle, optional buffer signature); + [Throws] + void abort(buffer handle, AsyncCallback_Void callback_); + [Throws] + async void abort(buffer handle); + [Throws] + async CMResult getPublicCertificate(String keyUri); + [Throws] + async boolean isAuthorizedApp(String keyUri); + [Throws] + async CMResult getAllUserTrustedCertificates(); + [Throws] + async CMResult getAllUserTrustedCertificates(CertScope scope); + [Throws] + async CMResult getUserTrustedCertificate(String certUri); + [Throws] + async CMResult getAllSystemAppCertificates(); + [Throws] + async CMResult getPrivateCertificates(); dictionary CertType { - number CA_CERT_SYSTEM = 0; number CA_CERT_USER = 1; - }; dictionary CertScope { - number CURRENT_USER = 1; number GLOBAL_USER = 2; - + }; + dictionary CertAlgorithm { + number INTERNATIONAL = 1; + number SM = 2; }; [Entity=Interface] interface CertStoreProperty { - attribute CertType certType; [Optional] attribute CertScope certScope; - - }; + [Optional] + attribute CertAlgorithm certAlg; + }; + [Throws] + String getCertificateStorePath(CertStoreProperty property); + [Throws] + CMResult installUserTrustedCertificateSync(buffer cert, CertScope certScope); + [Throws] + void uninstallUserTrustedCertificateSync(String certUri); + [Throws] + async CMResult installPrivateCertificate(buffer keystore, String keystorePwd, String certAlias, AuthStorageLevel level); dictionary AuthStorageLevel { - number EL1 = 1; number EL2 = 2; number EL4 = 4; - - }; - [GlobalScope] - interface GlobalScope_certificateManager_ohos_security_certManager { - - [Throws] - static void installPrivateCertificate(buffer keystore, String keystorePwd, String certAlias, AsyncCallback_CMResult_Void callback_); - [Throws] - static async CMResult installPrivateCertificate(buffer keystore, String keystorePwd, String certAlias); - [Throws] - static void uninstallPrivateCertificate(String keyUri, AsyncCallback_Void callback_); - [Throws] - static async void uninstallPrivateCertificate(String keyUri); - [Throws] - static void getAllAppPrivateCertificates(AsyncCallback_CMResult_Void callback_); - [Throws] - static async CMResult getAllAppPrivateCertificates(); - [Throws] - static void getPrivateCertificate(String keyUri, AsyncCallback_CMResult_Void callback_); - [Throws] - static async CMResult getPrivateCertificate(String keyUri); - [Throws] - static void init(String authUri, CMSignatureSpec spec, AsyncCallback_CMHandle_Void callback_); - [Throws] - static async CMHandle init(String authUri, CMSignatureSpec spec); - [Throws] - static void update(buffer handle, buffer data, AsyncCallback_Void callback_); - [Throws] - static async void update(buffer handle, buffer data); - [Throws] - static void finish(buffer handle, AsyncCallback_CMResult_Void callback_); - [Throws] - static void finish(buffer handle, buffer signature, AsyncCallback_CMResult_Void callback_); - [Throws] - static async CMResult finish(buffer handle, optional buffer signature); - [Throws] - static void abort(buffer handle, AsyncCallback_Void callback_); - [Throws] - static async void abort(buffer handle); - [Throws] - static async CMResult getPublicCertificate(String keyUri); - [Throws] - static async boolean isAuthorizedApp(String keyUri); - [Throws] - static async CMResult getAllUserTrustedCertificates(); - [Throws] - static async CMResult getAllUserTrustedCertificates(CertScope scope); - [Throws] - static async CMResult getUserTrustedCertificate(String certUri); - [Throws] - static async CMResult getAllSystemAppCertificates(); - [Throws] - static async CMResult getPrivateCertificates(); - [Throws] - static String getCertificateStorePath(CertStoreProperty property); - [Throws] - static CMResult installUserTrustedCertificateSync(buffer cert, CertScope certScope); - [Throws] - static void uninstallUserTrustedCertificateSync(String certUri); - [Throws] - static async CMResult installPrivateCertificate(buffer keystore, String keystorePwd, String certAlias, AuthStorageLevel level); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.security.certManagerDialog.idl b/idl/@ohos.security.certManagerDialog.idl index 3b5553a..64c942d 100644 --- a/idl/@ohos.security.certManagerDialog.idl +++ b/idl/@ohos.security.certManagerDialog.idl @@ -1,53 +1,40 @@ package ohos.security.certManagerDialog; +import ohos.app.ability.common.default as common; +[DefaultExport] namespace certificateManagerDialog { - dictionary CertificateDialogErrorCode { - number ERROR_GENERIC = 29700001; number ERROR_OPERATION_CANCELED = 29700002; number ERROR_OPERATION_FAILED = 29700003; number ERROR_DEVICE_NOT_SUPPORTED = 29700004; number ERROR_NOT_COMPLY_SECURITY_POLICY = 29700005; - }; dictionary CertificateDialogPageType { - number PAGE_MAIN = 1; number PAGE_CA_CERTIFICATE = 2; number PAGE_CREDENTIAL = 3; number PAGE_INSTALL_CERTIFICATE = 4; - }; + [Throws] + async void openCertificateManagerDialog(common.Context context, CertificateDialogPageType pageType); dictionary CertificateType { - number CA_CERT = 1; - }; dictionary CertificateScope { - number NOT_SPECIFIED = 0; number CURRENT_USER = 1; number GLOBAL_USER = 2; - }; + [Throws] + async String openInstallCertificateDialog(common.Context context, CertificateType certType, CertificateScope certScope, buffer cert); + [Throws] + async void openUninstallCertificateDialog(common.Context context, CertificateType certType, String certUri); [Entity=Interface] interface CertificateDialogProperty { - attribute boolean showInstallButton; - }; - [GlobalScope] - interface GlobalScope_certificateManagerDialog_ohos_security_certManagerDialog { - - [Throws] - static async void openCertificateManagerDialog(common.Context context, CertificateDialogPageType pageType); - [Throws] - static async String openInstallCertificateDialog(common.Context context, CertificateType certType, CertificateScope certScope, buffer cert); - [Throws] - static async void openUninstallCertificateDialog(common.Context context, CertificateType certType, String certUri); - [Throws] - static async void openCertificateDetailDialog(common.Context context, buffer cert, CertificateDialogProperty property); - - }; - + [Throws] + async void openCertificateDetailDialog(common.Context context, buffer cert, CertificateDialogProperty property); + [Throws] + async String openAuthorizeDialog(common.Context context); }; \ No newline at end of file diff --git a/idl/@ohos.security.cryptoFramework.idl b/idl/@ohos.security.cryptoFramework.idl index 4c4453c..0258714 100644 --- a/idl/@ohos.security.cryptoFramework.idl +++ b/idl/@ohos.security.cryptoFramework.idl @@ -1,82 +1,62 @@ -package ohos.security; +package ohos.security.cryptoFramework; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace cryptoFramework { - dictionary Result { - number INVALID_PARAMS = 401; number NOT_SUPPORT = 801; number ERR_OUT_OF_MEMORY = 17620001; number ERR_RUNTIME_ERROR = 17620002; + number ERR_PARAMETER_CHECK_FAILED = 17620003; number ERR_CRYPTO_OPERATION = 17630001; - }; [Entity=Interface] interface DataBlob { - attribute buffer data; - }; [Entity=Interface] interface ParamsSpec { - attribute String algName; - }; [Entity=Interface] interface IvParamsSpec: ParamsSpec { - attribute DataBlob iv; - }; [Entity=Interface] interface GcmParamsSpec: ParamsSpec { - attribute DataBlob iv; attribute DataBlob aad; attribute DataBlob authTag; - }; [Entity=Interface] interface CcmParamsSpec: ParamsSpec { - attribute DataBlob iv; attribute DataBlob aad; attribute DataBlob authTag; - }; dictionary CryptoMode { - number ENCRYPT_MODE = 0; number DECRYPT_MODE = 1; - }; [Entity=Interface] interface KeyEncodingConfig { - attribute String password; attribute String cipherName; - }; [Entity=Interface] interface Key { - readonly attribute String format; readonly attribute String algName; [Throws] DataBlob getEncoded(); - }; [Entity=Interface] interface SymKey: Key { - void clearMem(); - }; [Entity=Interface] interface PriKey: Key { - void clearMem(); [Throws] (bigint or String or number) getAsyKeySpec(AsyKeySpecItem itemType); @@ -86,31 +66,25 @@ namespace cryptoFramework { String getEncodedPem(String format); [Throws] String getEncodedPem(String format, KeyEncodingConfig config); - }; [Entity=Interface] interface PubKey: Key { - [Throws] (bigint or String or number) getAsyKeySpec(AsyKeySpecItem itemType); [Throws] DataBlob getEncodedDer(String format); [Throws] String getEncodedPem(String format); - }; [Entity=Interface] interface KeyPair { - readonly attribute PriKey priKey; readonly attribute PubKey pubKey; - }; [Async, Synthetic] callback AsyncCallback_DataBlob_Void = void (DataBlob result); [Entity=Interface] interface Random { - readonly attribute String algName; [Throws] void generateRandom(number len, AsyncCallback_DataBlob_Void callback_); @@ -120,13 +94,13 @@ namespace cryptoFramework { DataBlob generateRandomSync(number len); [Throws] void setSeed(DataBlob seed); - }; + [Throws] + Random createRandom(); [Async, Synthetic] callback AsyncCallback_KeyPair_Void = void (KeyPair result); [Entity=Interface] interface AsyKeyGenerator { - readonly attribute String algName; [Throws] void generateKeyPair(AsyncCallback_KeyPair_Void callback_); @@ -135,12 +109,8 @@ namespace cryptoFramework { [Throws] KeyPair generateKeyPairSync(); [Throws] - void convertKey(DataBlob pubKey, DataBlob priKey, AsyncCallback_KeyPair_Void callback_); - [Throws] void convertKey((DataBlob or undefined) pubKey, (DataBlob or undefined) priKey, AsyncCallback_KeyPair_Void callback_); [Throws] - async KeyPair convertKey(DataBlob pubKey, DataBlob priKey); - [Throws] async KeyPair convertKey((DataBlob or undefined) pubKey, (DataBlob or undefined) priKey); [Throws] KeyPair convertKeySync((DataBlob or undefined) pubKey, (DataBlob or undefined) priKey); @@ -152,13 +122,11 @@ namespace cryptoFramework { KeyPair convertPemKeySync((String or undefined) pubKey, (String or undefined) priKey); [Throws] KeyPair convertPemKeySync((String or undefined) pubKey, (String or undefined) priKey, String password); - }; [Async, Synthetic] callback AsyncCallback_SymKey_Void = void (SymKey result); [Entity=Interface] interface SymKeyGenerator { - readonly attribute String algName; [Throws] void generateSymKey(AsyncCallback_SymKey_Void callback_); @@ -172,31 +140,27 @@ namespace cryptoFramework { async SymKey convertKey(DataBlob key); [Throws] SymKey convertKeySync(DataBlob key); - }; + [Throws] + AsyKeyGenerator createAsyKeyGenerator(String algName); + [Throws] + SymKeyGenerator createSymKeyGenerator(String algName); [Entity=Interface] interface MacSpec { - attribute String algName; - }; [Entity=Interface] interface HmacSpec: MacSpec { - attribute String mdName; - }; [Entity=Interface] interface CmacSpec: MacSpec { - attribute String cipherName; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); [Entity=Interface] interface Mac { - readonly attribute String algName; [Throws] void init(SymKey key, AsyncCallback_Void callback_); @@ -218,11 +182,13 @@ namespace cryptoFramework { DataBlob doFinalSync(); [Throws] number getMacLength(); - }; + [Throws] + Mac createMac(String algName); + [Throws] + Mac createMac(MacSpec macSpec); [Entity=Interface] interface Md { - readonly attribute String algName; [Throws] void update(DataBlob input, AsyncCallback_Void callback_); @@ -238,38 +204,30 @@ namespace cryptoFramework { DataBlob digestSync(); [Throws] number getMdLength(); - }; + [Throws] + Md createMd(String algName); dictionary CipherSpecItem { - number OAEP_MD_NAME_STR = 100; number OAEP_MGF_NAME_STR = 101; number OAEP_MGF1_MD_STR = 102; number OAEP_MGF1_PSRC_UINT8ARR = 103; number SM2_MD_NAME_STR = 104; - }; dictionary SignSpecItem { - number PSS_MD_NAME_STR = 100; number PSS_MGF_NAME_STR = 101; number PSS_MGF1_MD_STR = 102; number PSS_SALT_LEN_NUM = 103; number PSS_TRAILER_FIELD_NUM = 104; number SM2_USER_ID_UINT8ARR = 105; - }; [Entity=Interface] interface Cipher { - readonly attribute String algName; [Throws] - void init(CryptoMode opMode, Key key, ParamsSpec params, AsyncCallback_Void callback_); - [Throws] void init(CryptoMode opMode, Key key, (ParamsSpec or undefined) params, AsyncCallback_Void callback_); [Throws] - async void init(CryptoMode opMode, Key key, ParamsSpec params); - [Throws] async void init(CryptoMode opMode, Key key, (ParamsSpec or undefined) params); [Throws] void initSync(CryptoMode opMode, Key key, (ParamsSpec or undefined) params); @@ -280,12 +238,8 @@ namespace cryptoFramework { [Throws] DataBlob updateSync(DataBlob data); [Throws] - void doFinal(DataBlob data, AsyncCallback_DataBlob_Void callback_); - [Throws] void doFinal((DataBlob or undefined) data, AsyncCallback_DataBlob_Void callback_); [Throws] - async DataBlob doFinal(DataBlob data); - [Throws] async DataBlob doFinal((DataBlob or undefined) data); [Throws] DataBlob doFinalSync((DataBlob or undefined) data); @@ -293,11 +247,11 @@ namespace cryptoFramework { void setCipherSpec(CipherSpecItem itemType, buffer itemValue); [Throws] (String or buffer) getCipherSpec(CipherSpecItem itemType); - }; + [Throws] + Cipher createCipher(String transformation); [Entity=Interface] interface Sign { - readonly attribute String algName; [Throws] void init(PriKey priKey, AsyncCallback_Void callback_); @@ -312,28 +266,20 @@ namespace cryptoFramework { [Throws] void updateSync(DataBlob data); [Throws] - void sign(DataBlob data, AsyncCallback_DataBlob_Void callback_); - [Throws] void sign((DataBlob or undefined) data, AsyncCallback_DataBlob_Void callback_); [Throws] - async DataBlob sign(DataBlob data); - [Throws] async DataBlob sign((DataBlob or undefined) data); [Throws] DataBlob signSync((DataBlob or undefined) data); [Throws] - void setSignSpec(SignSpecItem itemType, number itemValue); - [Throws] void setSignSpec(SignSpecItem itemType, (number or buffer) itemValue); [Throws] (String or number) getSignSpec(SignSpecItem itemType); - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); [Entity=Interface] interface Verify { - readonly attribute String algName; [Throws] void init(PubKey pubKey, AsyncCallback_Void callback_); @@ -348,12 +294,8 @@ namespace cryptoFramework { [Throws] void updateSync(DataBlob data); [Throws] - void verify(DataBlob data, DataBlob signatureData, AsyncCallback_Boolean_Void callback_); - [Throws] void verify((DataBlob or undefined) data, DataBlob signatureData, AsyncCallback_Boolean_Void callback_); [Throws] - async boolean verify(DataBlob data, DataBlob signatureData); - [Throws] async boolean verify((DataBlob or undefined) data, DataBlob signatureData); [Throws] boolean verifySync((DataBlob or undefined) data, DataBlob signatureData); @@ -362,16 +304,16 @@ namespace cryptoFramework { [Throws] (DataBlob or undefined) recoverSync(DataBlob signatureData); [Throws] - void setVerifySpec(SignSpecItem itemType, number itemValue); - [Throws] void setVerifySpec(SignSpecItem itemType, (number or buffer) itemValue); [Throws] (String or number) getVerifySpec(SignSpecItem itemType); - }; + [Throws] + Sign createSign(String algName); + [Throws] + Verify createVerify(String algName); [Entity=Interface] interface KeyAgreement { - readonly attribute String algName; [Throws] void generateSecret(PriKey priKey, PubKey pubKey, AsyncCallback_DataBlob_Void callback_); @@ -379,10 +321,10 @@ namespace cryptoFramework { async DataBlob generateSecret(PriKey priKey, PubKey pubKey); [Throws] DataBlob generateSecretSync(PriKey priKey, PubKey pubKey); - }; + [Throws] + KeyAgreement createKeyAgreement(String algName); dictionary AsyKeySpecItem { - number DSA_P_BN = 101; number DSA_Q_BN = 102; number DSA_G_BN = 103; @@ -413,204 +355,149 @@ namespace cryptoFramework { number ED25519_PK_BN = 502; number X25519_SK_BN = 601; number X25519_PK_BN = 602; - }; dictionary AsyKeySpecType { - number COMMON_PARAMS_SPEC = 0; number PRIVATE_KEY_SPEC = 1; number PUBLIC_KEY_SPEC = 2; number KEY_PAIR_SPEC = 3; - }; [Entity=Interface] interface AsyKeySpec { - attribute String algName; attribute AsyKeySpecType specType; - }; [Entity=Interface] interface DSACommonParamsSpec: AsyKeySpec { - attribute bigint p; attribute bigint q; attribute bigint g; - }; [Entity=Interface] interface DSAPubKeySpec: AsyKeySpec { - attribute DSACommonParamsSpec params; attribute bigint pk; - }; [Entity=Interface] interface DSAKeyPairSpec: AsyKeySpec { - attribute DSACommonParamsSpec params; attribute bigint sk; attribute bigint pk; - }; [Entity=Interface] interface ECField { - attribute String fieldType; - }; [Entity=Interface] interface ECFieldFp: ECField { - attribute bigint p; - }; [Entity=Interface] interface Point { - attribute bigint x; attribute bigint y; - }; [Entity=Interface] interface ECCCommonParamsSpec: AsyKeySpec { - attribute ECField field; attribute bigint a; attribute bigint b; attribute Point g; attribute bigint n; attribute number h; - }; [Entity=Interface] interface ECCPriKeySpec: AsyKeySpec { - attribute ECCCommonParamsSpec params; attribute bigint sk; - }; [Entity=Interface] interface ECCPubKeySpec: AsyKeySpec { - attribute ECCCommonParamsSpec params; attribute Point pk; - }; [Entity=Interface] interface ECCKeyPairSpec: AsyKeySpec { - attribute ECCCommonParamsSpec params; attribute bigint sk; attribute Point pk; - }; [Entity=Class] interface ECCKeyUtil { - [Throws] static ECCCommonParamsSpec genECCCommonParamsSpec(String curveName); [Throws] static Point convertPoint(String curveName, buffer encodedPoint); [Throws] static buffer getEncodedPoint(String curveName, Point point, String format); - }; [Entity=Interface] interface DHCommonParamsSpec: AsyKeySpec { - attribute bigint p; attribute bigint g; attribute number l; - }; [Entity=Interface] interface DHPriKeySpec: AsyKeySpec { - attribute DHCommonParamsSpec params; attribute bigint sk; - }; [Entity=Interface] interface DHPubKeySpec: AsyKeySpec { - attribute DHCommonParamsSpec params; attribute bigint pk; - }; [Entity=Interface] interface DHKeyPairSpec: AsyKeySpec { - attribute DHCommonParamsSpec params; attribute bigint sk; attribute bigint pk; - }; [Entity=Class] interface DHKeyUtil { - [Throws] static DHCommonParamsSpec genDHCommonParamsSpec(number pLen, optional number skLen); - }; [Entity=Interface] interface ED25519PriKeySpec: AsyKeySpec { - attribute bigint sk; - }; [Entity=Interface] interface ED25519PubKeySpec: AsyKeySpec { - attribute bigint pk; - }; [Entity=Interface] interface ED25519KeyPairSpec: AsyKeySpec { - attribute bigint sk; attribute bigint pk; - }; [Entity=Interface] interface X25519PriKeySpec: AsyKeySpec { - attribute bigint sk; - }; [Entity=Interface] interface X25519PubKeySpec: AsyKeySpec { - attribute bigint pk; - }; [Entity=Interface] interface X25519KeyPairSpec: AsyKeySpec { - attribute bigint sk; attribute bigint pk; - }; [Entity=Interface] interface RSACommonParamsSpec: AsyKeySpec { - attribute bigint n; - }; [Entity=Interface] interface RSAPubKeySpec: AsyKeySpec { - attribute RSACommonParamsSpec params; attribute bigint pk; - }; [Entity=Interface] interface RSAKeyPairSpec: AsyKeySpec { - attribute RSACommonParamsSpec params; attribute bigint sk; attribute bigint pk; - }; [Async, Synthetic] callback AsyncCallback_PriKey_Void = void (PriKey result); @@ -618,7 +505,6 @@ namespace cryptoFramework { callback AsyncCallback_PubKey_Void = void (PubKey result); [Entity=Interface] interface AsyKeyGeneratorBySpec { - readonly attribute String algName; [Throws] void generateKeyPair(AsyncCallback_KeyPair_Void callback_); @@ -638,35 +524,29 @@ namespace cryptoFramework { async PubKey generatePubKey(); [Throws] PubKey generatePubKeySync(); - }; + [Throws] + AsyKeyGeneratorBySpec createAsyKeyGeneratorBySpec(AsyKeySpec asyKeySpec); [Entity=Interface] interface KdfSpec { - attribute String algName; - }; [Entity=Interface] interface PBKDF2Spec: KdfSpec { - attribute (String or buffer) password; attribute buffer salt; attribute number iterations; attribute number keySize; - }; [Entity=Interface] interface HKDFSpec: KdfSpec { - attribute (String or buffer) key; attribute buffer salt; attribute buffer info; attribute number keySize; - }; [Entity=Interface] interface ScryptSpec: KdfSpec { - attribute (String or buffer) passphrase; attribute buffer salt; attribute number n; @@ -674,11 +554,9 @@ namespace cryptoFramework { attribute number p; attribute number maxMemory; attribute number keySize; - }; [Entity=Interface] interface Kdf { - readonly attribute String algName; [Throws] void generateSecret(KdfSpec params, AsyncCallback_DataBlob_Void callback_); @@ -686,54 +564,33 @@ namespace cryptoFramework { async DataBlob generateSecret(KdfSpec params); [Throws] DataBlob generateSecretSync(KdfSpec params); - }; + [Throws] + Kdf createKdf(String algName); [Entity=Interface] interface SM2CipherTextSpec { - attribute bigint xCoordinate; attribute bigint yCoordinate; attribute buffer cipherTextData; attribute buffer hashData; - }; [Entity=Class] interface SM2CryptoUtil { - [Throws] static DataBlob genCipherTextBySpec(SM2CipherTextSpec spec, optional String mode); [Throws] static SM2CipherTextSpec getCipherTextSpec(DataBlob cipherText, optional String mode); - }; - [GlobalScope] - interface GlobalScope_cryptoFramework_ohos_security_cryptoFramework { - - [Throws] - static Random createRandom(); - [Throws] - static AsyKeyGenerator createAsyKeyGenerator(String algName); - [Throws] - static SymKeyGenerator createSymKeyGenerator(String algName); - [Throws] - static Mac createMac(String algName); - [Throws] - static Mac createMac(MacSpec macSpec); - [Throws] - static Md createMd(String algName); - [Throws] - static Cipher createCipher(String transformation); - [Throws] - static Sign createSign(String algName); - [Throws] - static Verify createVerify(String algName); - [Throws] - static KeyAgreement createKeyAgreement(String algName); + [Entity=Interface] + interface EccSignatureSpec { + attribute bigint r; + attribute bigint s; + }; + [Entity=Class] + interface SignatureUtils { [Throws] - static AsyKeyGeneratorBySpec createAsyKeyGeneratorBySpec(AsyKeySpec asyKeySpec); + static EccSignatureSpec genEccSignatureSpec(buffer data); [Throws] - static Kdf createKdf(String algName); - + static buffer genEccSignature(EccSignatureSpec spec); }; - }; \ No newline at end of file diff --git a/idl/@ohos.security.huks.idl b/idl/@ohos.security.huks.idl index 8859228..ff824f4 100644 --- a/idl/@ohos.security.huks.idl +++ b/idl/@ohos.security.huks.idl @@ -1,57 +1,176 @@ -package ohos.security; +package ohos.security.huks; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace huks { - [Async, Synthetic] callback AsyncCallback_HuksResult_Void = void (HuksResult result); + [Deprecated] + void generateKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult generateKey(String keyAlias, HuksOptions options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void generateKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Void callback_); + [Throws] + async void generateKeyItem(String keyAlias, HuksOptions options); + [Throws] + async void generateKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Deprecated] + void deleteKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult deleteKey(String keyAlias, HuksOptions options); + [Throws] + void deleteKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Void callback_); + [Throws] + async void deleteKeyItem(String keyAlias, HuksOptions options); + [Throws] + async void deleteKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Deprecated] + void importKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult importKey(String keyAlias, HuksOptions options); + [Throws] + void importKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Void callback_); + [Throws] + async void importKeyItem(String keyAlias, HuksOptions options); + [Throws] + async void importKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Throws] + void importWrappedKeyItem(String keyAlias, String wrappingKeyAlias, HuksOptions options, AsyncCallback_Void callback_); + [Throws] + async void importWrappedKeyItemAsUser(number userId, String keyAlias, String wrappingKeyAlias, HuksOptions huksOptions); + [Throws] + async void importWrappedKeyItem(String keyAlias, String wrappingKeyAlias, HuksOptions options); + [Deprecated] + void exportKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult exportKey(String keyAlias, HuksOptions options); [Async, Synthetic] callback AsyncCallback_HuksReturnResult_Void = void (HuksReturnResult result); + [Throws] + void exportKeyItem(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + async HuksReturnResult exportKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Throws] + async HuksReturnResult exportKeyItem(String keyAlias, HuksOptions options); + [Deprecated] + void getKeyProperties(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult getKeyProperties(String keyAlias, HuksOptions options); + [Throws] + void getKeyItemProperties(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + async HuksReturnResult getKeyItemPropertiesAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Throws] + async HuksReturnResult getKeyItemProperties(String keyAlias, HuksOptions options); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isKeyExist(String keyAlias, HuksOptions options, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isKeyExist(String keyAlias, HuksOptions options); + [Throws] + void isKeyItemExist(String keyAlias, HuksOptions options, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isKeyItemExist(String keyAlias, HuksOptions options); + [Throws] + void hasKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean hasKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Throws] + async boolean hasKeyItem(String keyAlias, HuksOptions options); [Async, Synthetic] callback AsyncCallback_HuksHandle_Void = void (HuksHandle result); + [Deprecated] + void init(String keyAlias, HuksOptions options, AsyncCallback_HuksHandle_Void callback_); + [Deprecated] + async HuksHandle init(String keyAlias, HuksOptions options); [Async, Synthetic] callback AsyncCallback_HuksSessionHandle_Void = void (HuksSessionHandle result); + [Throws] + void initSession(String keyAlias, HuksOptions options, AsyncCallback_HuksSessionHandle_Void callback_); + [Throws] + async HuksSessionHandle initSession(String keyAlias, HuksOptions options); + [Throws] + async HuksSessionHandle initSessionAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Deprecated] + void update(number handle, optional buffer token, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult update(number handle, optional buffer token, HuksOptions options); + [Throws] + void updateSession(long handle, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + void updateSession(long handle, HuksOptions options, buffer token, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + async HuksReturnResult updateSession(long handle, HuksOptions options, optional buffer token); + [Deprecated] + void finish(number handle, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult finish(number handle, HuksOptions options); + [Throws] + void finishSession(number handle, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + void finishSession(number handle, HuksOptions options, buffer token, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + async HuksReturnResult finishSession(number handle, HuksOptions options, optional buffer token); + [Deprecated] + void abort(number handle, HuksOptions options, AsyncCallback_HuksResult_Void callback_); + [Deprecated] + async HuksResult abort(number handle, HuksOptions options); + [Throws] + void abortSession(number handle, HuksOptions options, AsyncCallback_Void callback_); + [Throws] + async void abortSession(number handle, HuksOptions options); + [Throws] + void attestKeyItem(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + async HuksReturnResult attestKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Throws] + async HuksReturnResult attestKeyItem(String keyAlias, HuksOptions options); + [Throws] + void anonAttestKeyItem(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); + [Throws] + async HuksReturnResult anonAttestKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); + [Throws] + async HuksReturnResult anonAttestKeyItem(String keyAlias, HuksOptions options); + [Deprecated] + String getSdkVersion(HuksOptions options); + [Throws] + async HuksListAliasesReturnResult listAliases(HuksOptions options); + [Throws] + async HuksReturnResult wrapKeyItem(String keyAlias, HuksOptions params); + [Throws] + async HuksReturnResult unwrapKeyItem(String keyAlias, HuksOptions params, buffer wrappedKey); [Entity=Interface] interface HuksParam { - attribute HuksTag tag; attribute (boolean or number or bigint or buffer) value; - }; [Entity=Interface, Deprecated] interface HuksHandle { - [Deprecated] attribute number errorCode; [Deprecated] attribute number handle; [Optional, Deprecated] attribute buffer token; - }; [Entity=Interface] interface HuksSessionHandle { - attribute number handle; [Optional] attribute buffer challenge; - }; [Entity=Interface] interface HuksOptions { - [Optional] attribute sequence properties; [Optional] attribute buffer inData; - }; [Entity=Interface, Deprecated] interface HuksResult { - [Deprecated] attribute number errorCode; [Optional, Deprecated] @@ -60,28 +179,22 @@ namespace huks { attribute sequence properties; [Optional, Deprecated] attribute sequence certChains; - }; [Entity=Interface] interface HuksReturnResult { - [Optional] attribute buffer outData; [Optional] attribute sequence properties; [Optional] attribute sequence certChains; - }; [Entity=Interface] interface HuksListAliasesReturnResult { - attribute sequence keyAliases; - }; [Deprecated] dictionary HuksErrorCode { - [Deprecated] number HUKS_SUCCESS = 0; [Deprecated] @@ -216,10 +329,8 @@ namespace huks { number HUKS_ERROR_INTERNAL_ERROR = -999; [Deprecated] number HUKS_ERROR_UNKNOWN_ERROR = -1000; - }; dictionary HuksExceptionErrCode { - number HUKS_ERR_CODE_PERMISSION_FAIL = 201; number HUKS_ERR_CODE_NOT_SYSTEM_APP = 202; number HUKS_ERR_CODE_ILLEGAL_ARGUMENT = 401; @@ -240,10 +351,10 @@ namespace huks { number HUKS_ERR_CODE_INSUFFICIENT_MEMORY = 12000014; number HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015; number HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016; - + number HUKS_ERR_CODE_KEY_ALREADY_EXIST = 12000017; + number HUKS_ERR_CODE_INVALID_ARGUMENT = 12000018; }; dictionary HuksKeyPurpose { - number HUKS_KEY_PURPOSE_ENCRYPT = 1; number HUKS_KEY_PURPOSE_DECRYPT = 2; number HUKS_KEY_PURPOSE_SIGN = 4; @@ -253,10 +364,8 @@ namespace huks { number HUKS_KEY_PURPOSE_UNWRAP = 64; number HUKS_KEY_PURPOSE_MAC = 128; number HUKS_KEY_PURPOSE_AGREE = 256; - }; dictionary HuksKeyDigest { - number HUKS_DIGEST_NONE = 0; number HUKS_DIGEST_MD5 = 1; number HUKS_DIGEST_SM3 = 2; @@ -265,10 +374,8 @@ namespace huks { number HUKS_DIGEST_SHA256 = 12; number HUKS_DIGEST_SHA384 = 13; number HUKS_DIGEST_SHA512 = 14; - }; dictionary HuksKeyPadding { - number HUKS_PADDING_NONE = 0; number HUKS_PADDING_OAEP = 1; number HUKS_PADDING_PSS = 2; @@ -277,10 +384,8 @@ namespace huks { number HUKS_PADDING_PKCS7 = 5; number HUKS_PADDING_ISO_IEC_9796_2 = 6; number HUKS_PADDING_ISO_IEC_9797_1 = 7; - }; dictionary HuksCipherMode { - number HUKS_MODE_ECB = 1; number HUKS_MODE_CBC = 2; number HUKS_MODE_CTR = 3; @@ -288,10 +393,8 @@ namespace huks { number HUKS_MODE_CFB = 5; number HUKS_MODE_CCM = 31; number HUKS_MODE_GCM = 32; - }; dictionary HuksKeySize { - number HUKS_RSA_KEY_SIZE_512 = 512; number HUKS_RSA_KEY_SIZE_768 = 768; number HUKS_RSA_KEY_SIZE_1024 = 1024; @@ -316,10 +419,8 @@ namespace huks { number HUKS_DES_KEY_SIZE_64 = 64; number HUKS_3DES_KEY_SIZE_128 = 128; number HUKS_3DES_KEY_SIZE_192 = 192; - }; dictionary HuksKeyAlg { - number HUKS_ALG_RSA = 1; number HUKS_ALG_ECC = 2; number HUKS_ALG_DSA = 3; @@ -337,117 +438,89 @@ namespace huks { number HUKS_ALG_DES = 160; number HUKS_ALG_3DES = 161; number HUKS_ALG_CMAC = 162; - }; dictionary HuksUnwrapSuite { - number HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1; number HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2; - }; dictionary HuksKeyGenerateType { - number HUKS_KEY_GENERATE_TYPE_DEFAULT = 0; number HUKS_KEY_GENERATE_TYPE_DERIVE = 1; number HUKS_KEY_GENERATE_TYPE_AGREE = 2; - }; dictionary HuksKeyFlag { - number HUKS_KEY_FLAG_IMPORT_KEY = 1; number HUKS_KEY_FLAG_GENERATE_KEY = 2; number HUKS_KEY_FLAG_AGREE_KEY = 3; number HUKS_KEY_FLAG_DERIVE_KEY = 4; - }; dictionary HuksKeyStorageType { - [Deprecated] number HUKS_STORAGE_TEMP = 0; [Deprecated] number HUKS_STORAGE_PERSISTENT = 1; number HUKS_STORAGE_ONLY_USED_IN_HUKS = 2; number HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3; - }; dictionary HuksImportKeyType { - number HUKS_KEY_TYPE_PUBLIC_KEY = 0; number HUKS_KEY_TYPE_PRIVATE_KEY = 1; number HUKS_KEY_TYPE_KEY_PAIR = 2; - }; dictionary HuksRsaPssSaltLenType { - number HUKS_RSA_PSS_SALT_LEN_DIGEST = 0; number HUKS_RSA_PSS_SALT_LEN_MAX = 1; - }; dictionary HuksUserAuthType { - number HUKS_USER_AUTH_TYPE_FINGERPRINT = 1; number HUKS_USER_AUTH_TYPE_FACE = 2; number HUKS_USER_AUTH_TYPE_PIN = 4; - + number HUKS_USER_AUTH_TYPE_TUI_PIN = 32; }; dictionary HuksAuthAccessType { - number HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1; number HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 2; number HUKS_AUTH_ACCESS_ALWAYS_VALID = 4; - }; dictionary HuksUserAuthMode { - number HUKS_USER_AUTH_MODE_LOCAL = 0; number HUKS_USER_AUTH_MODE_COAUTH = 1; - }; dictionary HuksAuthStorageLevel { - number HUKS_AUTH_STORAGE_LEVEL_DE = 0; number HUKS_AUTH_STORAGE_LEVEL_CE = 1; number HUKS_AUTH_STORAGE_LEVEL_ECE = 2; - }; dictionary HuksChallengeType { - number HUKS_CHALLENGE_TYPE_NORMAL = 0; number HUKS_CHALLENGE_TYPE_CUSTOM = 1; number HUKS_CHALLENGE_TYPE_NONE = 2; - }; dictionary HuksChallengePosition { - number HUKS_CHALLENGE_POS_0 = 0; number HUKS_CHALLENGE_POS_1 = 1; number HUKS_CHALLENGE_POS_2 = 2; number HUKS_CHALLENGE_POS_3 = 3; - }; dictionary HuksSecureSignType { - number HUKS_SECURE_SIGN_WITH_AUTHINFO = 1; - }; dictionary HuksSendType { - number HUKS_SEND_TYPE_ASYNC = 0; number HUKS_SEND_TYPE_SYNC = 1; - + }; + dictionary HuksKeyWrapType { + number HUKS_KEY_WRAP_TYPE_HUK_BASED = 2; }; dictionary HuksTagType { - number HUKS_TAG_TYPE_INVALID = 0; number HUKS_TAG_TYPE_INT = 268435456; number HUKS_TAG_TYPE_UINT = 536870912; number HUKS_TAG_TYPE_ULONG = 805306368; number HUKS_TAG_TYPE_BOOL = 1073741824; number HUKS_TAG_TYPE_BYTES = 1342177280; - }; dictionary HuksTag { - [Deprecated] number HUKS_TAG_INVALID = 0; number HUKS_TAG_ALGORITHM = 536870913; @@ -528,6 +601,7 @@ namespace huks { number HUKS_TAG_ATTESTATION_ID_UDID = 1342177793; number HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = 1342177794; number HUKS_TAG_ATTESTATION_ID_VERSION_INFO = 1342177795; + number HUKS_TAG_KEY_OVERRIDE = 1073742344; number HUKS_TAG_IS_KEY_ALIAS = 1073742825; number HUKS_TAG_KEY_STORAGE_FLAG = 536871914; number HUKS_TAG_IS_ALLOWED_WRAP = 1073742827; @@ -567,136 +641,5 @@ namespace huks { number HUKS_TAG_SYMMETRIC_KEY_DATA = 1342197281; number HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = 1342197282; number HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = 1342197283; - - }; - [GlobalScope] - interface GlobalScope_huks_ohos_security_huks { - - [Deprecated] - static void generateKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult generateKey(String keyAlias, HuksOptions options); - [Throws] - static void generateKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Void callback_); - [Throws] - static async void generateKeyItem(String keyAlias, HuksOptions options); - [Throws] - static async void generateKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Deprecated] - static void deleteKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult deleteKey(String keyAlias, HuksOptions options); - [Throws] - static void deleteKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Void callback_); - [Throws] - static async void deleteKeyItem(String keyAlias, HuksOptions options); - [Throws] - static async void deleteKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Deprecated] - static void importKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult importKey(String keyAlias, HuksOptions options); - [Throws] - static void importKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Void callback_); - [Throws] - static async void importKeyItem(String keyAlias, HuksOptions options); - [Throws] - static async void importKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Throws] - static void importWrappedKeyItem(String keyAlias, String wrappingKeyAlias, HuksOptions options, AsyncCallback_Void callback_); - [Throws] - static async void importWrappedKeyItemAsUser(number userId, String keyAlias, String wrappingKeyAlias, HuksOptions huksOptions); - [Throws] - static async void importWrappedKeyItem(String keyAlias, String wrappingKeyAlias, HuksOptions options); - [Deprecated] - static void exportKey(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult exportKey(String keyAlias, HuksOptions options); - [Throws] - static void exportKeyItem(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static async HuksReturnResult exportKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Throws] - static async HuksReturnResult exportKeyItem(String keyAlias, HuksOptions options); - [Deprecated] - static void getKeyProperties(String keyAlias, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult getKeyProperties(String keyAlias, HuksOptions options); - [Throws] - static void getKeyItemProperties(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static async HuksReturnResult getKeyItemPropertiesAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Throws] - static async HuksReturnResult getKeyItemProperties(String keyAlias, HuksOptions options); - [Deprecated] - static void isKeyExist(String keyAlias, HuksOptions options, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isKeyExist(String keyAlias, HuksOptions options); - [Throws] - static void isKeyItemExist(String keyAlias, HuksOptions options, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isKeyItemExist(String keyAlias, HuksOptions options); - [Throws] - static void hasKeyItem(String keyAlias, HuksOptions options, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean hasKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Throws] - static async boolean hasKeyItem(String keyAlias, HuksOptions options); - [Deprecated] - static void init(String keyAlias, HuksOptions options, AsyncCallback_HuksHandle_Void callback_); - [Deprecated] - static async HuksHandle init(String keyAlias, HuksOptions options); - [Throws] - static void initSession(String keyAlias, HuksOptions options, AsyncCallback_HuksSessionHandle_Void callback_); - [Throws] - static async HuksSessionHandle initSession(String keyAlias, HuksOptions options); - [Throws] - static async HuksSessionHandle initSessionAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Deprecated] - static void update(number handle, optional buffer token, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult update(number handle, optional buffer token, HuksOptions options); - [Throws] - static void updateSession(number handle, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static void updateSession(number handle, HuksOptions options, buffer token, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static async HuksReturnResult updateSession(number handle, HuksOptions options, optional buffer token); - [Deprecated] - static void finish(number handle, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult finish(number handle, HuksOptions options); - [Throws] - static void finishSession(number handle, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static void finishSession(number handle, HuksOptions options, buffer token, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static async HuksReturnResult finishSession(number handle, HuksOptions options, optional buffer token); - [Deprecated] - static void abort(number handle, HuksOptions options, AsyncCallback_HuksResult_Void callback_); - [Deprecated] - static async HuksResult abort(number handle, HuksOptions options); - [Throws] - static void abortSession(number handle, HuksOptions options, AsyncCallback_Void callback_); - [Throws] - static async void abortSession(number handle, HuksOptions options); - [Throws] - static void attestKeyItem(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static async HuksReturnResult attestKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Throws] - static async HuksReturnResult attestKeyItem(String keyAlias, HuksOptions options); - [Throws] - static void anonAttestKeyItem(String keyAlias, HuksOptions options, AsyncCallback_HuksReturnResult_Void callback_); - [Throws] - static async HuksReturnResult anonAttestKeyItemAsUser(number userId, String keyAlias, HuksOptions huksOptions); - [Throws] - static async HuksReturnResult anonAttestKeyItem(String keyAlias, HuksOptions options); - [Deprecated] - static String getSdkVersion(HuksOptions options); - [Throws] - static async HuksListAliasesReturnResult listAliases(HuksOptions options); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.security.securityGuard.idl b/idl/@ohos.security.securityGuard.idl index d06c3da..d9919fa 100644 --- a/idl/@ohos.security.securityGuard.idl +++ b/idl/@ohos.security.securityGuard.idl @@ -1,19 +1,19 @@ -package ohos.security; +package ohos.security.securityGuard; +import ohos.base.Callback as Callback; +[DefaultExport] namespace securityGuard { - [Entity=Interface] interface SecurityEvent { - attribute number eventId; attribute String version; attribute String content; [Optional] attribute String timestamp; - }; + [Throws] + void reportSecurityEvent(SecurityEvent securityEvent); [Entity=Interface] interface SecurityEventRule { - attribute number eventId; [Optional] attribute String beginTime; @@ -21,7 +21,6 @@ namespace securityGuard { attribute String endTime; [Optional] attribute String param; - }; [Synthetic] callback Callback_Array_SecurityEvent_Void = void (sequence events); @@ -31,69 +30,49 @@ namespace securityGuard { callback Callback_String_Void = void (String message); [Entity=Interface] interface Querier { - attribute Callback_Array_SecurityEvent_Void onQuery; attribute Callback_Void onComplete; attribute Callback_String_Void onError; - }; + [Throws] + void querySecurityEvent(sequence rules, Querier querier); [Entity=Interface] interface CollectorRule { - attribute number eventId; [Optional] attribute String param; - }; + [Throws] + void startSecurityEventCollector(CollectorRule rule); + [Throws] + void stopSecurityEventCollector(CollectorRule rule); [Entity=Interface] interface ModelRule { - attribute String modelName; [Optional] attribute String param; - }; [Entity=Interface] interface ModelResult { - attribute String result; - }; + [Throws] + async ModelResult getModelResult(ModelRule rule); [Entity=Interface] interface SecurityEventInfo { - attribute number eventId; - }; [Synthetic] callback Callback_SecurityEvent_Void = void (SecurityEvent parameter); + [Throws, DtsName="on", DtsTag="'securityEventOccur'"] + void onSecurityEventOccur(SecurityEventInfo securityEventInfo, Callback_SecurityEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'securityEventOccur'"] + void offSecurityEventOccur(SecurityEventInfo securityEventInfo, optional Callback_SecurityEvent_Void callback_); [Entity=Interface] interface PolicyFile { - attribute String name; attribute number fd; - }; - [GlobalScope] - interface GlobalScope_securityGuard_ohos_security_securityGuard { - - [Throws] - static void reportSecurityEvent(SecurityEvent securityEvent); - [Throws] - static void querySecurityEvent(sequence rules, Querier querier); - [Throws] - static void startSecurityEventCollector(CollectorRule rule); - [Throws] - static void stopSecurityEventCollector(CollectorRule rule); - [Throws] - static async ModelResult getModelResult(ModelRule rule); - [Throws, DtsName="on", DtsTag="'securityEventOccur'"] - static void onSecurityEventOccur(SecurityEventInfo securityEventInfo, Callback_SecurityEvent_Void callback_); - [Throws, DtsName="off", DtsTag="'securityEventOccur'"] - static void offSecurityEventOccur(SecurityEventInfo securityEventInfo, optional Callback_SecurityEvent_Void callback_); - [Throws] - static async void updatePolicyFile(PolicyFile policyFile); - - }; - + [Throws] + async void updatePolicyFile(PolicyFile policyFile); }; \ No newline at end of file diff --git a/idl/@ohos.selectionInput.SelectionExtensionAbility.idl b/idl/@ohos.selectionInput.SelectionExtensionAbility.idl new file mode 100644 index 0000000..c5911d3 --- /dev/null +++ b/idl/@ohos.selectionInput.SelectionExtensionAbility.idl @@ -0,0 +1,10 @@ +package ohos.selectionInput.SelectionExtensionAbility; +import ohos.rpc.default as rpc; +import ohos.app.ability.Want.default as Want; +import ohos.selectionInput.SelectionExtensionContext.default as SelectionExtensionContext; +[Entity=Class, DefaultExport] +interface SelectionExtensionAbility { + attribute SelectionExtensionContext context; + rpc.RemoteObject onConnect(Want want); + void onDisconnect(); +}; \ No newline at end of file diff --git a/idl/@ohos.selectionInput.SelectionExtensionContext.idl b/idl/@ohos.selectionInput.SelectionExtensionContext.idl new file mode 100644 index 0000000..f7d67ad --- /dev/null +++ b/idl/@ohos.selectionInput.SelectionExtensionContext.idl @@ -0,0 +1,8 @@ +package ohos.selectionInput.SelectionExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] +interface SelectionExtensionContext: [Extends] ExtensionContext { + [Throws] + async void startAbility(Want want); +}; \ No newline at end of file diff --git a/idl/@ohos.selectionInput.SelectionPanel.idl b/idl/@ohos.selectionInput.SelectionPanel.idl new file mode 100644 index 0000000..6348e9f --- /dev/null +++ b/idl/@ohos.selectionInput.SelectionPanel.idl @@ -0,0 +1,13 @@ +package ohos.selectionInput.SelectionPanel; +[Entity=Interface] +interface PanelInfo { + attribute PanelType panelType; + attribute number x; + attribute number y; + attribute number width; + attribute number height; +}; +dictionary PanelType { + number MENU_PANEL = 1; + number MAIN_PANEL = 2; +}; \ No newline at end of file diff --git a/idl/@ohos.selectionInput.selectionManager.idl b/idl/@ohos.selectionInput.selectionManager.idl new file mode 100644 index 0000000..4ba355a --- /dev/null +++ b/idl/@ohos.selectionInput.selectionManager.idl @@ -0,0 +1,61 @@ +package ohos.selectionInput.selectionManager; +import ohos.base.Callback as Callback; +import application.Context.default as Context; +import ohos.selectionInput.SelectionPanel.PanelInfo as PanelInfo; +[DefaultExport] +namespace selectionManager { + [Synthetic] + callback Callback_SelectionInfo_Void = void (SelectionInfo parameter); + [Throws, DtsName="on", DtsTag="'selectionCompleted'"] + void onSelectionCompleted(Callback_SelectionInfo_Void callback_); + [DtsName="off", DtsTag="'selectionCompleted'"] + void offSelectionCompleted(optional Callback_SelectionInfo_Void callback_); + [Throws] + async Panel createPanel(Context ctx, PanelInfo info); + [Throws] + async void destroyPanel(Panel panel); + [Entity=Interface] + interface SelectionInfo { + attribute String text; + attribute SelectionType selectionType; + attribute number startDisplayX; + attribute number startDisplayY; + attribute number endDisplayX; + attribute number endDisplayY; + attribute number startWindowX; + attribute number startWindowY; + attribute number endWindowX; + attribute number endWindowY; + attribute number displayID; + attribute number windowID; + attribute String bundleName; + }; + [Synthetic] + callback Callback_Void = void (); + [Entity=Interface] + interface Panel { + [Throws] + async void setUiContent(String path); + [Throws] + async void show(); + [Throws] + async void hide(); + [Throws] + async void startMoving(); + [Throws] + async void moveTo(number x, number y); + [DtsName="on", DtsTag="'destroyed'"] + void onDestroyed(Callback_Void callback_); + [DtsName="on", DtsTag="'hidden'"] + void onHidden(Callback_Void callback_); + [DtsName="off", DtsTag="'destroyed'"] + void offDestroyed(optional Callback_Void callback_); + [DtsName="off", DtsTag="'hidden'"] + void offHidden(optional Callback_Void callback_); + }; + dictionary SelectionType { + number MOUSE_MOVE = 1; + number DOUBLE_CLICK = 2; + number TRIPLE_CLICK = 3; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.sensor.idl b/idl/@ohos.sensor.idl index fcfe03b..a8f819e 100644 --- a/idl/@ohos.sensor.idl +++ b/idl/@ohos.sensor.idl @@ -1,10 +1,9 @@ -package ohos; +package ohos.sensor; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace sensor { - dictionary SensorId { - number ACCELEROMETER = 1; number GYROSCOPE = 2; number AMBIENT_LIGHT = 5; @@ -28,57 +27,369 @@ namespace sensor { number HEART_RATE = 278; number WEAR_DETECTION = 280; number ACCELEROMETER_UNCALIBRATED = 281; - }; [Synthetic] callback Callback_ColorResponse_Void = void (ColorResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.COLOR"] + void onColor(Callback_ColorResponse_Void callback_, optional Options options); [Synthetic] callback Callback_SarResponse_Void = void (SarResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.SAR"] + void onSar(Callback_SarResponse_Void callback_, optional Options options); [Synthetic] callback Callback_AccelerometerResponse_Void = void (AccelerometerResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.ACCELEROMETER"] + void onAccelerometer(Callback_AccelerometerResponse_Void callback_, optional Options options); [Synthetic] callback Callback_AccelerometerUncalibratedResponse_Void = void (AccelerometerUncalibratedResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] + void onAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_, optional Options options); [Synthetic] callback Callback_LightResponse_Void = void (LightResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.AMBIENT_LIGHT"] + void onAmbientLight(Callback_LightResponse_Void callback_, optional Options options); [Synthetic] callback Callback_AmbientTemperatureResponse_Void = void (AmbientTemperatureResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.AMBIENT_TEMPERATURE"] + void onAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_, optional Options options); [Synthetic] callback Callback_BarometerResponse_Void = void (BarometerResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.BAROMETER"] + void onBarometer(Callback_BarometerResponse_Void callback_, optional Options options); [Synthetic] callback Callback_GravityResponse_Void = void (GravityResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.GRAVITY"] + void onGravity(Callback_GravityResponse_Void callback_, optional Options options); [Synthetic] callback Callback_GyroscopeResponse_Void = void (GyroscopeResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.GYROSCOPE"] + void onGyroscope(Callback_GyroscopeResponse_Void callback_, optional Options options); [Synthetic] callback Callback_GyroscopeUncalibratedResponse_Void = void (GyroscopeUncalibratedResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] + void onGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_, optional Options options); [Synthetic] callback Callback_HallResponse_Void = void (HallResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.HALL"] + void onHall(Callback_HallResponse_Void callback_, optional Options options); [Synthetic] callback Callback_HeartRateResponse_Void = void (HeartRateResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.HEART_RATE"] + void onHeartRate(Callback_HeartRateResponse_Void callback_, optional Options options); [Synthetic] callback Callback_HumidityResponse_Void = void (HumidityResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.HUMIDITY"] + void onHumidity(Callback_HumidityResponse_Void callback_, optional Options options); [Synthetic] callback Callback_LinearAccelerometerResponse_Void = void (LinearAccelerometerResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.LINEAR_ACCELEROMETER"] + void onLinearAccelerometer(Callback_LinearAccelerometerResponse_Void callback_, optional Options options); [Synthetic] callback Callback_MagneticFieldResponse_Void = void (MagneticFieldResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.MAGNETIC_FIELD"] + void onMagneticField(Callback_MagneticFieldResponse_Void callback_, optional Options options); [Synthetic] callback Callback_MagneticFieldUncalibratedResponse_Void = void (MagneticFieldUncalibratedResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] + void onMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_, optional Options options); [Synthetic] callback Callback_OrientationResponse_Void = void (OrientationResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.ORIENTATION"] + void onOrientation(Callback_OrientationResponse_Void callback_, optional Options options); + [Throws, DtsName="on", DtsTag="'ORIENTATION'"] + void onORIENTATION(Callback_OrientationResponse_Void callback_, optional Options options); + [Throws, DtsName="on", DtsTag="'orientationChange'"] + void onOrientationChange(Callback_OrientationResponse_Void callback_, optional Options options); [Synthetic] callback Callback_PedometerResponse_Void = void (PedometerResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.PEDOMETER"] + void onPedometer(Callback_PedometerResponse_Void callback_, optional Options options); [Synthetic] callback Callback_PedometerDetectionResponse_Void = void (PedometerDetectionResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.PEDOMETER_DETECTION"] + void onPedometerDetection(Callback_PedometerDetectionResponse_Void callback_, optional Options options); [Synthetic] callback Callback_ProximityResponse_Void = void (ProximityResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.PROXIMITY"] + void onProximity(Callback_ProximityResponse_Void callback_, optional Options options); [Synthetic] callback Callback_RotationVectorResponse_Void = void (RotationVectorResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.ROTATION_VECTOR"] + void onRotationVector(Callback_RotationVectorResponse_Void callback_, optional Options options); [Synthetic] callback Callback_SignificantMotionResponse_Void = void (SignificantMotionResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.SIGNIFICANT_MOTION"] + void onSignificantMotion(Callback_SignificantMotionResponse_Void callback_, optional Options options); [Synthetic] callback Callback_WearDetectionResponse_Void = void (WearDetectionResponse parameter); + [Throws, DtsName="on", DtsTag="SensorId.WEAR_DETECTION"] + void onWearDetection(Callback_WearDetectionResponse_Void callback_, optional Options options); + [Throws, DtsName="once", DtsTag="SensorId.ACCELEROMETER"] + void onceAccelerometer(Callback_AccelerometerResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] + void onceAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.AMBIENT_LIGHT"] + void onceAmbientLight(Callback_LightResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.AMBIENT_TEMPERATURE"] + void onceAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.BAROMETER"] + void onceBarometer(Callback_BarometerResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.GRAVITY"] + void onceGravity(Callback_GravityResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.GYROSCOPE"] + void onceGyroscope(Callback_GyroscopeResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] + void onceGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.HALL"] + void onceHall(Callback_HallResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.HEART_RATE"] + void onceHeartRate(Callback_HeartRateResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.HUMIDITY"] + void onceHumidity(Callback_HumidityResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.LINEAR_ACCELEROMETER"] + void onceLinearAccelerometer(Callback_LinearAccelerometerResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.MAGNETIC_FIELD"] + void onceMagneticField(Callback_MagneticFieldResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] + void onceMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.ORIENTATION"] + void onceOrientation(Callback_OrientationResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.PEDOMETER"] + void oncePedometer(Callback_PedometerResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.PEDOMETER_DETECTION"] + void oncePedometerDetection(Callback_PedometerDetectionResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.PROXIMITY"] + void onceProximity(Callback_ProximityResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.ROTATION_VECTOR"] + void onceRotationVector(Callback_RotationVectorResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.SIGNIFICANT_MOTION"] + void onceSignificantMotion(Callback_SignificantMotionResponse_Void callback_); + [Throws, DtsName="once", DtsTag="SensorId.WEAR_DETECTION"] + void onceWearDetection(Callback_WearDetectionResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.COLOR"] + void offColor(optional Callback_ColorResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.COLOR"] + void offColor(optional SensorInfoParam sensorInfoParam, optional Callback_ColorResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.SAR"] + void offSar(optional Callback_SarResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.SAR"] + void offSar(optional SensorInfoParam sensorInfoParam, optional Callback_SarResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ACCELEROMETER"] + void offAccelerometer(optional Callback_AccelerometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ACCELEROMETER"] + void offAccelerometer(optional SensorInfoParam sensorInfoParam, optional Callback_AccelerometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] + void offAccelerometerUncalibrated(optional Callback_AccelerometerUncalibratedResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] + void offAccelerometerUncalibrated(optional SensorInfoParam sensorInfoParam, optional Callback_AccelerometerUncalibratedResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.AMBIENT_LIGHT"] + void offAmbientLight(optional Callback_LightResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.AMBIENT_LIGHT"] + void offAmbientLight(optional SensorInfoParam sensorInfoParam, optional Callback_LightResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.AMBIENT_TEMPERATURE"] + void offAmbientTemperature(optional Callback_AmbientTemperatureResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.AMBIENT_TEMPERATURE"] + void offAmbientTemperature(optional SensorInfoParam sensorInfoParam, optional Callback_AmbientTemperatureResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.BAROMETER"] + void offBarometer(optional Callback_BarometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.BAROMETER"] + void offBarometer(optional SensorInfoParam sensorInfoParam, optional Callback_BarometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.GRAVITY"] + void offGravity(optional Callback_GravityResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.GRAVITY"] + void offGravity(optional SensorInfoParam sensorInfoParam, optional Callback_GravityResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.GYROSCOPE"] + void offGyroscope(optional Callback_GyroscopeResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.GYROSCOPE"] + void offGyroscope(optional SensorInfoParam sensorInfoParam, optional Callback_GyroscopeResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] + void offGyroscopeUncalibrated(optional Callback_GyroscopeUncalibratedResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] + void offGyroscopeUncalibrated(optional SensorInfoParam sensorInfoParam, optional Callback_GyroscopeUncalibratedResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.HALL"] + void offHall(optional Callback_HallResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.HALL"] + void offHall(optional SensorInfoParam sensorInfoParam, optional Callback_HallResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.HEART_RATE"] + void offHeartRate(optional Callback_HeartRateResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.HEART_RATE"] + void offHeartRate(optional SensorInfoParam sensorInfoParam, optional Callback_HeartRateResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.HUMIDITY"] + void offHumidity(optional Callback_HumidityResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.HUMIDITY"] + void offHumidity(optional SensorInfoParam sensorInfoParam, optional Callback_HumidityResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.LINEAR_ACCELEROMETER"] + void offLinearAccelerometer(optional Callback_LinearAccelerometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.LINEAR_ACCELEROMETER"] + void offLinearAccelerometer(optional SensorInfoParam sensorInfoParam, optional Callback_LinearAccelerometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.MAGNETIC_FIELD"] + void offMagneticField(optional Callback_MagneticFieldResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.MAGNETIC_FIELD"] + void offMagneticField(optional SensorInfoParam sensorInfoParam, optional Callback_MagneticFieldResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] + void offMagneticFieldUncalibrated(optional Callback_MagneticFieldUncalibratedResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] + void offMagneticFieldUncalibrated(optional SensorInfoParam sensorInfoParam, optional Callback_MagneticFieldUncalibratedResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ORIENTATION"] + void offOrientation(optional Callback_OrientationResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ORIENTATION"] + void offOrientation(optional SensorInfoParam sensorInfoParam, optional Callback_OrientationResponse_Void callback_); + [Throws, DtsName="off", DtsTag="'orientationChange'"] + void offOrientationChange(optional Callback_OrientationResponse_Void callback_); + [Throws, DtsName="off", DtsTag="'ORIENTATION'"] + void offORIENTATION(optional Callback_OrientationResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.PEDOMETER"] + void offPedometer(optional Callback_PedometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.PEDOMETER"] + void offPedometer(optional SensorInfoParam sensorInfoParam, optional Callback_PedometerResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.PEDOMETER_DETECTION"] + void offPedometerDetection(optional Callback_PedometerDetectionResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.PEDOMETER_DETECTION"] + void offPedometerDetection(optional SensorInfoParam sensorInfoParam, optional Callback_PedometerDetectionResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.PROXIMITY"] + void offProximity(optional Callback_ProximityResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.PROXIMITY"] + void offProximity(optional SensorInfoParam sensorInfoParam, optional Callback_ProximityResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ROTATION_VECTOR"] + void offRotationVector(optional Callback_RotationVectorResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.ROTATION_VECTOR"] + void offRotationVector(optional SensorInfoParam sensorInfoParam, optional Callback_RotationVectorResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.SIGNIFICANT_MOTION"] + void offSignificantMotion(optional Callback_SignificantMotionResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.SIGNIFICANT_MOTION"] + void offSignificantMotion(optional SensorInfoParam sensorInfoParam, optional Callback_SignificantMotionResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.WEAR_DETECTION"] + void offWearDetection(optional Callback_WearDetectionResponse_Void callback_); + [Throws, DtsName="off", DtsTag="SensorId.WEAR_DETECTION"] + void offWearDetection(optional SensorInfoParam sensorInfoParam, optional Callback_WearDetectionResponse_Void callback_); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER"] + void onSensorTypeIdAccelerometer(Callback_AccelerometerResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED"] + void onSensorTypeIdAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT"] + void onSensorTypeIdAmbientLight(Callback_LightResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE"] + void onSensorTypeIdAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_BAROMETER"] + void onSensorTypeIdBarometer(Callback_BarometerResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_GRAVITY"] + void onSensorTypeIdGravity(Callback_GravityResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE"] + void onSensorTypeIdGyroscope(Callback_GyroscopeResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED"] + void onSensorTypeIdGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_HALL"] + void onSensorTypeIdHall(Callback_HallResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_HEART_RATE"] + void onSensorTypeIdHeartRate(Callback_HeartRateResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_HUMIDITY"] + void onSensorTypeIdHumidity(Callback_HumidityResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION"] + void onSensorTypeIdLinearAcceleration(Callback_LinearAccelerometerResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD"] + void onSensorTypeIdMagneticField(Callback_MagneticFieldResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED"] + void onSensorTypeIdMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ORIENTATION"] + void onSensorTypeIdOrientation(Callback_OrientationResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER"] + void onSensorTypeIdPedometer(Callback_PedometerResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION"] + void onSensorTypeIdPedometerDetection(Callback_PedometerDetectionResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_PROXIMITY"] + void onSensorTypeIdProximity(Callback_ProximityResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR"] + void onSensorTypeIdRotationVector(Callback_RotationVectorResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION"] + void onSensorTypeIdSignificantMotion(Callback_SignificantMotionResponse_Void callback_, optional Options options); + [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_WEAR_DETECTION"] + void onSensorTypeIdWearDetection(Callback_WearDetectionResponse_Void callback_, optional Options options); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER"] + void onceSensorTypeIdAccelerometer(Callback_AccelerometerResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED"] + void onceSensorTypeIdAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT"] + void onceSensorTypeIdAmbientLight(Callback_LightResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE"] + void onceSensorTypeIdAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_BAROMETER"] + void onceSensorTypeIdBarometer(Callback_BarometerResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_GRAVITY"] + void onceSensorTypeIdGravity(Callback_GravityResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE"] + void onceSensorTypeIdGyroscope(Callback_GyroscopeResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED"] + void onceSensorTypeIdGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_HALL"] + void onceSensorTypeIdHall(Callback_HallResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_HEART_RATE"] + void onceSensorTypeIdHeartRate(Callback_HeartRateResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_HUMIDITY"] + void onceSensorTypeIdHumidity(Callback_HumidityResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION"] + void onceSensorTypeIdLinearAcceleration(Callback_LinearAccelerometerResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD"] + void onceSensorTypeIdMagneticField(Callback_MagneticFieldResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED"] + void onceSensorTypeIdMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ORIENTATION"] + void onceSensorTypeIdOrientation(Callback_OrientationResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER"] + void onceSensorTypeIdPedometer(Callback_PedometerResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION"] + void onceSensorTypeIdPedometerDetection(Callback_PedometerDetectionResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_PROXIMITY"] + void onceSensorTypeIdProximity(Callback_ProximityResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR"] + void onceSensorTypeIdRotationVector(Callback_RotationVectorResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION"] + void onceSensorTypeIdSignificantMotion(Callback_SignificantMotionResponse_Void callback_); + [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_WEAR_DETECTION"] + void onceSensorTypeIdWearDetection(Callback_WearDetectionResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER"] + void offSensorTypeIdAccelerometer(optional Callback_AccelerometerResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED"] + void offSensorTypeIdAccelerometerUncalibrated(optional Callback_AccelerometerUncalibratedResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT"] + void offSensorTypeIdAmbientLight(optional Callback_LightResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE"] + void offSensorTypeIdAmbientTemperature(optional Callback_AmbientTemperatureResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_BAROMETER"] + void offSensorTypeIdBarometer(optional Callback_BarometerResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_GRAVITY"] + void offSensorTypeIdGravity(optional Callback_GravityResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE"] + void offSensorTypeIdGyroscope(optional Callback_GyroscopeResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED"] + void offSensorTypeIdGyroscopeUncalibrated(optional Callback_GyroscopeUncalibratedResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_HALL"] + void offSensorTypeIdHall(optional Callback_HallResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_HEART_RATE"] + void offSensorTypeIdHeartRate(optional Callback_HeartRateResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_HUMIDITY"] + void offSensorTypeIdHumidity(optional Callback_HumidityResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION"] + void offSensorTypeIdLinearAcceleration(optional Callback_LinearAccelerometerResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD"] + void offSensorTypeIdMagneticField(optional Callback_MagneticFieldResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED"] + void offSensorTypeIdMagneticFieldUncalibrated(optional Callback_MagneticFieldUncalibratedResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ORIENTATION"] + void offSensorTypeIdOrientation(optional Callback_OrientationResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER"] + void offSensorTypeIdPedometer(optional Callback_PedometerResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION"] + void offSensorTypeIdPedometerDetection(optional Callback_PedometerDetectionResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_PROXIMITY"] + void offSensorTypeIdProximity(optional Callback_ProximityResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR"] + void offSensorTypeIdRotationVector(optional Callback_RotationVectorResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION"] + void offSensorTypeIdSignificantMotion(optional Callback_SignificantMotionResponse_Void callback_); + [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_WEAR_DETECTION"] + void offSensorTypeIdWearDetection(optional Callback_WearDetectionResponse_Void callback_); [Entity=Interface] interface Sensor { - attribute String sensorName; attribute String vendorName; attribute String firmwareVersion; @@ -89,15 +400,35 @@ namespace sensor { attribute number maxSamplePeriod; attribute number precision; attribute number power; - + [Optional] + attribute number sensorIndex; + [Optional] + attribute number deviceId; + [Optional] + attribute String deviceName; + [Optional] + attribute boolean isLocalSensor; }; [Async, Synthetic] callback AsyncCallback_Sensor_Void = void (Sensor result); + [Throws] + void getSingleSensor(SensorId type, AsyncCallback_Sensor_Void callback_); + [Throws] + async Sensor getSingleSensor(SensorId type); + [Throws] + Sensor getSingleSensorSync(SensorId type); + sequence getSingleSensorByDeviceSync(SensorId type, optional number deviceId); [Async, Synthetic] callback AsyncCallback_Array_Sensor_Void = void (sequence result); + [Throws] + void getSensorList(AsyncCallback_Array_Sensor_Void callback_); + [Throws] + async sequence getSensorList(); + [Throws] + sequence getSensorListSync(); + sequence getSensorListByDeviceSync(optional number deviceId); [Entity=Interface] interface GeomagneticResponse { - attribute number x; attribute number y; attribute number z; @@ -105,49 +436,113 @@ namespace sensor { attribute number deflectionAngle; attribute number levelIntensity; attribute number totalIntensity; - }; [Entity=Interface] interface LocationOptions { - attribute number latitude; attribute number longitude; attribute number altitude; - }; [Async, Synthetic] callback AsyncCallback_GeomagneticResponse_Void = void (GeomagneticResponse result); + [Deprecated] + void getGeomagneticField(LocationOptions locationOptions, number timeMillis, AsyncCallback_GeomagneticResponse_Void callback_); + [Deprecated] + async GeomagneticResponse getGeomagneticField(LocationOptions locationOptions, number timeMillis); + [Throws] + void getGeomagneticInfo(LocationOptions locationOptions, number timeMillis, AsyncCallback_GeomagneticResponse_Void callback_); + [Throws] + async GeomagneticResponse getGeomagneticInfo(LocationOptions locationOptions, number timeMillis); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void getAltitude(number seaPressure, number currentPressure, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getAltitude(number seaPressure, number currentPressure); + [Throws] + void getDeviceAltitude(number seaPressure, number currentPressure, AsyncCallback_Number_Void callback_); + [Throws] + async number getDeviceAltitude(number seaPressure, number currentPressure); + [Deprecated] + void getGeomagneticDip(sequence inclinationMatrix, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getGeomagneticDip(sequence inclinationMatrix); + [Throws] + void getInclination(sequence inclinationMatrix, AsyncCallback_Number_Void callback_); + [Throws] + async number getInclination(sequence inclinationMatrix); [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); + [Deprecated] + void getAngleModify(sequence currentRotationMatrix, sequence preRotationMatrix, AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async sequence getAngleModify(sequence currentRotationMatrix, sequence preRotationMatrix); + [Throws] + void getAngleVariation(sequence currentRotationMatrix, sequence preRotationMatrix, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getAngleVariation(sequence currentRotationMatrix, sequence preRotationMatrix); + [Deprecated] + void createRotationMatrix(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async sequence createRotationMatrix(sequence rotationVector); + [Throws] + void getRotationMatrix(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getRotationMatrix(sequence rotationVector); [Entity=Interface] interface CoordinatesOptions { - attribute number x; attribute number y; - }; + [Deprecated] + void transformCoordinateSystem(sequence inRotationVector, CoordinatesOptions coordinates, AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async sequence transformCoordinateSystem(sequence inRotationVector, CoordinatesOptions coordinates); + [Throws] + void transformRotationMatrix(sequence inRotationVector, CoordinatesOptions coordinates, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence transformRotationMatrix(sequence inRotationVector, CoordinatesOptions coordinates); + [Deprecated] + void createQuaternion(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async sequence createQuaternion(sequence rotationVector); + [Throws] + void getQuaternion(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getQuaternion(sequence rotationVector); + [Deprecated] + void getDirection(sequence rotationMatrix, AsyncCallback_Array_Number_Void callback_); + [Deprecated] + async sequence getDirection(sequence rotationMatrix); + [Throws] + void getOrientation(sequence rotationMatrix, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence getOrientation(sequence rotationMatrix); [Entity=Interface] interface RotationMatrixResponse { - attribute sequence rotation; attribute sequence inclination; - }; [Async, Synthetic] callback AsyncCallback_RotationMatrixResponse_Void = void (RotationMatrixResponse result); + [Deprecated] + void createRotationMatrix(sequence gravity, sequence geomagnetic, AsyncCallback_RotationMatrixResponse_Void callback_); + [Deprecated] + async RotationMatrixResponse createRotationMatrix(sequence gravity, sequence geomagnetic); + [Throws] + void getRotationMatrix(sequence gravity, sequence geomagnetic, AsyncCallback_RotationMatrixResponse_Void callback_); + [Throws] + async RotationMatrixResponse getRotationMatrix(sequence gravity, sequence geomagnetic); [Entity=Interface] interface Options { - [Optional] attribute (number or SensorFrequency) interval; - + [Optional] + attribute SensorInfoParam sensorInfoParam; }; typedef String SensorFrequency; [Deprecated] dictionary SensorType { - [Deprecated] number SENSOR_TYPE_ID_ACCELEROMETER = 1; [Deprecated] @@ -190,544 +585,165 @@ namespace sensor { number SENSOR_TYPE_ID_WEAR_DETECTION = 280; [Deprecated] number SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED = 281; - }; dictionary SensorAccuracy { - number ACCURACY_UNRELIABLE = 0; number ACCURACY_LOW = 1; number ACCURACY_MEDIUM = 2; number ACCURACY_HIGH = 3; - }; [Entity=Interface] interface Response { - attribute number timestamp; attribute SensorAccuracy accuracy; - }; [Entity=Interface] interface AccelerometerResponse: Response { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface LinearAccelerometerResponse: Response { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface AccelerometerUncalibratedResponse: Response { - attribute number x; attribute number y; attribute number z; attribute number biasX; attribute number biasY; attribute number biasZ; - }; [Entity=Interface] interface GravityResponse: Response { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface OrientationResponse: Response { - attribute number alpha; attribute number beta; attribute number gamma; - }; [Entity=Interface] interface RotationVectorResponse: Response { - attribute number x; attribute number y; attribute number z; attribute number w; - }; [Entity=Interface] interface GyroscopeResponse: Response { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface GyroscopeUncalibratedResponse: Response { - attribute number x; attribute number y; attribute number z; attribute number biasX; attribute number biasY; attribute number biasZ; - }; [Entity=Interface] interface SignificantMotionResponse: Response { - attribute number scalar; - }; [Entity=Interface] interface ProximityResponse: Response { - attribute number distance; - }; [Entity=Interface] interface LightResponse: Response { - attribute number intensity; [Optional] attribute number colorTemperature; [Optional] attribute number infraredLuminance; - }; [Entity=Interface] interface HallResponse: Response { - attribute number status; - }; [Entity=Interface] interface MagneticFieldResponse: Response { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface MagneticFieldUncalibratedResponse: Response { - attribute number x; attribute number y; attribute number z; attribute number biasX; attribute number biasY; attribute number biasZ; - }; [Entity=Interface] interface PedometerResponse: Response { - attribute number steps; - }; [Entity=Interface] interface HumidityResponse: Response { - attribute number humidity; - }; [Entity=Interface] interface PedometerDetectionResponse: Response { - attribute number scalar; - }; [Entity=Interface] interface AmbientTemperatureResponse: Response { - attribute number temperature; - }; [Entity=Interface] interface BarometerResponse: Response { - attribute number pressure; - }; [Entity=Interface] interface HeartRateResponse: Response { - attribute number heartRate; - }; [Entity=Interface] interface WearDetectionResponse: Response { - attribute number value; - }; [Entity=Interface] interface ColorResponse: Response { - attribute number lightIntensity; attribute number colorTemperature; - }; [Entity=Interface] interface SarResponse: Response { - attribute number absorptionRatio; - - }; - [GlobalScope] - interface GlobalScope_sensor_ohos_sensor { - - [Throws, DtsName="on", DtsTag="SensorId.COLOR"] - static void onColor(Callback_ColorResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.SAR"] - static void onSar(Callback_SarResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.ACCELEROMETER"] - static void onAccelerometer(Callback_AccelerometerResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] - static void onAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.AMBIENT_LIGHT"] - static void onAmbientLight(Callback_LightResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.AMBIENT_TEMPERATURE"] - static void onAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.BAROMETER"] - static void onBarometer(Callback_BarometerResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.GRAVITY"] - static void onGravity(Callback_GravityResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.GYROSCOPE"] - static void onGyroscope(Callback_GyroscopeResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] - static void onGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.HALL"] - static void onHall(Callback_HallResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.HEART_RATE"] - static void onHeartRate(Callback_HeartRateResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.HUMIDITY"] - static void onHumidity(Callback_HumidityResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.LINEAR_ACCELEROMETER"] - static void onLinearAccelerometer(Callback_LinearAccelerometerResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.MAGNETIC_FIELD"] - static void onMagneticField(Callback_MagneticFieldResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] - static void onMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.ORIENTATION"] - static void onOrientation(Callback_OrientationResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.PEDOMETER"] - static void onPedometer(Callback_PedometerResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.PEDOMETER_DETECTION"] - static void onPedometerDetection(Callback_PedometerDetectionResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.PROXIMITY"] - static void onProximity(Callback_ProximityResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.ROTATION_VECTOR"] - static void onRotationVector(Callback_RotationVectorResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.SIGNIFICANT_MOTION"] - static void onSignificantMotion(Callback_SignificantMotionResponse_Void callback_, optional Options options); - [Throws, DtsName="on", DtsTag="SensorId.WEAR_DETECTION"] - static void onWearDetection(Callback_WearDetectionResponse_Void callback_, optional Options options); - [Throws, DtsName="once", DtsTag="SensorId.ACCELEROMETER"] - static void onceAccelerometer(Callback_AccelerometerResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] - static void onceAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.AMBIENT_LIGHT"] - static void onceAmbientLight(Callback_LightResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.AMBIENT_TEMPERATURE"] - static void onceAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.BAROMETER"] - static void onceBarometer(Callback_BarometerResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.GRAVITY"] - static void onceGravity(Callback_GravityResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.GYROSCOPE"] - static void onceGyroscope(Callback_GyroscopeResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] - static void onceGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.HALL"] - static void onceHall(Callback_HallResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.HEART_RATE"] - static void onceHeartRate(Callback_HeartRateResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.HUMIDITY"] - static void onceHumidity(Callback_HumidityResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.LINEAR_ACCELEROMETER"] - static void onceLinearAccelerometer(Callback_LinearAccelerometerResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.MAGNETIC_FIELD"] - static void onceMagneticField(Callback_MagneticFieldResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] - static void onceMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.ORIENTATION"] - static void onceOrientation(Callback_OrientationResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.PEDOMETER"] - static void oncePedometer(Callback_PedometerResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.PEDOMETER_DETECTION"] - static void oncePedometerDetection(Callback_PedometerDetectionResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.PROXIMITY"] - static void onceProximity(Callback_ProximityResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.ROTATION_VECTOR"] - static void onceRotationVector(Callback_RotationVectorResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.SIGNIFICANT_MOTION"] - static void onceSignificantMotion(Callback_SignificantMotionResponse_Void callback_); - [Throws, DtsName="once", DtsTag="SensorId.WEAR_DETECTION"] - static void onceWearDetection(Callback_WearDetectionResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.COLOR"] - static void offColor(optional Callback_ColorResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.SAR"] - static void offSar(optional Callback_SarResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.ACCELEROMETER"] - static void offAccelerometer(optional Callback_AccelerometerResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.ACCELEROMETER_UNCALIBRATED"] - static void offAccelerometerUncalibrated(optional Callback_AccelerometerUncalibratedResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.AMBIENT_LIGHT"] - static void offAmbientLight(optional Callback_LightResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.AMBIENT_TEMPERATURE"] - static void offAmbientTemperature(optional Callback_AmbientTemperatureResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.BAROMETER"] - static void offBarometer(optional Callback_BarometerResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.GRAVITY"] - static void offGravity(optional Callback_GravityResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.GYROSCOPE"] - static void offGyroscope(optional Callback_GyroscopeResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.GYROSCOPE_UNCALIBRATED"] - static void offGyroscopeUncalibrated(optional Callback_GyroscopeUncalibratedResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.HALL"] - static void offHall(optional Callback_HallResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.HEART_RATE"] - static void offHeartRate(optional Callback_HeartRateResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.HUMIDITY"] - static void offHumidity(optional Callback_HumidityResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.LINEAR_ACCELEROMETER"] - static void offLinearAccelerometer(optional Callback_LinearAccelerometerResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.MAGNETIC_FIELD"] - static void offMagneticField(optional Callback_MagneticFieldResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.MAGNETIC_FIELD_UNCALIBRATED"] - static void offMagneticFieldUncalibrated(optional Callback_MagneticFieldUncalibratedResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.ORIENTATION"] - static void offOrientation(optional Callback_OrientationResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.PEDOMETER"] - static void offPedometer(optional Callback_PedometerResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.PEDOMETER_DETECTION"] - static void offPedometerDetection(optional Callback_PedometerDetectionResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.PROXIMITY"] - static void offProximity(optional Callback_ProximityResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.ROTATION_VECTOR"] - static void offRotationVector(optional Callback_RotationVectorResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.SIGNIFICANT_MOTION"] - static void offSignificantMotion(optional Callback_SignificantMotionResponse_Void callback_); - [Throws, DtsName="off", DtsTag="SensorId.WEAR_DETECTION"] - static void offWearDetection(optional Callback_WearDetectionResponse_Void callback_); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER"] - static void onSensorTypeIdAccelerometer(Callback_AccelerometerResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED"] - static void onSensorTypeIdAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT"] - static void onSensorTypeIdAmbientLight(Callback_LightResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE"] - static void onSensorTypeIdAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_BAROMETER"] - static void onSensorTypeIdBarometer(Callback_BarometerResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_GRAVITY"] - static void onSensorTypeIdGravity(Callback_GravityResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE"] - static void onSensorTypeIdGyroscope(Callback_GyroscopeResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED"] - static void onSensorTypeIdGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_HALL"] - static void onSensorTypeIdHall(Callback_HallResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_HEART_RATE"] - static void onSensorTypeIdHeartRate(Callback_HeartRateResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_HUMIDITY"] - static void onSensorTypeIdHumidity(Callback_HumidityResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION"] - static void onSensorTypeIdLinearAcceleration(Callback_LinearAccelerometerResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD"] - static void onSensorTypeIdMagneticField(Callback_MagneticFieldResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED"] - static void onSensorTypeIdMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ORIENTATION"] - static void onSensorTypeIdOrientation(Callback_OrientationResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER"] - static void onSensorTypeIdPedometer(Callback_PedometerResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION"] - static void onSensorTypeIdPedometerDetection(Callback_PedometerDetectionResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_PROXIMITY"] - static void onSensorTypeIdProximity(Callback_ProximityResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR"] - static void onSensorTypeIdRotationVector(Callback_RotationVectorResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION"] - static void onSensorTypeIdSignificantMotion(Callback_SignificantMotionResponse_Void callback_, optional Options options); - [Deprecated, DtsName="on", DtsTag="SensorType.SENSOR_TYPE_ID_WEAR_DETECTION"] - static void onSensorTypeIdWearDetection(Callback_WearDetectionResponse_Void callback_, optional Options options); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER"] - static void onceSensorTypeIdAccelerometer(Callback_AccelerometerResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED"] - static void onceSensorTypeIdAccelerometerUncalibrated(Callback_AccelerometerUncalibratedResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT"] - static void onceSensorTypeIdAmbientLight(Callback_LightResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE"] - static void onceSensorTypeIdAmbientTemperature(Callback_AmbientTemperatureResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_BAROMETER"] - static void onceSensorTypeIdBarometer(Callback_BarometerResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_GRAVITY"] - static void onceSensorTypeIdGravity(Callback_GravityResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE"] - static void onceSensorTypeIdGyroscope(Callback_GyroscopeResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED"] - static void onceSensorTypeIdGyroscopeUncalibrated(Callback_GyroscopeUncalibratedResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_HALL"] - static void onceSensorTypeIdHall(Callback_HallResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_HEART_RATE"] - static void onceSensorTypeIdHeartRate(Callback_HeartRateResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_HUMIDITY"] - static void onceSensorTypeIdHumidity(Callback_HumidityResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION"] - static void onceSensorTypeIdLinearAcceleration(Callback_LinearAccelerometerResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD"] - static void onceSensorTypeIdMagneticField(Callback_MagneticFieldResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED"] - static void onceSensorTypeIdMagneticFieldUncalibrated(Callback_MagneticFieldUncalibratedResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ORIENTATION"] - static void onceSensorTypeIdOrientation(Callback_OrientationResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER"] - static void onceSensorTypeIdPedometer(Callback_PedometerResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION"] - static void onceSensorTypeIdPedometerDetection(Callback_PedometerDetectionResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_PROXIMITY"] - static void onceSensorTypeIdProximity(Callback_ProximityResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR"] - static void onceSensorTypeIdRotationVector(Callback_RotationVectorResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION"] - static void onceSensorTypeIdSignificantMotion(Callback_SignificantMotionResponse_Void callback_); - [Deprecated, DtsName="once", DtsTag="SensorType.SENSOR_TYPE_ID_WEAR_DETECTION"] - static void onceSensorTypeIdWearDetection(Callback_WearDetectionResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER"] - static void offSensorTypeIdAccelerometer(optional Callback_AccelerometerResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED"] - static void offSensorTypeIdAccelerometerUncalibrated(optional Callback_AccelerometerUncalibratedResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT"] - static void offSensorTypeIdAmbientLight(optional Callback_LightResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE"] - static void offSensorTypeIdAmbientTemperature(optional Callback_AmbientTemperatureResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_BAROMETER"] - static void offSensorTypeIdBarometer(optional Callback_BarometerResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_GRAVITY"] - static void offSensorTypeIdGravity(optional Callback_GravityResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE"] - static void offSensorTypeIdGyroscope(optional Callback_GyroscopeResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED"] - static void offSensorTypeIdGyroscopeUncalibrated(optional Callback_GyroscopeUncalibratedResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_HALL"] - static void offSensorTypeIdHall(optional Callback_HallResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_HEART_RATE"] - static void offSensorTypeIdHeartRate(optional Callback_HeartRateResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_HUMIDITY"] - static void offSensorTypeIdHumidity(optional Callback_HumidityResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION"] - static void offSensorTypeIdLinearAcceleration(optional Callback_LinearAccelerometerResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD"] - static void offSensorTypeIdMagneticField(optional Callback_MagneticFieldResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED"] - static void offSensorTypeIdMagneticFieldUncalibrated(optional Callback_MagneticFieldUncalibratedResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ORIENTATION"] - static void offSensorTypeIdOrientation(optional Callback_OrientationResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER"] - static void offSensorTypeIdPedometer(optional Callback_PedometerResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION"] - static void offSensorTypeIdPedometerDetection(optional Callback_PedometerDetectionResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_PROXIMITY"] - static void offSensorTypeIdProximity(optional Callback_ProximityResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR"] - static void offSensorTypeIdRotationVector(optional Callback_RotationVectorResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION"] - static void offSensorTypeIdSignificantMotion(optional Callback_SignificantMotionResponse_Void callback_); - [Deprecated, DtsName="off", DtsTag="SensorType.SENSOR_TYPE_ID_WEAR_DETECTION"] - static void offSensorTypeIdWearDetection(optional Callback_WearDetectionResponse_Void callback_); - [Throws] - static void getSingleSensor(SensorId type, AsyncCallback_Sensor_Void callback_); - [Throws] - static async Sensor getSingleSensor(SensorId type); - [Throws] - static Sensor getSingleSensorSync(SensorId type); - [Throws] - static void getSensorList(AsyncCallback_Array_Sensor_Void callback_); - [Throws] - static async sequence getSensorList(); - [Throws] - static sequence getSensorListSync(); - [Deprecated] - static void getGeomagneticField(LocationOptions locationOptions, number timeMillis, AsyncCallback_GeomagneticResponse_Void callback_); - [Deprecated] - static async GeomagneticResponse getGeomagneticField(LocationOptions locationOptions, number timeMillis); - [Throws] - static void getGeomagneticInfo(LocationOptions locationOptions, number timeMillis, AsyncCallback_GeomagneticResponse_Void callback_); - [Throws] - static async GeomagneticResponse getGeomagneticInfo(LocationOptions locationOptions, number timeMillis); - [Deprecated] - static void getAltitude(number seaPressure, number currentPressure, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getAltitude(number seaPressure, number currentPressure); - [Throws] - static void getDeviceAltitude(number seaPressure, number currentPressure, AsyncCallback_Number_Void callback_); - [Throws] - static async number getDeviceAltitude(number seaPressure, number currentPressure); - [Deprecated] - static void getGeomagneticDip(sequence inclinationMatrix, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getGeomagneticDip(sequence inclinationMatrix); - [Throws] - static void getInclination(sequence inclinationMatrix, AsyncCallback_Number_Void callback_); - [Throws] - static async number getInclination(sequence inclinationMatrix); - [Deprecated] - static void getAngleModify(sequence currentRotationMatrix, sequence preRotationMatrix, AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async sequence getAngleModify(sequence currentRotationMatrix, sequence preRotationMatrix); - [Throws] - static void getAngleVariation(sequence currentRotationMatrix, sequence preRotationMatrix, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getAngleVariation(sequence currentRotationMatrix, sequence preRotationMatrix); - [Deprecated] - static void createRotationMatrix(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async sequence createRotationMatrix(sequence rotationVector); - [Throws] - static void getRotationMatrix(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getRotationMatrix(sequence rotationVector); - [Deprecated] - static void transformCoordinateSystem(sequence inRotationVector, CoordinatesOptions coordinates, AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async sequence transformCoordinateSystem(sequence inRotationVector, CoordinatesOptions coordinates); - [Throws] - static void transformRotationMatrix(sequence inRotationVector, CoordinatesOptions coordinates, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence transformRotationMatrix(sequence inRotationVector, CoordinatesOptions coordinates); - [Deprecated] - static void createQuaternion(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async sequence createQuaternion(sequence rotationVector); - [Throws] - static void getQuaternion(sequence rotationVector, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getQuaternion(sequence rotationVector); - [Deprecated] - static void getDirection(sequence rotationMatrix, AsyncCallback_Array_Number_Void callback_); - [Deprecated] - static async sequence getDirection(sequence rotationMatrix); - [Throws] - static void getOrientation(sequence rotationMatrix, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence getOrientation(sequence rotationMatrix); - [Deprecated] - static void createRotationMatrix(sequence gravity, sequence geomagnetic, AsyncCallback_RotationMatrixResponse_Void callback_); - [Deprecated] - static async RotationMatrixResponse createRotationMatrix(sequence gravity, sequence geomagnetic); - [Throws] - static void getRotationMatrix(sequence gravity, sequence geomagnetic, AsyncCallback_RotationMatrixResponse_Void callback_); - [Throws] - static async RotationMatrixResponse getRotationMatrix(sequence gravity, sequence geomagnetic); - - }; - + }; + [Synthetic] + callback Callback_SensorStatusEvent_Void = void (SensorStatusEvent parameter); + [Throws, DtsName="on", DtsTag="'sensorStatusChange'"] + void onSensorStatusChange(Callback_SensorStatusEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'sensorStatusChange'"] + void offSensorStatusChange(optional Callback_SensorStatusEvent_Void callback_); + [Entity=Interface] + interface SensorStatusEvent { + attribute number timestamp; + attribute number sensorId; + attribute number sensorIndex; + attribute boolean isSensorOnline; + attribute number deviceId; + attribute String deviceName; + }; + [Entity=Interface] + interface SensorInfoParam { + [Optional] + attribute number deviceId; + [Optional] + attribute number sensorIndex; + }; }; \ No newline at end of file diff --git a/idl/@ohos.settings.idl b/idl/@ohos.settings.idl index ef8b89b..6e35c5f 100644 --- a/idl/@ohos.settings.idl +++ b/idl/@ohos.settings.idl @@ -1,98 +1,72 @@ -package ohos; +package ohos.settings; import ohos.base.AsyncCallback as AsyncCallback; import ability.dataAbilityHelper.DataAbilityHelper as DataAbilityHelper; -import application.Context as Context; +import application.Context.default as Context; +[DefaultExport] namespace settings { - namespace domainName { - - }; namespace date { - - }; namespace display { - - }; namespace general { - - }; namespace input { - - }; namespace network { - - }; namespace phone { - - }; namespace sound { - - }; namespace TTS { - - }; namespace wireless { - - }; [Async, Synthetic] callback AsyncCallback_Object_Void = void (Object result); + [Deprecated] + void getURI(String name, AsyncCallback_Object_Void callback_); + [Deprecated] + async Object getURI(String name); + [Deprecated] + void getValue(DataAbilityHelper dataAbilityHelper, String name, AsyncCallback_Object_Void callback_); + [Deprecated] + async Object getValue(DataAbilityHelper dataAbilityHelper, String name); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + void getValue(Context context, String name, AsyncCallback_String_Void callback_); + async String getValue(Context context, String name); + async String getValue(Context context, String name, String domainName); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void setValue(DataAbilityHelper dataAbilityHelper, String name, Object value, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean setValue(DataAbilityHelper dataAbilityHelper, String name, Object value); + void setValue(Context context, String name, String value, AsyncCallback_Boolean_Void callback_); + async boolean setValue(Context context, String name, String value); + [Throws] + async boolean setValue(Context context, String name, String value, String domainName); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_settings_ohos_settings { - - [Deprecated] - static void getURI(String name, AsyncCallback_Object_Void callback_); - [Deprecated] - static async Object getURI(String name); - [Deprecated] - static void getValue(DataAbilityHelper dataAbilityHelper, String name, AsyncCallback_Object_Void callback_); - [Deprecated] - static async Object getValue(DataAbilityHelper dataAbilityHelper, String name); - static void getValue(Context context, String name, AsyncCallback_String_Void callback_); - static async String getValue(Context context, String name); - static async String getValue(Context context, String name, String domainName); - [Deprecated] - static void setValue(DataAbilityHelper dataAbilityHelper, String name, Object value, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean setValue(DataAbilityHelper dataAbilityHelper, String name, Object value); - static void setValue(Context context, String name, String value, AsyncCallback_Boolean_Void callback_); - static async boolean setValue(Context context, String name, String value); - [Throws] - static async boolean setValue(Context context, String name, String value, String domainName); - static void enableAirplaneMode(boolean enable, AsyncCallback_Void callback_); - static async void enableAirplaneMode(boolean enable); - static void canShowFloating(AsyncCallback_Boolean_Void callback_); - static async boolean canShowFloating(); - static String getUriSync(String name); - [Deprecated] - static String getValueSync(DataAbilityHelper dataAbilityHelper, String name, String defValue); - static String getValueSync(Context context, String name, String defValue); - static String getValueSync(Context context, String name, String defValue, String domainName); - [Deprecated] - static boolean setValueSync(DataAbilityHelper dataAbilityHelper, String name, String value); - static boolean setValueSync(Context context, String name, String value); - [Throws] - static boolean setValueSync(Context context, String name, String value, String domainName); - static boolean registerKeyObserver(Context context, String name, String domainName, AsyncCallback_Void observer); - static boolean unregisterKeyObserver(Context context, String name, String domainName); - [Throws] - static async boolean openNetworkManagerSettings(Context context); - - }; - + void enableAirplaneMode(boolean enable, AsyncCallback_Void callback_); + async void enableAirplaneMode(boolean enable); + void canShowFloating(AsyncCallback_Boolean_Void callback_); + async boolean canShowFloating(); + String getUriSync(String name); + [Deprecated] + String getValueSync(DataAbilityHelper dataAbilityHelper, String name, String defValue); + String getValueSync(Context context, String name, String defValue); + String getValueSync(Context context, String name, String defValue, String domainName); + [Deprecated] + boolean setValueSync(DataAbilityHelper dataAbilityHelper, String name, String value); + boolean setValueSync(Context context, String name, String value); + [Throws] + boolean setValueSync(Context context, String name, String value, String domainName); + boolean registerKeyObserver(Context context, String name, String domainName, AsyncCallback_Void observer); + boolean unregisterKeyObserver(Context context, String name, String domainName); + [Throws] + async boolean openNetworkManagerSettings(Context context); }; \ No newline at end of file diff --git a/idl/@ohos.statfs.idl b/idl/@ohos.statfs.idl index c2472e6..9d0ebcc 100644 --- a/idl/@ohos.statfs.idl +++ b/idl/@ohos.statfs.idl @@ -1,21 +1,15 @@ -package ohos; +package ohos.statfs; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace Statfs { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); - [GlobalScope] - interface GlobalScope_Statfs_ohos_statfs { - - [Deprecated] - static void getFreeBytes(String path, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getFreeBytes(String path); - [Deprecated] - static void getTotalBytes(String path, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getTotalBytes(String path); - - }; - + [Deprecated] + void getFreeBytes(String path, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getFreeBytes(String path); + [Deprecated] + void getTotalBytes(String path, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getTotalBytes(String path); }; \ No newline at end of file diff --git a/idl/@ohos.stationary.idl b/idl/@ohos.stationary.idl index 17de73c..3838b9f 100644 --- a/idl/@ohos.stationary.idl +++ b/idl/@ohos.stationary.idl @@ -1,36 +1,24 @@ -package ohos; +package ohos.stationary; import ohos.base.Callback as Callback; +[DefaultExport] namespace stationary { - [Entity=Interface] interface ActivityResponse { - attribute ActivityState state; - }; typedef String ActivityType; dictionary ActivityEvent { - number ENTER = 1; number EXIT = 2; number ENTER_EXIT = 3; - }; dictionary ActivityState { - number ENTER = 1; number EXIT = 2; - }; [Synthetic] callback Callback_ActivityResponse_Void = void (ActivityResponse parameter); - [GlobalScope] - interface GlobalScope_stationary_ohos_stationary { - - static void on(ActivityType activity, ActivityEvent event, number reportLatencyNs, Callback_ActivityResponse_Void callback_); - static void once(ActivityType activity, Callback_ActivityResponse_Void callback_); - static void off(ActivityType activity, ActivityEvent event, optional Callback_ActivityResponse_Void callback_); - - }; - + void on(ActivityType activity, ActivityEvent event, number reportLatencyNs, Callback_ActivityResponse_Void callback_); + void once(ActivityType activity, Callback_ActivityResponse_Void callback_); + void off(ActivityType activity, ActivityEvent event, optional Callback_ActivityResponse_Void callback_); }; \ No newline at end of file diff --git a/idl/@ohos.systemCapability.idl b/idl/@ohos.systemCapability.idl index 58d3e21..be69dd4 100644 --- a/idl/@ohos.systemCapability.idl +++ b/idl/@ohos.systemCapability.idl @@ -1,16 +1,10 @@ -package ohos; +package ohos.systemCapability; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace systemCapability { - [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_systemCapability_ohos_systemCapability { - - static void querySystemCapabilities(AsyncCallback_String_Void callback_); - static async String querySystemCapabilities(); - - }; - + void querySystemCapabilities(AsyncCallback_String_Void callback_); + async String querySystemCapabilities(); }; \ No newline at end of file diff --git a/idl/@ohos.systemDateTime.idl b/idl/@ohos.systemDateTime.idl index de43df6..096b377 100644 --- a/idl/@ohos.systemDateTime.idl +++ b/idl/@ohos.systemDateTime.idl @@ -1,71 +1,63 @@ -package ohos; +package ohos.systemDateTime; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace systemDateTime { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setTime(number time, AsyncCallback_Void callback_); + [Throws] + async void setTime(number time); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated, Throws] + void getCurrentTime(boolean isNano, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void getCurrentTime(AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number getCurrentTime(optional boolean isNano); + number getTime(optional boolean isNanoseconds); + [Deprecated, Throws] + void getRealActiveTime(boolean isNano, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void getRealActiveTime(AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number getRealActiveTime(optional boolean isNano); + [Deprecated, Throws] + void getRealTime(boolean isNano, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void getRealTime(AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number getRealTime(optional boolean isNano); dictionary TimeType { - number STARTUP = 0; number ACTIVE = 1; - }; + [Throws] + number getUptime(TimeType timeType, optional boolean isNanoseconds); + [Deprecated, Throws] + void setDate(date date, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void setDate(date date); [Async, Synthetic] - callback AsyncCallback_Date_Void = void (Date result); + callback AsyncCallback_Date_Void = void (date result); + [Deprecated, Throws] + void getDate(AsyncCallback_Date_Void callback_); + [Deprecated, Throws] + async date getDate(); + [Throws] + void setTimezone(String timezone, AsyncCallback_Void callback_); + [Throws] + async void setTimezone(String timezone); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_systemDateTime_ohos_systemDateTime { - - [Throws] - static void setTime(number time, AsyncCallback_Void callback_); - [Throws] - static async void setTime(number time); - [Deprecated, Throws] - static void getCurrentTime(boolean isNano, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void getCurrentTime(AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static async number getCurrentTime(optional boolean isNano); - static number getTime(optional boolean isNanoseconds); - [Deprecated, Throws] - static void getRealActiveTime(boolean isNano, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void getRealActiveTime(AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static async number getRealActiveTime(optional boolean isNano); - [Deprecated, Throws] - static void getRealTime(boolean isNano, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void getRealTime(AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static async number getRealTime(optional boolean isNano); - [Throws] - static number getUptime(TimeType timeType, optional boolean isNanoseconds); - [Deprecated, Throws] - static void setDate(Date date, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void setDate(Date date); - [Deprecated, Throws] - static void getDate(AsyncCallback_Date_Void callback_); - [Deprecated, Throws] - static async Date getDate(); - [Throws] - static void setTimezone(String timezone, AsyncCallback_Void callback_); - [Throws] - static async void setTimezone(String timezone); - [Throws] - static void getTimezone(AsyncCallback_String_Void callback_); - [Throws] - static async String getTimezone(); - static String getTimezoneSync(); - [Throws] - static async void updateNtpTime(); - [Throws] - static number getNtpTime(); - - }; - + [Throws] + void getTimezone(AsyncCallback_String_Void callback_); + [Throws] + async String getTimezone(); + String getTimezoneSync(); + [Throws] + async void updateNtpTime(); + [Throws] + number getNtpTime(); }; \ No newline at end of file diff --git a/idl/@ohos.systemParameterEnhance.idl b/idl/@ohos.systemParameterEnhance.idl index 32714f2..d3eda3e 100644 --- a/idl/@ohos.systemParameterEnhance.idl +++ b/idl/@ohos.systemParameterEnhance.idl @@ -1,30 +1,24 @@ -package ohos; +package ohos.systemParameterEnhance; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; +[DefaultExport] namespace systemParameterEnhance { - + [Throws] + String getSync(String key, optional String def); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void get(String key, AsyncCallback_String_Void callback_); + [Throws] + void get(String key, String def, AsyncCallback_String_Void callback_); + [Throws] + async String get(String key, optional String def); + [Throws] + void setSync(String key, String value); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_systemParameterEnhance_ohos_systemParameterEnhance { - - [Throws] - static String getSync(String key, optional String def); - [Throws] - static void get(String key, AsyncCallback_String_Void callback_); - [Throws] - static void get(String key, String def, AsyncCallback_String_Void callback_); - [Throws] - static async String get(String key, optional String def); - [Throws] - static void setSync(String key, String value); - [Throws] - static void set(String key, String value, AsyncCallback_Void callback_); - [Throws] - static async void set(String key, String value); - - }; - + [Throws] + void set(String key, String value, AsyncCallback_Void callback_); + [Throws] + async void set(String key, String value); }; \ No newline at end of file diff --git a/idl/@ohos.systemTime.idl b/idl/@ohos.systemTime.idl index 3565cf3..f2a00a3 100644 --- a/idl/@ohos.systemTime.idl +++ b/idl/@ohos.systemTime.idl @@ -1,57 +1,51 @@ -package ohos; +package ohos.systemTime; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace systemTime { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated, Throws] + void setTime(number time, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void setTime(number time); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated, Throws] + void getCurrentTime(boolean isNano, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void getCurrentTime(AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number getCurrentTime(optional boolean isNano); + [Deprecated, Throws] + void getRealActiveTime(boolean isNano, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void getRealActiveTime(AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number getRealActiveTime(optional boolean isNano); + [Deprecated, Throws] + void getRealTime(boolean isNano, AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + void getRealTime(AsyncCallback_Number_Void callback_); + [Deprecated, Throws] + async number getRealTime(optional boolean isNano); + [Deprecated, Throws] + void setDate(date date, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void setDate(date date); [Async, Synthetic] - callback AsyncCallback_Date_Void = void (Date result); + callback AsyncCallback_Date_Void = void (date result); + [Deprecated, Throws] + void getDate(AsyncCallback_Date_Void callback_); + [Deprecated, Throws] + async date getDate(); + [Deprecated, Throws] + void setTimezone(String timezone, AsyncCallback_Void callback_); + [Deprecated, Throws] + async void setTimezone(String timezone); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); - [GlobalScope] - interface GlobalScope_systemTime_ohos_systemTime { - - [Deprecated, Throws] - static void setTime(number time, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void setTime(number time); - [Deprecated, Throws] - static void getCurrentTime(boolean isNano, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void getCurrentTime(AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static async number getCurrentTime(optional boolean isNano); - [Deprecated, Throws] - static void getRealActiveTime(boolean isNano, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void getRealActiveTime(AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static async number getRealActiveTime(optional boolean isNano); - [Deprecated, Throws] - static void getRealTime(boolean isNano, AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static void getRealTime(AsyncCallback_Number_Void callback_); - [Deprecated, Throws] - static async number getRealTime(optional boolean isNano); - [Deprecated, Throws] - static void setDate(Date date, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void setDate(Date date); - [Deprecated, Throws] - static void getDate(AsyncCallback_Date_Void callback_); - [Deprecated, Throws] - static async Date getDate(); - [Deprecated, Throws] - static void setTimezone(String timezone, AsyncCallback_Void callback_); - [Deprecated, Throws] - static async void setTimezone(String timezone); - [Deprecated, Throws] - static void getTimezone(AsyncCallback_String_Void callback_); - [Deprecated, Throws] - static async String getTimezone(); - - }; - + [Deprecated, Throws] + void getTimezone(AsyncCallback_String_Void callback_); + [Deprecated, Throws] + async String getTimezone(); }; \ No newline at end of file diff --git a/idl/@ohos.systemTimer.idl b/idl/@ohos.systemTimer.idl index d235a4f..6873147 100644 --- a/idl/@ohos.systemTimer.idl +++ b/idl/@ohos.systemTimer.idl @@ -1,17 +1,32 @@ -package ohos; +package ohos.systemTimer; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.WantAgent as WantAgent; +import ohos.app.ability.wantAgent.WantAgent as WantAgent; +[DefaultExport] namespace systemTimer { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void createTimer(TimerOptions options, AsyncCallback_Number_Void callback_); + [Throws] + async number createTimer(TimerOptions options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void startTimer(number timer, number triggerTime, AsyncCallback_Void callback_); + [Throws] + async void startTimer(number timer, number triggerTime); + [Throws] + void stopTimer(number timer, AsyncCallback_Void callback_); + [Throws] + async void stopTimer(number timer); + [Throws] + void destroyTimer(number timer, AsyncCallback_Void callback_); + [Throws] + async void destroyTimer(number timer); [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface TimerOptions { - attribute number type; attribute boolean repeat; [Optional] @@ -24,28 +39,5 @@ namespace systemTimer { attribute boolean autoRestore; [Optional] attribute String name; - }; - [GlobalScope] - interface GlobalScope_systemTimer_ohos_systemTimer { - - [Throws] - static void createTimer(TimerOptions options, AsyncCallback_Number_Void callback_); - [Throws] - static async number createTimer(TimerOptions options); - [Throws] - static void startTimer(number timer, number triggerTime, AsyncCallback_Void callback_); - [Throws] - static async void startTimer(number timer, number triggerTime); - [Throws] - static void stopTimer(number timer, AsyncCallback_Void callback_); - [Throws] - static async void stopTimer(number timer); - [Throws] - static void destroyTimer(number timer, AsyncCallback_Void callback_); - [Throws] - static async void destroyTimer(number timer); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.systemparameter.idl b/idl/@ohos.systemparameter.idl index 5091b0e..e7a6146 100644 --- a/idl/@ohos.systemparameter.idl +++ b/idl/@ohos.systemparameter.idl @@ -1,29 +1,24 @@ -package ohos; +package ohos.systemparameter; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; +[DefaultExport] namespace systemParameter { - + [Deprecated] + String getSync(String key, optional String def); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Deprecated] + void get(String key, AsyncCallback_String_Void callback_); + [Deprecated] + void get(String key, String def, AsyncCallback_String_Void callback_); + [Deprecated] + async String get(String key, optional String def); + [Deprecated] + void setSync(String key, String value); [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_systemParameter_ohos_systemparameter { - - [Deprecated] - static String getSync(String key, optional String def); - [Deprecated] - static void get(String key, AsyncCallback_String_Void callback_); - [Deprecated] - static void get(String key, String def, AsyncCallback_String_Void callback_); - [Deprecated] - static async String get(String key, optional String def); - static void setSync(String key, String value); - [Deprecated] - static void set(String key, String value, AsyncCallback_Void callback_); - [Deprecated] - static async void set(String key, String value); - - }; - + [Deprecated] + void set(String key, String value, AsyncCallback_Void callback_); + [Deprecated] + async void set(String key, String value); }; \ No newline at end of file diff --git a/idl/@ohos.taskpool.idl b/idl/@ohos.taskpool.idl index 0420cf9..653a06c 100644 --- a/idl/@ohos.taskpool.idl +++ b/idl/@ohos.taskpool.idl @@ -1,19 +1,16 @@ -package ohos; +package ohos.taskpool; +[DefaultExport] namespace taskpool { - dictionary Priority { - number HIGH = 0; number MEDIUM = 1; number LOW = 2; number IDLE = 3; - }; callback CallbackFunction = void (); callback CallbackFunctionWithError = void (Error e); [Entity=Class] interface Task { - constructor(Function func, sequence... args); constructor(String name, Function func, sequence... args); attribute Function function; @@ -46,11 +43,9 @@ namespace taskpool { [Throws] void onExecutionSucceeded(CallbackFunction callback_); boolean isDone(); - }; [Entity=Class] interface TaskGroup { - constructor(); constructor(String name); attribute String name; @@ -58,107 +53,91 @@ namespace taskpool { void addTask(Function func, sequence... args); [Throws] void addTask(Task task); - }; [Entity=Class] interface SequenceRunner { - constructor(optional Priority priority); constructor(String name, optional Priority priority); [Throws] async Object execute(Task task); - }; [Entity=Class] - interface LongTask: Task { - - + interface LongTask: [Extends] Task { }; [Synthetic] callback Callback_A_Promise_R = Promise (A... args); - [Entity=Class, TypeParameters="A extends Array,R"] - interface GenericsTask: Task { - + [Entity=Class, TypeParameters="A,R"] + interface GenericsTask: [Extends] Task { constructor(Callback_A_Promise_R func, A... args); constructor(String name, Callback_A_Promise_R func, A... args); - }; dictionary State { - number WAITING = 1; number RUNNING = 2; number CANCELED = 3; - }; [Entity=Class] interface TaskInfo { - attribute number taskId; attribute State state; [Optional] attribute number duration; attribute String name; - }; [Entity=Class] interface ThreadInfo { - attribute number tid; [Optional] attribute sequence taskIds; [Optional] attribute Priority priority; - }; [Entity=Class] interface TaskPoolInfo { - attribute sequence threadInfos; attribute sequence taskInfos; - }; + [Throws] + async Object execute(Function func, sequence... args); + [Throws, TypeParameters="A,R"] + async R execute(Callback_A_Promise_R func, A... args); + [Throws] + async Object execute(Task task, optional Priority priority); + [Throws, TypeParameters="A,R"] + async R execute([TypeArguments="A,R"] GenericsTask task, optional Priority priority); + [Throws] + async sequence execute(TaskGroup group, optional Priority priority); + [Throws] + async Object executeDelayed(number delayTime, Task task, optional Priority priority); + [Throws, TypeParameters="A,R"] + async R executeDelayed(number delayTime, [TypeArguments="A,R"] GenericsTask task, optional Priority priority); + [Throws] + void executePeriodically(number period, Task task, optional Priority priority); + [Throws, TypeParameters="A,R"] + void executePeriodically(number period, [TypeArguments="A,R"] GenericsTask task, optional Priority priority); + [Throws] + void cancel(Task task); + [Throws] + void cancel(TaskGroup group); + [Throws] + void cancel(number taskId); + TaskPoolInfo getTaskPoolInfo(); + [Throws] + void terminateTask(LongTask longTask); + [Throws] + boolean isConcurrent(Function func); [Entity=Class] interface AsyncRunner { - constructor(number runningCapacity, optional number waitingCapacity); constructor(String name, number runningCapacity, optional number waitingCapacity); [Throws] async Object execute(Task task, optional Priority priority); - }; - [GlobalScope] - interface GlobalScope_taskpool_ohos_taskpool { - - [Throws] - static async Object execute(Function func, sequence... args); - [Throws, TypeParameters="A extends Array,R"] - static async R execute(Callback_A_Promise_R func, A... args); - [Throws] - static async Object execute(Task task, optional Priority priority); - [Throws, TypeParameters="A extends Array,R"] - static async R execute([TypeArguments="A,R"] GenericsTask task, optional Priority priority); - [Throws] - static async sequence execute(TaskGroup group, optional Priority priority); - [Throws] - static async Object executeDelayed(number delayTime, Task task, optional Priority priority); - [Throws, TypeParameters="A extends Array,R"] - static async R executeDelayed(number delayTime, [TypeArguments="A,R"] GenericsTask task, optional Priority priority); - [Throws] - static void executePeriodically(number period, Task task, optional Priority priority); - [Throws, TypeParameters="A extends Array,R"] - static void executePeriodically(number period, [TypeArguments="A,R"] GenericsTask task, optional Priority priority); - [Throws] - static void cancel(Task task); - [Throws] - static void cancel(TaskGroup group); - [Throws] - static void cancel(number taskId); - static TaskPoolInfo getTaskPoolInfo(); - [Throws] - static void terminateTask(LongTask longTask); - [Throws] - static boolean isConcurrent(Function func); - + [Entity=Interface] + interface TaskResult { + [Optional] + attribute Object result; + [Optional] + attribute (Error or Object) error; }; - }; \ No newline at end of file diff --git a/idl/@ohos.telephony.call.idl b/idl/@ohos.telephony.call.idl index 13335e7..9858aba 100644 --- a/idl/@ohos.telephony.call.idl +++ b/idl/@ohos.telephony.call.idl @@ -1,94 +1,350 @@ -package ohos.telephony; +package ohos.telephony.call; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import application.Context as Context; -import ohos.multimedia.image as image; +import application.BaseContext.default as Context; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace call { - [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void dial(String phoneNumber, DialOptions options, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean dial(String phoneNumber, optional DialOptions options); + [Deprecated] + void dial(String phoneNumber, AsyncCallback_Boolean_Void callback_); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void dialCall(String phoneNumber, DialCallOptions options, AsyncCallback_Void callback_); + [Throws] + async void dialCall(String phoneNumber, optional DialCallOptions options); + [Throws] + void dialCall(String phoneNumber, AsyncCallback_Void callback_); + [Throws] + void makeCall(String phoneNumber, AsyncCallback_Void callback_); + [Throws] + async void makeCall(String phoneNumber); + [Throws] + async void makeCall(Context context, String phoneNumber); + void hasCall(AsyncCallback_Boolean_Void callback_); + async boolean hasCall(); + boolean hasCallSync(); [Async, Synthetic] callback AsyncCallback_CallState_Void = void (CallState result); + void getCallState(AsyncCallback_CallState_Void callback_); + async CallState getCallState(); + CallState getCallStateSync(); + [Throws] + void muteRinger(AsyncCallback_Void callback_); + [Throws] + async void muteRinger(); + boolean hasVoiceCapability(); + [Throws] + void isEmergencyPhoneNumber(String phoneNumber, EmergencyNumberOptions options, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isEmergencyPhoneNumber(String phoneNumber, optional EmergencyNumberOptions options); + [Throws] + void isEmergencyPhoneNumber(String phoneNumber, AsyncCallback_Boolean_Void callback_); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void formatPhoneNumber(String phoneNumber, NumberFormatOptions options, AsyncCallback_String_Void callback_); + [Throws] + async String formatPhoneNumber(String phoneNumber, optional NumberFormatOptions options); + [Throws] + void formatPhoneNumber(String phoneNumber, AsyncCallback_String_Void callback_); + [Throws] + void formatPhoneNumberToE164(String phoneNumber, String countryCode, AsyncCallback_String_Void callback_); + [Throws] + async String formatPhoneNumberToE164(String phoneNumber, String countryCode); + [Throws] + void answerCall(number callId, AsyncCallback_Void callback_); + [Throws] + async void answerCall(optional number callId); + [Throws] + void answerCall(AsyncCallback_Void callback_); + [Throws] + async void answerCall(VideoStateType videoState, number callId); + [Throws] + void hangUpCall(number callId, AsyncCallback_Void callback_); + [Throws] + async void hangUpCall(optional number callId); + [Throws] + void hangUpCall(AsyncCallback_Void callback_); + [Throws] + void rejectCall(number callId, RejectMessageOptions options, AsyncCallback_Void callback_); + [Throws] + async void rejectCall(optional number callId, optional RejectMessageOptions options); + [Throws] + void rejectCall(number callId, AsyncCallback_Void callback_); + [Throws] + void rejectCall(AsyncCallback_Void callback_); + [Throws] + void rejectCall(RejectMessageOptions options, AsyncCallback_Void callback_); + [Throws] + void holdCall(number callId, AsyncCallback_Void callback_); + [Throws] + async void holdCall(number callId); + [Throws] + void unHoldCall(number callId, AsyncCallback_Void callback_); + [Throws] + async void unHoldCall(number callId); + [Throws] + void switchCall(number callId, AsyncCallback_Void callback_); + [Throws] + async void switchCall(number callId); + [Throws] + void combineConference(number callId, AsyncCallback_Void callback_); + [Throws] + async void combineConference(number callId); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getMainCallId(number callId, AsyncCallback_Number_Void callback_); + [Throws] + async number getMainCallId(number callId); [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void getSubCallIdList(number callId, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getSubCallIdList(number callId); + [Throws] + void getCallIdListForConference(number callId, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence getCallIdListForConference(number callId); [Async, Synthetic] callback AsyncCallback_CallWaitingStatus_Void = void (CallWaitingStatus result); + [Throws] + void getCallWaitingStatus(number slotId, AsyncCallback_CallWaitingStatus_Void callback_); + [Throws] + async CallWaitingStatus getCallWaitingStatus(number slotId); + [Throws] + void setCallWaiting(number slotId, boolean activate, AsyncCallback_Void callback_); + [Throws] + async void setCallWaiting(number slotId, boolean activate); + [Throws] + void startDTMF(number callId, String character, AsyncCallback_Void callback_); + [Throws] + async void startDTMF(number callId, String character); + [Throws] + void stopDTMF(number callId, AsyncCallback_Void callback_); + [Throws] + async void stopDTMF(number callId); + [Throws] + void postDialProceed(number callId, boolean proceed, AsyncCallback_Void callback_); + [Throws] + async void postDialProceed(number callId, boolean proceed); + [Throws] + void isInEmergencyCall(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isInEmergencyCall(); [Synthetic] callback Callback_CallAttributeOptions_Void = void (CallAttributeOptions parameter); + [Throws, DtsName="on", DtsTag="'callDetailsChange'"] + void onCallDetailsChange(Callback_CallAttributeOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'callDetailsChange'"] + void offCallDetailsChange(optional Callback_CallAttributeOptions_Void callback_); [Synthetic] callback Callback_CallEventOptions_Void = void (CallEventOptions parameter); + [Throws, DtsName="on", DtsTag="'callEventChange'"] + void onCallEventChange(Callback_CallEventOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'callEventChange'"] + void offCallEventChange(optional Callback_CallEventOptions_Void callback_); [Synthetic] callback Callback_DisconnectedDetails_Void = void (DisconnectedDetails parameter); + [Throws, DtsName="on", DtsTag="'callDisconnectedCause'"] + void onCallDisconnectedCause(Callback_DisconnectedDetails_Void callback_); + [Throws, DtsName="off", DtsTag="'callDisconnectedCause'"] + void offCallDisconnectedCause(optional Callback_DisconnectedDetails_Void callback_); [Synthetic] callback Callback_MmiCodeResults_Void = void (MmiCodeResults parameter); + [Throws, DtsName="on", DtsTag="'mmiCodeResult'"] + void onMmiCodeResult(Callback_MmiCodeResults_Void callback_); + [Throws, DtsName="off", DtsTag="'mmiCodeResult'"] + void offMmiCodeResult(optional Callback_MmiCodeResults_Void callback_); [Synthetic] callback Callback_AudioDeviceCallbackInfo_Void = void (AudioDeviceCallbackInfo parameter); + [Throws, DtsName="on", DtsTag="'audioDeviceChange'"] + void onAudioDeviceChange(Callback_AudioDeviceCallbackInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'audioDeviceChange'"] + void offAudioDeviceChange(optional Callback_AudioDeviceCallbackInfo_Void callback_); [Synthetic] callback Callback_String_Void = void (String parameter); + [Throws, DtsName="on", DtsTag="'postDialDelay'"] + void onPostDialDelay(Callback_String_Void callback_); + [Throws, DtsName="off", DtsTag="'postDialDelay'"] + void offPostDialDelay(optional Callback_String_Void callback_); + [Throws] + void isNewCallAllowed(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isNewCallAllowed(); + [Throws] + void separateConference(number callId, AsyncCallback_Void callback_); + [Throws] + async void separateConference(number callId); [Async, Synthetic] callback AsyncCallback_RestrictionStatus_Void = void (RestrictionStatus result); + [Throws] + void getCallRestrictionStatus(number slotId, CallRestrictionType type, AsyncCallback_RestrictionStatus_Void callback_); + [Throws] + async RestrictionStatus getCallRestrictionStatus(number slotId, CallRestrictionType type); + [Throws] + void setCallRestriction(number slotId, CallRestrictionInfo info, AsyncCallback_Void callback_); + [Throws] + async void setCallRestriction(number slotId, CallRestrictionInfo info); + [Throws] + void setCallRestrictionPassword(number slotId, String oldPassword, String newPassword, AsyncCallback_Void callback_); + [Throws] + async void setCallRestrictionPassword(number slotId, String oldPassword, String newPassword); [Async, Synthetic] callback AsyncCallback_CallTransferResult_Void = void (CallTransferResult result); + [Throws] + void getCallTransferInfo(number slotId, CallTransferType type, AsyncCallback_CallTransferResult_Void callback_); + [Throws] + async CallTransferResult getCallTransferInfo(number slotId, CallTransferType type); + [Throws] + void setCallTransfer(number slotId, CallTransferInfo info, AsyncCallback_Void callback_); + [Throws] + async void setCallTransfer(number slotId, CallTransferInfo info); + [Throws] + void isRinging(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isRinging(); + [Throws] + void setMuted(AsyncCallback_Void callback_); + [Throws] + async void setMuted(); + [Throws] + void cancelMuted(AsyncCallback_Void callback_); + [Throws] + async void cancelMuted(); + [Throws] + void setAudioDevice(AudioDevice device, AsyncCallback_Void callback_); + [Throws] + async void setAudioDevice(AudioDevice device); + [Throws] + void joinConference(number mainCallId, sequence callNumberList, AsyncCallback_Void callback_); + [Throws] + async void joinConference(number mainCallId, sequence callNumberList); + [Throws] + void kickOutFromConference(number callId, AsyncCallback_Void callback_); + [Throws] + async void kickOutFromConference(number callId); + [Throws] + void updateImsCallMode(number callId, ImsCallMode mode, AsyncCallback_Void callback_); + [Throws] + async void updateImsCallMode(number callId, ImsCallMode mode); + [Throws] + async void cancelCallUpgrade(number callId); + [Throws] + async void controlCamera(number callId, String cameraId); + [Throws] + async void setPreviewSurface(number callId, String surfaceId); + [Throws] + async void setDisplaySurface(number callId, String surfaceId); + [Throws] + async void setDeviceDirection(number callId, DeviceDirection deviceDirection); [Synthetic] callback Callback_ImsCallModeInfo_Void = void (ImsCallModeInfo parameter); + [Throws, DtsName="on", DtsTag="'imsCallModeChange'"] + void onImsCallModeChange(Callback_ImsCallModeInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'imsCallModeChange'"] + void offImsCallModeChange(optional Callback_ImsCallModeInfo_Void callback_); [Synthetic] callback Callback_CallSessionEvent_Void = void (CallSessionEvent parameter); + [Throws, DtsName="on", DtsTag="'callSessionEvent'"] + void onCallSessionEvent(Callback_CallSessionEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'callSessionEvent'"] + void offCallSessionEvent(optional Callback_CallSessionEvent_Void callback_); [Synthetic] callback Callback_PeerDimensionsDetail_Void = void (PeerDimensionsDetail parameter); + [Throws, DtsName="on", DtsTag="'peerDimensionsChange'"] + void onPeerDimensionsChange(Callback_PeerDimensionsDetail_Void callback_); + [Throws, DtsName="off", DtsTag="'peerDimensionsChange'"] + void offPeerDimensionsChange(optional Callback_PeerDimensionsDetail_Void callback_); [Synthetic] callback Callback_CameraCapabilities_Void = void (CameraCapabilities parameter); + [Throws, DtsName="on", DtsTag="'cameraCapabilitiesChange'"] + void onCameraCapabilitiesChange(Callback_CameraCapabilities_Void callback_); + [Throws, DtsName="off", DtsTag="'cameraCapabilitiesChange'"] + void offCameraCapabilitiesChange(optional Callback_CameraCapabilities_Void callback_); + [Throws] + void enableImsSwitch(number slotId, AsyncCallback_Void callback_); + [Throws] + async void enableImsSwitch(number slotId); + [Throws] + void disableImsSwitch(number slotId, AsyncCallback_Void callback_); + [Throws] + async void disableImsSwitch(number slotId); + [Throws] + void isImsSwitchEnabled(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isImsSwitchEnabled(number slotId); + [Throws] + boolean isImsSwitchEnabledSync(number slotId); + [Throws] + void closeUnfinishedUssd(number slotId, AsyncCallback_Void callback_); + [Throws] + async void closeUnfinishedUssd(number slotId); + [Throws] + void setVoNRState(number slotId, VoNRState state, AsyncCallback_Void callback_); + [Throws] + async void setVoNRState(number slotId, VoNRState state); [Async, Synthetic] callback AsyncCallback_VoNRState_Void = void (VoNRState result); + [Throws] + void getVoNRState(number slotId, AsyncCallback_VoNRState_Void callback_); + [Throws] + async VoNRState getVoNRState(number slotId); + [Throws] + void canSetCallTransferTime(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean canSetCallTransferTime(number slotId); + [Throws] + void inputDialerSpecialCode(String inputCode, AsyncCallback_Void callback_); + [Throws] + async void inputDialerSpecialCode(String inputCode); + [Throws] + void removeMissedIncomingCallNotification(AsyncCallback_Void callback_); + [Throws] + async void removeMissedIncomingCallNotification(); + [Throws] + async void sendCallUiEvent(number callId, String eventName); dictionary ImsCallMode { - number CALL_MODE_AUDIO_ONLY = 0; number CALL_MODE_SEND_ONLY = 1; number CALL_MODE_RECEIVE_ONLY = 2; number CALL_MODE_SEND_RECEIVE = 3; number CALL_MODE_VIDEO_PAUSED = 4; - }; dictionary VoNRState { - number VONR_STATE_OFF = 0; number VONR_STATE_ON = 1; - }; dictionary AudioDeviceType { - number DEVICE_EARPIECE = 0; number DEVICE_SPEAKER = 1; number DEVICE_WIRED_HEADSET = 2; number DEVICE_BLUETOOTH_SCO = 3; number DEVICE_DISTRIBUTED_AUTOMOTIVE = 4; - }; [Entity=Interface] interface AudioDevice { - attribute AudioDeviceType deviceType; [Optional] attribute String address; [Optional] attribute String deviceName; - }; [Entity=Interface] interface AudioDeviceCallbackInfo { - attribute sequence audioDeviceList; attribute AudioDevice currentAudioDevice; attribute boolean isMuted; - }; dictionary CallRestrictionType { - number RESTRICTION_TYPE_ALL_INCOMING = 0; number RESTRICTION_TYPE_ALL_OUTGOING = 1; number RESTRICTION_TYPE_INTERNATIONAL = 2; @@ -97,11 +353,9 @@ namespace call { number RESTRICTION_TYPE_ALL_CALLS = 5; number RESTRICTION_TYPE_OUTGOING_SERVICES = 6; number RESTRICTION_TYPE_INCOMING_SERVICES = 7; - }; [Entity=Interface] interface CallTransferInfo { - attribute String transferNum; attribute CallTransferType type; attribute CallTransferSettingType settingType; @@ -113,27 +367,21 @@ namespace call { attribute number endHour; [Optional] attribute number endMinute; - }; dictionary CallTransferType { - number TRANSFER_TYPE_UNCONDITIONAL = 0; number TRANSFER_TYPE_BUSY = 1; number TRANSFER_TYPE_NO_REPLY = 2; number TRANSFER_TYPE_NOT_REACHABLE = 3; - }; dictionary CallTransferSettingType { - number CALL_TRANSFER_DISABLE = 0; number CALL_TRANSFER_ENABLE = 1; number CALL_TRANSFER_REGISTRATION = 3; number CALL_TRANSFER_ERASURE = 4; - }; [Entity=Interface] interface CallAttributeOptions { - attribute String accountNumber; attribute boolean speakerphoneOn; attribute number accountId; @@ -154,11 +402,9 @@ namespace call { attribute NumberMarkInfo numberMarkInfo; [Optional] attribute record extraParams; - }; [Entity=Interface] interface VoipCallAttribute { - attribute String voipCallId; attribute String userName; attribute image.PixelMap userProfile; @@ -171,37 +417,29 @@ namespace call { attribute boolean isConferenceCall; [Optional] attribute boolean isVoiceAnswerSupported; - }; dictionary ConferenceState { - number TEL_CONFERENCE_IDLE = 0; number TEL_CONFERENCE_ACTIVE = 1; number TEL_CONFERENCE_DISCONNECTING = 2; number TEL_CONFERENCE_DISCONNECTED = 3; - }; dictionary CallType { - number TYPE_CS = 0; number TYPE_IMS = 1; number TYPE_OTT = 2; number TYPE_ERR_CALL = 3; number TYPE_VOIP = 4; - }; dictionary VideoStateType { - number TYPE_VOICE = 0; [Deprecated] number TYPE_VIDEO = 1; number TYPE_VIDEO_SEND_ONLY = 1; number TYPE_VIDEO_RECEIVE_ONLY = 2; number TYPE_VIDEO_BIDIRECTIONAL = 3; - }; dictionary VideoRequestResultType { - number TYPE_REQUEST_SUCCESS = 0; number TYPE_REQUEST_FAILURE = 1; number TYPE_REQUEST_INVALID = 2; @@ -210,26 +448,20 @@ namespace call { number TYPE_REQUEST_UPGRADE_CANCELED = 5; number TYPE_DOWNGRADE_RTP_OR_RTCP_TIMEOUT = 100; number TYPE_DOWNGRADE_RTP_AND_RTCP_TIMEOUT = 101; - }; dictionary DeviceDirection { - number DEVICE_DIRECTION_0 = 0; number DEVICE_DIRECTION_90 = 90; number DEVICE_DIRECTION_180 = 180; number DEVICE_DIRECTION_270 = 270; - }; dictionary CallSessionEventId { - number EVENT_CONTROL_CAMERA_FAILURE = 0; number EVENT_CONTROL_CAMERA_READY = 1; number EVENT_DISPLAY_SURFACE_RELEASED = 100; number EVENT_PREVIEW_SURFACE_RELEASED = 101; - }; dictionary DetailedCallState { - number CALL_STATUS_ACTIVE = 0; number CALL_STATUS_HOLDING = 1; number CALL_STATUS_DIALING = 2; @@ -239,30 +471,22 @@ namespace call { number CALL_STATUS_DISCONNECTED = 6; number CALL_STATUS_DISCONNECTING = 7; number CALL_STATUS_IDLE = 8; - }; [Entity=Interface] interface CallRestrictionInfo { - attribute CallRestrictionType type; attribute String password; attribute CallRestrictionMode mode; - }; dictionary CallRestrictionMode { - number RESTRICTION_MODE_DEACTIVATION = 0; number RESTRICTION_MODE_ACTIVATION = 1; - }; [Entity=Interface] interface CallEventOptions { - attribute CallAbilityEventId eventId; - }; dictionary CallAbilityEventId { - number EVENT_DIAL_NO_CARRIER = 1; number EVENT_INVALID_FDN_NUMBER = 2; number EVENT_HOLD_CALL_FAILED = 3; @@ -271,20 +495,16 @@ namespace call { number EVENT_SPLIT_CALL_FAILED = 6; number EVENT_SHOW_FULL_SCREEN = 7; number EVENT_SHOW_FLOAT_WINDOW = 8; - }; dictionary CallState { - number CALL_STATE_UNKNOWN = -1; number CALL_STATE_IDLE = 0; number CALL_STATE_RINGING = 1; number CALL_STATE_OFFHOOK = 2; number CALL_STATE_ANSWERED = 3; - }; [Entity=Interface] interface DialOptions { - [Optional] attribute boolean extras; [Optional] @@ -295,11 +515,9 @@ namespace call { attribute DialScene dialScene; [Optional] attribute DialType dialType; - }; [Entity=Interface] interface DialCallOptions { - [Optional] attribute number accountId; [Optional] @@ -310,31 +528,23 @@ namespace call { attribute DialType dialType; [Optional] attribute record extraParams; - }; dictionary DialScene { - number CALL_NORMAL = 0; number CALL_PRIVILEGED = 1; number CALL_EMERGENCY = 2; - }; dictionary DialType { - number DIAL_CARRIER_TYPE = 0; number DIAL_VOICE_MAIL_TYPE = 1; number DIAL_OTT_TYPE = 2; - }; [Entity=Interface] interface RejectMessageOptions { - attribute String messageContent; - }; [Entity=Interface] interface CallTransferResult { - attribute TransferStatus status; [DtsName="number"] attribute String number_; @@ -342,55 +552,39 @@ namespace call { attribute number startMinute; attribute number endHour; attribute number endMinute; - }; dictionary CallWaitingStatus { - number CALL_WAITING_DISABLE = 0; number CALL_WAITING_ENABLE = 1; - }; dictionary RestrictionStatus { - number RESTRICTION_DISABLE = 0; number RESTRICTION_ENABLE = 1; - }; dictionary TransferStatus { - number TRANSFER_DISABLE = 0; number TRANSFER_ENABLE = 1; - }; [Entity=Interface] interface EmergencyNumberOptions { - [Optional] attribute number slotId; - }; [Entity=Interface] interface NumberFormatOptions { - [Optional] attribute String countryCode; - }; [Entity=Interface] interface MmiCodeResults { - attribute MmiCodeResult result; attribute String message; - }; dictionary MmiCodeResult { - number MMI_CODE_SUCCESS = 0; number MMI_CODE_FAILED = 1; - }; dictionary DisconnectedReason { - number UNASSIGNED_NUMBER = 1; number NO_ROUTE_TO_DESTINATION = 3; number CHANNEL_UNACCEPTABLE = 6; @@ -470,50 +664,38 @@ namespace call { number CALL_NOT_ALLOW = 1029; number SIM_INVALID = 1045; number UNKNOWN = 1279; - }; [Entity=Interface] interface DisconnectedDetails { - attribute DisconnectedReason reason; attribute String message; - }; [Entity=Interface] interface ImsCallModeInfo { - attribute number callId; attribute VideoRequestResultType result; attribute boolean isRequestInfo; attribute ImsCallMode imsCallMode; - }; [Entity=Interface] interface CallSessionEvent { - attribute number callId; attribute CallSessionEventId eventId; - }; [Entity=Interface] interface PeerDimensionsDetail { - attribute number callId; attribute number width; attribute number height; - }; [Entity=Interface] interface CameraCapabilities { - attribute number callId; attribute number width; attribute number height; - }; [Entity=Interface] interface NumberMarkInfo { - attribute MarkType markType; [Optional] attribute String markContent; @@ -525,10 +707,8 @@ namespace call { attribute boolean isCloud; [Optional] attribute String markDetails; - }; dictionary MarkType { - number MARK_TYPE_NONE = 0; number MARK_TYPE_CRANK = 1; number MARK_TYPE_FRAUD = 2; @@ -541,279 +721,5 @@ namespace call { number MARK_TYPE_OTHERS = 9; number MARK_TYPE_YELLOW_PAGE = 10; number MARK_TYPE_ENTERPRISE = 11; - }; - [GlobalScope] - interface GlobalScope_call_ohos_telephony_call { - - [Deprecated] - static void dial(String phoneNumber, DialOptions options, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean dial(String phoneNumber, optional DialOptions options); - [Deprecated] - static void dial(String phoneNumber, AsyncCallback_Boolean_Void callback_); - [Throws] - static void dialCall(String phoneNumber, DialCallOptions options, AsyncCallback_Void callback_); - [Throws] - static async void dialCall(String phoneNumber, optional DialCallOptions options); - [Throws] - static void dialCall(String phoneNumber, AsyncCallback_Void callback_); - [Throws] - static void makeCall(String phoneNumber, AsyncCallback_Void callback_); - [Throws] - static async void makeCall(String phoneNumber); - [Throws] - static async void makeCall(Context context, String phoneNumber); - static void hasCall(AsyncCallback_Boolean_Void callback_); - static async boolean hasCall(); - static boolean hasCallSync(); - static void getCallState(AsyncCallback_CallState_Void callback_); - static async CallState getCallState(); - static CallState getCallStateSync(); - [Throws] - static void muteRinger(AsyncCallback_Void callback_); - [Throws] - static async void muteRinger(); - static boolean hasVoiceCapability(); - [Throws] - static void isEmergencyPhoneNumber(String phoneNumber, EmergencyNumberOptions options, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isEmergencyPhoneNumber(String phoneNumber, optional EmergencyNumberOptions options); - [Throws] - static void isEmergencyPhoneNumber(String phoneNumber, AsyncCallback_Boolean_Void callback_); - [Throws] - static void formatPhoneNumber(String phoneNumber, NumberFormatOptions options, AsyncCallback_String_Void callback_); - [Throws] - static async String formatPhoneNumber(String phoneNumber, optional NumberFormatOptions options); - [Throws] - static void formatPhoneNumber(String phoneNumber, AsyncCallback_String_Void callback_); - [Throws] - static void formatPhoneNumberToE164(String phoneNumber, String countryCode, AsyncCallback_String_Void callback_); - [Throws] - static async String formatPhoneNumberToE164(String phoneNumber, String countryCode); - [Throws] - static void answerCall(number callId, AsyncCallback_Void callback_); - [Throws] - static async void answerCall(optional number callId); - [Throws] - static void answerCall(AsyncCallback_Void callback_); - [Throws] - static async void answerCall(VideoStateType videoState, number callId); - [Throws] - static void hangUpCall(number callId, AsyncCallback_Void callback_); - [Throws] - static async void hangUpCall(optional number callId); - [Throws] - static void hangUpCall(AsyncCallback_Void callback_); - [Throws] - static void rejectCall(number callId, RejectMessageOptions options, AsyncCallback_Void callback_); - [Throws] - static async void rejectCall(optional number callId, optional RejectMessageOptions options); - [Throws] - static void rejectCall(number callId, AsyncCallback_Void callback_); - [Throws] - static void rejectCall(AsyncCallback_Void callback_); - [Throws] - static void rejectCall(RejectMessageOptions options, AsyncCallback_Void callback_); - [Throws] - static void holdCall(number callId, AsyncCallback_Void callback_); - [Throws] - static async void holdCall(number callId); - [Throws] - static void unHoldCall(number callId, AsyncCallback_Void callback_); - [Throws] - static async void unHoldCall(number callId); - [Throws] - static void switchCall(number callId, AsyncCallback_Void callback_); - [Throws] - static async void switchCall(number callId); - [Throws] - static void combineConference(number callId, AsyncCallback_Void callback_); - [Throws] - static async void combineConference(number callId); - [Throws] - static void getMainCallId(number callId, AsyncCallback_Number_Void callback_); - [Throws] - static async number getMainCallId(number callId); - [Throws] - static void getSubCallIdList(number callId, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getSubCallIdList(number callId); - [Throws] - static void getCallIdListForConference(number callId, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence getCallIdListForConference(number callId); - [Throws] - static void getCallWaitingStatus(number slotId, AsyncCallback_CallWaitingStatus_Void callback_); - [Throws] - static async CallWaitingStatus getCallWaitingStatus(number slotId); - [Throws] - static void setCallWaiting(number slotId, boolean activate, AsyncCallback_Void callback_); - [Throws] - static async void setCallWaiting(number slotId, boolean activate); - [Throws] - static void startDTMF(number callId, String character, AsyncCallback_Void callback_); - [Throws] - static async void startDTMF(number callId, String character); - [Throws] - static void stopDTMF(number callId, AsyncCallback_Void callback_); - [Throws] - static async void stopDTMF(number callId); - [Throws] - static void postDialProceed(number callId, boolean proceed, AsyncCallback_Void callback_); - [Throws] - static async void postDialProceed(number callId, boolean proceed); - [Throws] - static void isInEmergencyCall(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isInEmergencyCall(); - [Throws, DtsName="on", DtsTag="'callDetailsChange'"] - static void onCallDetailsChange(Callback_CallAttributeOptions_Void callback_); - [Throws, DtsName="off", DtsTag="'callDetailsChange'"] - static void offCallDetailsChange(optional Callback_CallAttributeOptions_Void callback_); - [Throws, DtsName="on", DtsTag="'callEventChange'"] - static void onCallEventChange(Callback_CallEventOptions_Void callback_); - [Throws, DtsName="off", DtsTag="'callEventChange'"] - static void offCallEventChange(optional Callback_CallEventOptions_Void callback_); - [Throws, DtsName="on", DtsTag="'callDisconnectedCause'"] - static void onCallDisconnectedCause(Callback_DisconnectedDetails_Void callback_); - [Throws, DtsName="off", DtsTag="'callDisconnectedCause'"] - static void offCallDisconnectedCause(optional Callback_DisconnectedDetails_Void callback_); - [Throws, DtsName="on", DtsTag="'mmiCodeResult'"] - static void onMmiCodeResult(Callback_MmiCodeResults_Void callback_); - [Throws, DtsName="off", DtsTag="'mmiCodeResult'"] - static void offMmiCodeResult(optional Callback_MmiCodeResults_Void callback_); - [Throws, DtsName="on", DtsTag="'audioDeviceChange'"] - static void onAudioDeviceChange(Callback_AudioDeviceCallbackInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'audioDeviceChange'"] - static void offAudioDeviceChange(optional Callback_AudioDeviceCallbackInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'postDialDelay'"] - static void onPostDialDelay(Callback_String_Void callback_); - [Throws, DtsName="off", DtsTag="'postDialDelay'"] - static void offPostDialDelay(optional Callback_String_Void callback_); - [Throws] - static void isNewCallAllowed(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isNewCallAllowed(); - [Throws] - static void separateConference(number callId, AsyncCallback_Void callback_); - [Throws] - static async void separateConference(number callId); - [Throws] - static void getCallRestrictionStatus(number slotId, CallRestrictionType type, AsyncCallback_RestrictionStatus_Void callback_); - [Throws] - static async RestrictionStatus getCallRestrictionStatus(number slotId, CallRestrictionType type); - [Throws] - static void setCallRestriction(number slotId, CallRestrictionInfo info, AsyncCallback_Void callback_); - [Throws] - static async void setCallRestriction(number slotId, CallRestrictionInfo info); - [Throws] - static void setCallRestrictionPassword(number slotId, String oldPassword, String newPassword, AsyncCallback_Void callback_); - [Throws] - static async void setCallRestrictionPassword(number slotId, String oldPassword, String newPassword); - [Throws] - static void getCallTransferInfo(number slotId, CallTransferType type, AsyncCallback_CallTransferResult_Void callback_); - [Throws] - static async CallTransferResult getCallTransferInfo(number slotId, CallTransferType type); - [Throws] - static void setCallTransfer(number slotId, CallTransferInfo info, AsyncCallback_Void callback_); - [Throws] - static async void setCallTransfer(number slotId, CallTransferInfo info); - [Throws] - static void isRinging(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isRinging(); - [Throws] - static void setMuted(AsyncCallback_Void callback_); - [Throws] - static async void setMuted(); - [Throws] - static void cancelMuted(AsyncCallback_Void callback_); - [Throws] - static async void cancelMuted(); - [Throws] - static void setAudioDevice(AudioDevice device, AsyncCallback_Void callback_); - [Throws] - static async void setAudioDevice(AudioDevice device); - [Throws] - static void joinConference(number mainCallId, sequence callNumberList, AsyncCallback_Void callback_); - [Throws] - static async void joinConference(number mainCallId, sequence callNumberList); - [Throws] - static void kickOutFromConference(number callId, AsyncCallback_Void callback_); - [Throws] - static async void kickOutFromConference(number callId); - [Throws] - static void updateImsCallMode(number callId, ImsCallMode mode, AsyncCallback_Void callback_); - [Throws] - static async void updateImsCallMode(number callId, ImsCallMode mode); - [Throws] - static async void cancelCallUpgrade(number callId); - [Throws] - static async void controlCamera(number callId, String cameraId); - [Throws] - static async void setPreviewSurface(number callId, String surfaceId); - [Throws] - static async void setDisplaySurface(number callId, String surfaceId); - [Throws] - static async void setDeviceDirection(number callId, DeviceDirection deviceDirection); - [Throws, DtsName="on", DtsTag="'imsCallModeChange'"] - static void onImsCallModeChange(Callback_ImsCallModeInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'imsCallModeChange'"] - static void offImsCallModeChange(optional Callback_ImsCallModeInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'callSessionEvent'"] - static void onCallSessionEvent(Callback_CallSessionEvent_Void callback_); - [Throws, DtsName="off", DtsTag="'callSessionEvent'"] - static void offCallSessionEvent(optional Callback_CallSessionEvent_Void callback_); - [Throws, DtsName="on", DtsTag="'peerDimensionsChange'"] - static void onPeerDimensionsChange(Callback_PeerDimensionsDetail_Void callback_); - [Throws, DtsName="off", DtsTag="'peerDimensionsChange'"] - static void offPeerDimensionsChange(optional Callback_PeerDimensionsDetail_Void callback_); - [Throws, DtsName="on", DtsTag="'cameraCapabilitiesChange'"] - static void onCameraCapabilitiesChange(Callback_CameraCapabilities_Void callback_); - [Throws, DtsName="off", DtsTag="'cameraCapabilitiesChange'"] - static void offCameraCapabilitiesChange(optional Callback_CameraCapabilities_Void callback_); - [Throws] - static void enableImsSwitch(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void enableImsSwitch(number slotId); - [Throws] - static void disableImsSwitch(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void disableImsSwitch(number slotId); - [Throws] - static void isImsSwitchEnabled(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isImsSwitchEnabled(number slotId); - [Throws] - static boolean isImsSwitchEnabledSync(number slotId); - [Throws] - static void closeUnfinishedUssd(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void closeUnfinishedUssd(number slotId); - [Throws] - static void setVoNRState(number slotId, VoNRState state, AsyncCallback_Void callback_); - [Throws] - static async void setVoNRState(number slotId, VoNRState state); - [Throws] - static void getVoNRState(number slotId, AsyncCallback_VoNRState_Void callback_); - [Throws] - static async VoNRState getVoNRState(number slotId); - [Throws] - static void canSetCallTransferTime(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean canSetCallTransferTime(number slotId); - [Throws] - static void inputDialerSpecialCode(String inputCode, AsyncCallback_Void callback_); - [Throws] - static async void inputDialerSpecialCode(String inputCode); - [Throws] - static void removeMissedIncomingCallNotification(AsyncCallback_Void callback_); - [Throws] - static async void removeMissedIncomingCallNotification(); - [Throws] - static async void sendCallUiEvent(number callId, String eventName); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.telephony.data.idl b/idl/@ohos.telephony.data.idl index 06e96ae..e3fae14 100644 --- a/idl/@ohos.telephony.data.idl +++ b/idl/@ohos.telephony.data.idl @@ -1,79 +1,92 @@ -package ohos.telephony; +package ohos.telephony.data; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace data { - [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + void getDefaultCellularDataSlotId(AsyncCallback_Number_Void callback_); + async number getDefaultCellularDataSlotId(); + number getDefaultCellularDataSlotIdSync(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setDefaultCellularDataSlotId(number slotId, AsyncCallback_Void callback_); + [Throws] + async void setDefaultCellularDataSlotId(number slotId); [Async, Synthetic] callback AsyncCallback_DataFlowType_Void = void (DataFlowType result); + void getCellularDataFlowType(AsyncCallback_DataFlowType_Void callback_); + async DataFlowType getCellularDataFlowType(); [Async, Synthetic] callback AsyncCallback_DataConnectState_Void = void (DataConnectState result); + void getCellularDataState(AsyncCallback_DataConnectState_Void callback_); + async DataConnectState getCellularDataState(); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isCellularDataEnabled(AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isCellularDataEnabled(); + [Throws] + boolean isCellularDataEnabledSync(); + [Throws] + void enableCellularData(AsyncCallback_Void callback_); + [Throws] + async void enableCellularData(); + [Throws] + void disableCellularData(AsyncCallback_Void callback_); + [Throws] + async void disableCellularData(); + [Throws] + void isCellularDataRoamingEnabled(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isCellularDataRoamingEnabled(number slotId); + [Throws] + boolean isCellularDataRoamingEnabledSync(number slotId); + [Throws] + void enableCellularDataRoaming(number slotId, AsyncCallback_Void callback_); + [Throws] + async void enableCellularDataRoaming(number slotId); + [Throws] + void disableCellularDataRoaming(number slotId, AsyncCallback_Void callback_); + [Throws] + async void disableCellularDataRoaming(number slotId); + number getDefaultCellularDataSimId(); + [Throws] + async sequence queryAllApns(); + [Throws] + async String getActiveApnName(); + [Throws] + async sequence queryApnIds(ApnInfo apnInfo); + [Throws] + async boolean setPreferredApn(number apnId); + [Entity=Interface] + interface ApnInfo { + attribute String apnName; + attribute String apn; + attribute String mcc; + attribute String mnc; + [Optional] + attribute String user; + [Optional] + attribute String type; + [Optional] + attribute String proxy; + [Optional] + attribute String mmsproxy; + }; dictionary DataFlowType { - number DATA_FLOW_TYPE_NONE = 0; number DATA_FLOW_TYPE_DOWN = 1; number DATA_FLOW_TYPE_UP = 2; number DATA_FLOW_TYPE_UP_DOWN = 3; number DATA_FLOW_TYPE_DORMANT = 4; - }; dictionary DataConnectState { - number DATA_STATE_UNKNOWN = -1; number DATA_STATE_DISCONNECTED = 0; number DATA_STATE_CONNECTING = 1; number DATA_STATE_CONNECTED = 2; number DATA_STATE_SUSPENDED = 3; - - }; - [GlobalScope] - interface GlobalScope_data_ohos_telephony_data { - - static void getDefaultCellularDataSlotId(AsyncCallback_Number_Void callback_); - static async number getDefaultCellularDataSlotId(); - static number getDefaultCellularDataSlotIdSync(); - [Throws] - static void setDefaultCellularDataSlotId(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void setDefaultCellularDataSlotId(number slotId); - static void getCellularDataFlowType(AsyncCallback_DataFlowType_Void callback_); - static async DataFlowType getCellularDataFlowType(); - static void getCellularDataState(AsyncCallback_DataConnectState_Void callback_); - static async DataConnectState getCellularDataState(); - [Throws] - static void isCellularDataEnabled(AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isCellularDataEnabled(); - [Throws] - static boolean isCellularDataEnabledSync(); - [Throws] - static void enableCellularData(AsyncCallback_Void callback_); - [Throws] - static async void enableCellularData(); - [Throws] - static void disableCellularData(AsyncCallback_Void callback_); - [Throws] - static async void disableCellularData(); - [Throws] - static void isCellularDataRoamingEnabled(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isCellularDataRoamingEnabled(number slotId); - [Throws] - static boolean isCellularDataRoamingEnabledSync(number slotId); - [Throws] - static void enableCellularDataRoaming(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void enableCellularDataRoaming(number slotId); - [Throws] - static void disableCellularDataRoaming(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void disableCellularDataRoaming(number slotId); - static number getDefaultCellularDataSimId(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.telephony.esim.idl b/idl/@ohos.telephony.esim.idl new file mode 100644 index 0000000..2357253 --- /dev/null +++ b/idl/@ohos.telephony.esim.idl @@ -0,0 +1,202 @@ +package ohos.telephony.esim; +import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] +namespace eSIM { + [Throws] + boolean isSupported(number slotId); + [Throws] + async boolean addProfile(DownloadableProfile profile); + [Throws] + async String getEid(number slotId); + [Throws] + async OsuStatus getOsuStatus(number slotId); + [Throws] + async OsuStatus startOsu(number slotId); + [Throws] + async GetDownloadableProfileMetadataResult getDownloadableProfileMetadata(number slotId, number portIndex, DownloadableProfile profile, boolean forceDisableProfile); + [Throws] + async GetDownloadableProfilesResult getDownloadableProfiles(number slotId, number portIndex, boolean forceDisableProfile); + [Throws] + async DownloadProfileResult downloadProfile(number slotId, number portIndex, DownloadableProfile profile, DownloadConfiguration configuration); + [Throws] + async GetEuiccProfileInfoListResult getEuiccProfileInfoList(number slotId); + [Throws] + async EuiccInfo getEuiccInfo(number slotId); + [Throws] + async ResultCode deleteProfile(number slotId, String iccid); + [Throws] + async ResultCode switchToProfile(number slotId, number portIndex, String iccid, boolean forceDisableProfile); + [Throws] + async ResultCode setProfileNickname(number slotId, String iccid, String nickname); + [Throws] + async ResultCode resetMemory(number slotId, optional ResetOption options); + [Throws] + async ResultCode reserveProfilesForFactoryRestore(number slotId); + [Throws] + async ResultCode setDefaultSmdpAddress(number slotId, String address); + [Throws] + async String getDefaultSmdpAddress(number slotId); + [Throws] + async ResultCode cancelSession(number slotId, String transactionId, CancelReason cancelReason); + [Throws] + async String getContractInfo(number slotId, ContractRequestData requestData); + [Throws] + async String getSupportedPkids(number slotId); + [Entity=Interface] + interface ContractRequestData { + attribute String publicKey; + attribute String nonce; + attribute String pkid; + }; + [Entity=Interface] + interface AccessRule { + attribute String certificateHashHexStr; + attribute String packageName; + attribute number accessType; + }; + [Entity=Interface] + interface DownloadableProfile { + attribute String activationCode; + [Optional] + attribute String confirmationCode; + [Optional] + attribute String carrierName; + [Optional] + attribute sequence accessRules; + }; + [Entity=Interface] + interface GetDownloadableProfileMetadataResult { + attribute DownloadableProfile downloadableProfile; + attribute number pprType; + attribute boolean pprFlag; + attribute String iccid; + attribute String serviceProviderName; + attribute String profileName; + attribute ProfileClass profileClass; + attribute SolvableErrors solvableErrors; + attribute ResultCode responseResult; + }; + [Entity=Interface] + interface GetDownloadableProfilesResult { + attribute ResultCode responseResult; + attribute sequence downloadableProfiles; + }; + [Entity=Interface] + interface DownloadProfileResult { + attribute ResultCode responseResult; + attribute SolvableErrors solvableErrors; + attribute number cardId; + }; + [Entity=Interface] + interface GetEuiccProfileInfoListResult { + attribute ResultCode responseResult; + attribute sequence profiles; + attribute boolean isRemovable; + }; + [Entity=Interface] + interface OperatorId { + attribute String mcc; + attribute String mnc; + attribute String gid1; + attribute String gid2; + }; + [Entity=Interface] + interface EuiccProfile { + attribute String iccid; + attribute String nickName; + attribute String serviceProviderName; + attribute String profileName; + attribute ProfileState state; + attribute ProfileClass profileClass; + attribute OperatorId operatorId; + attribute PolicyRules policyRules; + attribute sequence accessRules; + }; + [Entity=Interface] + interface EuiccInfo { + attribute String osVersion; + }; + dictionary ResetOption { + number DELETE_OPERATIONAL_PROFILES = 1; + number DELETE_FIELD_LOADED_TEST_PROFILES = 2; + number RESET_DEFAULT_SMDP_ADDRESS = 4; + }; + dictionary OsuStatus { + number EUICC_UPGRADE_IN_PROGRESS = 1; + number EUICC_UPGRADE_FAILED = 2; + number EUICC_UPGRADE_SUCCESSFUL = 3; + number EUICC_UPGRADE_ALREADY_LATEST = 4; + number EUICC_UPGRADE_SERVICE_UNAVAILABLE = 5; + }; + dictionary ResultCode { + number RESULT_SOLVABLE_ERRORS = -2; + number RESULT_MUST_DISABLE_PROFILE = -1; + number RESULT_OK = 0; + number RESULT_GET_EID_FAILED = 201; + number RESULT_ACTIVATION_CODE_CHANGED = 203; + number RESULT_ACTIVATION_CODE_INVALID = 204; + number RESULT_SMDP_ADDRESS_INVALID = 205; + number RESULT_EUICC_INFO_INVALID = 206; + number RESULT_TLS_HANDSHAKE_FAILED = 207; + number RESULT_CERTIFICATE_IO_ERROR = 208; + number RESULT_CERTIFICATE_RESPONSE_TIMEOUT = 209; + number RESULT_AUTHENTICATION_FAILED = 210; + number RESULT_RESPONSE_HTTP_FAILED = 211; + number RESULT_CONFIRMATION_CODE_INCORRECT = 212; + number RESULT_EXCEEDED_CONFIRMATION_CODE_TRY_LIMIT = 213; + number RESULT_NO_PROFILE_ON_SERVER = 214; + number RESULT_TRANSACTION_ID_INVALID = 215; + number RESULT_SERVER_ADDRESS_INVALID = 216; + number RESULT_GET_BOUND_PROFILE_PACKAGE_FAILED = 217; + number RESULT_USER_CANCEL_DOWNLOAD = 218; + number RESULT_SERVER_UNAVAILABLE = 220; + number RESULT_PROFILE_NON_DELETE = 223; + number RESULT_SMDP_ADDRESS_INCORRECT = 226; + number RESULT_ANALYZE_AUTHENTICATION_SERVER_RESPONSE_FAILED = 228; + number RESULT_ANALYZE_AUTHENTICATION_CLIENT_RESPONSE_FAILED = 229; + number RESULT_ANALYZE_AUTHENTICATION_CLIENT_MATCHING_ID_REFUSED = 231; + number RESULT_PROFILE_TYPE_ERROR_AUTHENTICATION_STOPPED = 233; + number RESULT_CARRIER_SERVER_REFUSED_ERRORS = 249; + number RESULT_CERTIFICATE_INVALID = 251; + number RESULT_OUT_OF_MEMORY = 263; + number RESULT_PPR_FORBIDDEN = 268; + number RESULT_NOTHING_TO_DELETE = 270; + number RESULT_PPR_NOT_MATCH = 276; + number RESULT_CAT_BUSY = 283; + number RESULT_PROFILE_EID_INVALID = 284; + number RESULT_DOWNLOAD_TIMEOUT = 287; + number RESULT_SGP_22_OTHER = 400; + }; + dictionary CancelReason { + number CANCEL_REASON_END_USER_REJECTION = 0; + number CANCEL_REASON_POSTPONED = 1; + number CANCEL_REASON_TIMEOUT = 2; + number CANCEL_REASON_PPR_NOT_ALLOWED = 3; + }; + dictionary ProfileState { + number PROFILE_STATE_UNSPECIFIED = -1; + number PROFILE_STATE_DISABLED = 0; + number PROFILE_STATE_ENABLED = 1; + }; + dictionary ProfileClass { + number PROFILE_CLASS_UNSPECIFIED = -1; + number PROFILE_CLASS_TEST = 0; + number PROFILE_CLASS_PROVISIONING = 1; + number PROFILE_CLASS_OPERATIONAL = 2; + }; + dictionary PolicyRules { + number POLICY_RULE_DISABLE_NOT_ALLOWED = 1; + number POLICY_RULE_DELETE_NOT_ALLOWED = 2; + number POLICY_RULE_DISABLE_AND_DELETE = 4; + }; + dictionary SolvableErrors { + number SOLVABLE_ERROR_NEED_CONFIRMATION_CODE = 1; + number SOLVABLE_ERROR_NEED_POLICY_RULE = 2; + }; + [Entity=Interface] + interface DownloadConfiguration { + attribute boolean switchAfterDownload; + attribute boolean forceDisableProfile; + attribute boolean isPprAllowed; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.telephony.observer.idl b/idl/@ohos.telephony.observer.idl index 671b5a0..15a67fc 100644 --- a/idl/@ohos.telephony.observer.idl +++ b/idl/@ohos.telephony.observer.idl @@ -1,11 +1,11 @@ -package ohos.telephony; +package ohos.telephony.observer; import ohos.base.Callback as Callback; -import ohos.telephony.radio as radio; -import ohos.telephony.data as data; -import ohos.telephony.call as call; -import ohos.telephony.sim as sim; +import ohos.telephony.radio.default as radio; +import ohos.telephony.data.default as data; +import ohos.telephony.call.default as call; +import ohos.telephony.sim.default as sim; +[DefaultExport] namespace observer { - typedef radio.NetworkState NetworkState; typedef radio.SignalInformation SignalInformation; typedef radio.CellInformation CellInformation; @@ -17,51 +17,88 @@ namespace observer { typedef sim.SimState SimState; [Synthetic] callback Callback_NetworkState_Void = void (NetworkState parameter); + [Throws, DtsName="on", DtsTag="'networkStateChange'"] + void onNetworkStateChange(Callback_NetworkState_Void callback_); + [Throws, DtsName="on", DtsTag="'networkStateChange'"] + void onNetworkStateChange(ObserverOptions options, Callback_NetworkState_Void callback_); + [Throws, DtsName="off", DtsTag="'networkStateChange'"] + void offNetworkStateChange(optional Callback_NetworkState_Void callback_); [Synthetic] callback Callback_Array_SignalInformation_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'signalInfoChange'"] + void onSignalInfoChange(Callback_Array_SignalInformation_Void callback_); + [Throws, DtsName="on", DtsTag="'signalInfoChange'"] + void onSignalInfoChange(ObserverOptions options, Callback_Array_SignalInformation_Void callback_); + [Throws, DtsName="off", DtsTag="'signalInfoChange'"] + void offSignalInfoChange(optional Callback_Array_SignalInformation_Void callback_); [Synthetic] callback Callback_Array_CellInformation_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'cellInfoChange'"] + void onCellInfoChange(Callback_Array_CellInformation_Void callback_); + [Throws, DtsName="on", DtsTag="'cellInfoChange'"] + void onCellInfoChange(ObserverOptions options, Callback_Array_CellInformation_Void callback_); + [Throws, DtsName="off", DtsTag="'cellInfoChange'"] + void offCellInfoChange(optional Callback_Array_CellInformation_Void callback_); [Synthetic] callback Callback_DataConnectionStateInfo_Void = void (DataConnectionStateInfo parameter); + [Throws, DtsName="on", DtsTag="'cellularDataConnectionStateChange'"] + void onCellularDataConnectionStateChange(Callback_DataConnectionStateInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'cellularDataConnectionStateChange'"] + void onCellularDataConnectionStateChange(ObserverOptions options, Callback_DataConnectionStateInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'cellularDataConnectionStateChange'"] + void offCellularDataConnectionStateChange(optional Callback_DataConnectionStateInfo_Void callback_); [Synthetic] callback Callback_DataFlowType_Void = void (DataFlowType parameter); + [Throws, DtsName="on", DtsTag="'cellularDataFlowChange'"] + void onCellularDataFlowChange(Callback_DataFlowType_Void callback_); + [Throws, DtsName="on", DtsTag="'cellularDataFlowChange'"] + void onCellularDataFlowChange(ObserverOptions options, Callback_DataFlowType_Void callback_); + [Throws, DtsName="off", DtsTag="'cellularDataFlowChange'"] + void offCellularDataFlowChange(optional Callback_DataFlowType_Void callback_); [Synthetic] callback Callback_CallStateInfo_Void = void (CallStateInfo parameter); + [Throws, DtsName="on", DtsTag="'callStateChange'"] + void onCallStateChange(Callback_CallStateInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'callStateChange'"] + void onCallStateChange(ObserverOptions options, Callback_CallStateInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'callStateChange'"] + void offCallStateChange(optional Callback_CallStateInfo_Void callback_); [Synthetic] callback Callback_SimStateData_Void = void (SimStateData parameter); + [Throws, DtsName="on", DtsTag="'simStateChange'"] + void onSimStateChange(Callback_SimStateData_Void callback_); + [Throws, DtsName="on", DtsTag="'simStateChange'"] + void onSimStateChange(ObserverOptions options, Callback_SimStateData_Void callback_); + [Throws, DtsName="off", DtsTag="'simStateChange'"] + void offSimStateChange(optional Callback_SimStateData_Void callback_); [Synthetic] callback Callback_Void = void (); + [Throws, DtsName="on", DtsTag="'iccAccountInfoChange'"] + void onIccAccountInfoChange(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'iccAccountInfoChange'"] + void offIccAccountInfoChange(optional Callback_Void callback_); [Entity=Interface] interface SimStateData { - attribute CardType type; attribute SimState state; attribute LockReason reason; - }; [Entity=Interface] interface CallStateInfo { - attribute CallState state; [DtsName="number"] attribute String number_; - }; [Entity=Interface] interface DataConnectionStateInfo { - attribute DataConnectState state; attribute RatType network; - }; [Entity=Interface] interface ObserverOptions { - attribute number slotId; - }; dictionary LockReason { - number SIM_NONE = 0; number SIM_PIN = 1; number SIM_PUK = 2; @@ -75,58 +112,5 @@ namespace observer { number SIM_PC_PUK = 10; number SIM_SIM_PIN = 11; number SIM_SIM_PUK = 12; - }; - [GlobalScope] - interface GlobalScope_observer_ohos_telephony_observer { - - [Throws, DtsName="on", DtsTag="'networkStateChange'"] - static void onNetworkStateChange(Callback_NetworkState_Void callback_); - [Throws, DtsName="on", DtsTag="'networkStateChange'"] - static void onNetworkStateChange(ObserverOptions options, Callback_NetworkState_Void callback_); - [Throws, DtsName="off", DtsTag="'networkStateChange'"] - static void offNetworkStateChange(optional Callback_NetworkState_Void callback_); - [Throws, DtsName="on", DtsTag="'signalInfoChange'"] - static void onSignalInfoChange(Callback_Array_SignalInformation_Void callback_); - [Throws, DtsName="on", DtsTag="'signalInfoChange'"] - static void onSignalInfoChange(ObserverOptions options, Callback_Array_SignalInformation_Void callback_); - [Throws, DtsName="off", DtsTag="'signalInfoChange'"] - static void offSignalInfoChange(optional Callback_Array_SignalInformation_Void callback_); - [Throws, DtsName="on", DtsTag="'cellInfoChange'"] - static void onCellInfoChange(Callback_Array_CellInformation_Void callback_); - [Throws, DtsName="on", DtsTag="'cellInfoChange'"] - static void onCellInfoChange(ObserverOptions options, Callback_Array_CellInformation_Void callback_); - [Throws, DtsName="off", DtsTag="'cellInfoChange'"] - static void offCellInfoChange(optional Callback_Array_CellInformation_Void callback_); - [Throws, DtsName="on", DtsTag="'cellularDataConnectionStateChange'"] - static void onCellularDataConnectionStateChange(Callback_DataConnectionStateInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'cellularDataConnectionStateChange'"] - static void onCellularDataConnectionStateChange(ObserverOptions options, Callback_DataConnectionStateInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'cellularDataConnectionStateChange'"] - static void offCellularDataConnectionStateChange(optional Callback_DataConnectionStateInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'cellularDataFlowChange'"] - static void onCellularDataFlowChange(Callback_DataFlowType_Void callback_); - [Throws, DtsName="on", DtsTag="'cellularDataFlowChange'"] - static void onCellularDataFlowChange(ObserverOptions options, Callback_DataFlowType_Void callback_); - [Throws, DtsName="off", DtsTag="'cellularDataFlowChange'"] - static void offCellularDataFlowChange(optional Callback_DataFlowType_Void callback_); - [Throws, DtsName="on", DtsTag="'callStateChange'"] - static void onCallStateChange(Callback_CallStateInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'callStateChange'"] - static void onCallStateChange(ObserverOptions options, Callback_CallStateInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'callStateChange'"] - static void offCallStateChange(optional Callback_CallStateInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'simStateChange'"] - static void onSimStateChange(Callback_SimStateData_Void callback_); - [Throws, DtsName="on", DtsTag="'simStateChange'"] - static void onSimStateChange(ObserverOptions options, Callback_SimStateData_Void callback_); - [Throws, DtsName="off", DtsTag="'simStateChange'"] - static void offSimStateChange(optional Callback_SimStateData_Void callback_); - [Throws, DtsName="on", DtsTag="'iccAccountInfoChange'"] - static void onIccAccountInfoChange(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'iccAccountInfoChange'"] - static void offIccAccountInfoChange(optional Callback_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.telephony.radio.idl b/idl/@ohos.telephony.radio.idl index 3a9c4de..d68dc3f 100644 --- a/idl/@ohos.telephony.radio.idl +++ b/idl/@ohos.telephony.radio.idl @@ -1,42 +1,187 @@ -package ohos.telephony; +package ohos.telephony.radio; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace radio { - [Async, Synthetic] callback AsyncCallback_NetworkRadioTech_Void = void (NetworkRadioTech result); + [Throws] + void getRadioTech(number slotId, AsyncCallback_NetworkRadioTech_Void callback_); + [Throws] + async NetworkRadioTech getRadioTech(number slotId); + NetworkRadioTech getRadioTechSync(number slotId); [Async, Synthetic] callback AsyncCallback_NetworkState_Void = void (NetworkState result); + [Throws] + void getNetworkState(number slotId, AsyncCallback_NetworkState_Void callback_); + [Throws] + async NetworkState getNetworkState(optional number slotId); + [Throws] + void getNetworkState(AsyncCallback_NetworkState_Void callback_); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void sendUpdateCellLocationRequest(number slotId, AsyncCallback_Void callback_); + [Throws] + async void sendUpdateCellLocationRequest(optional number slotId); + [Throws] + void sendUpdateCellLocationRequest(AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_Array_CellInformation_Void = void (sequence result); + [Throws] + void getCellInformation(number slotId, AsyncCallback_Array_CellInformation_Void callback_); + [Throws] + async sequence getCellInformation(optional number slotId); + [Throws] + void getCellInformation(AsyncCallback_Array_CellInformation_Void callback_); [Async, Synthetic] callback AsyncCallback_NetworkSelectionMode_Void = void (NetworkSelectionMode result); + [Throws] + void getNetworkSelectionMode(number slotId, AsyncCallback_NetworkSelectionMode_Void callback_); + [Throws] + async NetworkSelectionMode getNetworkSelectionMode(number slotId); + [Throws] + void setNetworkSelectionMode(NetworkSelectionModeOptions options, AsyncCallback_Void callback_); + [Throws] + async void setNetworkSelectionMode(NetworkSelectionModeOptions options); [Async, Synthetic] callback AsyncCallback_NetworkSearchResult_Void = void (NetworkSearchResult result); + [Throws] + void getNetworkSearchInformation(number slotId, AsyncCallback_NetworkSearchResult_Void callback_); + [Throws] + async NetworkSearchResult getNetworkSearchInformation(number slotId); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getISOCountryCodeForNetwork(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getISOCountryCodeForNetwork(number slotId); + String getISOCountryCodeForNetworkSync(number slotId); [Async, Synthetic] callback AsyncCallback_NrOptionMode_Void = void (NrOptionMode result); + [Deprecated, Throws] + void getNrOptionMode(number slotId, AsyncCallback_NrOptionMode_Void callback_); + [Deprecated, Throws] + async NrOptionMode getNrOptionMode(optional number slotId); + [Deprecated, Throws] + void getNrOptionMode(AsyncCallback_NrOptionMode_Void callback_); + [Throws] + void getIMEI(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getIMEI(optional number slotId); + [Throws] + void getIMEI(AsyncCallback_String_Void callback_); + [Throws] + void getMEID(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getMEID(optional number slotId); + [Throws] + void getMEID(AsyncCallback_String_Void callback_); + [Throws] + void getUniqueDeviceId(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getUniqueDeviceId(optional number slotId); + [Throws] + void getUniqueDeviceId(AsyncCallback_String_Void callback_); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void getPrimarySlotId(AsyncCallback_Number_Void callback_); + [Throws] + async number getPrimarySlotId(); + [Throws] + void setPrimarySlotId(number slotId, AsyncCallback_Void callback_); + [Throws] + async void setPrimarySlotId(number slotId); [Async, Synthetic] callback AsyncCallback_Array_SignalInformation_Void = void (sequence result); + [Throws] + void getSignalInformation(number slotId, AsyncCallback_Array_SignalInformation_Void callback_); + [Throws] + async sequence getSignalInformation(number slotId); + sequence getSignalInformationSync(number slotId); + [Deprecated] + boolean isNrSupported(); + [Deprecated] + boolean isNrSupported(number slotId); + boolean isNRSupported(); + boolean isNRSupported(number slotId); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isRadioOn(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isRadioOn(optional number slotId); + [Throws] + void isRadioOn(AsyncCallback_Boolean_Void callback_); + [Throws] + void turnOnRadio(number slotId, AsyncCallback_Void callback_); + [Throws] + async void turnOnRadio(optional number slotId); + [Throws] + void turnOnRadio(AsyncCallback_Void callback_); + [Throws] + void turnOffRadio(number slotId, AsyncCallback_Void callback_); + [Throws] + async void turnOffRadio(optional number slotId); + [Throws] + void turnOffRadio(AsyncCallback_Void callback_); + [Throws] + void getOperatorName(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getOperatorName(number slotId); + String getOperatorNameSync(number slotId); + [Throws] + void setPreferredNetwork(number slotId, PreferredNetworkMode networkMode, AsyncCallback_Void callback_); + [Throws] + async void setPreferredNetwork(number slotId, PreferredNetworkMode networkMode); [Async, Synthetic] callback AsyncCallback_PreferredNetworkMode_Void = void (PreferredNetworkMode result); + [Throws] + void getPreferredNetwork(number slotId, AsyncCallback_PreferredNetworkMode_Void callback_); + [Throws] + async PreferredNetworkMode getPreferredNetwork(number slotId); [Async, Synthetic] callback AsyncCallback_ImsRegInfo_Void = void (ImsRegInfo result); + [Throws] + void getImsRegInfo(number slotId, ImsServiceType imsType, AsyncCallback_ImsRegInfo_Void callback_); + [Throws] + async ImsRegInfo getImsRegInfo(number slotId, ImsServiceType imsType); [Synthetic] callback Callback_ImsRegInfo_Void = void (ImsRegInfo parameter); + [Throws, DtsName="on", DtsTag="'imsRegStateChange'"] + void onImsRegStateChange(number slotId, ImsServiceType imsType, Callback_ImsRegInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'imsRegStateChange'"] + void offImsRegStateChange(number slotId, ImsServiceType imsType, optional Callback_ImsRegInfo_Void callback_); + [Throws] + void getBasebandVersion(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getBasebandVersion(number slotId); + [Throws] + void setNROptionMode(number slotId, NROptionMode mode, AsyncCallback_Void callback_); + [Throws] + async void setNROptionMode(number slotId, NROptionMode mode); [Async, Synthetic] callback AsyncCallback_NROptionMode_Void = void (NROptionMode result); + [Throws] + void getNROptionMode(number slotId, AsyncCallback_NROptionMode_Void callback_); + [Throws] + async NROptionMode getNROptionMode(number slotId); + [Throws] + void setNetworkCapability(number slotId, NetworkCapabilityType type, NetworkCapabilityState state, AsyncCallback_Void callback_); + [Throws] + async void setNetworkCapability(number slotId, NetworkCapabilityType type, NetworkCapabilityState state); [Async, Synthetic] callback AsyncCallback_NetworkCapabilityState_Void = void (NetworkCapabilityState result); + [Throws] + void getNetworkCapability(number slotId, NetworkCapabilityType type, AsyncCallback_NetworkCapabilityState_Void callback_); + [Throws] + async NetworkCapabilityState getNetworkCapability(number slotId, NetworkCapabilityType type); + [Throws] + async void factoryReset(number slotId); + [Throws] + String getIMEISV(number slotId); dictionary PreferredNetworkMode { - number PREFERRED_NETWORK_MODE_GSM = 1; number PREFERRED_NETWORK_MODE_WCDMA = 2; number PREFERRED_NETWORK_MODE_LTE = 3; @@ -71,17 +216,13 @@ namespace radio { number PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM = 40; number PREFERRED_NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA_GSM_EVDO_CDMA = 41; number PREFERRED_NETWORK_MODE_MAX_VALUE = 99; - }; [Entity=Interface] interface NetworkRadioTech { - attribute RadioTechnology psRadioTech; attribute RadioTechnology csRadioTech; - }; dictionary RadioTechnology { - number RADIO_TECHNOLOGY_UNKNOWN = 0; number RADIO_TECHNOLOGY_GSM = 1; number RADIO_TECHNOLOGY_1XRTT = 2; @@ -95,18 +236,14 @@ namespace radio { number RADIO_TECHNOLOGY_LTE_CA = 10; number RADIO_TECHNOLOGY_IWLAN = 11; number RADIO_TECHNOLOGY_NR = 12; - }; [Entity=Interface] interface SignalInformation { - attribute NetworkType signalType; attribute number signalLevel; attribute number dBm; - }; dictionary NetworkType { - number NETWORK_TYPE_UNKNOWN = 0; number NETWORK_TYPE_GSM = 1; number NETWORK_TYPE_CDMA = 2; @@ -114,11 +251,9 @@ namespace radio { number NETWORK_TYPE_TDSCDMA = 4; number NETWORK_TYPE_LTE = 5; number NETWORK_TYPE_NR = 6; - }; [Entity=Interface] interface NetworkState { - attribute String longOperatorName; attribute String shortOperatorName; attribute String plmnNumeric; @@ -128,60 +263,48 @@ namespace radio { attribute NsaState nsaState; attribute boolean isCaActive; attribute boolean isEmergency; - }; dictionary RegState { - number REG_STATE_NO_SERVICE = 0; number REG_STATE_IN_SERVICE = 1; number REG_STATE_EMERGENCY_CALL_ONLY = 2; number REG_STATE_POWER_OFF = 3; - }; dictionary NsaState { - number NSA_STATE_NOT_SUPPORT = 1; number NSA_STATE_NO_DETECT = 2; number NSA_STATE_CONNECTED_DETECT = 3; number NSA_STATE_IDLE_DETECT = 4; number NSA_STATE_DUAL_CONNECTED = 5; number NSA_STATE_SA_ATTACHED = 6; - }; [Entity=Interface] interface CellInformation { - attribute NetworkType networkType; attribute boolean isCamped; attribute number timeStamp; attribute SignalInformation signalInformation; attribute (CdmaCellInformation or GsmCellInformation or LteCellInformation or NrCellInformation or TdscdmaCellInformation or WcdmaCellInformation) data; - }; [Entity=Interface] interface CdmaCellInformation { - attribute number baseId; attribute number latitude; attribute number longitude; attribute number nid; attribute number sid; - }; [Entity=Interface] interface GsmCellInformation { - attribute number lac; attribute number cellId; attribute number arfcn; attribute number bsic; attribute String mcc; attribute String mnc; - }; [Entity=Interface] interface LteCellInformation { - attribute number cgi; attribute number pci; attribute number tac; @@ -190,44 +313,36 @@ namespace radio { attribute String mcc; attribute String mnc; attribute boolean isSupportEndc; - }; [Entity=Interface] interface NrCellInformation { - attribute number nrArfcn; attribute number pci; attribute number tac; attribute number nci; attribute String mcc; attribute String mnc; - }; [Entity=Interface] interface TdscdmaCellInformation { - attribute number lac; attribute number cellId; attribute number cpid; attribute number uarfcn; attribute String mcc; attribute String mnc; - }; [Entity=Interface] interface WcdmaCellInformation { - attribute number lac; attribute number cellId; attribute number psc; attribute number uarfcn; attribute String mcc; attribute String mnc; - }; [Deprecated] dictionary NrOptionMode { - [Deprecated] number NR_OPTION_UNKNOWN = 0; [Deprecated] @@ -236,246 +351,70 @@ namespace radio { number NR_OPTION_SA_ONLY = 2; [Deprecated] number NR_OPTION_NSA_AND_SA = 3; - }; dictionary NROptionMode { - number NR_OPTION_UNKNOWN = 0; number NR_OPTION_NSA_ONLY = 1; number NR_OPTION_SA_ONLY = 2; number NR_OPTION_NSA_AND_SA = 3; - }; [Entity=Interface] interface NetworkSearchResult { - attribute boolean isNetworkSearchSuccess; attribute sequence networkSearchResult; - }; [Entity=Interface] interface NetworkInformation { - attribute String operatorName; attribute String operatorNumeric; attribute NetworkInformationState state; attribute String radioTech; - }; dictionary NetworkInformationState { - number NETWORK_UNKNOWN = 0; number NETWORK_AVAILABLE = 1; number NETWORK_CURRENT = 2; number NETWORK_FORBIDDEN = 3; - }; [Entity=Interface] interface NetworkSelectionModeOptions { - attribute number slotId; attribute NetworkSelectionMode selectMode; attribute NetworkInformation networkInformation; attribute boolean resumeSelection; - }; dictionary NetworkSelectionMode { - number NETWORK_SELECTION_UNKNOWN = 0; number NETWORK_SELECTION_AUTOMATIC = 1; number NETWORK_SELECTION_MANUAL = 2; - }; dictionary ImsRegState { - number IMS_UNREGISTERED = 0; number IMS_REGISTERED = 1; - }; dictionary ImsRegTech { - number REGISTRATION_TECH_NONE = 0; number REGISTRATION_TECH_LTE = 1; number REGISTRATION_TECH_IWLAN = 2; number REGISTRATION_TECH_NR = 3; - }; [Entity=Interface] interface ImsRegInfo { - attribute ImsRegState imsRegState; attribute ImsRegTech imsRegTech; - }; dictionary ImsServiceType { - number TYPE_VOICE = 0; number TYPE_VIDEO = 1; number TYPE_UT = 2; number TYPE_SMS = 3; - }; dictionary NetworkCapabilityType { - number SERVICE_TYPE_LTE = 0; number SERVICE_TYPE_NR = 1; - }; dictionary NetworkCapabilityState { - number SERVICE_CAPABILITY_OFF = 0; number SERVICE_CAPABILITY_ON = 1; - - }; - [GlobalScope] - interface GlobalScope_radio_ohos_telephony_radio { - - [Throws] - static void getRadioTech(number slotId, AsyncCallback_NetworkRadioTech_Void callback_); - [Throws] - static async NetworkRadioTech getRadioTech(number slotId); - [Throws] - static void getNetworkState(number slotId, AsyncCallback_NetworkState_Void callback_); - [Throws] - static async NetworkState getNetworkState(optional number slotId); - [Throws] - static void getNetworkState(AsyncCallback_NetworkState_Void callback_); - [Throws] - static void sendUpdateCellLocationRequest(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void sendUpdateCellLocationRequest(optional number slotId); - [Throws] - static void sendUpdateCellLocationRequest(AsyncCallback_Void callback_); - [Throws] - static void getCellInformation(number slotId, AsyncCallback_Array_CellInformation_Void callback_); - [Throws] - static async sequence getCellInformation(optional number slotId); - [Throws] - static void getCellInformation(AsyncCallback_Array_CellInformation_Void callback_); - [Throws] - static void getNetworkSelectionMode(number slotId, AsyncCallback_NetworkSelectionMode_Void callback_); - [Throws] - static async NetworkSelectionMode getNetworkSelectionMode(number slotId); - [Throws] - static void setNetworkSelectionMode(NetworkSelectionModeOptions options, AsyncCallback_Void callback_); - [Throws] - static async void setNetworkSelectionMode(NetworkSelectionModeOptions options); - [Throws] - static void getNetworkSearchInformation(number slotId, AsyncCallback_NetworkSearchResult_Void callback_); - [Throws] - static async NetworkSearchResult getNetworkSearchInformation(number slotId); - [Throws] - static void getISOCountryCodeForNetwork(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getISOCountryCodeForNetwork(number slotId); - static String getISOCountryCodeForNetworkSync(number slotId); - [Deprecated, Throws] - static void getNrOptionMode(number slotId, AsyncCallback_NrOptionMode_Void callback_); - [Deprecated, Throws] - static async NrOptionMode getNrOptionMode(optional number slotId); - [Deprecated, Throws] - static void getNrOptionMode(AsyncCallback_NrOptionMode_Void callback_); - [Throws] - static void getIMEI(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getIMEI(optional number slotId); - [Throws] - static void getIMEI(AsyncCallback_String_Void callback_); - [Throws] - static void getMEID(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getMEID(optional number slotId); - [Throws] - static void getMEID(AsyncCallback_String_Void callback_); - [Throws] - static void getUniqueDeviceId(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getUniqueDeviceId(optional number slotId); - [Throws] - static void getUniqueDeviceId(AsyncCallback_String_Void callback_); - [Throws] - static void getPrimarySlotId(AsyncCallback_Number_Void callback_); - [Throws] - static async number getPrimarySlotId(); - [Throws] - static void setPrimarySlotId(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void setPrimarySlotId(number slotId); - [Throws] - static void getSignalInformation(number slotId, AsyncCallback_Array_SignalInformation_Void callback_); - [Throws] - static async sequence getSignalInformation(number slotId); - static sequence getSignalInformationSync(number slotId); - [Deprecated] - static boolean isNrSupported(); - [Deprecated] - static boolean isNrSupported(number slotId); - static boolean isNRSupported(); - static boolean isNRSupported(number slotId); - [Throws] - static void isRadioOn(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isRadioOn(optional number slotId); - [Throws] - static void isRadioOn(AsyncCallback_Boolean_Void callback_); - [Throws] - static void turnOnRadio(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void turnOnRadio(optional number slotId); - [Throws] - static void turnOnRadio(AsyncCallback_Void callback_); - [Throws] - static void turnOffRadio(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void turnOffRadio(optional number slotId); - [Throws] - static void turnOffRadio(AsyncCallback_Void callback_); - [Throws] - static void getOperatorName(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getOperatorName(number slotId); - static String getOperatorNameSync(number slotId); - [Throws] - static void setPreferredNetwork(number slotId, PreferredNetworkMode networkMode, AsyncCallback_Void callback_); - [Throws] - static async void setPreferredNetwork(number slotId, PreferredNetworkMode networkMode); - [Throws] - static void getPreferredNetwork(number slotId, AsyncCallback_PreferredNetworkMode_Void callback_); - [Throws] - static async PreferredNetworkMode getPreferredNetwork(number slotId); - [Throws] - static void getImsRegInfo(number slotId, ImsServiceType imsType, AsyncCallback_ImsRegInfo_Void callback_); - [Throws] - static async ImsRegInfo getImsRegInfo(number slotId, ImsServiceType imsType); - [Throws, DtsName="on", DtsTag="'imsRegStateChange'"] - static void onImsRegStateChange(number slotId, ImsServiceType imsType, Callback_ImsRegInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'imsRegStateChange'"] - static void offImsRegStateChange(number slotId, ImsServiceType imsType, optional Callback_ImsRegInfo_Void callback_); - [Throws] - static void getBasebandVersion(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getBasebandVersion(number slotId); - [Throws] - static void setNROptionMode(number slotId, NROptionMode mode, AsyncCallback_Void callback_); - [Throws] - static async void setNROptionMode(number slotId, NROptionMode mode); - [Throws] - static void getNROptionMode(number slotId, AsyncCallback_NROptionMode_Void callback_); - [Throws] - static async NROptionMode getNROptionMode(number slotId); - [Throws] - static void setNetworkCapability(number slotId, NetworkCapabilityType type, NetworkCapabilityState state, AsyncCallback_Void callback_); - [Throws] - static async void setNetworkCapability(number slotId, NetworkCapabilityType type, NetworkCapabilityState state); - [Throws] - static void getNetworkCapability(number slotId, NetworkCapabilityType type, AsyncCallback_NetworkCapabilityState_Void callback_); - [Throws] - static async NetworkCapabilityState getNetworkCapability(number slotId, NetworkCapabilityType type); - [Throws] - static async void factoryReset(number slotId); - [Throws] - static String getIMEISV(number slotId); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.telephony.sim.idl b/idl/@ohos.telephony.sim.idl index f8f7d1e..0b98a03 100644 --- a/idl/@ohos.telephony.sim.idl +++ b/idl/@ohos.telephony.sim.idl @@ -1,43 +1,250 @@ -package ohos.telephony; +package ohos.telephony.sim; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace sim { - [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + void isSimActive(number slotId, AsyncCallback_Boolean_Void callback_); + async boolean isSimActive(number slotId); + boolean isSimActiveSync(number slotId); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + void getDefaultVoiceSlotId(AsyncCallback_Number_Void callback_); + async number getDefaultVoiceSlotId(); + [Throws] + void hasOperatorPrivileges(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean hasOperatorPrivileges(number slotId); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getISOCountryCodeForSim(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getISOCountryCodeForSim(number slotId); + String getISOCountryCodeForSimSync(number slotId); + [Throws] + void getSimOperatorNumeric(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getSimOperatorNumeric(number slotId); + String getSimOperatorNumericSync(number slotId); + [Throws] + void getSimSpn(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getSimSpn(number slotId); + String getSimSpnSync(number slotId); [Async, Synthetic] callback AsyncCallback_SimState_Void = void (SimState result); + [Throws] + void getSimState(number slotId, AsyncCallback_SimState_Void callback_); + [Throws] + async SimState getSimState(number slotId); + SimState getSimStateSync(number slotId); [Async, Synthetic] callback AsyncCallback_CardType_Void = void (CardType result); + [Throws] + void getCardType(number slotId, AsyncCallback_CardType_Void callback_); + [Throws] + async CardType getCardType(number slotId); + CardType getCardTypeSync(number slotId); + [Throws] + void getSimIccId(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getSimIccId(number slotId); + [Throws] + void getVoiceMailIdentifier(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getVoiceMailIdentifier(number slotId); + [Throws] + void getVoiceMailNumber(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getVoiceMailNumber(number slotId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void setVoiceMailInfo(number slotId, String mailName, String mailNumber, AsyncCallback_Void callback_); + [Throws] + async void setVoiceMailInfo(number slotId, String mailName, String mailNumber); + [Throws] + void getSimTelephoneNumber(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getSimTelephoneNumber(number slotId); + [Throws] + void getSimGid1(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getSimGid1(number slotId); + number getMaxSimCount(); + [Throws] + void getIMSI(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getIMSI(number slotId); + [Throws] + boolean isOperatorSimCard(number slotId, OperatorSimCard operator); + [Throws] + void hasSimCard(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean hasSimCard(number slotId); + boolean hasSimCardSync(number slotId); [Async, Synthetic] callback AsyncCallback_IccAccountInfo_Void = void (IccAccountInfo result); + [Throws] + void getSimAccountInfo(number slotId, AsyncCallback_IccAccountInfo_Void callback_); + [Throws] + async IccAccountInfo getSimAccountInfo(number slotId); [Async, Synthetic] callback AsyncCallback_Array_IccAccountInfo_Void = void (sequence result); + [Throws] + void getActiveSimAccountInfoList(AsyncCallback_Array_IccAccountInfo_Void callback_); + [Throws] + async sequence getActiveSimAccountInfoList(); + [Throws] + void setDefaultVoiceSlotId(number slotId, AsyncCallback_Void callback_); + [Throws] + async void setDefaultVoiceSlotId(number slotId); + [Throws] + void activateSim(number slotId, AsyncCallback_Void callback_); + [Throws] + async void activateSim(number slotId); + [Throws] + void deactivateSim(number slotId, AsyncCallback_Void callback_); + [Throws] + async void deactivateSim(number slotId); + [Throws] + void setShowName(number slotId, String name, AsyncCallback_Void callback_); + [Throws] + async void setShowName(number slotId, String name); + [Throws] + void getShowName(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getShowName(number slotId); + [Throws] + void setShowNumber(number slotId, String number_, AsyncCallback_Void callback_); + [Throws] + async void setShowNumber(number slotId, String number_); + [Throws] + void getShowNumber(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getShowNumber(number slotId); [Async, Synthetic] callback AsyncCallback_Array_OperatorConfig_Void = void (sequence result); + [Throws] + void getOperatorConfigs(number slotId, AsyncCallback_Array_OperatorConfig_Void callback_); + [Throws] + async sequence getOperatorConfigs(number slotId); [Async, Synthetic] callback AsyncCallback_LockStatusResponse_Void = void (LockStatusResponse result); + [Throws] + void unlockPin(number slotId, String pin, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse unlockPin(number slotId, String pin); + [Throws] + void unlockPuk(number slotId, String newPin, String puk, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse unlockPuk(number slotId, String newPin, String puk); + [Throws] + void alterPin(number slotId, String newPin, String oldPin, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse alterPin(number slotId, String newPin, String oldPin); + [Throws] + void setLockState(number slotId, LockInfo options, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse setLockState(number slotId, LockInfo options); + [Throws] + void unlockPin2(number slotId, String pin2, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse unlockPin2(number slotId, String pin2); + [Throws] + void unlockPuk2(number slotId, String newPin2, String puk2, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse unlockPuk2(number slotId, String newPin2, String puk2); + [Throws] + void alterPin2(number slotId, String newPin2, String oldPin2, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse alterPin2(number slotId, String newPin2, String oldPin2); [Async, Synthetic] callback AsyncCallback_Array_DiallingNumbersInfo_Void = void (sequence result); + [Throws] + void queryIccDiallingNumbers(number slotId, ContactType type, AsyncCallback_Array_DiallingNumbersInfo_Void callback_); + [Throws] + async sequence queryIccDiallingNumbers(number slotId, ContactType type); + [Throws] + void addIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers, AsyncCallback_Void callback_); + [Throws] + async void addIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers); + [Throws] + void delIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers, AsyncCallback_Void callback_); + [Throws] + async void delIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers); + [Throws] + void updateIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers, AsyncCallback_Void callback_); + [Throws] + async void updateIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers); [Async, Synthetic] callback AsyncCallback_LockState_Void = void (LockState result); + [Throws] + void getLockState(number slotId, LockType lockType, AsyncCallback_LockState_Void callback_); + [Throws] + async LockState getLockState(number slotId, LockType lockType); + [Throws] + void sendEnvelopeCmd(number slotId, String cmd, AsyncCallback_Void callback_); + [Throws] + async void sendEnvelopeCmd(number slotId, String cmd); + [Throws] + void sendTerminalResponseCmd(number slotId, String cmd, AsyncCallback_Void callback_); + [Throws] + async void sendTerminalResponseCmd(number slotId, String cmd); + [Throws] + void unlockSimLock(number slotId, PersoLockInfo lockInfo, AsyncCallback_LockStatusResponse_Void callback_); + [Throws] + async LockStatusResponse unlockSimLock(number slotId, PersoLockInfo lockInfo); + [Throws] + void getOpKey(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getOpKey(number slotId); + String getOpKeySync(number slotId); + [Throws] + void getOpName(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getOpName(number slotId); + String getOpNameSync(number slotId); + [Throws] + void getDefaultVoiceSimId(AsyncCallback_Number_Void callback_); + [Throws] + async number getDefaultVoiceSimId(); [Async, Synthetic] callback AsyncCallback_DsdsMode_Void = void (DsdsMode result); + [Throws] + void getDsdsMode(AsyncCallback_DsdsMode_Void callback_); + [Throws] + async DsdsMode getDsdsMode(); + [Throws] + async SimAuthenticationResponse getSimAuthentication(number slotId, AuthType authType, String authData); + [Throws] + void getAllSimAccountInfoList(AsyncCallback_Array_IccAccountInfo_Void callback_); + [Throws] + async sequence getAllSimAccountInfoList(); + [Async, Synthetic] + callback AsyncCallback_SimLabel_Void = void (SimLabel result); + [Throws] + void getSimLabel(number slotId, AsyncCallback_SimLabel_Void callback_); + [Throws] + async SimLabel getSimLabel(number slotId); + SimLabel getSimLabelSync(number slotId); + dictionary SimType { + number PSIM = 0; + number ESIM = 1; + }; + [Entity=Interface] + interface SimLabel { + attribute SimType simType; + attribute number index; + }; [Entity=Interface] interface OperatorConfig { - attribute String field; attribute String value; - }; [Entity=Interface] interface IccAccountInfo { - attribute number simId; attribute number slotIndex; attribute boolean isEsim; @@ -45,19 +252,15 @@ namespace sim { attribute String iccId; attribute String showName; attribute String showNumber; - }; [Entity=Interface] interface LockStatusResponse { - attribute number result; [Optional] attribute number remain; - }; [Entity=Interface] interface DiallingNumbersInfo { - attribute String alphaTag; [DtsName="number"] attribute String number_; @@ -65,31 +268,23 @@ namespace sim { attribute number recordNumber; [Optional] attribute String pin2; - }; [Entity=Interface] interface LockInfo { - attribute LockType lockType; attribute String password; attribute LockState state; - }; [Entity=Interface] interface PersoLockInfo { - attribute PersoLockType lockType; attribute String password; - }; dictionary LockType { - number PIN_LOCK = 1; number FDN_LOCK = 2; - }; dictionary CardType { - number UNKNOWN_CARD = -1; number SINGLE_MODE_SIM_CARD = 10; number SINGLE_MODE_USIM_CARD = 20; @@ -100,32 +295,24 @@ namespace sim { number DUAL_MODE_TELECOM_LTE_CARD = 43; number DUAL_MODE_UG_CARD = 50; number SINGLE_MODE_ISIM_CARD = 60; - }; dictionary SimState { - number SIM_STATE_UNKNOWN = 0; number SIM_STATE_NOT_PRESENT = 1; number SIM_STATE_LOCKED = 2; number SIM_STATE_NOT_READY = 3; number SIM_STATE_READY = 4; number SIM_STATE_LOADED = 5; - }; dictionary LockState { - number LOCK_OFF = 0; number LOCK_ON = 1; - }; dictionary ContactType { - number GENERAL_CONTACT = 1; number FIXED_DIALING = 2; - }; dictionary PersoLockType { - number PN_PIN_LOCK = 0; number PN_PUK_LOCK = 1; number PU_PIN_LOCK = 2; @@ -136,10 +323,8 @@ namespace sim { number PC_PUK_LOCK = 7; number SIM_PIN_LOCK = 8; number SIM_PUK_LOCK = 9; - }; dictionary OperatorConfigKey { - String KEY_VOICE_MAIL_NUMBER_STRING = "voice_mail_number_string"; String KEY_IMS_SWITCH_ON_BY_DEFAULT_BOOL = "ims_switch_on_by_default_bool"; String KEY_HIDE_IMS_SWITCH_BOOL = "hide_ims_switch_bool"; @@ -160,229 +345,24 @@ namespace sim { String KEY_PNN_CUST_STRING_ARRAY = "pnn_cust_string_array"; String KEY_OPL_CUST_STRING_ARRAY = "opl_cust_string_array"; String KEY_EMERGENCY_CALL_STRING_ARRAY = "emergency_call_string_array"; - }; dictionary DsdsMode { - number DSDS_MODE_V2 = 0; number DSDS_MODE_V3 = 1; number DSDS_MODE_V5_TDM = 2; number DSDS_MODE_V5_DSDA = 3; - }; dictionary OperatorSimCard { - String CHINA_TELECOM_CARD = "china_telecom_card"; - }; dictionary AuthType { - number SIM_AUTH_EAP_SIM_TYPE = 128; number SIM_AUTH_EAP_AKA_TYPE = 129; - }; [Entity=Interface] interface SimAuthenticationResponse { - attribute number simStatusWord1; attribute number simStatusWord2; attribute String response; - - }; - [GlobalScope] - interface GlobalScope_sim_ohos_telephony_sim { - - static void isSimActive(number slotId, AsyncCallback_Boolean_Void callback_); - static async boolean isSimActive(number slotId); - static boolean isSimActiveSync(number slotId); - static void getDefaultVoiceSlotId(AsyncCallback_Number_Void callback_); - static async number getDefaultVoiceSlotId(); - [Throws] - static void hasOperatorPrivileges(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean hasOperatorPrivileges(number slotId); - [Throws] - static void getISOCountryCodeForSim(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getISOCountryCodeForSim(number slotId); - static String getISOCountryCodeForSimSync(number slotId); - [Throws] - static void getSimOperatorNumeric(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getSimOperatorNumeric(number slotId); - static String getSimOperatorNumericSync(number slotId); - [Throws] - static void getSimSpn(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getSimSpn(number slotId); - static String getSimSpnSync(number slotId); - [Throws] - static void getSimState(number slotId, AsyncCallback_SimState_Void callback_); - [Throws] - static async SimState getSimState(number slotId); - static SimState getSimStateSync(number slotId); - [Throws] - static void getCardType(number slotId, AsyncCallback_CardType_Void callback_); - [Throws] - static async CardType getCardType(number slotId); - static CardType getCardTypeSync(number slotId); - [Throws] - static void getSimIccId(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getSimIccId(number slotId); - [Throws] - static void getVoiceMailIdentifier(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getVoiceMailIdentifier(number slotId); - [Throws] - static void getVoiceMailNumber(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getVoiceMailNumber(number slotId); - [Throws] - static void setVoiceMailInfo(number slotId, String mailName, String mailNumber, AsyncCallback_Void callback_); - [Throws] - static async void setVoiceMailInfo(number slotId, String mailName, String mailNumber); - [Throws] - static void getSimTelephoneNumber(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getSimTelephoneNumber(number slotId); - [Throws] - static void getSimGid1(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getSimGid1(number slotId); - static number getMaxSimCount(); - [Throws] - static void getIMSI(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getIMSI(number slotId); - [Throws] - static boolean isOperatorSimCard(number slotId, OperatorSimCard operator); - [Throws] - static void hasSimCard(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean hasSimCard(number slotId); - static boolean hasSimCardSync(number slotId); - [Throws] - static void getSimAccountInfo(number slotId, AsyncCallback_IccAccountInfo_Void callback_); - [Throws] - static async IccAccountInfo getSimAccountInfo(number slotId); - [Throws] - static void getActiveSimAccountInfoList(AsyncCallback_Array_IccAccountInfo_Void callback_); - [Throws] - static async sequence getActiveSimAccountInfoList(); - [Throws] - static void setDefaultVoiceSlotId(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void setDefaultVoiceSlotId(number slotId); - [Throws] - static void activateSim(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void activateSim(number slotId); - [Throws] - static void deactivateSim(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void deactivateSim(number slotId); - [Throws] - static void setShowName(number slotId, String name, AsyncCallback_Void callback_); - [Throws] - static async void setShowName(number slotId, String name); - [Throws] - static void getShowName(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getShowName(number slotId); - [Throws] - static void setShowNumber(number slotId, String number_, AsyncCallback_Void callback_); - [Throws] - static async void setShowNumber(number slotId, String number_); - [Throws] - static void getShowNumber(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getShowNumber(number slotId); - [Throws] - static void getOperatorConfigs(number slotId, AsyncCallback_Array_OperatorConfig_Void callback_); - [Throws] - static async sequence getOperatorConfigs(number slotId); - [Throws] - static void unlockPin(number slotId, String pin, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse unlockPin(number slotId, String pin); - [Throws] - static void unlockPuk(number slotId, String newPin, String puk, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse unlockPuk(number slotId, String newPin, String puk); - [Throws] - static void alterPin(number slotId, String newPin, String oldPin, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse alterPin(number slotId, String newPin, String oldPin); - [Throws] - static void setLockState(number slotId, LockInfo options, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse setLockState(number slotId, LockInfo options); - [Throws] - static void unlockPin2(number slotId, String pin2, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse unlockPin2(number slotId, String pin2); - [Throws] - static void unlockPuk2(number slotId, String newPin2, String puk2, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse unlockPuk2(number slotId, String newPin2, String puk2); - [Throws] - static void alterPin2(number slotId, String newPin2, String oldPin2, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse alterPin2(number slotId, String newPin2, String oldPin2); - [Throws] - static void queryIccDiallingNumbers(number slotId, ContactType type, AsyncCallback_Array_DiallingNumbersInfo_Void callback_); - [Throws] - static async sequence queryIccDiallingNumbers(number slotId, ContactType type); - [Throws] - static void addIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers, AsyncCallback_Void callback_); - [Throws] - static async void addIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers); - [Throws] - static void delIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers, AsyncCallback_Void callback_); - [Throws] - static async void delIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers); - [Throws] - static void updateIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers, AsyncCallback_Void callback_); - [Throws] - static async void updateIccDiallingNumbers(number slotId, ContactType type, DiallingNumbersInfo diallingNumbers); - [Throws] - static void getLockState(number slotId, LockType lockType, AsyncCallback_LockState_Void callback_); - [Throws] - static async LockState getLockState(number slotId, LockType lockType); - [Throws] - static void sendEnvelopeCmd(number slotId, String cmd, AsyncCallback_Void callback_); - [Throws] - static async void sendEnvelopeCmd(number slotId, String cmd); - [Throws] - static void sendTerminalResponseCmd(number slotId, String cmd, AsyncCallback_Void callback_); - [Throws] - static async void sendTerminalResponseCmd(number slotId, String cmd); - [Throws] - static void unlockSimLock(number slotId, PersoLockInfo lockInfo, AsyncCallback_LockStatusResponse_Void callback_); - [Throws] - static async LockStatusResponse unlockSimLock(number slotId, PersoLockInfo lockInfo); - [Throws] - static void getOpKey(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getOpKey(number slotId); - static String getOpKeySync(number slotId); - [Throws] - static void getOpName(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getOpName(number slotId); - static String getOpNameSync(number slotId); - [Throws] - static void getDefaultVoiceSimId(AsyncCallback_Number_Void callback_); - [Throws] - static async number getDefaultVoiceSimId(); - [Throws] - static void getDsdsMode(AsyncCallback_DsdsMode_Void callback_); - [Throws] - static async DsdsMode getDsdsMode(); - [Throws] - static async SimAuthenticationResponse getSimAuthentication(number slotId, AuthType authType, String authData); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.telephony.sms.idl b/idl/@ohos.telephony.sms.idl index c4b09f7..2933daf 100644 --- a/idl/@ohos.telephony.sms.idl +++ b/idl/@ohos.telephony.sms.idl @@ -1,57 +1,131 @@ -package ohos.telephony; +package ohos.telephony.sms; import ohos.base.AsyncCallback as AsyncCallback; -import application.Context as Context; +import application.BaseContext.default as Context; +[DefaultExport] namespace sms { - [Async, Synthetic] callback AsyncCallback_Array_String_Void = void (sequence result); + [Throws] + void splitMessage(String content, AsyncCallback_Array_String_Void callback_); + [Throws] + async sequence splitMessage(String content); [Async, Synthetic] callback AsyncCallback_ShortMessage_Void = void (ShortMessage result); + [Throws] + void createMessage(sequence pdu, String specification, AsyncCallback_ShortMessage_Void callback_); + [Throws] + async ShortMessage createMessage(sequence pdu, String specification); + [Deprecated, Throws] + void sendMessage(SendMessageOptions options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void sendShortMessage(SendMessageOptions options, AsyncCallback_Void callback_); + [Throws] + async void sendShortMessage(SendMessageOptions options); + [Throws] + void setDefaultSmsSlotId(number slotId, AsyncCallback_Void callback_); + [Throws] + async void setDefaultSmsSlotId(number slotId); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + void getDefaultSmsSlotId(AsyncCallback_Number_Void callback_); + async number getDefaultSmsSlotId(); + [Throws] + void setSmscAddr(number slotId, String smscAddr, AsyncCallback_Void callback_); + [Throws] + async void setSmscAddr(number slotId, String smscAddr); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void getSmscAddr(number slotId, AsyncCallback_String_Void callback_); + [Throws] + async String getSmscAddr(number slotId); + boolean hasSmsCapability(); + [Throws] + void addSimMessage(SimMessageOptions options, AsyncCallback_Void callback_); + [Throws] + async void addSimMessage(SimMessageOptions options); + [Throws] + void delSimMessage(number slotId, number msgIndex, AsyncCallback_Void callback_); + [Throws] + async void delSimMessage(number slotId, number msgIndex); + [Throws] + void updateSimMessage(UpdateSimMessageOptions options, AsyncCallback_Void callback_); + [Throws] + async void updateSimMessage(UpdateSimMessageOptions options); [Async, Synthetic] callback AsyncCallback_Array_SimShortMessage_Void = void (sequence result); + [Throws] + void getAllSimMessages(number slotId, AsyncCallback_Array_SimShortMessage_Void callback_); + [Throws] + async sequence getAllSimMessages(number slotId); + [Throws] + void setCBConfig(CBConfigOptions options, AsyncCallback_Void callback_); + [Throws] + async void setCBConfig(CBConfigOptions options); [Async, Synthetic] callback AsyncCallback_SmsSegmentsInfo_Void = void (SmsSegmentsInfo result); + [Throws] + void getSmsSegmentsInfo(number slotId, String message, boolean force7bit, AsyncCallback_SmsSegmentsInfo_Void callback_); + [Throws] + async SmsSegmentsInfo getSmsSegmentsInfo(number slotId, String message, boolean force7bit); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isImsSmsSupported(number slotId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isImsSmsSupported(number slotId); + [Throws] + void getImsShortMessageFormat(AsyncCallback_String_Void callback_); + [Throws] + async String getImsShortMessageFormat(); [Async, Synthetic] callback AsyncCallback_MmsInformation_Void = void (MmsInformation result); + [Throws] + void decodeMms((String or sequence) mmsFilePathName, AsyncCallback_MmsInformation_Void callback_); + [Throws] + async MmsInformation decodeMms((String or sequence) mmsFilePathName); [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); + [Throws] + void encodeMms(MmsInformation mms, AsyncCallback_Array_Number_Void callback_); + [Throws] + async sequence encodeMms(MmsInformation mms); + [Throws] + void getDefaultSmsSimId(AsyncCallback_Number_Void callback_); + [Throws] + async number getDefaultSmsSimId(); [Entity=Interface] interface MmsInformation { - attribute MessageType messageType; attribute (MmsSendReq or MmsSendConf or MmsNotificationInd or MmsRespInd or MmsRetrieveConf or MmsAcknowledgeInd or MmsDeliveryInd or MmsReadOrigInd or MmsReadRecInd) mmsType; [Optional] attribute sequence attachment; - }; + [Throws] + void sendMms(Context context, MmsParams mmsParams, AsyncCallback_Void callback_); + [Throws] + async void sendMms(Context context, MmsParams mmsParams); + [Throws] + void downloadMms(Context context, MmsParams mmsParams, AsyncCallback_Void callback_); + [Throws] + async void downloadMms(Context context, MmsParams mmsParams); [Entity=Interface] interface MmsParams { - attribute number slotId; attribute String mmsc; attribute String data; [Optional] attribute MmsConfig mmsConfig; - }; [Entity=Interface] interface MmsConfig { - attribute String userAgent; attribute String userAgentProfile; - }; [Entity=Interface] interface MmsSendReq { - attribute MmsAddress from; attribute String transactionId; attribute String contentType; @@ -78,21 +152,17 @@ namespace sms { attribute number deliveryReport; [Optional] attribute number readReport; - }; [Entity=Interface] interface MmsSendConf { - attribute number responseState; attribute String transactionId; attribute MmsVersionType version; [Optional] attribute String messageId; - }; [Entity=Interface] interface MmsNotificationInd { - attribute String transactionId; attribute number messageClass; attribute number messageSize; @@ -107,21 +177,17 @@ namespace sms { attribute number deliveryReport; [Optional] attribute number contentClass; - }; [Entity=Interface] interface MmsRespInd { - attribute String transactionId; attribute number status; attribute MmsVersionType version; [Optional] attribute ReportType reportAllowed; - }; [Entity=Interface] interface MmsRetrieveConf { - attribute String transactionId; attribute String messageId; attribute number date; @@ -144,41 +210,33 @@ namespace sms { attribute number retrieveStatus; [Optional] attribute String retrieveText; - }; [Entity=Interface] interface MmsAcknowledgeInd { - attribute String transactionId; attribute MmsVersionType version; [Optional] attribute ReportType reportAllowed; - }; [Entity=Interface] interface MmsDeliveryInd { - attribute String messageId; attribute number date; attribute sequence to; attribute number status; attribute MmsVersionType version; - }; [Entity=Interface] interface MmsReadOrigInd { - attribute MmsVersionType version; attribute String messageId; attribute sequence to; attribute MmsAddress from; attribute number date; attribute number readStatus; - }; [Entity=Interface] interface MmsReadRecInd { - attribute MmsVersionType version; attribute String messageId; attribute sequence to; @@ -186,11 +244,9 @@ namespace sms { attribute number readStatus; [Optional] attribute number date; - }; [Entity=Interface] interface MmsAttachment { - attribute String contentId; attribute String contentLocation; attribute DispositionType contentDisposition; @@ -205,17 +261,13 @@ namespace sms { attribute String fileName; [Optional] attribute MmsCharSets charset; - }; [Entity=Interface] interface MmsAddress { - attribute String address; attribute MmsCharSets charset; - }; dictionary MessageType { - number TYPE_MMS_SEND_REQ = 128; number TYPE_MMS_SEND_CONF = 129; number TYPE_MMS_NOTIFICATION_IND = 130; @@ -225,25 +277,19 @@ namespace sms { number TYPE_MMS_DELIVERY_IND = 134; number TYPE_MMS_READ_REC_IND = 135; number TYPE_MMS_READ_ORIG_IND = 136; - }; dictionary MmsPriorityType { - number MMS_LOW = 128; number MMS_NORMAL = 129; number MMS_HIGH = 130; - }; dictionary MmsVersionType { - number MMS_VERSION_1_0 = 16; number MMS_VERSION_1_1 = 17; number MMS_VERSION_1_2 = 18; number MMS_VERSION_1_3 = 19; - }; dictionary MmsCharSets { - number BIG5 = 2026; number ISO_10646_UCS_2 = 1000; number ISO_8859_1 = 4; @@ -258,53 +304,41 @@ namespace sms { number SHIFT_JIS = 17; number US_ASCII = 3; number UTF_8 = 106; - }; dictionary DispositionType { - number FROM_DATA = 0; number ATTACHMENT = 1; number INLINE = 2; - }; dictionary ReportType { - number MMS_YES = 128; number MMS_NO = 129; - }; [Entity=Interface] interface CBConfigOptions { - attribute number slotId; attribute boolean enable; attribute number startMessageId; attribute number endMessageId; attribute RanType ranType; - }; [Entity=Interface] interface SimMessageOptions { - attribute number slotId; attribute String smsc; attribute String pdu; attribute SimMessageStatus status; - }; [Entity=Interface] interface UpdateSimMessageOptions { - attribute number slotId; attribute number msgIndex; attribute SimMessageStatus newStatus; attribute String pdu; attribute String smsc; - }; [Entity=Interface] interface ShortMessage { - attribute String visibleMessageBody; attribute String visibleRawAddress; attribute ShortMessageClass messageClass; @@ -316,33 +350,26 @@ namespace sms { attribute sequence pdu; attribute number status; attribute boolean isSmsStatusReportMessage; - }; [Entity=Interface] interface SimShortMessage { - attribute ShortMessage shortMessage; attribute SimMessageStatus simMessageStatus; attribute number indexOnSim; - }; dictionary SimMessageStatus { - number SIM_MESSAGE_STATUS_FREE = 0; number SIM_MESSAGE_STATUS_READ = 1; number SIM_MESSAGE_STATUS_UNREAD = 3; number SIM_MESSAGE_STATUS_SENT = 5; number SIM_MESSAGE_STATUS_UNSENT = 7; - }; dictionary ShortMessageClass { - number UNKNOWN = 0; number INSTANT_MESSAGE = 1; number OPTIONAL_MESSAGE = 2; number SIM_MESSAGE = 3; number FORWARD_MESSAGE = 4; - }; [Async, Synthetic] callback AsyncCallback_ISendShortMessageCallback_Void = void (ISendShortMessageCallback result); @@ -350,7 +377,6 @@ namespace sms { callback AsyncCallback_IDeliveryShortMessageCallback_Void = void (IDeliveryShortMessageCallback result); [Entity=Interface] interface SendMessageOptions { - attribute number slotId; attribute String destinationHost; [Optional] @@ -362,138 +388,38 @@ namespace sms { attribute AsyncCallback_ISendShortMessageCallback_Void sendCallback; [Optional] attribute AsyncCallback_IDeliveryShortMessageCallback_Void deliveryCallback; - }; [Entity=Interface] interface ISendShortMessageCallback { - attribute SendSmsResult result; attribute String url; attribute boolean isLastPart; - }; [Entity=Interface] interface IDeliveryShortMessageCallback { - attribute sequence pdu; - }; dictionary SendSmsResult { - number SEND_SMS_SUCCESS = 0; number SEND_SMS_FAILURE_UNKNOWN = 1; number SEND_SMS_FAILURE_RADIO_OFF = 2; number SEND_SMS_FAILURE_SERVICE_UNAVAILABLE = 3; - }; dictionary RanType { - number TYPE_GSM = 1; number TYPE_CDMA = 2; - }; [Entity=Interface] interface SmsSegmentsInfo { - attribute number splitCount; attribute number encodeCount; attribute number encodeCountRemaining; attribute SmsEncodingScheme scheme; - }; dictionary SmsEncodingScheme { - number SMS_ENCODING_UNKNOWN = 0; number SMS_ENCODING_7BIT = 1; number SMS_ENCODING_8BIT = 2; number SMS_ENCODING_16BIT = 3; - - }; - [GlobalScope] - interface GlobalScope_sms_ohos_telephony_sms { - - [Throws] - static void splitMessage(String content, AsyncCallback_Array_String_Void callback_); - [Throws] - static async sequence splitMessage(String content); - [Throws] - static void createMessage(sequence pdu, String specification, AsyncCallback_ShortMessage_Void callback_); - [Throws] - static async ShortMessage createMessage(sequence pdu, String specification); - [Deprecated, Throws] - static void sendMessage(SendMessageOptions options); - [Throws] - static void sendShortMessage(SendMessageOptions options, AsyncCallback_Void callback_); - [Throws] - static async void sendShortMessage(SendMessageOptions options); - [Throws] - static void setDefaultSmsSlotId(number slotId, AsyncCallback_Void callback_); - [Throws] - static async void setDefaultSmsSlotId(number slotId); - static void getDefaultSmsSlotId(AsyncCallback_Number_Void callback_); - static async number getDefaultSmsSlotId(); - [Throws] - static void setSmscAddr(number slotId, String smscAddr, AsyncCallback_Void callback_); - [Throws] - static async void setSmscAddr(number slotId, String smscAddr); - [Throws] - static void getSmscAddr(number slotId, AsyncCallback_String_Void callback_); - [Throws] - static async String getSmscAddr(number slotId); - static boolean hasSmsCapability(); - [Throws] - static void addSimMessage(SimMessageOptions options, AsyncCallback_Void callback_); - [Throws] - static async void addSimMessage(SimMessageOptions options); - [Throws] - static void delSimMessage(number slotId, number msgIndex, AsyncCallback_Void callback_); - [Throws] - static async void delSimMessage(number slotId, number msgIndex); - [Throws] - static void updateSimMessage(UpdateSimMessageOptions options, AsyncCallback_Void callback_); - [Throws] - static async void updateSimMessage(UpdateSimMessageOptions options); - [Throws] - static void getAllSimMessages(number slotId, AsyncCallback_Array_SimShortMessage_Void callback_); - [Throws] - static async sequence getAllSimMessages(number slotId); - [Throws] - static void setCBConfig(CBConfigOptions options, AsyncCallback_Void callback_); - [Throws] - static async void setCBConfig(CBConfigOptions options); - [Throws] - static void getSmsSegmentsInfo(number slotId, String message, boolean force7bit, AsyncCallback_SmsSegmentsInfo_Void callback_); - [Throws] - static async SmsSegmentsInfo getSmsSegmentsInfo(number slotId, String message, boolean force7bit); - [Throws] - static void isImsSmsSupported(number slotId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isImsSmsSupported(number slotId); - [Throws] - static void getImsShortMessageFormat(AsyncCallback_String_Void callback_); - [Throws] - static async String getImsShortMessageFormat(); - [Throws] - static void decodeMms((String or sequence) mmsFilePathName, AsyncCallback_MmsInformation_Void callback_); - [Throws] - static async MmsInformation decodeMms((String or sequence) mmsFilePathName); - [Throws] - static void encodeMms(MmsInformation mms, AsyncCallback_Array_Number_Void callback_); - [Throws] - static async sequence encodeMms(MmsInformation mms); - [Throws] - static void getDefaultSmsSimId(AsyncCallback_Number_Void callback_); - [Throws] - static async number getDefaultSmsSimId(); - [Throws] - static void sendMms(Context context, MmsParams mmsParams, AsyncCallback_Void callback_); - [Throws] - static async void sendMms(Context context, MmsParams mmsParams); - [Throws] - static void downloadMms(Context context, MmsParams mmsParams, AsyncCallback_Void callback_); - [Throws] - static async void downloadMms(Context context, MmsParams mmsParams); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.telephony.vcard.idl b/idl/@ohos.telephony.vcard.idl index dbbbfd5..766ae1d 100644 --- a/idl/@ohos.telephony.vcard.idl +++ b/idl/@ohos.telephony.vcard.idl @@ -1,45 +1,35 @@ -package ohos.telephony; +package ohos.telephony.vcard; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.data.dataSharePredicates as dataSharePredicates; -import application.Context as Context; +import ohos.data.dataSharePredicates.default as dataSharePredicates; +import application.BaseContext.default as Context; +[DefaultExport] namespace vcard { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void importVCard(Context context, String filePath, number accountId, AsyncCallback_Void callback_); + [Throws] + async void importVCard(Context context, String filePath, optional number accountId); + [Throws] + void importVCard(Context context, String filePath, AsyncCallback_Void callback_); [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Throws] + void exportVCard(Context context, dataSharePredicates.DataSharePredicates predicates, VCardBuilderOptions options, AsyncCallback_String_Void callback_); + [Throws] + async String exportVCard(Context context, dataSharePredicates.DataSharePredicates predicates, optional VCardBuilderOptions options); + [Throws] + void exportVCard(Context context, dataSharePredicates.DataSharePredicates predicates, AsyncCallback_String_Void callback_); dictionary VCardType { - number VERSION_21 = 0; number VERSION_30 = 1; number VERSION_40 = 2; - }; [Entity=Interface] interface VCardBuilderOptions { - [Optional] attribute VCardType cardType; [Optional] attribute String charset; - }; - [GlobalScope] - interface GlobalScope_vcard_ohos_telephony_vcard { - - [Throws] - static void importVCard(Context context, String filePath, number accountId, AsyncCallback_Void callback_); - [Throws] - static async void importVCard(Context context, String filePath, optional number accountId); - [Throws] - static void importVCard(Context context, String filePath, AsyncCallback_Void callback_); - [Throws] - static void exportVCard(Context context, dataSharePredicates.DataSharePredicates predicates, VCardBuilderOptions options, AsyncCallback_String_Void callback_); - [Throws] - static async String exportVCard(Context context, dataSharePredicates.DataSharePredicates predicates, optional VCardBuilderOptions options); - [Throws] - static void exportVCard(Context context, dataSharePredicates.DataSharePredicates predicates, AsyncCallback_String_Void callback_); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.test.PerfTest.idl b/idl/@ohos.test.PerfTest.idl new file mode 100644 index 0000000..a54cfd5 --- /dev/null +++ b/idl/@ohos.test.PerfTest.idl @@ -0,0 +1,49 @@ +package ohos.test.PerfTest; +import ohos.base.Callback as Callback; +dictionary PerfMetric { + number DURATION = 0; + number CPU_LOAD = 1; + number CPU_USAGE = 2; + number MEMORY_RSS = 3; + number MEMORY_PSS = 4; + number APP_START_RESPONSE_TIME = 5; + number APP_START_COMPLETE_TIME = 6; + number PAGE_SWITCH_COMPLETE_TIME = 7; + number LIST_SWIPE_FPS = 8; +}; +[Synthetic] +callback Callback_Boolean_Void = void (boolean parameter); +[Synthetic] +callback Callback_Callback_Boolean_Void_Void = void (Callback_Boolean_Void parameter); +[Entity=Interface] +interface PerfTestStrategy { + attribute sequence metrics; + attribute Callback_Callback_Boolean_Void_Void actionCode; + [Optional] + attribute Callback_Callback_Boolean_Void_Void resetCode; + [Optional] + attribute String bundleName; + [Optional] + attribute number iterations; + [Optional] + attribute number timeout; +}; +[Entity=Interface] +interface PerfMeasureResult { + readonly attribute PerfMetric metric; + readonly attribute sequence roundValues; + readonly attribute number maximum; + readonly attribute number minimum; + readonly attribute number average; +}; +[Entity=Class] +interface PerfTest { + [Throws] + static PerfTest create(PerfTestStrategy strategy); + [Throws] + async void run(); + [Throws] + PerfMeasureResult getMeasureResult(PerfMetric metric); + [Throws] + void destroy(); +}; \ No newline at end of file diff --git a/idl/@ohos.thermal.idl b/idl/@ohos.thermal.idl index 0ca3d90..69f7fd9 100644 --- a/idl/@ohos.thermal.idl +++ b/idl/@ohos.thermal.idl @@ -1,11 +1,10 @@ -package ohos; +package ohos.thermal; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; import ohos.base.Callback as Callback; +[DefaultExport] namespace thermal { - dictionary ThermalLevel { - number COOL = 0; number NORMAL = 1; number WARM = 2; @@ -14,32 +13,24 @@ namespace thermal { number WARNING = 5; number EMERGENCY = 6; number ESCAPE = 7; - }; [Async, Synthetic] callback AsyncCallback_ThermalLevel_Void = void (ThermalLevel result); + [Deprecated] + void subscribeThermalLevel(AsyncCallback_ThermalLevel_Void callback_); [Synthetic] callback Callback_ThermalLevel_Void = void (ThermalLevel parameter); + [Throws] + void registerThermalLevelCallback(Callback_ThermalLevel_Void callback_); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void unsubscribeThermalLevel(optional AsyncCallback_Void callback_); [Synthetic] callback Callback_Void = void (); - [GlobalScope] - interface GlobalScope_thermal_ohos_thermal { - - [Deprecated] - static void subscribeThermalLevel(AsyncCallback_ThermalLevel_Void callback_); - [Throws] - static void registerThermalLevelCallback(Callback_ThermalLevel_Void callback_); - [Deprecated] - static void unsubscribeThermalLevel(optional AsyncCallback_Void callback_); - [Throws] - static void unregisterThermalLevelCallback(optional Callback_Void callback_); - [Deprecated] - static ThermalLevel getThermalLevel(); - [Throws] - static ThermalLevel getLevel(); - - }; - + [Throws] + void unregisterThermalLevelCallback(optional Callback_Void callback_); + [Deprecated] + ThermalLevel getThermalLevel(); + ThermalLevel getLevel(); }; \ No newline at end of file diff --git a/idl/@ohos.uiAppearance.idl b/idl/@ohos.uiAppearance.idl index 3edc52f..2fe3614 100644 --- a/idl/@ohos.uiAppearance.idl +++ b/idl/@ohos.uiAppearance.idl @@ -1,33 +1,25 @@ -package ohos; +package ohos.uiAppearance; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace uiAppearance { - dictionary DarkMode { - number ALWAYS_DARK = 0; number ALWAYS_LIGHT = 1; - }; [Async, Synthetic] callback AsyncCallback_Void = void (); - [GlobalScope] - interface GlobalScope_uiAppearance_ohos_uiAppearance { - - [Throws] - static void setDarkMode(DarkMode mode, AsyncCallback_Void callback_); - [Throws] - static async void setDarkMode(DarkMode mode); - [Throws] - static DarkMode getDarkMode(); - [Throws] - static async void setFontScale(number fontScale); - [Throws] - static number getFontScale(); - [Throws] - static async void setFontWeightScale(number fontWeightScale); - [Throws] - static number getFontWeightScale(); - - }; - + [Throws] + void setDarkMode(DarkMode mode, AsyncCallback_Void callback_); + [Throws] + async void setDarkMode(DarkMode mode); + [Throws] + DarkMode getDarkMode(); + [Throws] + async void setFontScale(number fontScale); + [Throws] + number getFontScale(); + [Throws] + async void setFontWeightScale(number fontWeightScale); + [Throws] + number getFontWeightScale(); }; \ No newline at end of file diff --git a/idl/@ohos.uiExtensionHost.idl b/idl/@ohos.uiExtensionHost.idl index d1adf21..7b54dba 100644 --- a/idl/@ohos.uiExtensionHost.idl +++ b/idl/@ohos.uiExtensionHost.idl @@ -1,33 +1,30 @@ -package ohos; +package ohos.uiExtensionHost; import ohos.base.Callback as Callback; -import ohos.window as window; +import ohos.window.default as window; +[DefaultExport] namespace uiExtensionHost { - [Entity=Literal, Synthetic] - interface Literal_window.AvoidAreaType_type_window.AvoidArea_area { - + interface Literal_Window_AvoidAreaType_type_Window_AvoidArea_area { attribute window.AvoidAreaType type; attribute window.AvoidArea area; - }; [Synthetic] - callback Callback_Literal_window_AvoidAreaType_type_window_AvoidArea_area_Void = void (Literal_window.AvoidAreaType_type_window.AvoidArea_area parameter); + callback Callback_Literal_Window_AvoidAreaType_type_Window_AvoidArea_area_Void = void (Literal_Window_AvoidAreaType_type_Window_AvoidArea_area parameter); [Synthetic] - callback Callback_window_Size_Void = void (window.Size parameter); + callback Callback_Window_Size_Void = void (window.Size parameter); [Entity=Interface] interface UIExtensionHostWindowProxy { - attribute UIExtensionHostWindowProxyProperties properties; [Throws] window.AvoidArea getWindowAvoidArea(window.AvoidAreaType type); [Throws, DtsName="on", DtsTag="'avoidAreaChange'"] - void onAvoidAreaChange(Callback_Literal_window_AvoidAreaType_type_window_AvoidArea_area_Void callback_); - [Throws, DtsName="off", DtsTag="'avoidAreaChange'"] - void offAvoidAreaChange(optional Callback_Literal_window_AvoidAreaType_type_window_AvoidArea_area_Void callback_); + void onAvoidAreaChange(Callback_Literal_Window_AvoidAreaType_type_Window_AvoidArea_area_Void callback_); [Throws, DtsName="on", DtsTag="'windowSizeChange'"] - void onWindowSizeChange(Callback_window_Size_Void callback_); + void onWindowSizeChange(Callback_Window_Size_Void callback_); + [Throws, DtsName="off", DtsTag="'avoidAreaChange'"] + void offAvoidAreaChange(optional Callback_Literal_Window_AvoidAreaType_type_Window_AvoidArea_area_Void callback_); [Throws, DtsName="off", DtsTag="'windowSizeChange'"] - void offWindowSizeChange(optional Callback_window_Size_Void callback_); + void offWindowSizeChange(optional Callback_Window_Size_Void callback_); [Throws] async void hideNonSecureWindows(boolean shouldHide); [Throws] @@ -36,13 +33,9 @@ namespace uiExtensionHost { async void setWaterMarkFlag(boolean enable); [Throws] async void hidePrivacyContentForHost(boolean shouldHide); - }; [Entity=Interface] interface UIExtensionHostWindowProxyProperties { - attribute window.Rect uiExtensionHostWindowProxyRect; - }; - }; \ No newline at end of file diff --git a/idl/@ohos.update.idl b/idl/@ohos.update.idl index 9df5d27..51a452a 100644 --- a/idl/@ohos.update.idl +++ b/idl/@ohos.update.idl @@ -1,7 +1,13 @@ -package ohos; +package ohos.update; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace update { - + [Throws] + Updater getOnlineUpdater(UpgradeInfo upgradeInfo); + [Throws] + Restorer getRestorer(); + [Throws] + LocalUpdater getLocalUpdater(); [Async, Synthetic] callback AsyncCallback_CheckResult_Void = void (CheckResult result); [Async, Synthetic] @@ -18,7 +24,6 @@ namespace update { callback AsyncCallback_UpgradePolicy_Void = void (UpgradePolicy result); [Entity=Interface] interface Updater { - [Throws] void checkNewVersion(AsyncCallback_CheckResult_Void callback_); [Throws] @@ -79,20 +84,16 @@ namespace update { void on(EventClassifyInfo eventClassifyInfo, UpgradeTaskCallback taskCallback); [Throws] void off(EventClassifyInfo eventClassifyInfo, optional UpgradeTaskCallback taskCallback); - }; [Entity=Interface] interface Restorer { - [Throws] void factoryReset(AsyncCallback_Void callback_); [Throws] async void factoryReset(); - }; [Entity=Interface] interface LocalUpdater { - [Throws] void verifyUpgradePackage(UpgradeFile upgradeFile, String certsFile, AsyncCallback_Void callback_); [Throws] @@ -105,45 +106,33 @@ namespace update { void on(EventClassifyInfo eventClassifyInfo, UpgradeTaskCallback taskCallback); [Throws] void off(EventClassifyInfo eventClassifyInfo, optional UpgradeTaskCallback taskCallback); - }; [Entity=Interface] interface UpgradeInfo { - attribute String upgradeApp; attribute BusinessType businessType; - }; [Entity=Interface] interface BusinessType { - attribute BusinessVendor vendor; attribute BusinessSubType subType; - }; [Entity=Interface] interface CheckResult { - attribute boolean isExistNewVersion; attribute NewVersionInfo newVersionInfo; - }; [Entity=Interface] interface NewVersionInfo { - attribute VersionDigestInfo versionDigestInfo; attribute sequence versionComponents; - }; [Entity=Interface] interface VersionDigestInfo { - attribute String versionDigest; - }; [Entity=Interface] interface VersionComponent { - attribute String componentId; attribute ComponentType componentType; attribute UpgradeAction upgradeAction; @@ -152,100 +141,74 @@ namespace update { attribute number size; attribute EffectiveMode effectiveMode; attribute DescriptionInfo descriptionInfo; - + [Optional] + attribute OtaMode otaMode; }; [Entity=Interface] interface DescriptionOptions { - attribute DescriptionFormat format; attribute String language; - }; [Entity=Interface] interface ComponentDescription { - attribute String componentId; attribute DescriptionInfo descriptionInfo; - }; [Entity=Interface] interface DescriptionInfo { - attribute DescriptionType descriptionType; attribute String content; - }; [Entity=Interface] interface CurrentVersionInfo { - attribute String osVersion; attribute String deviceName; attribute sequence versionComponents; - }; [Entity=Interface] interface DownloadOptions { - attribute NetType allowNetwork; attribute Order order; - }; [Entity=Interface] interface ResumeDownloadOptions { - attribute NetType allowNetwork; - }; [Entity=Interface] interface PauseDownloadOptions { - attribute boolean isAllowAutoResume; - }; [Entity=Interface] interface UpgradeOptions { - attribute Order order; - }; [Entity=Interface] interface ClearOptions { - attribute UpgradeStatus status; - }; [Entity=Interface] interface UpgradePolicy { - attribute boolean downloadStrategy; attribute boolean autoUpgradeStrategy; attribute sequence autoUpgradePeriods; - }; [Entity=Interface] interface UpgradePeriod { - attribute number start; attribute number end; - }; [Entity=Interface] interface TaskInfo { - attribute boolean existTask; attribute TaskBody taskBody; - }; [Entity=Interface] interface EventInfo { - attribute EventId eventId; attribute TaskBody taskBody; - }; [Entity=Interface] interface TaskBody { - attribute VersionDigestInfo versionDigestInfo; attribute UpgradeStatus status; attribute number subStatus; @@ -253,96 +216,74 @@ namespace update { attribute number installMode; attribute sequence errorMessages; attribute sequence versionComponents; - }; [Entity=Interface] interface ErrorMessage { - attribute number errorCode; attribute String errorMessage; - }; [Entity=Interface] interface EventClassifyInfo { - attribute EventClassify eventClassify; attribute String extraInfo; - }; [Entity=Interface] interface UpgradeFile { - attribute ComponentType fileType; attribute String filePath; - }; [Entity=Interface] interface UpgradeTaskCallback { - [CallSignature] void invoke(EventInfo eventInfo); - }; dictionary BusinessVendor { - String PUBLIC = "public"; - }; dictionary BusinessSubType { - number FIRMWARE = 1; - }; dictionary ComponentType { - number OTA = 1; - }; dictionary UpgradeAction { - String UPGRADE = "upgrade"; String RECOVERY = "recovery"; - }; dictionary EffectiveMode { - number COLD = 1; number LIVE = 2; number LIVE_AND_COLD = 3; - + }; + dictionary OtaMode { + number REGULAR_OTA = 0; + number STREAM_OTA = 1; + number AB_REGULAR_OTA = 2; + number AB_STREAM_OTA = 3; }; dictionary DescriptionType { - number CONTENT = 0; number URI = 1; - }; dictionary DescriptionFormat { - number STANDARD = 0; number SIMPLIFIED = 1; - }; dictionary NetType { - number CELLULAR = 1; number METERED_WIFI = 2; number NOT_METERED_WIFI = 4; number WIFI = 6; number CELLULAR_AND_WIFI = 7; - }; dictionary Order { - number DOWNLOAD = 1; number INSTALL = 2; number DOWNLOAD_AND_INSTALL = 3; number APPLY = 4; number INSTALL_AND_APPLY = 6; - }; dictionary UpgradeStatus { - number WAITING_DOWNLOAD = 20; number DOWNLOADING = 21; number DOWNLOAD_PAUSED = 22; @@ -353,15 +294,11 @@ namespace update { number APPLYING = 41; number UPGRADE_SUCCESS = 50; number UPGRADE_FAIL = 51; - }; dictionary EventClassify { - number TASK = 16777216; - }; dictionary EventId { - number EVENT_TASK_BASE = 16777216; number EVENT_TASK_RECEIVE = 16777217; number EVENT_TASK_CANCEL = 16777218; @@ -379,18 +316,5 @@ namespace update { number EVENT_APPLY_START = 16777230; number EVENT_UPGRADE_SUCCESS = 16777231; number EVENT_UPGRADE_FAIL = 16777232; - - }; - [GlobalScope] - interface GlobalScope_update_ohos_update { - - [Throws] - static Updater getOnlineUpdater(UpgradeInfo upgradeInfo); - [Throws] - static Restorer getRestorer(); - [Throws] - static LocalUpdater getLocalUpdater(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.uri.idl b/idl/@ohos.uri.idl index 15da694..12cf40b 100644 --- a/idl/@ohos.uri.idl +++ b/idl/@ohos.uri.idl @@ -1,24 +1,27 @@ -package ohos; +package ohos.uri; +[DefaultExport] namespace uri { - [Entity=Class] interface URI { - constructor(String uri); - attribute String scheme; - attribute String userInfo; attribute String host; attribute String port; - attribute String path; - attribute String query; - attribute String fragment; - attribute String authority; + attribute (String or undefined) scheme; + attribute (String or undefined) userInfo; + [Accessor=Getter] + readonly attribute (String or undefined) host; + [Accessor=Getter] + readonly attribute String port; + attribute (String or undefined) path; + attribute (String or undefined) query; + attribute (String or undefined) fragment; + attribute (String or undefined) authority; attribute String ssp; - attribute String encodedUserInfo; - attribute String encodedPath; - attribute String encodedQuery; - attribute String encodedFragment; - attribute String encodedAuthority; + attribute (String or undefined) encodedUserInfo; + attribute (String or undefined) encodedPath; + attribute (String or undefined) encodedQuery; + attribute (String or undefined) encodedFragment; + attribute (String or undefined) encodedAuthority; attribute String encodedSSP; [DtsName="toString"] String toString_(); @@ -29,11 +32,10 @@ namespace uri { boolean checkIsAbsolute(); URI normalize(); [Throws] - String getQueryValue(String key); + (String or undefined) getQueryValue(String key); [Throws] URI addQueryValue(String key, String value); sequence getQueryNames(); - [Throws] sequence getQueryValues(String key); [Throws] boolean getBooleanQueryValue(String key, boolean defaultValue); @@ -49,7 +51,5 @@ namespace uri { boolean checkRelative(); [Throws] static URI createFromParts(String scheme, String ssp, String fragment); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.url.idl b/idl/@ohos.url.idl index 7a4bd7e..fc472b4 100644 --- a/idl/@ohos.url.idl +++ b/idl/@ohos.url.idl @@ -1,18 +1,16 @@ -package ohos; +package ohos.url; +[DefaultExport] namespace url { - - [Entity=Tuple, Synthetic, TypeParameters="string,string"] + [Entity=Tuple, Synthetic] interface Tuple_String_String { - attribute String value0; attribute String value1; - }; [Synthetic] callback Callback_String_String_URLSearchParams_Void = void (String value, String key, URLSearchParams searchParams); [Entity=Class, Deprecated] interface URLSearchParams { - + [Deprecated] constructor(optional (sequence> or record or String or URLSearchParams) init); [Deprecated] void append(String name, String value); @@ -21,7 +19,7 @@ namespace url { [Deprecated] sequence getAll(String name); [Deprecated] - ([TypeArguments="Tuple_String_String"] IterableIterator) entries(); + sequence entries(); [Deprecated] void forEach(Callback_String_String_URLSearchParams_Void callbackFn, optional Object thisArg); [Deprecated] @@ -33,62 +31,65 @@ namespace url { [Deprecated] void sort(); [Deprecated] - ([TypeArguments="String"] IterableIterator) keys(); + sequence keys(); [Deprecated] - ([TypeArguments="String"] IterableIterator) values(); + sequence values(); [Deprecated, DtsName="_unknown"] - ([TypeArguments="Tuple_String_String"] IterableIterator) bottom_unknown(); + sequence bottom_unknown(); [Deprecated, DtsName="toString"] String toString_(); - }; [Synthetic] callback Callback_String_String_URLParams_Void = void (String value, String key, URLParams searchParams); [Entity=Class] interface URLParams { - constructor(optional (sequence> or record or String or URLParams) init); + constructor(optional (sequence or record or String or URLParams) init); [Throws] void append(String name, String value); [Throws] void delete(String name); - [Throws] sequence getAll(String name); - ([TypeArguments="Tuple_String_String"] IterableIterator) entries(); + sequence entries(); [Throws] void forEach(Callback_String_String_URLParams_Void callbackFn, optional Object thisArg); - [Throws] + void forEach(UrlCbFn callbackFn); (String or undefined) get(String name); [Throws] boolean has(String name); [Throws] void set(String name, String value); void sort(); - ([TypeArguments="String"] IterableIterator) keys(); - ([TypeArguments="String"] IterableIterator) values(); + sequence keys(); + sequence values(); [DtsName="_unknown"] - ([TypeArguments="Tuple_String_String"] IterableIterator) bottom_unknown(); + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); [DtsName="toString"] String toString_(); - }; [Entity=Class] interface URL { - + [Deprecated] constructor(String url, optional (String or URL) base); constructor(); + readonly attribute String origin; + [Deprecated] + readonly attribute URLSearchParams searchParams; + readonly attribute URLParams params; attribute String hash; attribute String host; attribute String hostname; attribute String href; + [Accessor=Getter] readonly attribute String origin; attribute String password; attribute String pathname; attribute String port; attribute String protocol; attribute String search; - [Deprecated] - readonly attribute URLSearchParams searchParams; + [Accessor=Getter] readonly attribute URLParams params; attribute String username; [Throws] @@ -96,7 +97,6 @@ namespace url { [DtsName="toString"] String toString_(); String toJSON(); - }; - + callback UrlCbFn = void (String value, String key, URLParams searchParams); }; \ No newline at end of file diff --git a/idl/@ohos.usb.idl b/idl/@ohos.usb.idl index d498915..fefdeca 100644 --- a/idl/@ohos.usb.idl +++ b/idl/@ohos.usb.idl @@ -1,9 +1,48 @@ -package ohos; +package ohos.usb; +[DefaultExport] namespace usb { - + [Deprecated] + sequence<[TypeArguments="USBDevice"] Readonly> getDevices(); + [Deprecated] + ([TypeArguments="USBDevicePipe"] Readonly) connectDevice(USBDevice device); + [Deprecated] + boolean hasRight(String deviceName); + [Deprecated] + async boolean requestRight(String deviceName); + [Deprecated] + number usbFunctionsFromString(String funcs); + [Deprecated] + String usbFunctionsToString(FunctionType funcs); + [Deprecated] + async boolean setCurrentFunctions(FunctionType funcs); + [Deprecated] + FunctionType getCurrentFunctions(); + [Deprecated] + sequence getPorts(); + [Deprecated] + PortModeType getSupportedModes(number portId); + [Deprecated] + async boolean setPortRoles(number portId, PowerRoleType powerRole, DataRoleType dataRole); + [Deprecated] + number claimInterface(USBDevicePipe pipe, USBInterface iface, optional boolean force); + [Deprecated] + number releaseInterface(USBDevicePipe pipe, USBInterface iface); + [Deprecated] + number setConfiguration(USBDevicePipe pipe, USBConfig config); + [Deprecated] + number setInterface(USBDevicePipe pipe, USBInterface iface); + [Deprecated] + buffer getRawDescriptor(USBDevicePipe pipe); + [Deprecated] + number getFileDescriptor(USBDevicePipe pipe); + [Deprecated] + async number controlTransfer(USBDevicePipe pipe, USBControlParams controlparam, optional number timeout); + [Deprecated] + async number bulkTransfer(USBDevicePipe pipe, USBEndpoint endpoint, buffer buffer, optional number timeout); + [Deprecated] + number closePipe(USBDevicePipe pipe); [Entity=Interface, Deprecated] interface USBEndpoint { - [Deprecated] attribute number address; [Deprecated] @@ -20,11 +59,9 @@ namespace usb { attribute number type; [Deprecated] attribute number interfaceId; - }; [Entity=Interface, Deprecated] interface USBInterface { - [Deprecated] attribute number id; [Deprecated] @@ -39,11 +76,9 @@ namespace usb { attribute String name; [Deprecated] attribute sequence endpoints; - }; [Entity=Interface, Deprecated] interface USBConfig { - [Deprecated] attribute number id; [Deprecated] @@ -58,11 +93,9 @@ namespace usb { attribute boolean isSelfPowered; [Deprecated] attribute sequence interfaces; - }; [Entity=Interface, Deprecated] interface USBDevice { - [Deprecated] attribute number busNum; [Deprecated] @@ -89,42 +122,34 @@ namespace usb { attribute number protocol; [Deprecated] attribute sequence configs; - }; [Entity=Interface, Deprecated] interface USBDevicePipe { - [Deprecated] attribute number busNum; [Deprecated] attribute number devAddress; - }; [Deprecated] dictionary PowerRoleType { - [Deprecated] number NONE = 0; [Deprecated] number SOURCE = 1; [Deprecated] number SINK = 2; - }; [Deprecated] dictionary DataRoleType { - [Deprecated] number NONE = 0; [Deprecated] number HOST = 1; [Deprecated] number DEVICE = 2; - }; [Deprecated] dictionary PortModeType { - [Deprecated] number NONE = 0; [Deprecated] @@ -135,33 +160,27 @@ namespace usb { number DRP = 3; [Deprecated] number NUM_MODES = 4; - }; [Entity=Interface, Deprecated] interface USBPortStatus { - [Deprecated] attribute number currentMode; [Deprecated] attribute number currentPowerRole; [Deprecated] attribute number currentDataRole; - }; [Entity=Interface, Deprecated] interface USBPort { - [Deprecated] attribute number id; [Deprecated] attribute PortModeType supportedModes; [Deprecated] attribute USBPortStatus status; - }; [Entity=Interface, Deprecated] interface USBControlParams { - [Deprecated] attribute number request; [Deprecated] @@ -174,11 +193,9 @@ namespace usb { attribute number index; [Deprecated] attribute buffer data; - }; [Deprecated] dictionary USBRequestTargetType { - [Deprecated] number USB_REQUEST_TARGET_DEVICE = 0; [Deprecated] @@ -187,31 +204,25 @@ namespace usb { number USB_REQUEST_TARGET_ENDPOINT = 2; [Deprecated] number USB_REQUEST_TARGET_OTHER = 3; - }; [Deprecated] dictionary USBControlRequestType { - [Deprecated] number USB_REQUEST_TYPE_STANDARD = 0; [Deprecated] number USB_REQUEST_TYPE_CLASS = 1; [Deprecated] number USB_REQUEST_TYPE_VENDOR = 2; - }; [Deprecated] dictionary USBRequestDirection { - [Deprecated] number USB_REQUEST_DIR_TO_DEVICE = 0; [Deprecated] number USB_REQUEST_DIR_FROM_DEVICE = 128; - }; [Deprecated] dictionary FunctionType { - [Deprecated] number NONE = 0; [Deprecated] @@ -232,52 +243,5 @@ namespace usb { number AUDIO_SOURCE = 128; [Deprecated] number NCM = 256; - - }; - [GlobalScope] - interface GlobalScope_usb_ohos_usb { - - [Deprecated] - static sequence<[TypeArguments="USBDevice"] Readonly> getDevices(); - [Deprecated] - static ([TypeArguments="USBDevicePipe"] Readonly) connectDevice(USBDevice device); - [Deprecated] - static boolean hasRight(String deviceName); - [Deprecated] - static async boolean requestRight(String deviceName); - [Deprecated] - static number usbFunctionsFromString(String funcs); - [Deprecated] - static String usbFunctionsToString(FunctionType funcs); - [Deprecated] - static async boolean setCurrentFunctions(FunctionType funcs); - [Deprecated] - static FunctionType getCurrentFunctions(); - [Deprecated] - static sequence getPorts(); - [Deprecated] - static PortModeType getSupportedModes(number portId); - [Deprecated] - static async boolean setPortRoles(number portId, PowerRoleType powerRole, DataRoleType dataRole); - [Deprecated] - static number claimInterface(USBDevicePipe pipe, USBInterface iface, optional boolean force); - [Deprecated] - static number releaseInterface(USBDevicePipe pipe, USBInterface iface); - [Deprecated] - static number setConfiguration(USBDevicePipe pipe, USBConfig config); - [Deprecated] - static number setInterface(USBDevicePipe pipe, USBInterface iface); - [Deprecated] - static buffer getRawDescriptor(USBDevicePipe pipe); - [Deprecated] - static number getFileDescriptor(USBDevicePipe pipe); - [Deprecated] - static async number controlTransfer(USBDevicePipe pipe, USBControlParams controlparam, optional number timeout); - [Deprecated] - static async number bulkTransfer(USBDevicePipe pipe, USBEndpoint endpoint, buffer buffer, optional number timeout); - [Deprecated] - static number closePipe(USBDevicePipe pipe); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.usbManager.idl b/idl/@ohos.usbManager.idl index aedd3aa..01c0a1b 100644 --- a/idl/@ohos.usbManager.idl +++ b/idl/@ohos.usbManager.idl @@ -1,111 +1,168 @@ -package ohos; +package ohos.usbManager; +import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace usbManager { - + [Throws] + sequence<[TypeArguments="USBDevice"] Readonly> getDevices(); + [Throws] + ([TypeArguments="USBDevicePipe"] Readonly) connectDevice(USBDevice device); + [Throws] + boolean hasRight(String deviceName); + [Throws] + async boolean requestRight(String deviceName); + [Throws] + boolean removeRight(String deviceName); + [Deprecated, Throws] + boolean addRight(String bundleName, String deviceName); + [Deprecated, Throws] + number usbFunctionsFromString(String funcs); + [Deprecated, Throws] + String usbFunctionsToString(FunctionType funcs); + [Deprecated, Throws] + async void setCurrentFunctions(FunctionType funcs); + [Deprecated] + FunctionType getCurrentFunctions(); + [Deprecated] + sequence getPorts(); + [Deprecated, Throws] + PortModeType getSupportedModes(number portId); + [Deprecated, Throws] + async void setPortRoles(number portId, PowerRoleType powerRole, DataRoleType dataRole); + [Throws] + boolean addDeviceAccessRight(String tokenId, String deviceName); + [Throws] + i32 getFunctionsFromString(String funcs); + [Throws] + String getStringFromFunctions(FunctionType funcs); + [Throws] + async void setDeviceFunctions(FunctionType funcs); + [Throws] + FunctionType getDeviceFunctions(); + [Throws] + sequence getPortList(); + [Throws] + PortModeType getPortSupportModes(i32 portId); + [Throws] + async void setPortRoleTypes(i32 portId, PowerRoleType powerRole, DataRoleType dataRole); + [Throws] + void addAccessoryRight(i32 tokenId, USBAccessory accessory); + [Throws] + i32 claimInterface(USBDevicePipe pipe, USBInterface iface, optional boolean force); + [Throws] + i32 releaseInterface(USBDevicePipe pipe, USBInterface iface); + [Throws] + i32 setConfiguration(USBDevicePipe pipe, USBConfiguration config); + [Throws] + i32 setInterface(USBDevicePipe pipe, USBInterface iface); + [Throws] + buffer getRawDescriptor(USBDevicePipe pipe); + [Throws] + i32 getFileDescriptor(USBDevicePipe pipe); + [Deprecated, Throws] + async number controlTransfer(USBDevicePipe pipe, USBControlParams controlparam, optional number timeout); + [Throws] + async i32 usbControlTransfer(USBDevicePipe pipe, USBDeviceRequestParams requestparam, optional i32 timeout); + [Throws] + async i32 bulkTransfer(USBDevicePipe pipe, USBEndpoint endpoint, buffer buffer, optional i32 timeout); + [Throws] + i32 closePipe(USBDevicePipe pipe); + [Throws] + boolean hasAccessoryRight(USBAccessory accessory); + [Throws] + async boolean requestAccessoryRight(USBAccessory accessory); + [Throws] + void cancelAccessoryRight(USBAccessory accessory); + [Throws] + sequence<[TypeArguments="USBAccessory"] Readonly> getAccessoryList(); + [Throws] + USBAccessoryHandle openAccessory(USBAccessory accessory); + [Throws] + void closeAccessory(USBAccessoryHandle accessoryHandle); [Entity=Interface] interface USBEndpoint { - - attribute number address; - attribute number attributes; - attribute number interval; - attribute number maxPacketSize; + attribute i32 address; + attribute i32 attributes; + attribute i32 interval; + attribute i32 maxPacketSize; attribute USBRequestDirection direction; [DtsName="number"] attribute number number_; - attribute number type; - attribute number interfaceId; - + attribute i32 endpointAddr; + attribute i32 type; + attribute i32 interfaceId; }; [Entity=Interface] interface USBInterface { - - attribute number id; - attribute number protocol; - attribute number clazz; - attribute number subClass; - attribute number alternateSetting; + attribute i32 id; + attribute i32 protocol; + attribute i32 clazz; + attribute i32 subClass; + attribute i32 alternateSetting; attribute String name; attribute sequence endpoints; - }; [Entity=Interface] interface USBConfiguration { - - attribute number id; - attribute number attributes; - attribute number maxPower; + attribute i32 id; + attribute i32 attributes; + attribute i32 maxPower; attribute String name; attribute boolean isRemoteWakeup; attribute boolean isSelfPowered; attribute sequence interfaces; - }; [Entity=Interface] interface USBDevice { - - attribute number busNum; - attribute number devAddress; + attribute i32 busNum; + attribute i32 devAddress; attribute String serial; attribute String name; attribute String manufacturerName; attribute String productName; attribute String version; - attribute number vendorId; - attribute number productId; - attribute number clazz; - attribute number subClass; - attribute number protocol; + attribute i32 vendorId; + attribute i32 productId; + attribute i32 clazz; + attribute i32 subClass; + attribute i32 protocol; attribute sequence configs; - }; [Entity=Interface] interface USBDevicePipe { - - attribute number busNum; - attribute number devAddress; - + attribute i32 busNum; + attribute i32 devAddress; }; dictionary PowerRoleType { - number NONE = 0; number SOURCE = 1; number SINK = 2; - }; dictionary DataRoleType { - number NONE = 0; number HOST = 1; number DEVICE = 2; - }; dictionary PortModeType { - number NONE = 0; number UFP = 1; number DFP = 2; number DRP = 3; number NUM_MODES = 4; - }; [Entity=Interface] interface USBPortStatus { - - attribute number currentMode; - attribute number currentPowerRole; - attribute number currentDataRole; - + attribute i32 currentMode; + attribute i32 currentPowerRole; + attribute i32 currentDataRole; }; [Entity=Interface] interface USBPort { - - attribute number id; + attribute i32 id; attribute PortModeType supportedModes; attribute USBPortStatus status; - }; [Entity=Interface, Deprecated] interface USBControlParams { - [Deprecated] attribute number request; [Deprecated] @@ -118,42 +175,32 @@ namespace usbManager { attribute number index; [Deprecated] attribute buffer data; - }; [Entity=Interface] interface USBDeviceRequestParams { - - attribute number bmRequestType; - attribute number bRequest; - attribute number wValue; - attribute number wIndex; - attribute number wLength; + attribute i32 bmRequestType; + attribute i32 bRequest; + attribute i32 wValue; + attribute i32 wIndex; + attribute i32 wLength; attribute buffer data; - }; dictionary USBRequestTargetType { - number USB_REQUEST_TARGET_DEVICE = 0; number USB_REQUEST_TARGET_INTERFACE = 1; number USB_REQUEST_TARGET_ENDPOINT = 2; number USB_REQUEST_TARGET_OTHER = 3; - }; dictionary USBControlRequestType { - number USB_REQUEST_TYPE_STANDARD = 0; number USB_REQUEST_TYPE_CLASS = 1; number USB_REQUEST_TYPE_VENDOR = 2; - }; dictionary USBRequestDirection { - number USB_REQUEST_DIR_TO_DEVICE = 0; number USB_REQUEST_DIR_FROM_DEVICE = 128; - }; dictionary FunctionType { - number NONE = 0; number ACM = 1; number ECM = 2; @@ -164,34 +211,26 @@ namespace usbManager { number MIDI = 64; number AUDIO_SOURCE = 128; number NCM = 256; - }; [Entity=Interface] interface USBAccessory { - attribute String manufacturer; attribute String product; attribute String description; attribute String version; attribute String serialNumber; - }; [Entity=Interface] interface USBAccessoryHandle { - - attribute number accessoryFd; - + attribute i32 accessoryFd; }; dictionary UsbTransferFlags { - number USB_TRANSFER_SHORT_NOT_OK = 0; number USB_TRANSFER_FREE_BUFFER = 1; number USB_TRANSFER_FREE_TRANSFER = 2; number USB_TRANSFER_ADD_ZERO_PACKET = 3; - }; dictionary UsbTransferStatus { - number TRANSFER_COMPLETED = 0; number TRANSFER_ERROR = 1; number TRANSFER_TIMED_OUT = 2; @@ -199,132 +238,44 @@ namespace usbManager { number TRANSFER_STALL = 4; number TRANSFER_NO_DEVICE = 5; number TRANSFER_OVERFLOW = 6; - }; dictionary UsbEndpointTransferType { - number TRANSFER_TYPE_ISOCHRONOUS = 1; number TRANSFER_TYPE_BULK = 2; number TRANSFER_TYPE_INTERRUPT = 3; - }; [Entity=Interface] interface UsbIsoPacketDescriptor { - - attribute number length; - attribute number actualLength; + attribute i32 length; + attribute i32 actualLength; attribute UsbTransferStatus status; - }; [Entity=Interface] interface SubmitTransferCallback { - - attribute number actualLength; + attribute i32 actualLength; attribute UsbTransferStatus status; attribute sequence<[TypeArguments="UsbIsoPacketDescriptor"] Readonly> isoPacketDescs; - }; [Async, Synthetic] callback AsyncCallback_SubmitTransferCallback_Void = void (SubmitTransferCallback result); [Entity=Interface] interface UsbDataTransferParams { - attribute USBDevicePipe devPipe; attribute UsbTransferFlags flags; - attribute number endpoint; + attribute i32 endpoint; attribute UsbEndpointTransferType type; - attribute number timeout; - attribute number length; + attribute i32 timeout; + attribute i32 length; [DtsName="callback"] attribute AsyncCallback_SubmitTransferCallback_Void callback_; attribute buffer userData; attribute buffer buffer; - attribute number isoPacketCount; - + attribute i32 isoPacketCount; }; - [GlobalScope] - interface GlobalScope_usbManager_ohos_usbManager { - - static sequence<[TypeArguments="USBDevice"] Readonly> getDevices(); - [Throws] - static ([TypeArguments="USBDevicePipe"] Readonly) connectDevice(USBDevice device); - [Throws] - static boolean hasRight(String deviceName); - [Throws] - static async boolean requestRight(String deviceName); - [Throws] - static boolean removeRight(String deviceName); - [Deprecated, Throws] - static boolean addRight(String bundleName, String deviceName); - [Deprecated, Throws] - static number usbFunctionsFromString(String funcs); - [Deprecated, Throws] - static String usbFunctionsToString(FunctionType funcs); - [Deprecated, Throws] - static async void setCurrentFunctions(FunctionType funcs); - [Deprecated] - static FunctionType getCurrentFunctions(); - [Deprecated] - static sequence getPorts(); - [Deprecated, Throws] - static PortModeType getSupportedModes(number portId); - [Deprecated, Throws] - static async void setPortRoles(number portId, PowerRoleType powerRole, DataRoleType dataRole); - [Throws] - static boolean addDeviceAccessRight(String tokenId, String deviceName); - [Throws] - static number getFunctionsFromString(String funcs); - [Throws] - static String getStringFromFunctions(FunctionType funcs); - [Throws] - static async void setDeviceFunctions(FunctionType funcs); - [Throws] - static FunctionType getDeviceFunctions(); - [Throws] - static sequence getPortList(); - [Throws] - static PortModeType getPortSupportModes(number portId); - [Throws] - static async void setPortRoleTypes(number portId, PowerRoleType powerRole, DataRoleType dataRole); - [Throws] - static void addAccessoryRight(number tokenId, USBAccessory accessory); - [Throws] - static number claimInterface(USBDevicePipe pipe, USBInterface iface, optional boolean force); - [Throws] - static number releaseInterface(USBDevicePipe pipe, USBInterface iface); - [Throws] - static number setConfiguration(USBDevicePipe pipe, USBConfiguration config); - [Throws] - static number setInterface(USBDevicePipe pipe, USBInterface iface); - [Throws] - static buffer getRawDescriptor(USBDevicePipe pipe); - [Throws] - static number getFileDescriptor(USBDevicePipe pipe); - [Deprecated, Throws] - static async number controlTransfer(USBDevicePipe pipe, USBControlParams controlparam, optional number timeout); - [Throws] - static async number usbControlTransfer(USBDevicePipe pipe, USBDeviceRequestParams requestparam, optional number timeout); - [Throws] - static async number bulkTransfer(USBDevicePipe pipe, USBEndpoint endpoint, buffer buffer, optional number timeout); - [Throws] - static number closePipe(USBDevicePipe pipe); - [Throws] - static boolean hasAccessoryRight(USBAccessory accessory); - [Throws] - static async boolean requestAccessoryRight(USBAccessory accessory); - [Throws] - static void cancelAccessoryRight(USBAccessory accessory); - [Throws] - static sequence<[TypeArguments="USBAccessory"] Readonly> getAccessoryList(); - [Throws] - static USBAccessoryHandle openAccessory(USBAccessory accessory); - [Throws] - static void closeAccessory(USBAccessoryHandle accessoryHandle); - [Throws] - static void usbSubmitTransfer(UsbDataTransferParams transfer); - [Throws] - static void usbCancelTransfer(UsbDataTransferParams transfer); - - }; - + [Throws] + void usbSubmitTransfer(UsbDataTransferParams transfer); + [Throws] + void usbCancelTransfer(UsbDataTransferParams transfer); + [Throws] + boolean resetUsbDevice(USBDevicePipe pipe); }; \ No newline at end of file diff --git a/idl/@ohos.usbManager.serial.idl b/idl/@ohos.usbManager.serial.idl new file mode 100644 index 0000000..c40ae0f --- /dev/null +++ b/idl/@ohos.usbManager.serial.idl @@ -0,0 +1,93 @@ +package ohos.usbManager.serial; +[DefaultExport] +namespace serialManager { + sequence<[TypeArguments="SerialPort"] Readonly> getPortList(); + [Throws] + boolean hasSerialRight(i32 portId); + [Throws] + async boolean requestSerialRight(i32 portId); + [Throws] + void addSerialRight(i32 tokenId, i32 portId); + [Throws] + void cancelSerialRight(i32 portId); + [Throws] + void open(i32 portId); + [Throws] + void close(i32 portId); + [Throws] + ([TypeArguments="SerialAttribute"] Readonly) getAttribute(i32 portId); + [Throws] + void setAttribute(i32 portId, SerialAttribute attribute_); + [Throws] + async i32 read(i32 portId, buffer buffer, optional i32 timeout); + [Throws] + i32 readSync(i32 portId, buffer buffer, optional i32 timeout); + [Throws] + async i32 write(i32 portId, buffer buffer, optional i32 timeout); + [Throws] + i32 writeSync(i32 portId, buffer buffer, optional i32 timeout); + [Entity=Interface] + interface SerialPort { + attribute i32 portId; + attribute String deviceName; + }; + [Entity=Interface] + interface SerialAttribute { + attribute BaudRates baudRate; + [Optional] + attribute DataBits dataBits; + [Optional] + attribute Parity parity; + [Optional] + attribute StopBits stopBits; + }; + dictionary BaudRates { + number BAUDRATE_50 = 50; + number BAUDRATE_75 = 75; + number BAUDRATE_110 = 110; + number BAUDRATE_134 = 134; + number BAUDRATE_150 = 150; + number BAUDRATE_200 = 200; + number BAUDRATE_300 = 300; + number BAUDRATE_600 = 600; + number BAUDRATE_1200 = 1200; + number BAUDRATE_1800 = 1800; + number BAUDRATE_2400 = 2400; + number BAUDRATE_4800 = 4800; + number BAUDRATE_9600 = 9600; + number BAUDRATE_19200 = 19200; + number BAUDRATE_38400 = 38400; + number BAUDRATE_57600 = 57600; + number BAUDRATE_115200 = 115200; + number BAUDRATE_230400 = 230400; + number BAUDRATE_460800 = 460800; + number BAUDRATE_500000 = 500000; + number BAUDRATE_576000 = 576000; + number BAUDRATE_921600 = 921600; + number BAUDRATE_1000000 = 1000000; + number BAUDRATE_1152000 = 1152000; + number BAUDRATE_1500000 = 1500000; + number BAUDRATE_2000000 = 2000000; + number BAUDRATE_2500000 = 2500000; + number BAUDRATE_3000000 = 3000000; + number BAUDRATE_3500000 = 3500000; + number BAUDRATE_4000000 = 4000000; + }; + dictionary DataBits { + number DATABIT_8 = 8; + number DATABIT_7 = 7; + number DATABIT_6 = 6; + number DATABIT_5 = 5; + }; + dictionary Parity { + number PARITY_NONE = 0; + number PARITY_ODD = 1; + number PARITY_EVEN = 2; + number PARITY_MARK = 3; + number PARITY_SPACE = 4; + }; + dictionary StopBits { + number STOPBIT_1 = 0; + number STOPBIT_2 = 1; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.userIAM.faceAuth.idl b/idl/@ohos.userIAM.faceAuth.idl index cd58025..394d89c 100644 --- a/idl/@ohos.userIAM.faceAuth.idl +++ b/idl/@ohos.userIAM.faceAuth.idl @@ -1,13 +1,10 @@ -package ohos.userIAM; +package ohos.userIAM.faceAuth; +[DefaultExport] namespace faceAuth { - [Entity=Class] interface FaceAuthManager { - constructor(); [Throws] void setSurfaceId(String surfaceId); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.userIAM.userAccessCtrl.idl b/idl/@ohos.userIAM.userAccessCtrl.idl new file mode 100644 index 0000000..5a69f69 --- /dev/null +++ b/idl/@ohos.userIAM.userAccessCtrl.idl @@ -0,0 +1,27 @@ +package ohos.userIAM.userAccessCtrl; +import ohos.userIAM.userAuth.default as userAuth; +[DefaultExport] +namespace userAccessCtrl { + [Throws] + async AuthToken verifyAuthToken(buffer authToken, i32 allowableDuration); + [Entity=Interface] + interface AuthToken { + attribute buffer challenge; + attribute userAuth.AuthTrustLevel authTrustLevel; + attribute userAuth.UserAuthType authType; + attribute AuthTokenType tokenType; + attribute i32 userId; + attribute bigint timeInterval; + [Optional] + attribute bigint secureUid; + [Optional] + attribute bigint enrolledId; + [Optional] + attribute bigint credentialId; + }; + dictionary AuthTokenType { + number TOKEN_TYPE_LOCAL_AUTH = 0; + number TOKEN_TYPE_LOCAL_RESIGN = 1; + number TOKEN_TYPE_COAUTH = 2; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.userIAM.userAuth.idl b/idl/@ohos.userIAM.userAuth.idl index a9ddcd4..178b690 100644 --- a/idl/@ohos.userIAM.userAuth.idl +++ b/idl/@ohos.userIAM.userAuth.idl @@ -1,10 +1,11 @@ -package ohos.userIAM; +package ohos.userIAM.userAuth; import ohos.base.AsyncCallback as AsyncCallback; +import application.Context.default as Context; +[DefaultExport] namespace userAuth { - + const i32 MAX_ALLOWABLE_REUSE_DURATION = 300000; [Deprecated] dictionary AuthenticationResult { - [Deprecated] number NO_SUPPORT = -1; [Deprecated] @@ -27,7 +28,6 @@ namespace userAuth { number NOT_ENROLLED = 8; [Deprecated] number GENERAL_ERROR = 100; - }; [Deprecated] typedef String AuthType; @@ -37,16 +37,16 @@ namespace userAuth { callback AsyncCallback_Number_Void = void (number result); [Entity=Interface, Deprecated] interface Authenticator { - [Deprecated] void execute(AuthType type, SecureLevel level, AsyncCallback_Number_Void callback_); [Deprecated] async number execute(AuthType type, SecureLevel level); - }; + [Deprecated] + Authenticator getAuthenticator(); [Entity=Class, Deprecated] interface UserAuth { - + [Deprecated] constructor(); [Deprecated] number getVersion(); @@ -56,7 +56,6 @@ namespace userAuth { buffer auth(buffer challenge, UserAuthType authType, AuthTrustLevel authTrustLevel, IUserAuthCallback callback_); [Deprecated] number cancelAuth(buffer contextID); - }; [Synthetic] callback Callback_Number_AuthResult_Void = void (number result, AuthResult extraInfo); @@ -64,27 +63,22 @@ namespace userAuth { callback Callback_Number_Number_Any_Void = void (number module, number acquire, any extraInfo); [Entity=Interface, Deprecated] interface IUserAuthCallback { - [Deprecated] attribute Callback_Number_AuthResult_Void onResult; [Optional, Deprecated] attribute Callback_Number_Number_Any_Void onAcquireInfo; - }; [Entity=Interface, Deprecated] interface AuthResult { - [Optional, Deprecated] attribute buffer token; [Optional, Deprecated] attribute number remainTimes; [Optional, Deprecated] attribute number freezingTime; - }; [Deprecated] dictionary ResultCode { - [Deprecated] number SUCCESS = 0; [Deprecated] @@ -107,11 +101,9 @@ namespace userAuth { number LOCKED = 9; [Deprecated] number NOT_ENROLLED = 10; - }; [Deprecated] dictionary FaceTips { - [Deprecated] number FACE_AUTH_TIP_TOO_BRIGHT = 1; [Deprecated] @@ -134,11 +126,9 @@ namespace userAuth { number FACE_AUTH_TIP_POOR_GAZE = 10; [Deprecated] number FACE_AUTH_TIP_NOT_DETECTED = 11; - }; [Deprecated] dictionary FingerprintTips { - [Deprecated] number FINGERPRINT_AUTH_TIP_GOOD = 0; [Deprecated] @@ -151,23 +141,18 @@ namespace userAuth { number FINGERPRINT_AUTH_TIP_TOO_FAST = 4; [Deprecated] number FINGERPRINT_AUTH_TIP_TOO_SLOW = 5; - }; dictionary UserAuthType { - number PIN = 1; number FACE = 2; number FINGERPRINT = 4; number PRIVATE_PIN = 16; - }; dictionary AuthTrustLevel { - number ATL1 = 10000; number ATL2 = 20000; number ATL3 = 30000; number ATL4 = 40000; - }; [Deprecated] typedef String AuthEventKey; @@ -175,14 +160,11 @@ namespace userAuth { typedef (AuthResultInfo or TipInfo) EventInfo; [Entity=Interface, Deprecated] interface AuthEvent { - [Deprecated, DtsName="callback"] void callback_(EventInfo result); - }; [Entity=Interface, Deprecated] interface AuthResultInfo { - [Deprecated] attribute number result; [Optional, Deprecated] @@ -191,16 +173,13 @@ namespace userAuth { attribute number remainAttempts; [Optional, Deprecated] attribute number lockoutDuration; - }; [Entity=Interface, Deprecated] interface TipInfo { - [Deprecated] attribute number module; [Deprecated] attribute number tip; - }; [Synthetic] callback Callback_AuthEventKey_AuthEvent_Void = void (AuthEventKey name, AuthEvent callback_); @@ -210,7 +189,6 @@ namespace userAuth { callback Callback_Void = void (); [Entity=Interface, Deprecated] interface AuthInstance { - [Deprecated] attribute Callback_AuthEventKey_AuthEvent_Void on; [Deprecated] @@ -219,51 +197,47 @@ namespace userAuth { attribute Callback_Void start; [Deprecated] attribute Callback_Void cancel; - }; + [Throws] + void getAvailableStatus(UserAuthType authType, AuthTrustLevel authTrustLevel); [Entity=Interface] interface EnrolledState { - - attribute number credentialDigest; - attribute number credentialCount; - + attribute i32 credentialDigest; + attribute i32 credentialCount; }; + [Throws] + EnrolledState getEnrolledState(UserAuthType authType); + [Deprecated, Throws] + AuthInstance getAuthInstance(buffer challenge, UserAuthType authType, AuthTrustLevel authTrustLevel); dictionary WindowModeType { - number DIALOG_BOX = 1; number FULLSCREEN = 2; - }; dictionary ReuseMode { - number AUTH_TYPE_RELEVANT = 1; number AUTH_TYPE_IRRELEVANT = 2; number CALLER_IRRELEVANT_AUTH_TYPE_RELEVANT = 3; number CALLER_IRRELEVANT_AUTH_TYPE_IRRELEVANT = 4; - }; [Entity=Interface] interface ReuseUnlockResult { - attribute ReuseMode reuseMode; - attribute number reuseDuration; - + attribute i32 reuseDuration; }; [Entity=Interface] interface AuthParam { - attribute buffer challenge; attribute sequence authType; attribute AuthTrustLevel authTrustLevel; [Optional] attribute ReuseUnlockResult reuseUnlockResult; [Optional] - attribute number userId; - + attribute i32 userId; + [Optional] + attribute boolean skipLockedBiometricAuth; }; [Entity=Interface] interface WidgetParam { - attribute String title; [Optional] attribute String navigationButtonText; @@ -271,46 +245,61 @@ namespace userAuth { attribute WindowModeType windowMode; [Optional] attribute Context uiContext; - }; [Entity=Interface] interface UserAuthResult { - - attribute number result; + attribute i32 result; [Optional] attribute buffer token; [Optional] attribute UserAuthType authType; [Optional] attribute EnrolledState enrolledState; - }; + [Synthetic] + callback Callback_UserAuthResult_Void = void (UserAuthResult result); [Entity=Interface] interface IAuthCallback { - + attribute Callback_UserAuthResult_Void onResult; void onResult(UserAuthResult result); - }; + dictionary UserAuthTipCode { + number COMPARE_FAILURE = 1; + number TIMEOUT = 2; + number TEMPORARILY_LOCKED = 3; + number PERMANENTLY_LOCKED = 4; + number WIDGET_LOADED = 5; + number WIDGET_RELEASED = 6; + }; + [Entity=Interface] + interface AuthTipInfo { + attribute UserAuthType tipType; + attribute UserAuthTipCode tipCode; + }; + callback AuthTipCallback = void (AuthTipInfo authTipInfo); [Entity=Interface] interface UserAuthInstance { - [Throws, DtsName="on", DtsTag="'result'"] void onResult(IAuthCallback callback_); + [Throws, DtsName="on", DtsTag="'authTip'"] + void onAuthTip(AuthTipCallback callback_); [Throws, DtsName="off", DtsTag="'result'"] void offResult(optional IAuthCallback callback_); + [Throws, DtsName="off", DtsTag="'authTip'"] + void offAuthTip(optional AuthTipCallback callback_); [Throws] void start(); [Throws] void cancel(); - }; + [Throws] + UserAuthInstance getUserAuthInstance(AuthParam authParam, WidgetParam widgetParam); dictionary NoticeType { - number WIDGET_NOTICE = 1; - }; + [Throws] + void sendNotice(NoticeType noticeType, String eventData); dictionary UserAuthResultCode { - number SUCCESS = 12500000; number FAIL = 12500001; number GENERAL_ERROR = 12500002; @@ -319,47 +308,31 @@ namespace userAuth { number TYPE_NOT_SUPPORT = 12500005; number TRUST_LEVEL_NOT_SUPPORT = 12500006; number BUSY = 12500007; + number INVALID_PARAMETERS = 12500008; number LOCKED = 12500009; number NOT_ENROLLED = 12500010; number CANCELED_FROM_WIDGET = 12500011; number PIN_EXPIRED = 12500013; number AUTH_TOKEN_CHECK_FAILED = 12500015; number AUTH_TOKEN_EXPIRED = 12500016; - + number REUSE_AUTH_RESULT_FAILED = 12500017; }; [Entity=Interface] interface UserAuthWidgetMgr { - [Throws, DtsName="on", DtsTag="'command'"] void onCommand(IAuthWidgetCallback callback_); [Throws, DtsName="off", DtsTag="'command'"] void offCommand(optional IAuthWidgetCallback callback_); - }; + [Throws] + UserAuthWidgetMgr getUserAuthWidgetMgr(i32 version); + [Synthetic] + callback Callback_String_Void = void (String cmdData); [Entity=Interface] interface IAuthWidgetCallback { - + attribute Callback_String_Void sendCommand; void sendCommand(String cmdData); - - }; - [GlobalScope] - interface GlobalScope_userAuth_ohos_userIAM_userAuth { - - [Deprecated] - static Authenticator getAuthenticator(); - [Throws] - static void getAvailableStatus(UserAuthType authType, AuthTrustLevel authTrustLevel); - [Throws] - static EnrolledState getEnrolledState(UserAuthType authType); - [Deprecated, Throws] - static AuthInstance getAuthInstance(buffer challenge, UserAuthType authType, AuthTrustLevel authTrustLevel); - [Throws] - static UserAuthInstance getUserAuthInstance(AuthParam authParam, WidgetParam widgetParam); - [Throws] - static void sendNotice(NoticeType noticeType, String eventData); - [Throws] - static UserAuthWidgetMgr getUserAuthWidgetMgr(number version); - }; - + [Throws] + buffer queryReusableAuthResult(AuthParam authParam); }; \ No newline at end of file diff --git a/idl/@ohos.util.ArrayList.idl b/idl/@ohos.util.ArrayList.idl index cc7b09b..d488852 100644 --- a/idl/@ohos.util.ArrayList.idl +++ b/idl/@ohos.util.ArrayList.idl @@ -1,15 +1,16 @@ -package ohos.util; +package ohos.util.ArrayList; [Synthetic] -callback Callback_T_Number_ArrayList_T = T (any value, optional number index, optional [TypeArguments="T"] ArrayList arrlist); +callback Callback_T_Opt_Number_Opt_ArrayList_T = T (T value, optional number index, optional [TypeArguments="T"] ArrayList arrlist); [Synthetic] -callback Callback_T_Number_ArrayList_Void = void (any value, optional number index, optional [TypeArguments="T"] ArrayList arrlist); +callback Callback_T_Opt_Number_Opt_ArrayList_Void = void (T value, optional number index, optional [TypeArguments="T"] ArrayList arrlist); [Synthetic] -callback Callback_T_T_Number = number (any firstValue, any secondValue); -[Entity=Class, TypeParameters="T"] +callback Callback_T_T_Number = number (T firstValue, T secondValue); +[Entity=Class, DefaultExport, TypeParameters="T"] interface ArrayList { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean add(T element); [Throws] @@ -27,9 +28,11 @@ interface ArrayList { [Throws] void removeByRange(number fromIndex, number toIndex); [Throws] - void replaceAllElements(Callback_T_Number_ArrayList_T callbackFn, optional Object thisArg); + void replaceAllElements(Callback_T_Opt_Number_Opt_ArrayList_T callbackFn, optional Object thisArg); + void replaceAllElements([TypeArguments="T"] ArrayListCbFn1 callbackFn); [Throws] - void forEach(Callback_T_Number_ArrayList_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_ArrayList_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] ArrayListCbFn callbackFn); [Throws] void sort(optional Callback_T_T_Number comparator); [Throws] @@ -46,11 +49,20 @@ interface ArrayList { boolean isEmpty(); [Throws, IndexSignature] T indexSignature(number index); + [Throws, DtsName="$_get"] + T dollar__get(number index); + [Throws, DtsName="$_set"] + void dollar__set(number index, T value); [Throws] void increaseCapacityTo(number newCapacity); [Throws] void trimToCurrentLength(); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback ArrayListCbFn = void (T value, number index, [TypeArguments="T"] ArrayList arrlist); +[TypeParameters="T"] +callback ArrayListCbFn1 = T (T value, optional number index, optional [TypeArguments="T"] ArrayList arrlist); \ No newline at end of file diff --git a/idl/@ohos.util.Deque.idl b/idl/@ohos.util.Deque.idl index 6ca808c..3407826 100644 --- a/idl/@ohos.util.Deque.idl +++ b/idl/@ohos.util.Deque.idl @@ -1,28 +1,33 @@ -package ohos.util; +package ohos.util.Deque; [Synthetic] -callback Callback_T_Number_Deque_Void = void (any value, optional number index, optional [TypeArguments="T"] Deque deque); -[Entity=Class, TypeParameters="T"] +callback Callback_T_Opt_Number_Opt_Deque_Void = void (T value, optional number index, optional [TypeArguments="T"] Deque deque); +[Entity=Class, DefaultExport, TypeParameters="T"] interface Deque { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] void insertFront(T element); [Throws] void insertEnd(T element); [Throws] boolean has(T element); - [Throws] - T getFirst(); - [Throws] - T getLast(); - [Throws] - T popFirst(); - [Throws] - T popLast(); - [Throws] - void forEach(Callback_T_Number_Deque_Void callbackFn, optional Object thisArg); + (T or undefined) getFirst(); + (T or undefined) getLast(); + (T or undefined) popFirst(); + (T or undefined) popLast(); + [Throws] + void forEach(Callback_T_Opt_Number_Opt_Deque_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] DequeCbFnforEach callbackFn); + [DtsName="$_get"] + T dollar__get(number index); + [DtsName="$_set"] + void dollar__set(number index, T value); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback DequeCbFnforEach = void (T value, number index, [TypeArguments="T"] Deque deque); \ No newline at end of file diff --git a/idl/@ohos.util.HashMap.idl b/idl/@ohos.util.HashMap.idl index 3c72101..c0d0c60 100644 --- a/idl/@ohos.util.HashMap.idl +++ b/idl/@ohos.util.HashMap.idl @@ -1,45 +1,46 @@ -package ohos.util; +package ohos.util.HashMap; [Synthetic] -callback Callback_V_K_HashMap_Void = void (optional V value, optional K key, optional [TypeArguments="K,V"] HashMap map); -[Entity=Tuple, Synthetic, TypeParameters="K,V"] +callback Callback_Opt_V_Opt_K_Opt_HashMap_Void = void (optional V value, optional K key, optional [TypeArguments="K,V"] HashMap map); +[Entity=Tuple, Synthetic] interface Tuple_K_V { - attribute K value0; attribute V value1; - }; -[Entity=Class, TypeParameters="K,V"] +[Entity=Class, DefaultExport, TypeParameters="K,V"] interface HashMap { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean isEmpty(); [Throws] boolean hasKey(K key); [Throws] boolean hasValue(V value); - [Throws] - V get(K key); + (V or undefined) get(K key); [Throws] void setAll([TypeArguments="K,V"] HashMap map); [Throws] Object set(K key, V value); - [Throws] - V remove(K key); + (V or undefined) remove(K key); [Throws] void clear(); [Throws] - ([TypeArguments="K"] IterableIterator) keys(); + sequence keys(); [Throws] - ([TypeArguments="V"] IterableIterator) values(); + sequence values(); [Throws] boolean replace(K key, V newValue); [Throws] - void forEach(Callback_V_K_HashMap_Void callbackFn, optional Object thisArg); + void forEach(Callback_Opt_V_Opt_K_Opt_HashMap_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="K,V"] HashMapCbFn callbackFn); [Throws] - ([TypeArguments="Tuple_K_V"] IterableIterator) entries(); + sequence entries(); [Throws, DtsName="_unknown"] - ([TypeArguments="Tuple_K_V"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="K,V"] +callback HashMapCbFn = void (V value, K key, [TypeArguments="K,V"] HashMap map); \ No newline at end of file diff --git a/idl/@ohos.util.HashSet.idl b/idl/@ohos.util.HashSet.idl index 0250e28..5dbacda 100644 --- a/idl/@ohos.util.HashSet.idl +++ b/idl/@ohos.util.HashSet.idl @@ -1,18 +1,17 @@ -package ohos.util; +package ohos.util.HashSet; [Synthetic] -callback Callback_T_T_HashSet_Void = void (optional any value, optional any key, optional [TypeArguments="T"] HashSet set); -[Entity=Tuple, Synthetic, TypeParameters="T,T"] +callback Callback_Opt_T_Opt_T_Opt_HashSet_Void = void (optional T value, optional T key, optional [TypeArguments="T"] HashSet set); +[Entity=Tuple, Synthetic] interface Tuple_T_T { - attribute T value0; attribute T value1; - }; -[Entity=Class, TypeParameters="T"] +[Entity=Class, DefaultExport, TypeParameters="T"] interface HashSet { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean isEmpty(); [Throws] @@ -24,12 +23,16 @@ interface HashSet { [Throws] void clear(); [Throws] - void forEach(Callback_T_T_HashSet_Void callbackFn, optional Object thisArg); + void forEach(Callback_Opt_T_Opt_T_Opt_HashSet_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] HashSetCbFn callbackFn); [Throws] - ([TypeArguments="T"] IterableIterator) values(); + sequence values(); [Throws] - ([TypeArguments="Tuple_T_T"] IterableIterator) entries(); + sequence entries(); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback HashSetCbFn = void (T value, T key, [TypeArguments="T"] HashSet set); \ No newline at end of file diff --git a/idl/@ohos.util.LightWeightMap.idl b/idl/@ohos.util.LightWeightMap.idl index 46d5041..abba92c 100644 --- a/idl/@ohos.util.LightWeightMap.idl +++ b/idl/@ohos.util.LightWeightMap.idl @@ -1,18 +1,17 @@ -package ohos.util; -[Entity=Tuple, Synthetic, TypeParameters="K,V"] +package ohos.util.LightWeightMap; +[Entity=Tuple, Synthetic] interface Tuple_K_V { - attribute K value0; attribute V value1; - }; [Synthetic] -callback Callback_V_K_LightWeightMap_Void = void (optional V value, optional K key, optional [TypeArguments="K,V"] LightWeightMap map); -[Entity=Class, TypeParameters="K,V"] +callback Callback_Opt_V_Opt_K_Opt_LightWeightMap_Void = void (optional V value, optional K key, optional [TypeArguments="K,V"] LightWeightMap map); +[Entity=Class, DefaultExport, TypeParameters="K,V"] interface LightWeightMap { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean hasAll([TypeArguments="K,V"] LightWeightMap map); [Throws] @@ -22,9 +21,8 @@ interface LightWeightMap { [Throws] void increaseCapacityTo(number minimumCapacity); [Throws] - ([TypeArguments="Tuple_K_V"] IterableIterator) entries(); - [Throws] - V get(K key); + sequence entries(); + (V or undefined) get(K key); [Throws] number getIndexOfKey(K key); [Throws] @@ -32,15 +30,14 @@ interface LightWeightMap { [Throws] boolean isEmpty(); [Throws] - K getKeyAt(number index); + (K or undefined) getKeyAt(number index); [Throws] - ([TypeArguments="K"] IterableIterator) keys(); + sequence keys(); [Throws] void setAll([TypeArguments="K,V"] LightWeightMap map); [Throws] Object set(K key, V value); - [Throws] - V remove(K key); + (V or undefined) remove(K key); [Throws] boolean removeAt(number index); [Throws] @@ -48,14 +45,18 @@ interface LightWeightMap { [Throws] boolean setValueAt(number index, V newValue); [Throws] - void forEach(Callback_V_K_LightWeightMap_Void callbackFn, optional Object thisArg); + void forEach(Callback_Opt_V_Opt_K_Opt_LightWeightMap_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="K,V"] LightWeightMapCbFn callbackFn); [Throws, DtsName="_unknown"] - ([TypeArguments="Tuple_K_V"] IterableIterator) bottom_unknown(); + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); [Throws, DtsName="toString"] String toString_(); [Throws] - V getValueAt(number index); + (V or undefined) getValueAt(number index); [Throws] - ([TypeArguments="V"] IterableIterator) values(); - -}; \ No newline at end of file + sequence values(); +}; +[TypeParameters="K,V"] +callback LightWeightMapCbFn = void (V value, K key, [TypeArguments="K,V"] LightWeightMap map); \ No newline at end of file diff --git a/idl/@ohos.util.LightWeightSet.idl b/idl/@ohos.util.LightWeightSet.idl index 595bda4..b812edc 100644 --- a/idl/@ohos.util.LightWeightSet.idl +++ b/idl/@ohos.util.LightWeightSet.idl @@ -1,18 +1,17 @@ -package ohos.util; +package ohos.util.LightWeightSet; [Synthetic] -callback Callback_T_T_LightWeightSet_Void = void (optional any value, optional any key, optional [TypeArguments="T"] LightWeightSet set); -[Entity=Tuple, Synthetic, TypeParameters="T,T"] +callback Callback_Opt_T_Opt_T_Opt_LightWeightSet_Void = void (optional T value, optional T key, optional [TypeArguments="T"] LightWeightSet set); +[Entity=Tuple, Synthetic] interface Tuple_T_T { - attribute T value0; attribute T value1; - }; -[Entity=Class, TypeParameters="T"] +[Entity=Class, DefaultExport, TypeParameters="T"] interface LightWeightSet { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean add(T obj); [Throws] @@ -27,27 +26,29 @@ interface LightWeightSet { void increaseCapacityTo(number minimumCapacity); [Throws] number getIndexOf(T key); - [Throws] - T remove(T key); + (T or undefined) remove(T key); [Throws] boolean removeAt(number index); [Throws] void clear(); [Throws] - void forEach(Callback_T_T_LightWeightSet_Void callbackFn, optional Object thisArg); + void forEach(Callback_Opt_T_Opt_T_Opt_LightWeightSet_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] LightWeightSetForEachCb callbackFn); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); [DtsName="toString"] String toString_(); [Throws] sequence toArray(); + (T or undefined) getValueAt(number index); [Throws] - T getValueAt(number index); - [Throws] - ([TypeArguments="T"] IterableIterator) values(); + sequence values(); [Throws] - ([TypeArguments="Tuple_T_T"] IterableIterator) entries(); + sequence entries(); [Throws] boolean isEmpty(); - -}; \ No newline at end of file +}; +[TypeParameters="T"] +callback LightWeightSetForEachCb = void (T value, T key, [TypeArguments="T"] LightWeightSet set); \ No newline at end of file diff --git a/idl/@ohos.util.LinkedList.idl b/idl/@ohos.util.LinkedList.idl index b057ee4..6f2e905 100644 --- a/idl/@ohos.util.LinkedList.idl +++ b/idl/@ohos.util.LinkedList.idl @@ -1,29 +1,29 @@ -package ohos.util; +package ohos.util.LinkedList; [Synthetic] -callback Callback_T_Number_LinkedList_Void = void (any value, optional number index, optional [TypeArguments="T"] LinkedList LinkedList); -[Entity=Class, TypeParameters="T"] +callback Callback_T_Opt_Number_Opt_LinkedList_Void = void (T value, optional number index, optional [TypeArguments="T"] LinkedList LinkedList); +[Entity=Class, DefaultExport, TypeParameters="T"] interface LinkedList { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean add(T element); [Throws] void insert(number index, T element); - [Throws] - T get(number index); + (T or undefined) get(number index); [Throws] void addFirst(T element); [Throws] - T removeFirst(); + (T or undefined) removeFirst(); [Throws] - T removeLast(); + (T or undefined) removeLast(); [Throws] boolean has(T element); [Throws] number getIndexOf(T element); [Throws] - T removeByIndex(number index); + (T or undefined) removeByIndex(number index); [Throws] boolean remove(T element); [Throws] @@ -32,14 +32,13 @@ interface LinkedList { boolean removeLastFound(T element); [Throws] number getLastIndexOf(T element); + (T or undefined) getFirst(); + (T or undefined) getLast(); [Throws] - T getFirst(); - [Throws] - T getLast(); - [Throws] - T set(number index, T element); + (T or undefined) set(number index, T element); [Throws] - void forEach(Callback_T_Number_LinkedList_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_LinkedList_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] LinkedListForEachCb callbackfn); [Throws] void clear(); [Throws] @@ -47,6 +46,9 @@ interface LinkedList { [Throws] sequence convertToArray(); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback LinkedListForEachCb = void (T value, number index, [TypeArguments="T"] LinkedList linkedList); \ No newline at end of file diff --git a/idl/@ohos.util.List.idl b/idl/@ohos.util.List.idl index 4886e60..099c087 100644 --- a/idl/@ohos.util.List.idl +++ b/idl/@ohos.util.List.idl @@ -1,41 +1,40 @@ -package ohos.util; +package ohos.util.List; [Synthetic] -callback Callback_T_Number_List_Void = void (any value, optional number index, optional [TypeArguments="T"] List List); +callback Callback_T_Opt_Number_Opt_List_Void = void (T value, optional number index, optional [TypeArguments="T"] List List); [Synthetic] -callback Callback_T_T_Number = number (any firstValue, any secondValue); +callback Callback_T_T_Number = number (T firstValue, T secondValue); [Synthetic] -callback Callback_T_Number_List_T = T (any value, optional number index, optional [TypeArguments="T"] List list); -[Entity=Class, TypeParameters="T"] +callback Callback_T_Opt_Number_Opt_List_T = T (T value, optional number index, optional [TypeArguments="T"] List list); +[Entity=Class, DefaultExport, TypeParameters="T"] interface List { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean add(T element); [Throws] void insert(T element, number index); - [Throws] - T get(number index); + (T or undefined) get(number index); [Throws] boolean has(T element); [Throws] number getIndexOf(T element); [Throws] - T removeByIndex(number index); + (T or undefined) removeByIndex(number index); [Throws] boolean remove(T element); [Throws] number getLastIndexOf(T element); + (T or undefined) getFirst(); + (T or undefined) getLast(); [Throws] - T getFirst(); - [Throws] - T getLast(); - [Throws] - T set(number index, T element); + (T or undefined) set(number index, T element); [Throws] boolean equal(Object obj); [Throws] - void forEach(Callback_T_Number_List_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_List_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] ListForEachCb callbackfn); [Throws] void sort(Callback_T_T_Number comparator); [Throws] @@ -43,12 +42,22 @@ interface List { [Throws] ([TypeArguments="T"] List) getSubList(number fromIndex, number toIndex); [Throws] - void replaceAllElements(Callback_T_Number_List_T callbackFn, optional Object thisArg); + void replaceAllElements(Callback_T_Opt_Number_Opt_List_T callbackFn, optional Object thisArg); + void replaceAllElements([TypeArguments="T"] ListReplaceCb callbackfn); [Throws] sequence convertToArray(); [Throws] boolean isEmpty(); + [DtsName="$_get"] + (T or undefined) dollar__get(number index); + [DtsName="$_set"] + void dollar__set(number index, T value); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback ListForEachCb = void (T value, number index, [TypeArguments="T"] List list); +[TypeParameters="T"] +callback ListReplaceCb = T (T value, number index, [TypeArguments="T"] List list); \ No newline at end of file diff --git a/idl/@ohos.util.PlainArray.idl b/idl/@ohos.util.PlainArray.idl index 9643a39..a87a759 100644 --- a/idl/@ohos.util.PlainArray.idl +++ b/idl/@ohos.util.PlainArray.idl @@ -1,18 +1,17 @@ -package ohos.util; +package ohos.util.PlainArray; [Synthetic] -callback Callback_T_Number_PlainArray_Void = void (any value, optional number index, optional [TypeArguments="T"] PlainArray PlainArray); -[Entity=Tuple, Synthetic, TypeParameters="number,T"] +callback Callback_T_Opt_Number_Opt_PlainArray_Void = void (T value, optional number index, optional [TypeArguments="T"] PlainArray PlainArray); +[Entity=Tuple, Synthetic] interface Tuple_Number_T { - attribute number value0; attribute T value1; - }; -[Entity=Class, TypeParameters="T"] +[Entity=Class, DefaultExport, TypeParameters="T"] interface PlainArray { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] void add(number key, T value); [Throws] @@ -22,7 +21,7 @@ interface PlainArray { [Throws] boolean has(number key); [Throws] - T get(number key); + (T or undefined) get(number key); [Throws] number getIndexOfKey(number key); [Throws] @@ -32,9 +31,9 @@ interface PlainArray { [Throws] number getKeyAt(number index); [Throws] - T remove(number key); + (T or undefined) remove(number key); [Throws] - T removeAt(number index); + (T or undefined) removeAt(number index); [Throws] number removeRangeFrom(number index, number size); [Throws] @@ -44,8 +43,12 @@ interface PlainArray { [Throws] T getValueAt(number index); [Throws] - void forEach(Callback_T_Number_PlainArray_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_PlainArray_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] PlainArrayForEachCb callbackFn); [Throws, DtsName="_unknown"] - ([TypeArguments="Tuple_Number_T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback PlainArrayForEachCb = void (T value, number key, [TypeArguments="T"] PlainArray PlainArray); \ No newline at end of file diff --git a/idl/@ohos.util.Queue.idl b/idl/@ohos.util.Queue.idl index f0de418..b128ac0 100644 --- a/idl/@ohos.util.Queue.idl +++ b/idl/@ohos.util.Queue.idl @@ -1,20 +1,23 @@ -package ohos.util; +package ohos.util.Queue; [Synthetic] -callback Callback_T_Number_Queue_Void = void (any value, optional number index, optional [TypeArguments="T"] Queue Queue); -[Entity=Class, TypeParameters="T"] +callback Callback_T_Opt_Number_Opt_Queue_Void = void (T value, optional number index, optional [TypeArguments="T"] Queue Queue); +[Entity=Class, DefaultExport, TypeParameters="T"] interface Queue { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean add(T element); + (T or undefined) getFirst(); + (T or undefined) pop(); [Throws] - T getFirst(); - [Throws] - T pop(); - [Throws] - void forEach(Callback_T_Number_Queue_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_Queue_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] QueueForEachCb callbackfn); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback QueueForEachCb = void (T value, number index, [TypeArguments="T"] Queue queue); \ No newline at end of file diff --git a/idl/@ohos.util.Stack.idl b/idl/@ohos.util.Stack.idl index e1a3a80..5697bce 100644 --- a/idl/@ohos.util.Stack.idl +++ b/idl/@ohos.util.Stack.idl @@ -1,24 +1,27 @@ -package ohos.util; +package ohos.util.Stack; [Synthetic] -callback Callback_T_Number_Stack_Void = void (any value, optional number index, optional [TypeArguments="T"] Stack stack); -[Entity=Class, TypeParameters="T"] +callback Callback_T_Opt_Number_Opt_Stack_Void = void (T value, optional number index, optional [TypeArguments="T"] Stack stack); +[Entity=Class, DefaultExport, TypeParameters="T"] interface Stack { - constructor(); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean isEmpty(); - [Throws] - T peek(); - [Throws] - T pop(); + (T or undefined) peek(); + (T or undefined) pop(); [Throws] T push(T item); [Throws] number locate(T element); [Throws] - void forEach(Callback_T_Number_Stack_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_Stack_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] StackForEachCb callbackfn); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback StackForEachCb = void (T value, number index, [TypeArguments="T"] Stack stack); \ No newline at end of file diff --git a/idl/@ohos.util.TreeMap.idl b/idl/@ohos.util.TreeMap.idl index 9598c21..701e37e 100644 --- a/idl/@ohos.util.TreeMap.idl +++ b/idl/@ohos.util.TreeMap.idl @@ -1,55 +1,55 @@ -package ohos.util; +package ohos.util.TreeMap; [Synthetic] -callback Callback_V_K_TreeMap_Void = void (optional V value, optional K key, optional [TypeArguments="K,V"] TreeMap map); -[Entity=Tuple, Synthetic, TypeParameters="K,V"] +callback Callback_Opt_V_Opt_K_Opt_TreeMap_Void = void (optional V value, optional K key, optional [TypeArguments="K,V"] TreeMap map); +[Entity=Tuple, Synthetic] interface Tuple_K_V { - attribute K value0; attribute V value1; - }; [Synthetic] callback Callback_K_K_Boolean = boolean (K firstValue, K secondValue); -[Entity=Class, TypeParameters="K,V"] +[Entity=Class, DefaultExport, TypeParameters="K,V"] interface TreeMap { - constructor(optional Callback_K_K_Boolean comparator); + constructor(optional [TypeArguments="K"] TreeMapComparator comparator); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean isEmpty(); [Throws] boolean hasKey(K key); [Throws] boolean hasValue(V value); - [Throws] - V get(K key); - [Throws] - K getFirstKey(); - [Throws] - K getLastKey(); + (V or undefined) get(K key); + (K or undefined) getFirstKey(); + (K or undefined) getLastKey(); [Throws] void setAll([TypeArguments="K,V"] TreeMap map); [Throws] Object set(K key, V value); - [Throws] - V remove(K key); + (V or undefined) remove(K key); [Throws] void clear(); + (K or undefined) getLowerKey(K key); + (K or undefined) getHigherKey(K key); [Throws] - K getLowerKey(K key); + sequence keys(); [Throws] - K getHigherKey(K key); - [Throws] - ([TypeArguments="K"] IterableIterator) keys(); - [Throws] - ([TypeArguments="V"] IterableIterator) values(); + sequence values(); [Throws] boolean replace(K key, V newValue); [Throws] - void forEach(Callback_V_K_TreeMap_Void callbackFn, optional Object thisArg); + void forEach(Callback_Opt_V_Opt_K_Opt_TreeMap_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="K,V"] TreeMapForEachCb callbackFn); [Throws] - ([TypeArguments="Tuple_K_V"] IterableIterator) entries(); + sequence entries(); [Throws, DtsName="_unknown"] - ([TypeArguments="Tuple_K_V"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="K,V"] +callback TreeMapForEachCb = void (V value, K key, [TypeArguments="K,V"] TreeMap map); +[TypeParameters="K"] +callback TreeMapComparator = number (K firstValue, K secondValue); \ No newline at end of file diff --git a/idl/@ohos.util.TreeSet.idl b/idl/@ohos.util.TreeSet.idl index a741719..e93e190 100644 --- a/idl/@ohos.util.TreeSet.idl +++ b/idl/@ohos.util.TreeSet.idl @@ -1,20 +1,20 @@ -package ohos.util; +package ohos.util.TreeSet; [Synthetic] -callback Callback_T_T_TreeSet_Void = void (optional any value, optional any key, optional [TypeArguments="T"] TreeSet set); -[Entity=Tuple, Synthetic, TypeParameters="T,T"] +callback Callback_Opt_T_Opt_T_Opt_TreeSet_Void = void (optional T value, optional T key, optional [TypeArguments="T"] TreeSet set); +[Entity=Tuple, Synthetic] interface Tuple_T_T { - attribute T value0; attribute T value1; - }; [Synthetic] -callback Callback_T_T_Boolean = boolean (any firstValue, any secondValue); -[Entity=Class, TypeParameters="T"] +callback Callback_T_T_Boolean = boolean (T firstValue, T secondValue); +[Entity=Class, DefaultExport, TypeParameters="T"] interface TreeSet { - constructor(optional Callback_T_T_Boolean comparator); + constructor(optional [TypeArguments="T"] TreeSetComparator comparator); attribute number length; + [Accessor=Getter] + readonly attribute number length; [Throws] boolean isEmpty(); [Throws] @@ -25,25 +25,25 @@ interface TreeSet { boolean remove(T value); [Throws] void clear(); + (T or undefined) getFirstValue(); + (T or undefined) getLastValue(); + (T or undefined) getLowerValue(T key); + (T or undefined) getHigherValue(T key); + (T or undefined) popFirst(); + (T or undefined) popLast(); [Throws] - T getFirstValue(); + void forEach(Callback_Opt_T_Opt_T_Opt_TreeSet_Void callbackFn, optional Object thisArg); + void forEach([TypeArguments="T"] TreeSetForEachCb callbackFn); [Throws] - T getLastValue(); + sequence values(); [Throws] - T getLowerValue(T key); - [Throws] - T getHigherValue(T key); - [Throws] - T popFirst(); - [Throws] - T popLast(); - [Throws] - void forEach(Callback_T_T_TreeSet_Void callbackFn, optional Object thisArg); - [Throws] - ([TypeArguments="T"] IterableIterator) values(); - [Throws] - ([TypeArguments="Tuple_T_T"] IterableIterator) entries(); + sequence entries(); [Throws, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - -}; \ No newline at end of file + sequence bottom_unknown(); + [DtsName="$_iterator"] + sequence dollar__iterator(); +}; +[TypeParameters="T"] +callback TreeSetForEachCb = void (T value, T key, [TypeArguments="T"] TreeSet set); +[TypeParameters="T"] +callback TreeSetComparator = number (T firstValue, T secondValue); \ No newline at end of file diff --git a/idl/@ohos.util.Vector.idl b/idl/@ohos.util.Vector.idl index a30c6d4..5850553 100644 --- a/idl/@ohos.util.Vector.idl +++ b/idl/@ohos.util.Vector.idl @@ -1,13 +1,13 @@ -package ohos.util; +package ohos.util.Vector; [Synthetic] -callback Callback_T_Number_Vector_T = T (any value, optional number index, optional [TypeArguments="T"] Vector vector); +callback Callback_T_Opt_Number_Opt_Vector_T = T (T value, optional number index, optional [TypeArguments="T"] Vector vector); [Synthetic] -callback Callback_T_Number_Vector_Void = void (any value, optional number index, optional [TypeArguments="T"] Vector vector); +callback Callback_T_Opt_Number_Opt_Vector_Void = void (T value, optional number index, optional [TypeArguments="T"] Vector vector); [Synthetic] -callback Callback_T_T_Number = number (any firstValue, any secondValue); -[Entity=Class, Deprecated, TypeParameters="T"] +callback Callback_T_T_Number = number (T firstValue, T secondValue); +[Entity=Class, Deprecated, DefaultExport, TypeParameters="T"] interface Vector { - + [Deprecated] constructor(); [Deprecated] attribute number length; @@ -40,9 +40,9 @@ interface Vector { [Deprecated] void removeByRange(number fromIndex, number toIndex); [Deprecated] - void replaceAllElements(Callback_T_Number_Vector_T callbackFn, optional Object thisArg); + void replaceAllElements(Callback_T_Opt_Number_Opt_Vector_T callbackFn, optional Object thisArg); [Deprecated] - void forEach(Callback_T_Number_Vector_Void callbackFn, optional Object thisArg); + void forEach(Callback_T_Opt_Number_Opt_Vector_Void callbackFn, optional Object thisArg); [Deprecated] void sort(optional Callback_T_T_Number comparator); [Deprecated] @@ -68,6 +68,5 @@ interface Vector { [Deprecated] void copyToArray(sequence array); [Deprecated, DtsName="_unknown"] - ([TypeArguments="T"] IterableIterator) bottom_unknown(); - + sequence bottom_unknown(); }; \ No newline at end of file diff --git a/idl/@ohos.util.idl b/idl/@ohos.util.idl index 3a679b0..48d635f 100644 --- a/idl/@ohos.util.idl +++ b/idl/@ohos.util.idl @@ -1,51 +1,64 @@ -package ohos; +package ohos.util; +[DefaultExport] namespace util { - + [Deprecated] + String printf(String format, sequence... args); + [Throws] + String format(String format, sequence... args); + [Deprecated] + String getErrorString(number errno); + [Throws] + String errnoToString(number errno); [Synthetic] callback Callback_Object_Object_Void = void (Object err, Object value); + [Throws] + Callback_Object_Object_Void callbackWrapper(Function original); + [Throws] + Function promisify(Callback_Object_Object_Void original); + [Deprecated] + Object promiseWrapper(Callback_Object_Object_Void original); + [Throws] + String generateRandomUUID(optional boolean entropyCache); + [Throws] + buffer generateRandomBinaryUUID(optional boolean entropyCache); + [Throws] + buffer parseUUID(String uuid); + [Throws] + number getHash(Object object_); + String getMainThreadStackTrace(); [Entity=Interface] interface TextDecoderOptions { - [Optional] attribute boolean fatal; [Optional] attribute boolean ignoreBOM; - }; [Entity=Interface] interface DecodeWithStreamOptions { - [Optional] attribute boolean stream; - }; [Entity=Interface] interface DecodeToStringOptions { - [Optional] attribute boolean stream; - }; [Entity=Literal, Synthetic] interface Literal_Boolean_stream { - [Optional] attribute boolean stream; - }; [Entity=Literal, Synthetic] interface Literal_Boolean_fatal_ignoreBOM { - [Optional] attribute boolean fatal; [Optional] attribute boolean ignoreBOM; - }; [Entity=Class] interface TextDecoder { - constructor(); + [Deprecated] constructor(optional String encoding, optional Literal_Boolean_fatal_ignoreBOM options); readonly attribute String encoding; readonly attribute boolean fatal; @@ -58,25 +71,19 @@ namespace util { String decodeWithStream(buffer input, optional DecodeWithStreamOptions options); [Throws] String decodeToString(buffer input, optional DecodeToStringOptions options); - }; [Entity=Interface] interface EncodeIntoUint8ArrayInfo { - attribute number read; attribute number written; - }; [Entity=Literal, Synthetic] interface Literal_Number_read_written { - attribute number read; attribute number written; - }; [Entity=Class] interface TextEncoder { - constructor(); constructor(optional String encoding); readonly attribute undefined encoding; @@ -90,11 +97,10 @@ namespace util { Literal_Number_read_written encodeInto(String input, buffer dest); [Throws] EncodeIntoUint8ArrayInfo encodeIntoUint8Array(String input, buffer dest); - }; [Entity=Class] interface RationalNumber { - + [Deprecated] constructor(number numerator, number denominator); constructor(); [Throws] @@ -118,18 +124,15 @@ namespace util { boolean isZero(); [DtsName="toString"] String toString_(); - }; - [Entity=Tuple, Synthetic, TypeParameters="K,V"] + [Entity=Tuple, Synthetic] interface Tuple_K_V { - attribute K value0; attribute V value1; - }; [Entity=Class, Deprecated, TypeParameters="K,V"] interface LruBuffer { - + [Deprecated] constructor(optional number capacity); [Deprecated] attribute number length; @@ -170,14 +173,12 @@ namespace util { [Deprecated] V createDefault(K key); [Deprecated] - ([TypeArguments="Tuple_K_V"] IterableIterator) entries(); + sequence entries(); [Deprecated, DtsName="_unknown"] - ([TypeArguments="Tuple_K_V"] IterableIterator) bottom_unknown(); - + sequence bottom_unknown(); }; [Entity=Class, TypeParameters="K,V"] interface LRUCache { - constructor(optional number capacity); attribute number length; [Throws] @@ -206,21 +207,18 @@ namespace util { boolean contains(K key); [Throws] V createDefault(K key); - ([TypeArguments="Tuple_K_V"] IterableIterator) entries(); + sequence entries(); [DtsName="_unknown"] - ([TypeArguments="Tuple_K_V"] IterableIterator) bottom_unknown(); - + sequence bottom_unknown(); }; [Entity=Interface] interface ScopeComparable { - boolean compareTo(ScopeComparable other); - }; typedef (ScopeComparable or number) ScopeType; [Entity=Class, Deprecated] interface Scope { - + [Deprecated] constructor(ScopeType lowerObj, ScopeType upperObj); [Deprecated, DtsName="toString"] String toString_(); @@ -244,11 +242,9 @@ namespace util { boolean contains(Scope range); [Deprecated] ScopeType clamp(ScopeType value); - }; [Entity=Class] interface ScopeHelper { - constructor(ScopeType lowerObj, ScopeType upperObj); [DtsName="toString"] String toString_(); @@ -270,11 +266,10 @@ namespace util { boolean contains(ScopeHelper range); [Throws] ScopeType clamp(ScopeType value); - }; [Entity=Class, Deprecated] interface Base64 { - + [Deprecated] constructor(); [Deprecated] buffer encodeSync(buffer src); @@ -288,19 +283,15 @@ namespace util { async String encodeToString(buffer src); [Deprecated] async buffer decode((buffer or String) src); - }; dictionary Type { - number BASIC = 0; number MIME = 1; number BASIC_URL_SAFE = 2; number MIME_URL_SAFE = 3; - }; [Entity=Class] interface Base64Helper { - constructor(); [Throws] buffer encodeSync(buffer src, optional Type options); @@ -314,11 +305,9 @@ namespace util { async String encodeToString(buffer src, optional Type options); [Throws] async buffer decode((buffer or String) src, optional Type options); - }; [Entity=Class] interface types { - constructor(); boolean isAnyArrayBuffer(Object value); boolean isArrayBufferView(Object value); @@ -364,55 +353,22 @@ namespace util { boolean isUint32Array(Object value); boolean isWeakMap(Object value); boolean isWeakSet(Object value); - }; [Entity=Class] interface Aspect { - [Throws] static void addBefore(Object targetClass, String methodName, boolean isStatic, Function before); [Throws] static void addAfter(Object targetClass, String methodName, boolean isStatic, Function after); [Throws] static void replace(Object targetClass, String methodName, boolean isStatic, Function instead); - }; [Entity=Class] interface StringDecoder { - constructor(optional String encoding); [Throws] String write((String or buffer) chunk); [Throws] String end(optional (String or buffer) chunk); - - }; - [GlobalScope] - interface GlobalScope_util_ohos_util { - - [Deprecated] - static String printf(String format, sequence... args); - [Throws] - static String format(String format, sequence... args); - [Deprecated] - static String getErrorString(number errno); - [Throws] - static String errnoToString(number errno); - [Throws] - static Callback_Object_Object_Void callbackWrapper(Function original); - [Throws] - static Function promisify(Callback_Object_Object_Void original); - [Deprecated] - static Object promiseWrapper(Callback_Object_Object_Void original); - [Throws] - static String generateRandomUUID(optional boolean entropyCache); - [Throws] - static buffer generateRandomBinaryUUID(optional boolean entropyCache); - [Throws] - static buffer parseUUID(String uuid); - [Throws] - static number getHash(Object object_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.util.json.idl b/idl/@ohos.util.json.idl index d390f13..07cfdc5 100644 --- a/idl/@ohos.util.json.idl +++ b/idl/@ohos.util.json.idl @@ -1,34 +1,27 @@ -package ohos.util; +package ohos.util.json; +[DefaultExport] namespace json { - callback Transformer = (Object or undefined) (Object this, String key, Object value); + [Throws] + (Object or undefined) parse(String text, optional Transformer reviver, optional ParseOptions options); + [TypeParameters="T"] + (T or undefined) parse(String text, Type type, optional Transformer reviver, optional ParseOptions options); + [Throws] + String stringify(Object value, optional (sequence<(number or String)> or undefined) replacer, optional (String or number) space); + String stringify(NullishType value, optional ((Transformer or sequence<(number or String)>) or undefined) replacer, optional (String or number) space); + [Throws] + String stringify(Object value, optional Transformer replacer, optional (String or number) space); + [Throws] + boolean has(Object obj, String property); + [Throws] + void remove(Object obj, String property); dictionary BigIntMode { - number DEFAULT = 0; number PARSE_AS_BIGINT = 1; number ALWAYS_PARSE_AS_BIGINT = 2; - }; [Entity=Interface] interface ParseOptions { - attribute BigIntMode bigIntMode; - }; - [GlobalScope] - interface GlobalScope_json_ohos_util_json { - - [Throws] - static (Object or undefined) parse(String text, optional Transformer reviver, optional ParseOptions options); - [Throws] - static String stringify(Object value, optional (sequence<(number or String)> or undefined) replacer, optional (String or number) space); - [Throws] - static String stringify(Object value, optional Transformer replacer, optional (String or number) space); - [Throws] - static boolean has(Object obj, String property); - [Throws] - static void remove(Object obj, String property); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.util.stream.idl b/idl/@ohos.util.stream.idl index 9176865..1be8c58 100644 --- a/idl/@ohos.util.stream.idl +++ b/idl/@ohos.util.stream.idl @@ -1,13 +1,13 @@ -package ohos.util; +package ohos.util.stream; import ohos.base.Callback as Callback; -import ohos.events.emitter as emitter; +import ohos.events.emitter.default as emitter; +[DefaultExport] namespace stream { - + callback StreamCb = void (); [Synthetic] - callback Callback_emitter_EventData_Void = void (emitter.EventData parameter); + callback Callback_Emitter_EventData_Void = void (emitter.EventData parameter); [Entity=Class] interface Writable { - constructor(); readonly attribute boolean writableObjectMode; readonly attribute number writableHighWatermark; @@ -19,43 +19,46 @@ namespace stream { [Throws] boolean write(optional (String or buffer) chunk, optional String encoding, optional Function callback_); [Throws] + boolean write(optional (String or buffer) chunk, optional String encoding, optional StreamCb callback_); + [Throws] Writable end(optional (String or buffer) chunk, optional String encoding, optional Function callback_); [Throws] + Writable end(optional (String or buffer) chunk, optional String encoding, optional StreamCb callback_); + [Throws] boolean setDefaultEncoding(optional String encoding); boolean cork(); boolean uncork(); [Throws] - void on(String event, Callback_emitter_EventData_Void callback_); + void on(String event, Callback_Emitter_EventData_Void callback_); [Throws] - void off(String event, optional Callback_emitter_EventData_Void callback_); + void off(String event, optional Callback_Emitter_EventData_Void callback_); [Throws] void doInitialize(Function callback_); + void doInitialize(StreamCb callback_); [Throws] void doWrite((String or buffer) chunk, String encoding, Function callback_); + void doWrite((String or buffer) chunk, String encoding, StreamCb callback_); [Throws] void doWritev((sequence or sequence) chunks, Function callback_); - + void doWritev((sequence or sequence) chunks, StreamCb callback_); }; [Entity=Class] - interface Transform: Duplex { - + interface Transform: [Extends] Duplex { constructor(); [Throws] void doTransform(String chunk, String encoding, Function callback_); + void doTransform(String chunk, String encoding, StreamCb callback_); [Throws] void doFlush(Function callback_); - + void doFlush(StreamCb callback_); }; [Entity=Interface] interface ReadableOptions { - [Optional] attribute String encoding; - }; [Entity=Class] interface Readable { - constructor(); constructor(ReadableOptions options); readonly attribute boolean readableObjectMode; @@ -77,20 +80,19 @@ namespace stream { [Throws] Readable unpipe(optional Writable destination); [Throws] - void on(String event, Callback_emitter_EventData_Void callback_); + void on(String event, Callback_Emitter_EventData_Void callback_); [Throws] - void off(String event, optional Callback_emitter_EventData_Void callback_); + void off(String event, optional Callback_Emitter_EventData_Void callback_); [Throws] void doInitialize(Function callback_); + void doInitialize(StreamCb callback_); [Throws] void doRead(number size); [Throws] boolean push(((buffer or String) or undefined) chunk, optional String encoding); - }; [Entity=Class] - interface Duplex: Readable { - + interface Duplex: [Extends] Readable { constructor(); readonly attribute boolean writableObjectMode; readonly attribute number writableHighWatermark; @@ -102,16 +104,20 @@ namespace stream { [Throws] boolean write(optional (String or buffer) chunk, optional String encoding, optional Function callback_); [Throws] + boolean write(optional (String or buffer) chunk, optional String encoding, optional StreamCb callback_); + [Throws] Writable end(optional (String or buffer) chunk, optional String encoding, optional Function callback_); [Throws] + Writable end(optional (String or buffer) chunk, optional String encoding, optional StreamCb callback_); + [Throws] boolean setDefaultEncoding(optional String encoding); boolean cork(); boolean uncork(); [Throws] void doWrite((String or buffer) chunk, String encoding, Function callback_); + void doWrite((String or buffer) chunk, String encoding, StreamCb callback_); [Throws] void doWritev((sequence or sequence) chunks, Function callback_); - + void doWritev((sequence or sequence) chunks, StreamCb callback_); }; - }; \ No newline at end of file diff --git a/idl/@ohos.vibrator.idl b/idl/@ohos.vibrator.idl index 4f4917c..db4dd6a 100644 --- a/idl/@ohos.vibrator.idl +++ b/idl/@ohos.vibrator.idl @@ -1,98 +1,122 @@ -package ohos; +package ohos.vibrator; import ohos.base.AsyncCallback as AsyncCallback; +import ohos.base.Callback as Callback; +[DefaultExport] namespace vibrator { - [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void vibrate(number duration, optional AsyncCallback_Void callback_); + [Deprecated] + async void vibrate(number duration); + [Deprecated] + async void vibrate(EffectId effectId); + [Deprecated] + void vibrate(EffectId effectId, optional AsyncCallback_Void callback_); + [Throws] + void startVibration(VibrateEffect effect, VibrateAttribute attribute_, AsyncCallback_Void callback_); + [Throws] + async void startVibration(VibrateEffect effect, VibrateAttribute attribute_); + [Throws] + async void stopVibration(VibratorStopMode stopMode); + [Throws] + void stopVibration(VibratorStopMode stopMode, AsyncCallback_Void callback_); + [Throws] + void stopVibration(AsyncCallback_Void callback_); + [Throws] + async void stopVibration(); + [Throws] + void stopVibrationSync(); + [Throws] + async void stopVibration(optional VibratorInfoParam param); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Throws] + void isSupportEffect(String effectId, AsyncCallback_Boolean_Void callback_); + [Throws] + async boolean isSupportEffect(String effectId); + [Throws] + boolean isSupportEffectSync(String effectId); + [Throws] + EffectInfo getEffectInfoSync(String effectId, optional VibratorInfoParam param); + [Entity=Interface] + interface EffectInfo { + attribute boolean isEffectSupported; + }; + [Deprecated] + async void stop(VibratorStopMode stopMode); + [Deprecated] + void stop(VibratorStopMode stopMode, optional AsyncCallback_Void callback_); + [Throws] + boolean isHdHapticSupported(); dictionary EffectId { - String EFFECT_CLOCK_TIMER = "haptic.clock.timer"; - }; dictionary HapticFeedback { - String EFFECT_SOFT = "haptic.effect.soft"; String EFFECT_HARD = "haptic.effect.hard"; String EFFECT_SHARP = "haptic.effect.sharp"; String EFFECT_NOTICE_SUCCESS = "haptic.notice.success"; String EFFECT_NOTICE_FAILURE = "haptic.notice.fail"; String EFFECT_NOTICE_WARNING = "haptic.notice.warning"; - }; dictionary VibratorStopMode { - String VIBRATOR_STOP_MODE_TIME = "time"; String VIBRATOR_STOP_MODE_PRESET = "preset"; - }; typedef String Usage; [Entity=Interface] interface VibrateAttribute { - [Optional] attribute number id; + [Optional] + attribute number deviceId; attribute Usage usage; [Optional] attribute boolean systemUsage; - }; typedef (VibrateTime or VibratePreset or VibrateFromFile or VibrateFromPattern) VibrateEffect; [Entity=Interface] interface VibrateTime { - attribute String type; attribute number duration; - }; [Entity=Interface] interface VibratePreset { - attribute String type; attribute String effectId; [Optional] attribute number count; [Optional] attribute number intensity; - }; [Entity=Interface] interface VibrateFromFile { - attribute String type; attribute HapticFileDescriptor hapticFd; - }; [Entity=Interface] interface HapticFileDescriptor { - attribute number fd; [Optional] attribute number offset; [Optional] attribute number length; - }; dictionary VibratorEventType { - number CONTINUOUS = 0; number TRANSIENT = 1; - }; [Entity=Interface] interface VibratorCurvePoint { - attribute number time; [Optional] attribute number intensity; [Optional] attribute number frequency; - }; [Entity=Interface] interface VibratorEvent { - attribute VibratorEventType eventType; attribute number time; [Optional] @@ -105,18 +129,14 @@ namespace vibrator { attribute number index; [Optional] attribute sequence points; - }; [Entity=Interface] interface VibratorPattern { - attribute number time; attribute sequence events; - }; [Entity=Interface] interface ContinuousParam { - [Optional] attribute number intensity; [Optional] @@ -125,74 +145,56 @@ namespace vibrator { attribute sequence points; [Optional] attribute number index; - }; [Entity=Interface] interface TransientParam { - [Optional] attribute number intensity; [Optional] attribute number frequency; [Optional] attribute number index; - }; [Entity=Class] interface VibratorPatternBuilder { - [Throws] VibratorPatternBuilder addContinuousEvent(number time, number duration, optional ContinuousParam options); [Throws] VibratorPatternBuilder addTransientEvent(number time, optional TransientParam options); VibratorPattern build(); - }; [Entity=Interface] interface VibrateFromPattern { - attribute String type; attribute VibratorPattern pattern; - - }; - [GlobalScope] - interface GlobalScope_vibrator_ohos_vibrator { - - [Deprecated] - static void vibrate(number duration, optional AsyncCallback_Void callback_); - [Deprecated] - static async void vibrate(number duration); - [Deprecated] - static async void vibrate(EffectId effectId); - [Deprecated] - static void vibrate(EffectId effectId, optional AsyncCallback_Void callback_); - [Throws] - static void startVibration(VibrateEffect effect, VibrateAttribute attribute_, AsyncCallback_Void callback_); - [Throws] - static async void startVibration(VibrateEffect effect, VibrateAttribute attribute_); - [Throws] - static async void stopVibration(VibratorStopMode stopMode); - [Throws] - static void stopVibration(VibratorStopMode stopMode, AsyncCallback_Void callback_); - [Throws] - static void stopVibration(AsyncCallback_Void callback_); - [Throws] - static async void stopVibration(); - [Throws] - static void stopVibrationSync(); - [Throws] - static void isSupportEffect(String effectId, AsyncCallback_Boolean_Void callback_); - [Throws] - static async boolean isSupportEffect(String effectId); - [Throws] - static boolean isSupportEffectSync(String effectId); - [Deprecated] - static async void stop(VibratorStopMode stopMode); - [Deprecated] - static void stop(VibratorStopMode stopMode, optional AsyncCallback_Void callback_); - [Throws] - static boolean isHdHapticSupported(); - }; - + [Entity=Interface] + interface VibratorInfoParam { + [Optional] + attribute number deviceId; + [Optional] + attribute number vibratorId; + }; + [Entity=Interface] + interface VibratorInfo { + attribute number deviceId; + attribute number vibratorId; + attribute String deviceName; + attribute boolean isHdHapticSupported; + attribute boolean isLocalVibrator; + }; + sequence getVibratorInfoSync(optional VibratorInfoParam param); + [Synthetic] + callback Callback_VibratorStatusEvent_Void = void (VibratorStatusEvent parameter); + [Throws, DtsName="on", DtsTag="'vibratorStateChange'"] + void onVibratorStateChange(Callback_VibratorStatusEvent_Void callback_); + [Throws, DtsName="off", DtsTag="'vibratorStateChange'"] + void offVibratorStateChange(optional Callback_VibratorStatusEvent_Void callback_); + [Entity=Interface] + interface VibratorStatusEvent { + attribute number timestamp; + attribute number deviceId; + attribute number vibratorCount; + attribute boolean isVibratorOnline; + }; }; \ No newline at end of file diff --git a/idl/@ohos.wallpaper.idl b/idl/@ohos.wallpaper.idl index a9a7560..0bb1fe9 100644 --- a/idl/@ohos.wallpaper.idl +++ b/idl/@ohos.wallpaper.idl @@ -1,11 +1,10 @@ -package ohos; +package ohos.wallpaper; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimedia.image as image; +import ohos.multimedia.image.default as image; +[DefaultExport] namespace wallpaper { - [Entity=Interface, Deprecated] interface RgbaColor { - [Deprecated] attribute number red; [Deprecated] @@ -14,139 +13,124 @@ namespace wallpaper { attribute number blue; [Deprecated] attribute number alpha; - }; dictionary WallpaperType { - number WALLPAPER_SYSTEM = 0; number WALLPAPER_LOCKSCREEN = 1; - }; [Entity=Interface] interface WallpaperInfo { - attribute FoldState foldState; attribute RotateState rotateState; attribute String source; - }; dictionary FoldState { - number NORMAL = 0; number UNFOLD_ONCE_STATE = 1; number UNFOLD_TWICE_STATE = 2; - }; dictionary RotateState { - number PORTRAIT = 0; number LANDSCAPE = 1; - }; dictionary WallpaperResourceType { - number DEFAULT = 0; number PICTURE = 1; number VIDEO = 2; number PACKAGE = 3; - }; [Async, Synthetic] callback AsyncCallback_Array_RgbaColor_Void = void (sequence result); + [Deprecated] + void getColors(WallpaperType wallpaperType, AsyncCallback_Array_RgbaColor_Void callback_); + [Deprecated] + async sequence getColors(WallpaperType wallpaperType); + [Throws] + sequence getColorsSync(WallpaperType wallpaperType); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void getId(WallpaperType wallpaperType, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getId(WallpaperType wallpaperType); + [Deprecated] + void getFile(WallpaperType wallpaperType, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getFile(WallpaperType wallpaperType); + [Deprecated] + void getMinHeight(AsyncCallback_Number_Void callback_); + [Deprecated] + async number getMinHeight(); + [Throws] + number getMinHeightSync(); + [Deprecated] + void getMinWidth(AsyncCallback_Number_Void callback_); + [Deprecated] + async number getMinWidth(); + [Throws] + number getMinWidthSync(); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void isChangePermitted(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isChangePermitted(); + [Deprecated] + void isOperationAllowed(AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean isOperationAllowed(); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void reset(WallpaperType wallpaperType, AsyncCallback_Void callback_); + [Deprecated] + async void reset(WallpaperType wallpaperType); + [Throws] + void restore(WallpaperType wallpaperType, AsyncCallback_Void callback_); + [Throws] + async void restore(WallpaperType wallpaperType); + [Deprecated] + void setWallpaper((String or image.PixelMap) source, WallpaperType wallpaperType, AsyncCallback_Void callback_); + [Deprecated] + async void setWallpaper((String or image.PixelMap) source, WallpaperType wallpaperType); + [Throws] + void setImage((String or image.PixelMap) source, WallpaperType wallpaperType, AsyncCallback_Void callback_); + [Throws] + async void setImage((String or image.PixelMap) source, WallpaperType wallpaperType); [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); + [Deprecated] + void getPixelMap(WallpaperType wallpaperType, AsyncCallback_Image_PixelMap_Void callback_); + [Deprecated] + async image.PixelMap getPixelMap(WallpaperType wallpaperType); + [Throws] + void getImage(WallpaperType wallpaperType, AsyncCallback_Image_PixelMap_Void callback_); + [Throws] + async image.PixelMap getImage(WallpaperType wallpaperType); + [Throws] + void setVideo(String source, WallpaperType wallpaperType, AsyncCallback_Void callback_); + [Throws] + async void setVideo(String source, WallpaperType wallpaperType); + [Throws] + void setCustomWallpaper(String source, WallpaperType wallpaperType, AsyncCallback_Void callback_); + [Throws] + async void setCustomWallpaper(String source, WallpaperType wallpaperType); [Synthetic] callback Callback_Array_RgbaColor_WallpaperType_Void = void (sequence colors, WallpaperType wallpaperType); + [Deprecated, DtsName="on", DtsTag="'colorChange'"] + void onColorChange(Callback_Array_RgbaColor_WallpaperType_Void callback_); [Synthetic] - callback Callback_WallpaperType_WallpaperResourceType_String_Void = void (WallpaperType wallpaperType, WallpaperResourceType resourceType, optional String uri); - [GlobalScope] - interface GlobalScope_wallpaper_ohos_wallpaper { - - [Deprecated] - static void getColors(WallpaperType wallpaperType, AsyncCallback_Array_RgbaColor_Void callback_); - [Deprecated] - static async sequence getColors(WallpaperType wallpaperType); - [Throws] - static sequence getColorsSync(WallpaperType wallpaperType); - [Deprecated] - static void getId(WallpaperType wallpaperType, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getId(WallpaperType wallpaperType); - [Deprecated] - static void getFile(WallpaperType wallpaperType, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getFile(WallpaperType wallpaperType); - [Deprecated] - static void getMinHeight(AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getMinHeight(); - [Throws] - static number getMinHeightSync(); - [Deprecated] - static void getMinWidth(AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getMinWidth(); - [Throws] - static number getMinWidthSync(); - [Deprecated] - static void isChangePermitted(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isChangePermitted(); - [Deprecated] - static void isOperationAllowed(AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean isOperationAllowed(); - [Deprecated] - static void reset(WallpaperType wallpaperType, AsyncCallback_Void callback_); - [Deprecated] - static async void reset(WallpaperType wallpaperType); - [Throws] - static void restore(WallpaperType wallpaperType, AsyncCallback_Void callback_); - [Throws] - static async void restore(WallpaperType wallpaperType); - [Deprecated] - static void setWallpaper((String or image.PixelMap) source, WallpaperType wallpaperType, AsyncCallback_Void callback_); - [Deprecated] - static async void setWallpaper((String or image.PixelMap) source, WallpaperType wallpaperType); - [Throws] - static void setImage((String or image.PixelMap) source, WallpaperType wallpaperType, AsyncCallback_Void callback_); - [Throws] - static async void setImage((String or image.PixelMap) source, WallpaperType wallpaperType); - [Deprecated] - static void getPixelMap(WallpaperType wallpaperType, AsyncCallback_image_PixelMap_Void callback_); - [Deprecated] - static async image.PixelMap getPixelMap(WallpaperType wallpaperType); - [Throws] - static void getImage(WallpaperType wallpaperType, AsyncCallback_image_PixelMap_Void callback_); - [Throws] - static async image.PixelMap getImage(WallpaperType wallpaperType); - [Throws] - static void setVideo(String source, WallpaperType wallpaperType, AsyncCallback_Void callback_); - [Throws] - static async void setVideo(String source, WallpaperType wallpaperType); - [Throws] - static void setCustomWallpaper(String source, WallpaperType wallpaperType, AsyncCallback_Void callback_); - [Throws] - static async void setCustomWallpaper(String source, WallpaperType wallpaperType); - [Deprecated, DtsName="on", DtsTag="'colorChange'"] - static void onColorChange(Callback_Array_RgbaColor_WallpaperType_Void callback_); - [Throws, DtsName="on", DtsTag="'wallpaperChange'"] - static void onWallpaperChange(Callback_WallpaperType_WallpaperResourceType_String_Void callback_); - [Deprecated, DtsName="off", DtsTag="'colorChange'"] - static void offColorChange(optional Callback_Array_RgbaColor_WallpaperType_Void callback_); - [Throws, DtsName="off", DtsTag="'wallpaperChange'"] - static void offWallpaperChange(optional Callback_WallpaperType_WallpaperResourceType_String_Void callback_); - [Throws] - static async void setAllWallpapers(sequence wallpaperInfos, WallpaperType wallpaperType); - [Throws] - static async image.PixelMap getWallpaperByState(WallpaperType wallpaperType, FoldState foldState, RotateState rotateState); - - }; - + callback onWallpaperChange_callback = void (WallpaperType wallpaperType, WallpaperResourceType resourceType, optional String uri); + [Throws, DtsName="on", DtsTag="'wallpaperChange'"] + void onWallpaperChange(onWallpaperChange_callback callback_); + [Deprecated, DtsName="off", DtsTag="'colorChange'"] + void offColorChange(optional Callback_Array_RgbaColor_WallpaperType_Void callback_); + [Synthetic] + callback offWallpaperChange_callback = void (WallpaperType wallpaperType, WallpaperResourceType resourceType, optional String uri); + [Throws, DtsName="off", DtsTag="'wallpaperChange'"] + void offWallpaperChange(optional offWallpaperChange_callback callback_); + [Throws] + async void setAllWallpapers(sequence wallpaperInfos, WallpaperType wallpaperType); + [Throws] + async image.PixelMap getWallpaperByState(WallpaperType wallpaperType, FoldState foldState, RotateState rotateState); }; \ No newline at end of file diff --git a/idl/@ohos.wantAgent.idl b/idl/@ohos.wantAgent.idl index de1c9cd..2f7fd76 100644 --- a/idl/@ohos.wantAgent.idl +++ b/idl/@ohos.wantAgent.idl @@ -1,28 +1,53 @@ -package ohos; +package ohos.wantAgent; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.app.ability.Want as Want; -import wantAgent.WantAgentInfo as WantAgentInfo; -import wantAgent.TriggerInfo as TriggerInfo; +import ohos.app.ability.Want.default as Want; +import wantAgent.wantAgentInfo.WantAgentInfo as WantAgentInfo; +import wantAgent.triggerInfo.TriggerInfo as TriggerInfo; +[DefaultExport] namespace wantAgent { - [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); + [Deprecated] + void getBundleName(WantAgent agent, AsyncCallback_String_Void callback_); + [Deprecated] + async String getBundleName(WantAgent agent); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void getUid(WantAgent agent, AsyncCallback_Number_Void callback_); + [Deprecated] + async number getUid(WantAgent agent); [Async, Synthetic] callback AsyncCallback_Want_Void = void (Want result); + [Deprecated] + void getWant(WantAgent agent, AsyncCallback_Want_Void callback_); + [Deprecated] + async Want getWant(WantAgent agent); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Deprecated] + void cancel(WantAgent agent, AsyncCallback_Void callback_); + [Deprecated] + async void cancel(WantAgent agent); [Synthetic] callback Callback_CompleteData_Void = void (CompleteData parameter); + [Deprecated] + void trigger(WantAgent agent, TriggerInfo triggerInfo, optional Callback_CompleteData_Void callback_); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void equal(WantAgent agent, WantAgent otherAgent, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean equal(WantAgent agent, WantAgent otherAgent); [Async, Synthetic] callback AsyncCallback_WantAgent_Void = void (WantAgent result); [Deprecated] + void getWantAgent(WantAgentInfo info, AsyncCallback_WantAgent_Void callback_); + [Deprecated] + async WantAgent getWantAgent(WantAgentInfo info); + [Deprecated] dictionary WantAgentFlags { - [Deprecated] number ONE_TIME_FLAG = 0; [Deprecated] @@ -43,11 +68,9 @@ namespace wantAgent { number REPLACE_ENTITIES = 8; [Deprecated] number REPLACE_BUNDLE = 9; - }; [Deprecated] dictionary OperationType { - [Deprecated] number UNKNOWN_TYPE = 0; [Deprecated] @@ -58,18 +81,14 @@ namespace wantAgent { number START_SERVICE = 3; [Deprecated] number SEND_COMMON_EVENT = 4; - }; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface, Deprecated] interface CompleteData { - [Deprecated] attribute WantAgent info; [Deprecated] @@ -80,39 +99,6 @@ namespace wantAgent { attribute String finalData; [Optional, Deprecated] attribute Literal_Empty extraInfo; - - }; - [GlobalScope] - interface GlobalScope_wantAgent_ohos_wantAgent { - - [Deprecated] - static void getBundleName(WantAgent agent, AsyncCallback_String_Void callback_); - [Deprecated] - static async String getBundleName(WantAgent agent); - [Deprecated] - static void getUid(WantAgent agent, AsyncCallback_Number_Void callback_); - [Deprecated] - static async number getUid(WantAgent agent); - [Deprecated] - static void getWant(WantAgent agent, AsyncCallback_Want_Void callback_); - [Deprecated] - static async Want getWant(WantAgent agent); - [Deprecated] - static void cancel(WantAgent agent, AsyncCallback_Void callback_); - [Deprecated] - static async void cancel(WantAgent agent); - [Deprecated] - static void trigger(WantAgent agent, TriggerInfo triggerInfo, optional Callback_CompleteData_Void callback_); - [Deprecated] - static void equal(WantAgent agent, WantAgent otherAgent, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean equal(WantAgent agent, WantAgent otherAgent); - [Deprecated] - static void getWantAgent(WantAgentInfo info, AsyncCallback_WantAgent_Void callback_); - [Deprecated] - static async WantAgent getWantAgent(WantAgentInfo info); - }; - }; typedef Object WantAgent; \ No newline at end of file diff --git a/idl/@ohos.web.netErrorList.idl b/idl/@ohos.web.netErrorList.idl index 0404f72..1e7b6c2 100644 --- a/idl/@ohos.web.netErrorList.idl +++ b/idl/@ohos.web.netErrorList.idl @@ -1,6 +1,5 @@ package ohos.web.netErrorList; dictionary WebNetErrorList { - number NET_OK = 0; number ERR_IO_PENDING = -1; number ERR_FAILED = -2; @@ -241,5 +240,4 @@ dictionary WebNetErrorList { number ERR_DNS_NAME_HTTPS_ONLY = -809; number ERR_DNS_REQUEST_CANCELED = -810; number ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811; - }; \ No newline at end of file diff --git a/idl/@ohos.web.webview.idl b/idl/@ohos.web.webview.idl index 2d5290c..c7c9bcc 100644 --- a/idl/@ohos.web.webview.idl +++ b/idl/@ohos.web.webview.idl @@ -1,22 +1,20 @@ -package ohos.web; +package ohos.web.webview; +import resource.Resource as Resource; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; import ohos.base.Callback as Callback; -import ohos.security.cert as cert; -import ohos.multimedia.image as image; -import ohos.print as print; +import ohos.security.cert.default as cert; +import ohos.multimedia.image.default as image; +import ohos.print.default as print; import ohos.web.netErrorList.WebNetErrorList as WebNetErrorList; +[DefaultExport] namespace webview { - [Entity=Interface] interface WebHeader { - attribute String headerKey; attribute String headerValue; - }; dictionary WebHitTestType { - [OriginalEnumMemberName=EditText] number EDIT_TEXT = 0; [OriginalEnumMemberName=Email] @@ -33,47 +31,35 @@ namespace webview { number PHONE = 6; [OriginalEnumMemberName=Unknown] number UNKNOWN = 7; - }; dictionary SecureDnsMode { - number OFF = 0; number AUTO = 1; number SECURE_ONLY = 2; - }; dictionary SecurityLevel { - number NONE = 0; number SECURE = 1; number WARNING = 2; number DANGEROUS = 3; - }; dictionary MediaPlaybackState { - number NONE = 0; number PLAYING = 1; number PAUSED = 2; number STOPPED = 3; - }; dictionary PressureLevel { - number MEMORY_PRESSURE_LEVEL_MODERATE = 1; number MEMORY_PRESSURE_LEVEL_CRITICAL = 2; - }; [Entity=Interface] interface HitTestValue { - attribute WebHitTestType type; attribute String extra; - }; [Entity=Interface] interface WebCustomScheme { - attribute String schemeName; attribute boolean isSupportCORS; attribute boolean isSupportFetch; @@ -89,17 +75,13 @@ namespace webview { attribute boolean isCspBypassing; [Optional] attribute boolean isCodeCacheSupported; - }; [Entity=Class] interface PdfData { - buffer pdfArrayBuffer(); - }; [Entity=Interface] interface PdfConfiguration { - attribute number width; attribute number height; attribute number marginTop; @@ -110,40 +92,34 @@ namespace webview { attribute number scale; [Optional] attribute boolean shouldPrintBackground; - }; [Entity=Interface] interface WebStorageOrigin { - attribute String origin; attribute number usage; attribute number quota; - }; [Entity=Interface] interface RequestInfo { - attribute String url; attribute String method; attribute String formData; - }; [Entity=Interface] interface ScrollOffset { - attribute number x; attribute number y; - }; [Synthetic] callback Callback_Void = void (); + [Throws] + void once(String type, Callback_Void callback_); [Async, Synthetic] callback AsyncCallback_Array_WebStorageOrigin_Void = void (sequence result); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Entity=Class] interface WebStorage { - static void deleteAllData(optional boolean incognito); [Throws] static void deleteOrigin(String origin); @@ -159,18 +135,15 @@ namespace webview { static async number getOriginUsage(String origin); [Throws] static void getOriginUsage(String origin, AsyncCallback_Number_Void callback_); - }; [Entity=Class] interface WebDataBase { - static boolean existHttpAuthCredentials(); static void deleteHttpAuthCredentials(); [Throws] static sequence getHttpAuthCredentials(String host, String realm); [Throws] static void saveHttpAuthCredentials(String host, String realm, String username, String password); - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); @@ -178,7 +151,6 @@ namespace webview { callback AsyncCallback_Array_String_Void = void (sequence result); [Entity=Class] interface GeolocationPermissions { - [Throws] static void allowGeolocation(String origin, optional boolean incognito); [Throws] @@ -192,7 +164,6 @@ namespace webview { static async sequence getStoredGeolocation(optional boolean incognito); [Throws] static void getStoredGeolocation(AsyncCallback_Array_String_Void callback_, optional boolean incognito); - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); @@ -200,7 +171,6 @@ namespace webview { callback AsyncCallback_Void = void (); [Entity=Class] interface WebCookieManager { - [Deprecated, Throws] static String getCookie(String url); [Throws] @@ -249,10 +219,8 @@ namespace webview { static async void clearSessionCookie(); [Throws] static void clearSessionCookie(AsyncCallback_Void callback_); - }; dictionary WebMessageType { - number NOT_SUPPORT = 0; number STRING = 1; number NUMBER = 2; @@ -260,11 +228,9 @@ namespace webview { number ARRAY_BUFFER = 4; number ARRAY = 5; number ERROR = 6; - }; [Entity=Class] interface WebMessageExt { - WebMessageType getType(); [Throws] String getString(); @@ -292,7 +258,6 @@ namespace webview { void setArray(sequence<(String or number or boolean)> message); [Throws] void setError(Error message); - }; typedef (buffer or String) WebMessage; [Synthetic] @@ -301,7 +266,6 @@ namespace webview { callback Callback_WebMessageExt_Void = void (WebMessageExt result); [Entity=Interface] interface WebMessagePort { - [Optional] attribute boolean isExtentionType; void close(); @@ -313,38 +277,30 @@ namespace webview { void postMessageEventExt(WebMessageExt message); [Throws] void onMessageEventExt(Callback_WebMessageExt_Void callback_); - }; [Entity=Interface] interface HistoryItem { - attribute image.PixelMap icon; attribute String historyUrl; attribute String historyRawUrl; attribute String title; - }; [Entity=Interface] interface BackForwardList { - attribute number currentIndex; attribute number size; [Throws] HistoryItem getItemAtIndex(number index); - }; [Entity=Interface] interface SnapshotInfo { - [Optional] attribute String id; [Optional] attribute SizeOptions size; - }; [Entity=Interface] interface SnapshotResult { - [Optional] attribute String id; [Optional] @@ -353,21 +309,17 @@ namespace webview { attribute SizeOptions size; [Optional] attribute image.PixelMap imagePixelMap; - }; dictionary JsMessageType { - number NOT_SUPPORT = 0; number STRING = 1; number NUMBER = 2; number BOOLEAN = 3; number ARRAY_BUFFER = 4; number ARRAY = 5; - }; [Entity=Class] interface JsMessageExt { - JsMessageType getType(); [Throws] String getString(); @@ -379,53 +331,61 @@ namespace webview { buffer getArrayBuffer(); [Throws] sequence<(String or number or boolean)> getArray(); - }; dictionary RenderProcessMode { - number SINGLE = 0; number MULTIPLE = 1; - }; [Entity=Interface] interface CacheOptions { - attribute sequence responseHeaders; - }; dictionary OfflineResourceType { - number IMAGE = 0; number CSS = 1; number CLASSIC_JS = 2; number MODULE_JS = 3; - }; [Entity=Interface] interface OfflineResourceMap { - attribute sequence urlList; attribute buffer resource; attribute sequence responseHeaders; attribute OfflineResourceType type; - }; dictionary ScrollType { - number EVENT = 0; - + }; + dictionary ControllerAttachState { + number UNATTACHED = 0; + number ATTACHED = 1; + }; + dictionary WebBlanklessErrorCode { + number SUCCESS = 0; + number ERR_UNKNOWN = -1; + number ERR_INVALID_PARAM = -2; + number ERR_CONTROLLER_NOT_INITED = -3; + number ERR_KEY_NOT_MATCH = -4; + number ERR_SIGNIFICANT_CHANGE = -5; + }; + [Entity=Interface] + interface BlanklessInfo { + attribute WebBlanklessErrorCode errCode; + attribute number similarity; + attribute number loadingTime; }; [Async, Synthetic] callback AsyncCallback_JsMessageExt_Void = void (JsMessageExt result); [Async, Synthetic] callback AsyncCallback_PdfData_Void = void (PdfData result); [Async, Synthetic] - callback AsyncCallback_Array_cert_X509Cert_Void = void (sequence result); + callback AsyncCallback_Array_Cert_X509Cert_Void = void (sequence result); [Async, Synthetic] callback AsyncCallback_SnapshotResult_Void = void (SnapshotResult result); + [Synthetic] + callback Callback_ControllerAttachState_Void = void (ControllerAttachState parameter); [Entity=Class] interface WebviewController { - constructor(optional String webTag); static void initializeWebEngine(); [Throws] @@ -433,6 +393,8 @@ namespace webview { [Throws] static void setWebDebuggingAccess(boolean webDebuggingAccess); [Throws] + static void setWebDebuggingAccess(boolean webDebuggingAccess, number port); + [Throws] void enableSafeBrowsing(boolean enable); boolean isSafeBrowsingEnabled(); [Throws] @@ -552,7 +514,7 @@ namespace webview { [Throws] async sequence getCertificate(); [Throws] - void getCertificate(AsyncCallback_Array_cert_X509Cert_Void callback_); + void getCertificate(AsyncCallback_Array_Cert_X509Cert_Void callback_); [Throws] void setAudioMuted(boolean mute); [Throws] @@ -622,6 +584,7 @@ namespace webview { static void addIntelligentTrackingPreventionBypassingList(sequence hostList); [Throws] static void removeIntelligentTrackingPreventionBypassingList(sequence hostList); + [Throws] static void clearIntelligentTrackingPreventionBypassingList(); static String getDefaultUserAgent(); void onCreateNativeMediaPlayer(CreateNativeMediaPlayerCallback callback_); @@ -647,7 +610,9 @@ namespace webview { void injectOfflineResources(sequence resourceMaps); [Throws] void enableAdsBlock(boolean enable); + [Throws] boolean isAdsBlockEnabled(); + [Throws] boolean isAdsBlockEnabledForCurPage(); String getSurfaceId(); [Throws] @@ -664,10 +629,36 @@ namespace webview { boolean scrollByWithResult(number deltaX, number deltaY); [Throws] HitTestValue getLastHitTest(); - + ScrollOffset getPageOffset(); + static void setAppCustomUserAgent(String userAgent); + [Throws] + static void setUserAgentForHosts(String userAgent, sequence hosts); + ControllerAttachState getAttachState(); + [DtsName="on", DtsTag="'controllerAttachStateChange'"] + void onControllerAttachStateChange(Callback_ControllerAttachState_Void callback_); + [DtsName="off", DtsTag="'controllerAttachStateChange'"] + void offControllerAttachStateChange(optional Callback_ControllerAttachState_Void callback_); + async ControllerAttachState waitForAttached(number timeout); + number getProgress(); + [Throws] + void avoidVisibleViewportBottom(number avoidHeight); + [Throws] + BlanklessInfo getBlanklessInfoWithKey(String key); + [Throws] + WebBlanklessErrorCode setBlanklessLoadingWithKey(String key, boolean is_start); + [Throws] + static void clearBlanklessLoadingCache(optional sequence keys); + [Throws] + static number setBlanklessLoadingCacheCapacity(number capacity); + [Throws] + boolean getErrorPageEnabled(); + [Throws] + void setErrorPageEnabled(boolean enable); + static void enablePrivateNetworkAccess(boolean enable); + static boolean isPrivateNetworkAccessEnabled(); + static void setWebDestroyMode(WebDestroyMode mode); }; dictionary WebDownloadState { - number IN_PROGRESS = 0; number COMPLETED = 1; number CANCELED = 2; @@ -675,10 +666,8 @@ namespace webview { number PENDING = 4; number PAUSED = 5; number UNKNOWN = 6; - }; dictionary WebDownloadErrorCode { - number ERROR_UNKNOWN = 0; number FILE_FAILED = 1; number FILE_ACCESS_DENIED = 2; @@ -707,11 +696,9 @@ namespace webview { number USER_CANCELED = 40; number USER_SHUTDOWN = 41; number CRASH = 50; - }; [Entity=Class] interface WebDownloadItem { - String getGuid(); number getCurrentSpeed(); number getPercentComplete(); @@ -734,30 +721,24 @@ namespace webview { buffer serialize(); [Throws] static WebDownloadItem deserialize(buffer serializedData); - }; [Synthetic] callback Callback_WebDownloadItem_Void = void (WebDownloadItem parameter); [Entity=Class] interface WebDownloadDelegate { - void onBeforeDownload(Callback_WebDownloadItem_Void callback_); void onDownloadUpdated(Callback_WebDownloadItem_Void callback_); void onDownloadFinish(Callback_WebDownloadItem_Void callback_); void onDownloadFailed(Callback_WebDownloadItem_Void callback_); - }; [Entity=Class] interface WebDownloadManager { - static void setDownloadDelegate(WebDownloadDelegate delegate); [Throws] static void resumeDownload(WebDownloadItem webDownloadItem); - }; [Entity=Class] interface WebHttpBodyStream { - [Throws] async void initialize(); [Throws] @@ -767,10 +748,8 @@ namespace webview { boolean isChunked(); boolean isEof(); boolean isInMemory(); - }; dictionary WebResourceType { - number MAIN_FRAME = 0; number SUB_FRAME = 1; number STYLE_SHEET = 2; @@ -791,11 +770,9 @@ namespace webview { number PLUGIN_RESOURCE = 17; number NAVIGATION_PRELOAD_MAIN_FRAME = 19; number NAVIGATION_PRELOAD_SUB_FRAME = 20; - }; [Entity=Class] interface WebSchemeHandlerRequest { - sequence getHeader(); String getRequestUrl(); String getRequestMethod(); @@ -805,11 +782,9 @@ namespace webview { (WebHttpBodyStream or undefined) getHttpBodyStream(); WebResourceType getRequestResourceType(); String getFrameUrl(); - }; [Entity=Class] interface WebSchemeHandlerResponse { - constructor(); [Throws] void setUrl(String url); @@ -832,11 +807,9 @@ namespace webview { [Throws] void setHeaderByName(String name, String value, boolean overwrite); String getHeaderByName(String name); - }; [Entity=Class] interface WebResourceHandler { - [Throws] void didReceiveResponse(WebSchemeHandlerResponse response); [Throws] @@ -845,7 +818,8 @@ namespace webview { void didFinish(); [Throws] void didFail(WebNetErrorList code); - + [Throws] + void didFail(WebNetErrorList code, boolean completeIfNoResponse); }; [Synthetic] callback Callback_WebSchemeHandlerRequest_WebResourceHandler_Boolean = boolean (WebSchemeHandlerRequest request, WebResourceHandler handler); @@ -853,46 +827,35 @@ namespace webview { callback Callback_WebSchemeHandlerRequest_Void = void (WebSchemeHandlerRequest parameter); [Entity=Class] interface WebSchemeHandler { - [Throws] void onRequestStart(Callback_WebSchemeHandlerRequest_WebResourceHandler_Boolean callback_); [Throws] void onRequestStop(Callback_WebSchemeHandlerRequest_Void callback_); - }; dictionary PlaybackStatus { - number PAUSED = 0; number PLAYING = 1; - }; dictionary NetworkState { - number EMPTY = 0; number IDLE = 1; number LOADING = 2; number NETWORK_ERROR = 3; - }; dictionary ReadyState { - number HAVE_NOTHING = 0; number HAVE_METADATA = 1; number HAVE_CURRENT_DATA = 2; number HAVE_FUTURE_DATA = 3; number HAVE_ENOUGH_DATA = 4; - }; dictionary MediaError { - number NETWORK_ERROR = 1; number FORMAT_ERROR = 2; number DECODE_ERROR = 3; - }; [Entity=Interface] interface NativeMediaPlayerHandler { - void handleStatusChanged(PlaybackStatus status); void handleVolumeChanged(number volume); void handleMutedChanged(boolean muted); @@ -908,18 +871,14 @@ namespace webview { void handleSeekFinished(); void handleError(MediaError error, String errorMessage); void handleVideoSizeChanged(number width, number height); - }; dictionary SuspendType { - number ENTER_BACK_FORWARD_CACHE = 0; number ENTER_BACKGROUND = 1; number AUTO_CLEANUP = 2; - }; [Entity=Interface] interface NativeMediaPlayerBridge { - void updateRect(number x, number y, number width, number height); void play(); void pause(); @@ -934,54 +893,40 @@ namespace webview { void resumePlayer(); [Optional] void suspendPlayer(SuspendType type); - }; dictionary MediaType { - number VIDEO = 0; number AUDIO = 1; - }; dictionary SourceType { - number URL = 0; number MSE = 1; - }; [Entity=Class] interface MediaSourceInfo { - attribute SourceType type; attribute String source; attribute String format; - }; [Entity=Interface] interface RectEvent { - attribute number x; attribute number y; attribute number width; attribute number height; - }; [Entity=Class] interface NativeMediaPlayerSurfaceInfo { - attribute String id; attribute RectEvent rect; - }; dictionary Preload { - number NONE = 0; number METADATA = 1; number AUTO = 2; - }; [Entity=Interface] interface MediaInfo { - attribute String embedID; attribute MediaType mediaType; attribute sequence mediaSrcList; @@ -993,12 +938,10 @@ namespace webview { attribute Preload preload; attribute record headers; attribute record attributes; - }; callback CreateNativeMediaPlayerCallback = NativeMediaPlayerBridge (NativeMediaPlayerHandler handler, MediaInfo mediaInfo); [Entity=Class] interface AdsBlockManager { - [Throws] static void setAdsBlockRules(String rulesFile, boolean replace); [Throws] @@ -1009,36 +952,30 @@ namespace webview { static void removeAdsBlockDisallowedList(sequence domainSuffixes); [Throws] static void removeAdsBlockAllowedList(sequence domainSuffixes); + [Throws] static void clearAdsBlockDisallowedList(); + [Throws] static void clearAdsBlockAllowedList(); - }; [Entity=Class] interface BackForwardCacheSupportedFeatures { - constructor(); attribute boolean nativeEmbed; attribute boolean mediaTakeOver; - }; [Entity=Class] interface BackForwardCacheOptions { - constructor(); attribute number size; attribute number timeToLive; - }; dictionary ProxySchemeFilter { - number MATCH_ALL_SCHEMES = 0; number MATCH_HTTP = 1; number MATCH_HTTPS = 2; - }; [Entity=Class] interface ProxyConfig { - [Throws] void insertBypassRule(String bypassRule); [Throws] @@ -1052,31 +989,22 @@ namespace webview { sequence getBypassRules(); sequence getProxyRules(); boolean isReverseBypassEnabled(); - }; [Entity=Class] interface ProxyRule { - ProxySchemeFilter getSchemeFilter(); String getUrl(); - }; callback OnProxyConfigChangeCallback = void (); [Entity=Class] interface ProxyController { - [Throws] static void applyProxyOverride(ProxyConfig proxyConfig, OnProxyConfigChangeCallback callback_); [Throws] static void removeProxyOverride(OnProxyConfigChangeCallback callback_); - }; - [GlobalScope] - interface GlobalScope_webview_ohos_web_webview { - - [Throws] - static void once(String type, Callback_Void callback_); - + dictionary WebDestroyMode { + number NORMAL_MODE = 0; + number FAST_MODE = 1; }; - }; \ No newline at end of file diff --git a/idl/@ohos.wifi.idl b/idl/@ohos.wifi.idl index 9bea899..743a078 100644 --- a/idl/@ohos.wifi.idl +++ b/idl/@ohos.wifi.idl @@ -1,37 +1,196 @@ -package ohos; +package ohos.wifi; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace wifi { - + [Deprecated] + boolean enableWifi(); + [Deprecated] + boolean disableWifi(); + [Deprecated] + boolean isWifiActive(); + [Deprecated] + boolean scan(); + [Deprecated] + async sequence getScanInfos(); [Async, Synthetic] callback AsyncCallback_Array_WifiScanInfo_Void = void (sequence result); + [Deprecated] + void getScanInfos(AsyncCallback_Array_WifiScanInfo_Void callback_); + [Deprecated] + async number addDeviceConfig(WifiDeviceConfig config); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Deprecated] + void addDeviceConfig(WifiDeviceConfig config, AsyncCallback_Number_Void callback_); + [Deprecated] + async boolean addUntrustedConfig(WifiDeviceConfig config); [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); + [Deprecated] + void addUntrustedConfig(WifiDeviceConfig config, AsyncCallback_Boolean_Void callback_); + [Deprecated] + async boolean removeUntrustedConfig(WifiDeviceConfig config); + [Deprecated] + void removeUntrustedConfig(WifiDeviceConfig config, AsyncCallback_Boolean_Void callback_); + [Deprecated] + boolean connectToNetwork(number networkId); + [Deprecated] + boolean connectToDevice(WifiDeviceConfig config); + [Deprecated] + boolean disconnect(); + [Deprecated] + number getSignalLevel(number rssi, number band); + [Deprecated] + async WifiLinkedInfo getLinkedInfo(); [Async, Synthetic] callback AsyncCallback_WifiLinkedInfo_Void = void (WifiLinkedInfo result); + [Deprecated] + void getLinkedInfo(AsyncCallback_WifiLinkedInfo_Void callback_); + [Deprecated] + boolean isConnected(); + [Deprecated] + number getSupportedFeatures(); + [Deprecated] + boolean isFeatureSupported(number featureId); + [Deprecated] + sequence getDeviceMacAddress(); + [Deprecated] + IpInfo getIpInfo(); + [Deprecated] + String getCountryCode(); + [Deprecated] + boolean reassociate(); + [Deprecated] + boolean reconnect(); + [Deprecated] + sequence getDeviceConfigs(); + [Deprecated] + number updateNetwork(WifiDeviceConfig config); + [Deprecated] + boolean disableNetwork(number netId); + [Deprecated] + boolean removeAllNetwork(); + [Deprecated] + boolean removeDevice(number id); + [Deprecated] + boolean enableHotspot(); + [Deprecated] + boolean disableHotspot(); + [Deprecated] + boolean isHotspotDualBandSupported(); + [Deprecated] + boolean isHotspotActive(); + [Deprecated] + boolean setHotspotConfig(HotspotConfig config); + [Deprecated] + HotspotConfig getHotspotConfig(); + [Deprecated] + sequence getStations(); + [Deprecated] + async WifiP2pLinkedInfo getP2pLinkedInfo(); [Async, Synthetic] callback AsyncCallback_WifiP2pLinkedInfo_Void = void (WifiP2pLinkedInfo result); + [Deprecated] + void getP2pLinkedInfo(AsyncCallback_WifiP2pLinkedInfo_Void callback_); + [Deprecated] + async WifiP2pGroupInfo getCurrentGroup(); [Async, Synthetic] callback AsyncCallback_WifiP2pGroupInfo_Void = void (WifiP2pGroupInfo result); + [Deprecated] + void getCurrentGroup(AsyncCallback_WifiP2pGroupInfo_Void callback_); + [Deprecated] + async sequence getP2pPeerDevices(); [Async, Synthetic] callback AsyncCallback_Array_WifiP2pDevice_Void = void (sequence result); + [Deprecated] + void getP2pPeerDevices(AsyncCallback_Array_WifiP2pDevice_Void callback_); + [Deprecated] + boolean createGroup(WifiP2PConfig config); + [Deprecated] + boolean removeGroup(); + [Deprecated] + boolean p2pConnect(WifiP2PConfig config); + [Deprecated] + boolean p2pCancelConnect(); + [Deprecated] + boolean startDiscoverDevices(); + [Deprecated] + boolean stopDiscoverDevices(); + [Deprecated] + boolean deletePersistentGroup(number netId); + [Deprecated] + boolean setDeviceName(String devName); [Synthetic] callback Callback_Number_Void = void (number parameter); + [Deprecated, DtsName="on", DtsTag="'wifiStateChange'"] + void onWifiStateChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'wifiStateChange'"] + void offWifiStateChange(optional Callback_Number_Void callback_); + [Deprecated, DtsName="on", DtsTag="'wifiConnectionChange'"] + void onWifiConnectionChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'wifiConnectionChange'"] + void offWifiConnectionChange(optional Callback_Number_Void callback_); + [Deprecated, DtsName="on", DtsTag="'wifiScanStateChange'"] + void onWifiScanStateChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'wifiScanStateChange'"] + void offWifiScanStateChange(optional Callback_Number_Void callback_); + [Deprecated, DtsName="on", DtsTag="'wifiRssiChange'"] + void onWifiRssiChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'wifiRssiChange'"] + void offWifiRssiChange(optional Callback_Number_Void callback_); + [Deprecated, DtsName="on", DtsTag="'streamChange'"] + void onStreamChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'streamChange'"] + void offStreamChange(optional Callback_Number_Void callback_); + [Deprecated, DtsName="on", DtsTag="'hotspotStateChange'"] + void onHotspotStateChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'hotspotStateChange'"] + void offHotspotStateChange(optional Callback_Number_Void callback_); [Synthetic] callback Callback_StationInfo_Void = void (StationInfo parameter); + [Deprecated, DtsName="on", DtsTag="'hotspotStaJoin'"] + void onHotspotStaJoin(Callback_StationInfo_Void callback_); + [Deprecated, DtsName="off", DtsTag="'hotspotStaJoin'"] + void offHotspotStaJoin(optional Callback_StationInfo_Void callback_); + [Deprecated, DtsName="on", DtsTag="'hotspotStaLeave'"] + void onHotspotStaLeave(Callback_StationInfo_Void callback_); + [Deprecated, DtsName="off", DtsTag="'hotspotStaLeave'"] + void offHotspotStaLeave(optional Callback_StationInfo_Void callback_); + [Deprecated, DtsName="on", DtsTag="'p2pStateChange'"] + void onP2pStateChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'p2pStateChange'"] + void offP2pStateChange(optional Callback_Number_Void callback_); [Synthetic] callback Callback_WifiP2pLinkedInfo_Void = void (WifiP2pLinkedInfo parameter); + [Deprecated, DtsName="on", DtsTag="'p2pConnectionChange'"] + void onP2pConnectionChange(Callback_WifiP2pLinkedInfo_Void callback_); + [Deprecated, DtsName="off", DtsTag="'p2pConnectionChange'"] + void offP2pConnectionChange(optional Callback_WifiP2pLinkedInfo_Void callback_); [Synthetic] callback Callback_WifiP2pDevice_Void = void (WifiP2pDevice parameter); + [Deprecated, DtsName="on", DtsTag="'p2pDeviceChange'"] + void onP2pDeviceChange(Callback_WifiP2pDevice_Void callback_); + [Deprecated, DtsName="off", DtsTag="'p2pDeviceChange'"] + void offP2pDeviceChange(optional Callback_WifiP2pDevice_Void callback_); [Synthetic] callback Callback_Array_WifiP2pDevice_Void = void (sequence parameter); + [Deprecated, DtsName="on", DtsTag="'p2pPeerDeviceChange'"] + void onP2pPeerDeviceChange(Callback_Array_WifiP2pDevice_Void callback_); + [Deprecated, DtsName="off", DtsTag="'p2pPeerDeviceChange'"] + void offP2pPeerDeviceChange(optional Callback_Array_WifiP2pDevice_Void callback_); [Synthetic] callback Callback_Void = void (); + [Deprecated, DtsName="on", DtsTag="'p2pPersistentGroupChange'"] + void onP2pPersistentGroupChange(Callback_Void callback_); + [Deprecated, DtsName="off", DtsTag="'p2pPersistentGroupChange'"] + void offP2pPersistentGroupChange(optional Callback_Void callback_); + [Deprecated, DtsName="on", DtsTag="'p2pDiscoveryChange'"] + void onP2pDiscoveryChange(Callback_Number_Void callback_); + [Deprecated, DtsName="off", DtsTag="'p2pDiscoveryChange'"] + void offP2pDiscoveryChange(optional Callback_Number_Void callback_); [Entity=Interface, Deprecated] interface WifiDeviceConfig { - [Deprecated] attribute String ssid; [Deprecated] @@ -56,11 +215,9 @@ namespace wifi { attribute IpType ipType; [Deprecated] attribute IpConfig staticIp; - }; [Entity=Interface, Deprecated] interface IpConfig { - [Deprecated] attribute number ipAddress; [Deprecated] @@ -69,11 +226,9 @@ namespace wifi { attribute sequence dnsServers; [Deprecated] attribute sequence domains; - }; [Entity=Interface, Deprecated] interface WifiScanInfo { - [Deprecated] attribute String ssid; [Deprecated] @@ -92,11 +247,9 @@ namespace wifi { attribute number channelWidth; [Deprecated] attribute number timestamp; - }; [Deprecated] dictionary WifiSecurityType { - [Deprecated] number WIFI_SEC_TYPE_INVALID = 0; [Deprecated] @@ -107,11 +260,9 @@ namespace wifi { number WIFI_SEC_TYPE_PSK = 3; [Deprecated] number WIFI_SEC_TYPE_SAE = 4; - }; [Entity=Interface, Deprecated] interface WifiLinkedInfo { - [Deprecated] attribute String ssid; [Deprecated] @@ -142,11 +293,9 @@ namespace wifi { attribute SuppState suppState; [Deprecated] attribute ConnState connState; - }; [Entity=Interface, Deprecated] interface IpInfo { - [Deprecated] attribute number ipAddress; [Deprecated] @@ -161,11 +310,9 @@ namespace wifi { attribute number serverIp; [Deprecated] attribute number leaseDuration; - }; [Entity=Interface, Deprecated] interface HotspotConfig { - [Deprecated] attribute String ssid; [Deprecated] @@ -176,33 +323,27 @@ namespace wifi { attribute String preSharedKey; [Deprecated] attribute number maxConn; - }; [Entity=Interface, Deprecated] interface StationInfo { - [Deprecated] attribute String name; [Deprecated] attribute String macAddress; [Deprecated] attribute String ipAddress; - }; [Deprecated] dictionary IpType { - [Deprecated] number STATIC = 0; [Deprecated] number DHCP = 1; [Deprecated] number UNKNOWN = 2; - }; [Deprecated] dictionary SuppState { - [Deprecated] number DISCONNECTED = 0; [Deprecated] @@ -227,11 +368,9 @@ namespace wifi { number UNINITIALIZED = 10; [Deprecated] number INVALID = 11; - }; [Deprecated] dictionary ConnState { - [Deprecated] number SCANNING = 0; [Deprecated] @@ -248,11 +387,9 @@ namespace wifi { number DISCONNECTED = 6; [Deprecated] number UNKNOWN = 7; - }; [Entity=Interface, Deprecated] interface WifiP2pDevice { - [Deprecated] attribute String deviceName; [Deprecated] @@ -263,11 +400,9 @@ namespace wifi { attribute P2pDeviceStatus deviceStatus; [Deprecated] attribute number groupCapabilitys; - }; [Entity=Interface, Deprecated] interface WifiP2PConfig { - [Deprecated] attribute String deviceAddress; [Deprecated] @@ -278,11 +413,9 @@ namespace wifi { attribute String groupName; [Deprecated] attribute GroupOwnerBand goBand; - }; [Entity=Interface, Deprecated] interface WifiP2pGroupInfo { - [Deprecated] attribute boolean isP2pGo; [Deprecated] @@ -301,31 +434,25 @@ namespace wifi { attribute sequence clientDevices; [Deprecated] attribute String goIpAddress; - }; [Deprecated] dictionary P2pConnectState { - [Deprecated] number DISCONNECTED = 0; [Deprecated] number CONNECTED = 1; - }; [Entity=Interface, Deprecated] interface WifiP2pLinkedInfo { - [Deprecated] attribute P2pConnectState connectState; [Deprecated] attribute boolean isGroupOwner; [Deprecated] attribute String groupOwnerAddr; - }; [Deprecated] dictionary P2pDeviceStatus { - [Deprecated] number CONNECTED = 0; [Deprecated] @@ -336,183 +463,14 @@ namespace wifi { number AVAILABLE = 3; [Deprecated] number UNAVAILABLE = 4; - }; [Deprecated] dictionary GroupOwnerBand { - [Deprecated] number GO_BAND_AUTO = 0; [Deprecated] number GO_BAND_2GHZ = 1; [Deprecated] number GO_BAND_5GHZ = 2; - - }; - [GlobalScope] - interface GlobalScope_wifi_ohos_wifi { - - [Deprecated] - static boolean enableWifi(); - [Deprecated] - static boolean disableWifi(); - [Deprecated] - static boolean isWifiActive(); - [Deprecated] - static boolean scan(); - [Deprecated] - static async sequence getScanInfos(); - [Deprecated] - static void getScanInfos(AsyncCallback_Array_WifiScanInfo_Void callback_); - [Deprecated] - static async number addDeviceConfig(WifiDeviceConfig config); - [Deprecated] - static void addDeviceConfig(WifiDeviceConfig config, AsyncCallback_Number_Void callback_); - [Deprecated] - static async boolean addUntrustedConfig(WifiDeviceConfig config); - [Deprecated] - static void addUntrustedConfig(WifiDeviceConfig config, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static async boolean removeUntrustedConfig(WifiDeviceConfig config); - [Deprecated] - static void removeUntrustedConfig(WifiDeviceConfig config, AsyncCallback_Boolean_Void callback_); - [Deprecated] - static boolean connectToNetwork(number networkId); - [Deprecated] - static boolean connectToDevice(WifiDeviceConfig config); - [Deprecated] - static boolean disconnect(); - [Deprecated] - static number getSignalLevel(number rssi, number band); - [Deprecated] - static async WifiLinkedInfo getLinkedInfo(); - [Deprecated] - static void getLinkedInfo(AsyncCallback_WifiLinkedInfo_Void callback_); - [Deprecated] - static boolean isConnected(); - [Deprecated] - static number getSupportedFeatures(); - [Deprecated] - static boolean isFeatureSupported(number featureId); - [Deprecated] - static sequence getDeviceMacAddress(); - [Deprecated] - static IpInfo getIpInfo(); - [Deprecated] - static String getCountryCode(); - [Deprecated] - static boolean reassociate(); - [Deprecated] - static boolean reconnect(); - [Deprecated] - static sequence getDeviceConfigs(); - [Deprecated] - static number updateNetwork(WifiDeviceConfig config); - [Deprecated] - static boolean disableNetwork(number netId); - [Deprecated] - static boolean removeAllNetwork(); - [Deprecated] - static boolean removeDevice(number id); - [Deprecated] - static boolean enableHotspot(); - [Deprecated] - static boolean disableHotspot(); - [Deprecated] - static boolean isHotspotDualBandSupported(); - [Deprecated] - static boolean isHotspotActive(); - [Deprecated] - static boolean setHotspotConfig(HotspotConfig config); - [Deprecated] - static HotspotConfig getHotspotConfig(); - [Deprecated] - static sequence getStations(); - [Deprecated] - static async WifiP2pLinkedInfo getP2pLinkedInfo(); - [Deprecated] - static void getP2pLinkedInfo(AsyncCallback_WifiP2pLinkedInfo_Void callback_); - [Deprecated] - static async WifiP2pGroupInfo getCurrentGroup(); - [Deprecated] - static void getCurrentGroup(AsyncCallback_WifiP2pGroupInfo_Void callback_); - [Deprecated] - static async sequence getP2pPeerDevices(); - [Deprecated] - static void getP2pPeerDevices(AsyncCallback_Array_WifiP2pDevice_Void callback_); - [Deprecated] - static boolean createGroup(WifiP2PConfig config); - [Deprecated] - static boolean removeGroup(); - [Deprecated] - static boolean p2pConnect(WifiP2PConfig config); - [Deprecated] - static boolean p2pCancelConnect(); - [Deprecated] - static boolean startDiscoverDevices(); - [Deprecated] - static boolean stopDiscoverDevices(); - [Deprecated] - static boolean deletePersistentGroup(number netId); - [Deprecated] - static boolean setDeviceName(String devName); - [Deprecated, DtsName="on", DtsTag="'wifiStateChange'"] - static void onWifiStateChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'wifiStateChange'"] - static void offWifiStateChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'wifiConnectionChange'"] - static void onWifiConnectionChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'wifiConnectionChange'"] - static void offWifiConnectionChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'wifiScanStateChange'"] - static void onWifiScanStateChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'wifiScanStateChange'"] - static void offWifiScanStateChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'wifiRssiChange'"] - static void onWifiRssiChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'wifiRssiChange'"] - static void offWifiRssiChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'streamChange'"] - static void onStreamChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'streamChange'"] - static void offStreamChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'hotspotStateChange'"] - static void onHotspotStateChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'hotspotStateChange'"] - static void offHotspotStateChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'hotspotStaJoin'"] - static void onHotspotStaJoin(Callback_StationInfo_Void callback_); - [Deprecated, DtsName="off", DtsTag="'hotspotStaJoin'"] - static void offHotspotStaJoin(optional Callback_StationInfo_Void callback_); - [Deprecated, DtsName="on", DtsTag="'hotspotStaLeave'"] - static void onHotspotStaLeave(Callback_StationInfo_Void callback_); - [Deprecated, DtsName="off", DtsTag="'hotspotStaLeave'"] - static void offHotspotStaLeave(optional Callback_StationInfo_Void callback_); - [Deprecated, DtsName="on", DtsTag="'p2pStateChange'"] - static void onP2pStateChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'p2pStateChange'"] - static void offP2pStateChange(optional Callback_Number_Void callback_); - [Deprecated, DtsName="on", DtsTag="'p2pConnectionChange'"] - static void onP2pConnectionChange(Callback_WifiP2pLinkedInfo_Void callback_); - [Deprecated, DtsName="off", DtsTag="'p2pConnectionChange'"] - static void offP2pConnectionChange(optional Callback_WifiP2pLinkedInfo_Void callback_); - [Deprecated, DtsName="on", DtsTag="'p2pDeviceChange'"] - static void onP2pDeviceChange(Callback_WifiP2pDevice_Void callback_); - [Deprecated, DtsName="off", DtsTag="'p2pDeviceChange'"] - static void offP2pDeviceChange(optional Callback_WifiP2pDevice_Void callback_); - [Deprecated, DtsName="on", DtsTag="'p2pPeerDeviceChange'"] - static void onP2pPeerDeviceChange(Callback_Array_WifiP2pDevice_Void callback_); - [Deprecated, DtsName="off", DtsTag="'p2pPeerDeviceChange'"] - static void offP2pPeerDeviceChange(optional Callback_Array_WifiP2pDevice_Void callback_); - [Deprecated, DtsName="on", DtsTag="'p2pPersistentGroupChange'"] - static void onP2pPersistentGroupChange(Callback_Void callback_); - [Deprecated, DtsName="off", DtsTag="'p2pPersistentGroupChange'"] - static void offP2pPersistentGroupChange(optional Callback_Void callback_); - [Deprecated, DtsName="on", DtsTag="'p2pDiscoveryChange'"] - static void onP2pDiscoveryChange(Callback_Number_Void callback_); - [Deprecated, DtsName="off", DtsTag="'p2pDiscoveryChange'"] - static void offP2pDiscoveryChange(optional Callback_Number_Void callback_); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.wifiManager.idl b/idl/@ohos.wifiManager.idl index b6abdb7..9b31b59 100644 --- a/idl/@ohos.wifiManager.idl +++ b/idl/@ohos.wifiManager.idl @@ -1,46 +1,265 @@ -package ohos; +package ohos.wifiManager; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace wifiManager { - + [Throws] + void enableWifi(); + [Throws] + void disableWifi(); + [Throws] + void enableSemiWifi(); + [Throws] + boolean isWifiActive(); + [Deprecated, Throws] + void scan(); + [Throws] + void startScan(); + [Deprecated, Throws] + async sequence getScanResults(); + [Throws] + WifiDetailState getWifiDetailState(); [Async, Synthetic] callback AsyncCallback_Array_WifiScanInfo_Void = void (sequence result); + [Deprecated, Throws] + void getScanResults(AsyncCallback_Array_WifiScanInfo_Void callback_); + [Deprecated, Throws] + sequence getScanResultsSync(); + [Throws] + sequence getScanInfoList(); + [Throws] + void setScanAlwaysAllowed(boolean isScanAlwaysAllowed); + [Throws] + boolean getScanAlwaysAllowed(); + [Throws] + async number addDeviceConfig(WifiDeviceConfig config); [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); + [Throws] + void addDeviceConfig(WifiDeviceConfig config, AsyncCallback_Number_Void callback_); + [Throws] + async number addCandidateConfig(WifiDeviceConfig config); + [Throws] + void addCandidateConfig(WifiDeviceConfig config, AsyncCallback_Number_Void callback_); + [Throws] + async void removeCandidateConfig(number networkId); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void removeCandidateConfig(number networkId, AsyncCallback_Void callback_); + [Throws] + sequence getCandidateConfigs(); + [Throws] + void connectToCandidateConfig(number networkId); + [Throws] + async void connectToCandidateConfigWithUserAction(number networkId); + [Throws] + void connectToNetwork(number networkId); + [Throws] + void connectToDevice(WifiDeviceConfig config); + [Throws] + void disconnect(); + [Throws] + number getSignalLevel(number rssi, number band); + [Throws] + async WifiLinkedInfo getLinkedInfo(); + [Throws] + sequence getMultiLinkedInfo(); [Async, Synthetic] callback AsyncCallback_WifiLinkedInfo_Void = void (WifiLinkedInfo result); + [Throws] + void getLinkedInfo(AsyncCallback_WifiLinkedInfo_Void callback_); + [Throws] + WifiLinkedInfo getLinkedInfoSync(); + [Throws] + boolean isConnected(); + [Throws] + number getSupportedFeatures(); + [Throws] + boolean isFeatureSupported(number featureId); + [Throws] + sequence getDeviceMacAddress(); + [Throws] + IpInfo getIpInfo(); + [Throws] + Ipv6Info getIpv6Info(); + [Throws] + String getCountryCode(); + [Throws] + void reassociate(); + [Throws] + void reconnect(); + [Throws] + sequence getDeviceConfigs(); + [Throws] + number updateNetwork(WifiDeviceConfig config); + [Throws] + void allowAutoConnect(number netId, boolean isAllowed); + [Throws] + void disableNetwork(number netId); + [Throws] + void removeAllNetwork(); + [Throws] + void removeDevice(number id); + [Throws] + boolean isBandTypeSupported(WifiBandType bandType); + [Throws] + sequence get5GChannelList(); + [Throws] + DisconnectedReason getDisconnectedReason(); + [Throws] + void startPortalCertification(); + [Throws] + boolean isMeteredHotspot(); + [Throws] + void enableHiLinkHandshake(boolean isHiLinkEnable, String bssid, WifiDeviceConfig config); + [Throws] + void factoryReset(); + [Throws] + void enableHotspot(); + [Throws] + void disableHotspot(); + [Throws] + boolean isHotspotDualBandSupported(); + [Throws] + boolean isOpenSoftApAllowed(); + [Throws] + boolean isHotspotActive(); + [Throws] + void setHotspotConfig(HotspotConfig config); + [Throws] + HotspotConfig getHotspotConfig(); + [Throws] + sequence getStations(); + [Throws] + void addHotspotBlockList(StationInfo stationInfo); + [Throws] + void delHotspotBlockList(StationInfo stationInfo); + [Throws] + sequence getHotspotBlockList(); + [Throws] + async WifiP2pLinkedInfo getP2pLinkedInfo(); [Async, Synthetic] callback AsyncCallback_WifiP2pLinkedInfo_Void = void (WifiP2pLinkedInfo result); + [Throws] + void getP2pLinkedInfo(AsyncCallback_WifiP2pLinkedInfo_Void callback_); + [Throws] + async WifiP2pGroupInfo getCurrentGroup(); [Async, Synthetic] callback AsyncCallback_WifiP2pGroupInfo_Void = void (WifiP2pGroupInfo result); + [Throws] + void getCurrentGroup(AsyncCallback_WifiP2pGroupInfo_Void callback_); + [Throws] + async sequence getP2pPeerDevices(); [Async, Synthetic] callback AsyncCallback_Array_WifiP2pDevice_Void = void (sequence result); + [Throws] + void getP2pPeerDevices(AsyncCallback_Array_WifiP2pDevice_Void callback_); + [Throws] + async WifiP2pDevice getP2pLocalDevice(); [Async, Synthetic] callback AsyncCallback_WifiP2pDevice_Void = void (WifiP2pDevice result); + [Throws] + void getP2pLocalDevice(AsyncCallback_WifiP2pDevice_Void callback_); + [Throws] + void createGroup(WifiP2PConfig config); + [Throws] + void removeGroup(); + [Throws] + void p2pConnect(WifiP2PConfig config); + [Throws] + void p2pCancelConnect(); + [Throws] + void startDiscoverDevices(); + [Throws] + void stopDiscoverDevices(); + [Throws] + void deletePersistentGroup(number netId); + [Throws] + async sequence getP2pGroups(); [Async, Synthetic] callback AsyncCallback_Array_WifiP2pGroupInfo_Void = void (sequence result); + [Throws] + void getP2pGroups(AsyncCallback_Array_WifiP2pGroupInfo_Void callback_); + [Throws] + void setDeviceName(String devName); [Synthetic] callback Callback_Number_Void = void (number parameter); + [Throws, DtsName="on", DtsTag="'wifiStateChange'"] + void onWifiStateChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'wifiStateChange'"] + void offWifiStateChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'wifiConnectionChange'"] + void onWifiConnectionChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'wifiConnectionChange'"] + void offWifiConnectionChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'wifiScanStateChange'"] + void onWifiScanStateChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'wifiScanStateChange'"] + void offWifiScanStateChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'wifiRssiChange'"] + void onWifiRssiChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'wifiRssiChange'"] + void offWifiRssiChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'streamChange'"] + void onStreamChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'streamChange'"] + void offStreamChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'deviceConfigChange'"] + void onDeviceConfigChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'deviceConfigChange'"] + void offDeviceConfigChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'hotspotStateChange'"] + void onHotspotStateChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'hotspotStateChange'"] + void offHotspotStateChange(optional Callback_Number_Void callback_); [Synthetic] callback Callback_StationInfo_Void = void (StationInfo parameter); + [Throws, DtsName="on", DtsTag="'hotspotStaJoin'"] + void onHotspotStaJoin(Callback_StationInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'hotspotStaJoin'"] + void offHotspotStaJoin(optional Callback_StationInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'hotspotStaLeave'"] + void onHotspotStaLeave(Callback_StationInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'hotspotStaLeave'"] + void offHotspotStaLeave(optional Callback_StationInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'p2pStateChange'"] + void onP2pStateChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'p2pStateChange'"] + void offP2pStateChange(optional Callback_Number_Void callback_); [Synthetic] callback Callback_WifiP2pLinkedInfo_Void = void (WifiP2pLinkedInfo parameter); + [Throws, DtsName="on", DtsTag="'p2pConnectionChange'"] + void onP2pConnectionChange(Callback_WifiP2pLinkedInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'p2pConnectionChange'"] + void offP2pConnectionChange(optional Callback_WifiP2pLinkedInfo_Void callback_); [Synthetic] callback Callback_WifiP2pDevice_Void = void (WifiP2pDevice parameter); + [Throws, DtsName="on", DtsTag="'p2pDeviceChange'"] + void onP2pDeviceChange(Callback_WifiP2pDevice_Void callback_); + [Throws, DtsName="off", DtsTag="'p2pDeviceChange'"] + void offP2pDeviceChange(optional Callback_WifiP2pDevice_Void callback_); [Synthetic] callback Callback_Array_WifiP2pDevice_Void = void (sequence parameter); + [Throws, DtsName="on", DtsTag="'p2pPeerDeviceChange'"] + void onP2pPeerDeviceChange(Callback_Array_WifiP2pDevice_Void callback_); + [Throws, DtsName="off", DtsTag="'p2pPeerDeviceChange'"] + void offP2pPeerDeviceChange(optional Callback_Array_WifiP2pDevice_Void callback_); [Synthetic] callback Callback_Void = void (); + [Throws, DtsName="on", DtsTag="'p2pPersistentGroupChange'"] + void onP2pPersistentGroupChange(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'p2pPersistentGroupChange'"] + void offP2pPersistentGroupChange(optional Callback_Void callback_); + [Throws, DtsName="on", DtsTag="'p2pDiscoveryChange'"] + void onP2pDiscoveryChange(Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'p2pDiscoveryChange'"] + void offP2pDiscoveryChange(optional Callback_Number_Void callback_); dictionary DeviceAddressType { - number RANDOM_DEVICE_ADDRESS = 0; number REAL_DEVICE_ADDRESS = 1; - }; dictionary EapMethod { - number EAP_NONE = 0; number EAP_PEAP = 1; number EAP_TLS = 2; @@ -50,10 +269,8 @@ namespace wifiManager { number EAP_AKA = 6; number EAP_AKA_PRIME = 7; number EAP_UNAUTH_TLS = 8; - }; dictionary Phase2Method { - number PHASE2_NONE = 0; number PHASE2_PAP = 1; number PHASE2_MSCHAP = 2; @@ -62,17 +279,13 @@ namespace wifiManager { number PHASE2_SIM = 5; number PHASE2_AKA = 6; number PHASE2_AKA_PRIME = 7; - }; dictionary DisconnectedReason { - number DISC_REASON_DEFAULT = 0; number DISC_REASON_WRONG_PWD = 1; number DISC_REASON_CONNECTION_FULL = 2; - }; dictionary WifiDetailState { - number UNKNOWN = -1; number INACTIVE = 0; number ACTIVATED = 1; @@ -80,36 +293,28 @@ namespace wifiManager { number DEACTIVATING = 3; number SEMI_ACTIVATING = 4; number SEMI_ACTIVE = 5; - }; dictionary ProxyMethod { - number METHOD_NONE = 0; number METHOD_AUTO = 1; number METHOD_MANUAL = 2; - }; dictionary WifiCategory { - number DEFAULT = 1; number WIFI6 = 2; number WIFI6_PLUS = 3; number WIFI7 = 4; number WIFI7_PLUS = 5; - }; dictionary WifiLinkType { - number DEFAULT_LINK = 0; number WIFI7_SINGLE_LINK = 1; number WIFI7_MLSR = 2; number WIFI7_EMLSR = 3; number WIFI7_STR = 4; - }; [Entity=Interface] interface WifiProxyConfig { - [Optional] attribute ProxyMethod proxyMethod; [Optional] @@ -120,11 +325,9 @@ namespace wifiManager { attribute number serverPort; [Optional] attribute String exclusionObjects; - }; [Entity=Interface] interface WifiEapConfig { - attribute EapMethod eapMethod; attribute Phase2Method phase2Method; attribute String identity; @@ -140,11 +343,9 @@ namespace wifiManager { attribute String realm; attribute String plmn; attribute number eapSubId; - }; [Entity=Interface] interface WifiDeviceConfig { - attribute String ssid; [Optional] attribute String bssid; @@ -167,8 +368,12 @@ namespace wifiManager { [Optional] attribute IpType ipType; [Optional] + attribute number family; + [Optional] attribute IpConfig staticIp; [Optional] + attribute Ipv6Config staticIpv6; + [Optional] attribute WifiEapConfig eapConfig; [Optional] attribute WifiProxyConfig proxyConfig; @@ -178,46 +383,46 @@ namespace wifiManager { attribute number configStatus; [Optional] attribute boolean isAutoConnectAllowed; - + [Optional] + attribute boolean isSecureWifi; }; [Entity=Interface] interface WifiWapiConfig { - attribute WapiPskType wapiPskType; attribute String wapiAsCert; attribute String wapiUserCert; - }; [Entity=Interface] interface IpConfig { - attribute number ipAddress; attribute number gateway; attribute number prefixLength; attribute sequence dnsServers; attribute sequence domains; - + }; + [Entity=Interface] + interface Ipv6Config { + attribute String ipAddress; + attribute String gateway; + attribute number prefixLength; + attribute sequence dnsServers; + attribute sequence domains; }; [Entity=Interface] interface WifiInfoElem { - attribute number eid; attribute buffer content; - }; dictionary WifiChannelWidth { - number WIDTH_20MHZ = 0; number WIDTH_40MHZ = 1; number WIDTH_80MHZ = 2; number WIDTH_160MHZ = 3; number WIDTH_80MHZ_PLUS = 4; number WIDTH_INVALID = 5; - }; [Entity=Interface] interface WifiScanInfo { - attribute String ssid; attribute String bssid; attribute DeviceAddressType bssidType; @@ -233,10 +438,10 @@ namespace wifiManager { attribute number timestamp; attribute WifiCategory supportedWifiCategory; attribute boolean isHiLinkNetwork; - + [Optional] + attribute boolean isHiLinkProNetwork; }; dictionary WifiSecurityType { - number WIFI_SEC_TYPE_INVALID = 0; number WIFI_SEC_TYPE_OPEN = 1; number WIFI_SEC_TYPE_WEP = 2; @@ -247,25 +452,19 @@ namespace wifiManager { number WIFI_SEC_TYPE_OWE = 7; number WIFI_SEC_TYPE_WAPI_CERT = 8; number WIFI_SEC_TYPE_WAPI_PSK = 9; - }; dictionary WapiPskType { - number WAPI_PSK_ASCII = 0; number WAPI_PSK_HEX = 1; - }; dictionary WifiBandType { - number WIFI_BAND_NONE = 0; number WIFI_BAND_2G = 1; number WIFI_BAND_5G = 2; number WIFI_BAND_6G = 3; number WIFI_BAND_60G = 4; - }; dictionary WifiStandard { - number WIFI_STANDARD_UNDEFINED = 0; number WIFI_STANDARD_11A = 1; number WIFI_STANDARD_11B = 2; @@ -274,11 +473,9 @@ namespace wifiManager { number WIFI_STANDARD_11AC = 5; number WIFI_STANDARD_11AX = 6; number WIFI_STANDARD_11AD = 7; - }; [Entity=Interface] interface WifiLinkedInfo { - attribute String ssid; attribute String bssid; attribute number networkId; @@ -303,12 +500,12 @@ namespace wifiManager { attribute WifiCategory supportedWifiCategory; attribute boolean isHiLinkNetwork; [Optional] + attribute boolean isHiLinkProNetwork; + [Optional] attribute WifiLinkType wifiLinkType; - }; [Entity=Interface] interface IpInfo { - attribute number ipAddress; attribute number gateway; attribute number netmask; @@ -316,11 +513,9 @@ namespace wifiManager { attribute number secondDns; attribute number serverIp; attribute number leaseDuration; - }; [Entity=Interface] interface Ipv6Info { - attribute String linkIpv6Address; attribute String globalIpv6Address; attribute String randomGlobalIpv6Address; @@ -332,11 +527,9 @@ namespace wifiManager { attribute String netmask; attribute String primaryDNS; attribute String secondDNS; - }; [Entity=Interface] interface HotspotConfig { - attribute String ssid; attribute WifiSecurityType securityType; attribute number band; @@ -346,27 +539,21 @@ namespace wifiManager { attribute number maxConn; [Optional] attribute String ipAddress; - }; [Entity=Interface] interface StationInfo { - attribute String name; attribute String macAddress; [Optional] attribute DeviceAddressType macAddressType; attribute String ipAddress; - }; dictionary IpType { - number STATIC = 0; number DHCP = 1; number UNKNOWN = 2; - }; dictionary SuppState { - number DISCONNECTED = 0; number INTERFACE_DISABLED = 1; number INACTIVE = 2; @@ -379,10 +566,8 @@ namespace wifiManager { number COMPLETED = 9; number UNINITIALIZED = 10; number INVALID = 11; - }; dictionary ConnState { - number SCANNING = 0; number CONNECTING = 1; number AUTHENTICATING = 2; @@ -391,11 +576,9 @@ namespace wifiManager { number DISCONNECTING = 5; number DISCONNECTED = 6; number UNKNOWN = 7; - }; [Entity=Interface] interface WifiP2pDevice { - attribute String deviceName; attribute String deviceAddress; [Optional] @@ -403,11 +586,9 @@ namespace wifiManager { attribute String primaryDeviceType; attribute P2pDeviceStatus deviceStatus; attribute number groupCapabilities; - }; [Entity=Interface] interface WifiP2PConfig { - attribute String deviceAddress; [Optional] attribute DeviceAddressType deviceAddressType; @@ -415,11 +596,9 @@ namespace wifiManager { attribute String passphrase; attribute String groupName; attribute GroupOwnerBand goBand; - }; [Entity=Interface] interface WifiP2pGroupInfo { - attribute boolean isP2pGo; attribute WifiP2pDevice ownerInfo; attribute String passphrase; @@ -430,262 +609,27 @@ namespace wifiManager { attribute number frequency; attribute sequence clientDevices; attribute String goIpAddress; - }; dictionary P2pConnectState { - number DISCONNECTED = 0; number CONNECTED = 1; - }; [Entity=Interface] interface WifiP2pLinkedInfo { - attribute P2pConnectState connectState; attribute boolean isGroupOwner; attribute String groupOwnerAddr; - }; dictionary P2pDeviceStatus { - number CONNECTED = 0; number INVITED = 1; number FAILED = 2; number AVAILABLE = 3; number UNAVAILABLE = 4; - }; dictionary GroupOwnerBand { - number GO_BAND_AUTO = 0; number GO_BAND_2GHZ = 1; number GO_BAND_5GHZ = 2; - - }; - [GlobalScope] - interface GlobalScope_wifiManager_ohos_wifiManager { - - [Throws] - static void enableWifi(); - [Throws] - static void disableWifi(); - [Throws] - static void enableSemiWifi(); - [Throws] - static boolean isWifiActive(); - [Deprecated, Throws] - static void scan(); - [Throws] - static void startScan(); - [Deprecated, Throws] - static async sequence getScanResults(); - [Throws] - static WifiDetailState getWifiDetailState(); - [Deprecated, Throws] - static void getScanResults(AsyncCallback_Array_WifiScanInfo_Void callback_); - [Deprecated, Throws] - static sequence getScanResultsSync(); - [Throws] - static sequence getScanInfoList(); - [Throws] - static void setScanAlwaysAllowed(boolean isScanAlwaysAllowed); - [Throws] - static boolean getScanAlwaysAllowed(); - [Throws] - static async number addDeviceConfig(WifiDeviceConfig config); - [Throws] - static void addDeviceConfig(WifiDeviceConfig config, AsyncCallback_Number_Void callback_); - [Throws] - static async number addCandidateConfig(WifiDeviceConfig config); - [Throws] - static void addCandidateConfig(WifiDeviceConfig config, AsyncCallback_Number_Void callback_); - [Throws] - static async void removeCandidateConfig(number networkId); - [Throws] - static void removeCandidateConfig(number networkId, AsyncCallback_Void callback_); - [Throws] - static sequence getCandidateConfigs(); - [Throws] - static void connectToCandidateConfig(number networkId); - [Throws] - static void connectToNetwork(number networkId); - [Throws] - static void connectToDevice(WifiDeviceConfig config); - [Throws] - static void disconnect(); - [Throws] - static number getSignalLevel(number rssi, number band); - [Throws] - static async WifiLinkedInfo getLinkedInfo(); - [Throws] - static sequence getMultiLinkedInfo(); - [Throws] - static void getLinkedInfo(AsyncCallback_WifiLinkedInfo_Void callback_); - [Throws] - static WifiLinkedInfo getLinkedInfoSync(); - [Throws] - static boolean isConnected(); - [Throws] - static number getSupportedFeatures(); - [Throws] - static boolean isFeatureSupported(number featureId); - [Throws] - static sequence getDeviceMacAddress(); - [Throws] - static IpInfo getIpInfo(); - [Throws] - static Ipv6Info getIpv6Info(); - [Throws] - static String getCountryCode(); - [Throws] - static void reassociate(); - [Throws] - static void reconnect(); - [Throws] - static sequence getDeviceConfigs(); - [Throws] - static number updateNetwork(WifiDeviceConfig config); - [Throws] - static void allowAutoConnect(number netId, boolean isAllowed); - [Throws] - static void disableNetwork(number netId); - [Throws] - static void removeAllNetwork(); - [Throws] - static void removeDevice(number id); - [Throws] - static boolean isBandTypeSupported(WifiBandType bandType); - [Throws] - static sequence get5GChannelList(); - [Throws] - static DisconnectedReason getDisconnectedReason(); - [Throws] - static void startPortalCertification(); - [Throws] - static boolean isMeteredHotspot(); - [Throws] - static void enableHiLinkHandshake(boolean isHiLinkEnable, String bssid, WifiDeviceConfig config); - [Throws] - static void factoryReset(); - [Throws] - static void enableHotspot(); - [Throws] - static void disableHotspot(); - [Throws] - static boolean isHotspotDualBandSupported(); - [Throws] - static boolean isOpenSoftApAllowed(); - [Throws] - static boolean isHotspotActive(); - [Throws] - static void setHotspotConfig(HotspotConfig config); - [Throws] - static HotspotConfig getHotspotConfig(); - [Throws] - static sequence getStations(); - [Throws] - static undefined addHotspotBlockList(StationInfo stationInfo); - [Throws] - static undefined delHotspotBlockList(StationInfo stationInfo); - [Throws] - static sequence getHotspotBlockList(); - [Throws] - static async WifiP2pLinkedInfo getP2pLinkedInfo(); - [Throws] - static void getP2pLinkedInfo(AsyncCallback_WifiP2pLinkedInfo_Void callback_); - [Throws] - static async WifiP2pGroupInfo getCurrentGroup(); - [Throws] - static void getCurrentGroup(AsyncCallback_WifiP2pGroupInfo_Void callback_); - [Throws] - static async sequence getP2pPeerDevices(); - [Throws] - static void getP2pPeerDevices(AsyncCallback_Array_WifiP2pDevice_Void callback_); - [Throws] - static async WifiP2pDevice getP2pLocalDevice(); - [Throws] - static void getP2pLocalDevice(AsyncCallback_WifiP2pDevice_Void callback_); - [Throws] - static void createGroup(WifiP2PConfig config); - [Throws] - static void removeGroup(); - [Throws] - static void p2pConnect(WifiP2PConfig config); - [Throws] - static void p2pCancelConnect(); - [Throws] - static void startDiscoverDevices(); - [Throws] - static void stopDiscoverDevices(); - [Throws] - static void deletePersistentGroup(number netId); - [Throws] - static async sequence getP2pGroups(); - [Throws] - static void getP2pGroups(AsyncCallback_Array_WifiP2pGroupInfo_Void callback_); - [Throws] - static void setDeviceName(String devName); - [Throws, DtsName="on", DtsTag="'wifiStateChange'"] - static void onWifiStateChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'wifiStateChange'"] - static void offWifiStateChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'wifiConnectionChange'"] - static void onWifiConnectionChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'wifiConnectionChange'"] - static void offWifiConnectionChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'wifiScanStateChange'"] - static void onWifiScanStateChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'wifiScanStateChange'"] - static void offWifiScanStateChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'wifiRssiChange'"] - static void onWifiRssiChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'wifiRssiChange'"] - static void offWifiRssiChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'streamChange'"] - static void onStreamChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'streamChange'"] - static void offStreamChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'deviceConfigChange'"] - static void onDeviceConfigChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'deviceConfigChange'"] - static void offDeviceConfigChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'hotspotStateChange'"] - static void onHotspotStateChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'hotspotStateChange'"] - static void offHotspotStateChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'hotspotStaJoin'"] - static void onHotspotStaJoin(Callback_StationInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'hotspotStaJoin'"] - static void offHotspotStaJoin(optional Callback_StationInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'hotspotStaLeave'"] - static void onHotspotStaLeave(Callback_StationInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'hotspotStaLeave'"] - static void offHotspotStaLeave(optional Callback_StationInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'p2pStateChange'"] - static void onP2pStateChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'p2pStateChange'"] - static void offP2pStateChange(optional Callback_Number_Void callback_); - [Throws, DtsName="on", DtsTag="'p2pConnectionChange'"] - static void onP2pConnectionChange(Callback_WifiP2pLinkedInfo_Void callback_); - [Throws, DtsName="off", DtsTag="'p2pConnectionChange'"] - static void offP2pConnectionChange(optional Callback_WifiP2pLinkedInfo_Void callback_); - [Throws, DtsName="on", DtsTag="'p2pDeviceChange'"] - static void onP2pDeviceChange(Callback_WifiP2pDevice_Void callback_); - [Throws, DtsName="off", DtsTag="'p2pDeviceChange'"] - static void offP2pDeviceChange(optional Callback_WifiP2pDevice_Void callback_); - [Throws, DtsName="on", DtsTag="'p2pPeerDeviceChange'"] - static void onP2pPeerDeviceChange(Callback_Array_WifiP2pDevice_Void callback_); - [Throws, DtsName="off", DtsTag="'p2pPeerDeviceChange'"] - static void offP2pPeerDeviceChange(optional Callback_Array_WifiP2pDevice_Void callback_); - [Throws, DtsName="on", DtsTag="'p2pPersistentGroupChange'"] - static void onP2pPersistentGroupChange(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'p2pPersistentGroupChange'"] - static void offP2pPersistentGroupChange(optional Callback_Void callback_); - [Throws, DtsName="on", DtsTag="'p2pDiscoveryChange'"] - static void onP2pDiscoveryChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'p2pDiscoveryChange'"] - static void offP2pDiscoveryChange(optional Callback_Number_Void callback_); - - }; - + }; }; \ No newline at end of file diff --git a/idl/@ohos.wifiManagerExt.idl b/idl/@ohos.wifiManagerExt.idl index c82cea1..4432945 100644 --- a/idl/@ohos.wifiManagerExt.idl +++ b/idl/@ohos.wifiManagerExt.idl @@ -1,37 +1,29 @@ -package ohos; +package ohos.wifiManagerExt; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace wifiManagerExt { - + [Deprecated, Throws] + void enableHotspot(); + [Deprecated, Throws] + void disableHotspot(); + [Throws] + async sequence getSupportedPowerMode(); [Async, Synthetic] callback AsyncCallback_Array_PowerMode_Void = void (sequence result); + [Throws] + void getSupportedPowerMode(AsyncCallback_Array_PowerMode_Void callback_); + [Throws] + async PowerMode getPowerMode(); [Async, Synthetic] callback AsyncCallback_PowerMode_Void = void (PowerMode result); + [Throws] + void getPowerMode(AsyncCallback_PowerMode_Void callback_); + [Deprecated, Throws] + void setPowerMode(PowerMode mode); dictionary PowerMode { - number SLEEPING = 0; number GENERAL = 1; number THROUGH_WALL = 2; - }; - [GlobalScope] - interface GlobalScope_wifiManagerExt_ohos_wifiManagerExt { - - [Deprecated, Throws] - static void enableHotspot(); - [Deprecated, Throws] - static void disableHotspot(); - [Throws] - static async sequence getSupportedPowerMode(); - [Throws] - static void getSupportedPowerMode(AsyncCallback_Array_PowerMode_Void callback_); - [Throws] - static async PowerMode getPowerMode(); - [Throws] - static void getPowerMode(AsyncCallback_PowerMode_Void callback_); - [Deprecated, Throws] - static void setPowerMode(PowerMode mode); - - }; - }; \ No newline at end of file diff --git a/idl/@ohos.wifiext.idl b/idl/@ohos.wifiext.idl index f892115..5e25c5b 100644 --- a/idl/@ohos.wifiext.idl +++ b/idl/@ohos.wifiext.idl @@ -1,41 +1,33 @@ -package ohos; +package ohos.wifiext; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; +[DefaultExport] namespace wifiext { - + [Deprecated] + boolean enableHotspot(); + [Deprecated] + boolean disableHotspot(); + [Deprecated] + async sequence getSupportedPowerModel(); [Async, Synthetic] callback AsyncCallback_Array_PowerModel_Void = void (sequence result); + [Deprecated] + void getSupportedPowerModel(AsyncCallback_Array_PowerModel_Void callback_); + [Deprecated] + async PowerModel getPowerModel(); [Async, Synthetic] callback AsyncCallback_PowerModel_Void = void (PowerModel result); [Deprecated] + void getPowerModel(AsyncCallback_PowerModel_Void callback_); + [Deprecated] + boolean setPowerModel(PowerModel model); + [Deprecated] dictionary PowerModel { - [Deprecated] number SLEEPING = 0; [Deprecated] number GENERAL = 1; [Deprecated] number THROUGH_WALL = 2; - - }; - [GlobalScope] - interface GlobalScope_wifiext_ohos_wifiext { - - [Deprecated] - static boolean enableHotspot(); - [Deprecated] - static boolean disableHotspot(); - [Deprecated] - static async sequence getSupportedPowerModel(); - [Deprecated] - static void getSupportedPowerModel(AsyncCallback_Array_PowerModel_Void callback_); - [Deprecated] - static async PowerModel getPowerModel(); - [Deprecated] - static void getPowerModel(AsyncCallback_PowerModel_Void callback_); - [Deprecated] - static boolean setPowerModel(PowerModel model); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.window.floatingBall.idl b/idl/@ohos.window.floatingBall.idl new file mode 100644 index 0000000..18a4e5f --- /dev/null +++ b/idl/@ohos.window.floatingBall.idl @@ -0,0 +1,65 @@ +package ohos.window.floatingBall; +import application.BaseContext.default as BaseContext; +import ohos.multimedia.image.default as image; +import ohos.app.ability.Want.default as Want; +import ohos.base.Callback as Callback; +[DefaultExport] +namespace floatingBall { + boolean isFloatingBallEnabled(); + [Throws] + async FloatingBallController create(FloatingBallConfiguration config); + [Entity=Interface] + interface FloatingBallConfiguration { + attribute BaseContext context; + }; + [Synthetic] + callback Callback_FloatingBallState_Void = void (FloatingBallState parameter); + [Synthetic] + callback Callback_Void = void (); + [Entity=Interface] + interface FloatingBallController { + [Throws] + async void startFloatingBall(FloatingBallParams params); + [Throws] + async void updateFloatingBall(FloatingBallParams params); + [Throws] + async void stopFloatingBall(); + [Throws, DtsName="on", DtsTag="'stateChange'"] + void onStateChange(Callback_FloatingBallState_Void callback_); + [Throws, DtsName="on", DtsTag="'click'"] + void onClick(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'stateChange'"] + void offStateChange(optional Callback_FloatingBallState_Void callback_); + [Throws, DtsName="off", DtsTag="'click'"] + void offClick(optional Callback_Void callback_); + [Throws] + async FloatingBallWindowInfo getFloatingBallWindowInfo(); + [Throws] + async void restoreMainWindow(Want want); + }; + [Entity=Interface] + interface FloatingBallParams { + attribute FloatingBallTemplate template; + attribute String title; + [Optional] + attribute String content; + [Optional] + attribute String backgroundColor; + [Optional] + attribute image.PixelMap icon; + }; + dictionary FloatingBallState { + number STARTED = 1; + number STOPPED = 2; + }; + dictionary FloatingBallTemplate { + number STATIC = 1; + number NORMAL = 2; + number EMPHATIC = 3; + number SIMPLE = 4; + }; + [Entity=Interface] + interface FloatingBallWindowInfo { + readonly attribute number windowId; + }; +}; \ No newline at end of file diff --git a/idl/@ohos.window.idl b/idl/@ohos.window.idl index b3a0d36..ea8fb19 100644 --- a/idl/@ohos.window.idl +++ b/idl/@ohos.window.idl @@ -1,25 +1,27 @@ -package ohos; +package ohos.window; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; -import application.BaseContext as BaseContext; -import ohos.multimedia.image as image; -import ohos.rpc as rpc; -import ohos.app.ability.dialogRequest as dialogRequest; -import ohos.arkui.UIContext as UIContext; -import ohos.app.ability.ConfigurationConstant as ConfigurationConstant; -import ohos.bundle.bundleManager as bundleManager; -import ohos.arkui.node.ColorMetrics as ColorMetrics; -[Entity=Interface, TypeParameters="T,V = void"] +import application.BaseContext.default as BaseContext; +import ohos.multimedia.image.default as image; +import ohos.rpc.default as rpc; +import ohos.app.ability.dialogRequest.default as dialogRequest; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.Graphics.ColorMetrics as ColorMetrics; +import ohos.app.ability.ConfigurationConstant.default as ConfigurationConstant; +import ohos.bundle.bundleManager.default as bundleManager; +import ohos.arkui.stateManagement.LocalStorage as LocalStorage; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.Graphics.ColorMetrics as ColorMetrics; +import ohos.base.Callback as Callback; +[Entity=Interface, TypeParameters="T,V"] interface Callback { - [CallSignature] V invoke(T data); - }; +typedef sequence WindowAnimationCurveParam; +[DefaultExport] namespace window { - dictionary WindowType { - number TYPE_APP = 0; [Deprecated] number TYPE_SYSTEM_ALERT = 1; @@ -45,45 +47,40 @@ namespace window { number TYPE_GLOBAL_SEARCH = 20; number TYPE_HANDWRITE = 21; number TYPE_WALLET_SWIPE_CARD = 22; - + number TYPE_SCREEN_CONTROL = 23; + number TYPE_FLOAT_NAVIGATION = 24; + number TYPE_DYNAMIC = 25; + number TYPE_MUTISCREEN_COLLABORATION = 26; + number TYPE_MAIN = 32; }; dictionary AvoidAreaType { - number TYPE_SYSTEM = 0; number TYPE_CUTOUT = 1; number TYPE_SYSTEM_GESTURE = 2; number TYPE_KEYBOARD = 3; number TYPE_NAVIGATION_INDICATOR = 4; - }; dictionary WindowMode { - number UNDEFINED = 1; number FULLSCREEN = 2; number PRIMARY = 3; number SECONDARY = 4; number FLOATING = 5; - }; dictionary WindowLayoutMode { - number WINDOW_LAYOUT_MODE_CASCADE = 0; number WINDOW_LAYOUT_MODE_TILE = 1; - }; dictionary WindowStatusType { - number UNDEFINED = 0; number FULL_SCREEN = 1; number MAXIMIZE = 2; number MINIMIZE = 3; number FLOATING = 4; number SPLIT_SCREEN = 5; - }; [Entity=Interface] interface SystemBarProperties { - [Optional] attribute String statusBarColor; [Optional] @@ -100,24 +97,18 @@ namespace window { attribute boolean enableStatusBarAnimation; [Optional] attribute boolean enableNavigationBarAnimation; - }; [Entity=Interface] interface StatusBarProperty { - attribute String contentColor; - }; [Entity=Interface] interface SystemBarStyle { - [Optional] attribute String statusBarContentColor; - }; [Entity=Interface] interface SystemBarRegionTint { - attribute WindowType type; [Optional] attribute boolean isEnable; @@ -127,66 +118,72 @@ namespace window { attribute String backgroundColor; [Optional] attribute String contentColor; - }; [Entity=Interface] interface SystemBarTintState { - attribute number displayId; attribute sequence regionTint; - }; [Entity=Interface] interface Rect { - attribute number left; attribute number top; attribute number width; attribute number height; - + }; + [Entity=Interface] + interface Position { + attribute number x; + attribute number y; + }; + dictionary WindowAnchor { + number TOP_START = 0; + number TOP = 1; + number TOP_END = 2; + number START = 3; + number CENTER = 4; + number END = 5; + number BOTTOM_START = 6; + number BOTTOM = 7; + number BOTTOM_END = 8; }; [Entity=Interface] interface AvoidArea { - attribute boolean visible; attribute Rect leftRect; attribute Rect topRect; attribute Rect rightRect; attribute Rect bottomRect; - }; [Entity=Interface] interface Size { - attribute number width; attribute number height; - }; [Entity=Interface] interface WindowInfo { - attribute Rect rect; + [Optional] + attribute Rect globalDisplayRect; attribute String bundleName; attribute String abilityName; attribute number windowId; attribute WindowStatusType windowStatusType; [Optional] attribute boolean isFocused; - }; [Entity=Interface] interface WindowDensityInfo { - attribute number systemDensity; attribute number defaultDensity; attribute number customDensity; - }; [Entity=Interface] interface WindowProperties { - attribute Rect windowRect; attribute Rect drawableRect; + [Optional] + attribute Rect globalDisplayRect; attribute WindowType type; attribute boolean isFullScreen; attribute boolean isLayoutFullScreen; @@ -205,11 +202,9 @@ namespace window { attribute number displayId; [Optional] attribute String name; - }; [Entity=Interface] interface DecorButtonStyle { - [Optional] attribute ConfigurationConstant.ColorMode colorMode; [Optional] @@ -218,17 +213,17 @@ namespace window { attribute number spacingBetweenButtons; [Optional] attribute number closeButtonRightMargin; - + [Optional] + attribute number buttonIconSize; + [Optional] + attribute number buttonBackgroundCornerRadius; }; dictionary ColorSpace { - number DEFAULT = 0; number WIDE_GAMUT = 1; - }; [Entity=Interface] interface ScaleOptions { - [Optional] attribute number x; [Optional] @@ -237,11 +232,9 @@ namespace window { attribute number pivotX; [Optional] attribute number pivotY; - }; [Entity=Interface] interface RotateOptions { - [Optional] attribute number x; [Optional] @@ -252,39 +245,31 @@ namespace window { attribute number pivotX; [Optional] attribute number pivotY; - }; [Entity=Interface] interface TranslateOptions { - [Optional] attribute number x; [Optional] attribute number y; [Optional] attribute number z; - }; [Entity=Interface] interface TransitionContext { - attribute Window toWindow; [Throws] void completeTransition(boolean isCompleted); - }; [Entity=Interface] interface TransitionController { - [Throws] void animationForShown(TransitionContext context); [Throws] void animationForHidden(TransitionContext context); - }; [Entity=Interface] interface Configuration { - attribute String name; attribute WindowType windowType; [Optional] @@ -297,11 +282,13 @@ namespace window { attribute boolean decorEnabled; [Optional] attribute String title; - + [Optional] + attribute number zIndex; + [Optional] + attribute boolean defaultDensityEnabled; }; [Entity=Interface] interface WindowLimits { - [Optional] attribute number maxWidth; [Optional] @@ -310,33 +297,25 @@ namespace window { attribute number minWidth; [Optional] attribute number minHeight; - }; [Entity=Interface] interface TitleButtonRect { - attribute number right; attribute number top; attribute number width; attribute number height; - }; [Entity=Interface] interface RectChangeOptions { - attribute Rect rect; attribute RectChangeReason reason; - }; [Entity=Interface] interface AvoidAreaOptions { - attribute AvoidAreaType type; attribute AvoidArea area; - }; dictionary RectChangeReason { - number UNDEFINED = 0; number MAXIMIZE = 1; number RECOVER = 2; @@ -344,18 +323,100 @@ namespace window { number DRAG = 4; number DRAG_START = 5; number DRAG_END = 6; - }; [Async, Synthetic] callback AsyncCallback_Window_Void = void (Window result); + [Throws] + void createWindow(Configuration config, AsyncCallback_Window_Void callback_); + [Throws] + async Window createWindow(Configuration config); + [Deprecated] + void create(String id, WindowType type, AsyncCallback_Window_Void callback_); + [Deprecated] + async Window create(String id, WindowType type); + [Deprecated] + async Window create(BaseContext ctx, String id, WindowType type); + [Deprecated] + void create(BaseContext ctx, String id, WindowType type, AsyncCallback_Window_Void callback_); + [Deprecated] + void find(String id, AsyncCallback_Window_Void callback_); + [Deprecated] + async Window find(String id); + [Throws] + Window findWindow(String name); + [Deprecated] + void getTopWindow(AsyncCallback_Window_Void callback_); + [Deprecated] + async Window getTopWindow(); + [Deprecated] + async Window getTopWindow(BaseContext ctx); + [Deprecated] + void getTopWindow(BaseContext ctx, AsyncCallback_Window_Void callback_); + [Throws] + void getLastWindow(BaseContext ctx, AsyncCallback_Window_Void callback_); + [Throws] + async Window getLastWindow(BaseContext ctx); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void minimizeAll(number id, AsyncCallback_Void callback_); + [Throws] + async void minimizeAll(number id); + [Throws] + void toggleShownStateForAllAppWindows(AsyncCallback_Void callback_); + [Throws] + async void toggleShownStateForAllAppWindows(); + [Throws] + void setWindowLayoutMode(WindowLayoutMode mode, AsyncCallback_Void callback_); + [Throws] + async void setWindowLayoutMode(WindowLayoutMode mode); + [Throws] + void setGestureNavigationEnabled(boolean enable, AsyncCallback_Void callback_); + [Throws] + async void setGestureNavigationEnabled(boolean enable); + [Throws] + async void setWaterMarkImage(image.PixelMap pixelMap, boolean enable); + [Throws] + void setWaterMarkImage(image.PixelMap pixelMap, boolean enable, AsyncCallback_Void callback_); + [Throws] + async void shiftAppWindowFocus(number sourceWindowId, number targetWindowId); + [Throws] + async void shiftAppWindowPointerEvent(number sourceWindowId, number targetWindowId); + [Throws] + async void shiftAppWindowTouchEvent(number sourceWindowId, number targetWindowId, number fingerId); + [Throws] + async sequence getVisibleWindowInfo(); + [Throws] + async image.PixelMap getSnapshot(number windowId); + [Throws] + async sequence getWindowsByCoordinate(number displayId, optional number windowNumber, optional number x, optional number y); + [Throws] + async sequence getAllWindowLayoutInfo(number displayId); + [Throws] + async number getGlobalWindowMode(optional number displayId); + [Throws] + async String getTopNavDestinationName(number windowId); [Synthetic] callback Callback_SystemBarTintState_Void = void (SystemBarTintState parameter); + [Throws, DtsName="on", DtsTag="'systemBarTintChange'"] + void onSystemBarTintChange(Callback_SystemBarTintState_Void callback_); + [Throws, DtsName="off", DtsTag="'systemBarTintChange'"] + void offSystemBarTintChange(optional Callback_SystemBarTintState_Void callback_); [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); + [Throws, DtsName="on", DtsTag="'gestureNavigationEnabledChange'"] + void onGestureNavigationEnabledChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'gestureNavigationEnabledChange'"] + void offGestureNavigationEnabledChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="on", DtsTag="'waterMarkFlagChange'"] + void onWaterMarkFlagChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'waterMarkFlagChange'"] + void offWaterMarkFlagChange(optional Callback_Boolean_Void callback_); + [Throws] + async void setStartWindowBackgroundColor(String moduleName, String abilityName, ColorMetrics color); + [Throws] + async void notifyScreenshotEvent(ScreenshotEventType eventType); dictionary Orientation { - number UNSPECIFIED = 0; number PORTRAIT = 1; number LANDSCAPE = 2; @@ -374,41 +435,96 @@ namespace window { number USER_ROTATION_PORTRAIT_INVERTED = 15; number USER_ROTATION_LANDSCAPE_INVERTED = 16; number FOLLOW_DESKTOP = 17; - }; dictionary BlurStyle { - number OFF = 0; number THIN = 1; number REGULAR = 2; number THICK = 3; - }; dictionary WindowEventType { - number WINDOW_SHOWN = 1; number WINDOW_ACTIVE = 2; number WINDOW_INACTIVE = 3; number WINDOW_HIDDEN = 4; number WINDOW_DESTROYED = 7; - }; dictionary MaximizePresentation { - number FOLLOW_APP_IMMERSIVE_SETTING = 0; number EXIT_IMMERSIVE = 1; number ENTER_IMMERSIVE = 2; number ENTER_IMMERSIVE_DISABLE_TITLE_AND_DOCK_HOVER = 3; - }; [Entity=Interface] interface MoveConfiguration { - [Optional] attribute number displayId; - }; typedef String SpecificSystemBar; + dictionary WindowTransitionType { + number DESTROY = 0; + }; + dictionary AnimationType { + number FADE_IN_OUT = 0; + number FADE_IN = 1; + }; + dictionary WindowAnimationCurve { + number LINEAR = 0; + number INTERPOLATION_SPRING = 1; + number CUBIC_BEZIER = 2; + }; + [Entity=Interface] + interface WindowAnimationConfig { + attribute WindowAnimationCurve curve; + [Optional] + attribute number duration; + [Optional] + attribute WindowAnimationCurveParam param; + }; + [Entity=Interface] + interface TransitionAnimation { + attribute WindowAnimationConfig config; + [Optional] + attribute number opacity; + }; + [Entity=Interface] + interface StartAnimationSystemParams { + attribute AnimationType type; + [Optional] + attribute WindowAnimationConfig animationConfig; + }; + [Entity=Interface] + interface StartAnimationParams { + attribute AnimationType type; + }; + [Entity=Interface] + interface WindowCreateParams { + [Optional] + attribute StartAnimationParams animationParams; + [Optional] + attribute StartAnimationSystemParams systemAnimationParams; + }; + [Entity=Interface] + interface KeyboardInfo { + attribute Rect beginRect; + attribute Rect endRect; + [Optional] + attribute boolean animated; + [Optional] + attribute WindowAnimationConfig config; + }; + [Entity=Interface] + interface KeyFramePolicy { + attribute boolean enable; + [Optional] + attribute number interval; + [Optional] + attribute number distance; + [Optional] + attribute number animationDuration; + [Optional] + attribute number animationDelay; + }; [Async, Synthetic] callback AsyncCallback_WindowProperties_Void = void (WindowProperties result); [Async, Synthetic] @@ -424,24 +540,27 @@ namespace window { [Synthetic] callback Callback_Number_Void = void (number parameter); [Synthetic] + callback Callback_KeyboardInfo_Void = void (KeyboardInfo parameter); + [Synthetic] callback Callback_Void = void (); [Synthetic] + callback Callback_ScreenshotEventType_Void = void (ScreenshotEventType parameter); + [Synthetic] callback Callback_WindowEventType_Void = void (WindowEventType parameter); [Synthetic] callback Callback_WindowStatusType_Void = void (WindowStatusType parameter); [Synthetic] callback Callback_Promise_Boolean = Promise (); - [Async, Synthetic] - callback AsyncCallback_ColorSpace_Void = void (ColorSpace result); - [Async, Synthetic] - callback AsyncCallback_image_PixelMap_Void = void (image.PixelMap result); [Synthetic] callback Callback_TitleButtonRect_Void = void (TitleButtonRect parameter); [Synthetic] callback Callback_RectChangeOptions_Void = void (RectChangeOptions parameter); + [Async, Synthetic] + callback AsyncCallback_ColorSpace_Void = void (ColorSpace result); + [Async, Synthetic] + callback AsyncCallback_Image_PixelMap_Void = void (image.PixelMap result); [Entity=Interface] interface Window { - [Throws] void hide(AsyncCallback_Void callback_); [Throws] @@ -459,6 +578,8 @@ namespace window { [Throws] async void showWindow(); [Throws] + async void showWindow(ShowWindowOptions options); + [Throws] void showWithAnimation(AsyncCallback_Void callback_); [Throws] async void showWithAnimation(); @@ -479,13 +600,11 @@ namespace window { [Throws] void moveWindowTo(number x, number y, AsyncCallback_Void callback_); [Throws] - async void moveWindowToAsync(number x, number y); - [Throws] async void moveWindowToAsync(number x, number y, optional MoveConfiguration moveConfiguration); [Throws] - async void moveWindowToGlobal(number x, number y); - [Throws] async void moveWindowToGlobal(number x, number y, optional MoveConfiguration moveConfiguration); + [Throws] + async void moveWindowToGlobalDisplay(number x, number y); [Deprecated] async void resetSize(number width, number height); [Deprecated] @@ -496,6 +615,10 @@ namespace window { void resize(number width, number height, AsyncCallback_Void callback_); [Throws] async void resizeAsync(number width, number height); + [Throws] + async void setFollowParentWindowLayoutEnabled(boolean enabled); + [Throws] + async void setRelativePositionToParentWindowEnabled(boolean enabled, optional WindowAnchor anchor, optional number offsetX, optional number offsetY); [Deprecated] async void setWindowType(WindowType type); [Deprecated] @@ -506,14 +629,20 @@ namespace window { void setWindowMode(WindowMode mode, AsyncCallback_Void callback_); [Deprecated] void getProperties(AsyncCallback_WindowProperties_Void callback_); - [Throws] - Rect getGlobalRect(); [Deprecated] async WindowProperties getProperties(); [Throws] + Rect getGlobalRect(); + [Throws] WindowProperties getWindowProperties(); [Throws] WindowDensityInfo getWindowDensityInfo(); + [Throws] + void setDefaultDensityEnabled(boolean enabled); + [Throws] + void setWindowContainerModalColor(String activeColor, String inactiveColor); + [Throws] + async boolean isMainWindowFullScreenAcrossDisplays(); [Deprecated] void getAvoidArea(AvoidAreaType type, AsyncCallback_AvoidArea_Void callback_); [Deprecated] @@ -598,68 +727,116 @@ namespace window { boolean isWindowShowing(); [Throws, DtsName="on", DtsTag="'windowSizeChange'"] void onWindowSizeChange(Callback_Size_Void callback_); - [Throws, DtsName="off", DtsTag="'windowSizeChange'"] - void offWindowSizeChange(optional Callback_Size_Void callback_); [Deprecated, DtsName="on", DtsTag="'systemAvoidAreaChange'"] void onSystemAvoidAreaChange(Callback_AvoidArea_Void callback_); - [Deprecated, DtsName="off", DtsTag="'systemAvoidAreaChange'"] - void offSystemAvoidAreaChange(optional Callback_AvoidArea_Void callback_); [Throws, DtsName="on", DtsTag="'avoidAreaChange'"] void onAvoidAreaChange(Callback_AvoidAreaOptions_Void callback_); - [Throws, DtsName="off", DtsTag="'avoidAreaChange'"] - void offAvoidAreaChange(optional Callback_AvoidAreaOptions_Void callback_); [Throws, DtsName="on", DtsTag="'keyboardHeightChange'"] void onKeyboardHeightChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'keyboardHeightChange'"] - void offKeyboardHeightChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'keyboardWillShow'"] + void onKeyboardWillShow(Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'keyboardWillHide'"] + void onKeyboardWillHide(Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'keyboardDidShow'"] + void onKeyboardDidShow(Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="on", DtsTag="'keyboardDidHide'"] + void onKeyboardDidHide(Callback_KeyboardInfo_Void callback_); [Throws, DtsName="on", DtsTag="'touchOutside'"] void onTouchOutside(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'touchOutside'"] - void offTouchOutside(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'displayIdChange'"] void onDisplayIdChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'displayIdChange'"] - void offDisplayIdChange(optional Callback_Number_Void callback_); [Throws, DtsName="on", DtsTag="'windowVisibilityChange'"] void onWindowVisibilityChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'windowVisibilityChange'"] - void offWindowVisibilityChange(optional Callback_Boolean_Void callback_); [Throws, DtsName="on", DtsTag="'systemDensityChange'"] void onSystemDensityChange(Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'systemDensityChange'"] - void offSystemDensityChange(optional Callback_Number_Void callback_); + [Throws, DtsName="on", DtsTag="'mainWindowFullScreenAcrossDisplaysChanged'"] + void onMainWindowFullScreenAcrossDisplaysChanged(Callback_Boolean_Void callback_); [Throws, DtsName="on", DtsTag="'noInteractionDetected'"] void onNoInteractionDetected(number timeout, Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'noInteractionDetected'"] - void offNoInteractionDetected(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'screenshot'"] void onScreenshot(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'screenshot'"] - void offScreenshot(optional Callback_Void callback_); + [Throws, DtsName="on", DtsTag="'screenshotAppEvent'"] + void onScreenshotAppEvent(Callback_ScreenshotEventType_Void callback_); [Throws, DtsName="on", DtsTag="'dialogTargetTouch'"] void onDialogTargetTouch(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'dialogTargetTouch'"] - void offDialogTargetTouch(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'windowEvent'"] void onWindowEvent(Callback_WindowEventType_Void callback_); - [Throws, DtsName="off", DtsTag="'windowEvent'"] - void offWindowEvent(optional Callback_WindowEventType_Void callback_); [Throws, DtsName="on", DtsTag="'windowStatusChange'"] void onWindowStatusChange(Callback_WindowStatusType_Void callback_); - [Throws, DtsName="off", DtsTag="'windowStatusChange'"] - void offWindowStatusChange(optional Callback_WindowStatusType_Void callback_); + [Throws, DtsName="on", DtsTag="'windowStatusDidChange'"] + void onWindowStatusDidChange(Callback_WindowStatusType_Void callback_); [Throws, DtsName="on", DtsTag="'subWindowClose'"] void onSubWindowClose(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'subWindowClose'"] - void offSubWindowClose(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'windowWillClose'"] void onWindowWillClose(Callback_Promise_Boolean callback_); - [Throws, DtsName="off", DtsTag="'windowWillClose'"] - void offWindowWillClose(optional Callback_Promise_Boolean callback_); [Throws, DtsName="on", DtsTag="'windowHighlightChange'"] void onWindowHighlightChange(Callback_Boolean_Void callback_); + [Throws, DtsName="on", DtsTag="'windowTitleButtonRectChange'"] + void onWindowTitleButtonRectChange(Callback_TitleButtonRect_Void callback_); + [Throws, DtsName="on", DtsTag="'windowRectChange'"] + void onWindowRectChange(Callback_RectChangeOptions_Void callback_); + [Throws, DtsName="on", DtsTag="'rectChangeInGlobalDisplay'"] + void onRectChangeInGlobalDisplay(Callback_RectChangeOptions_Void callback_); + [Throws, DtsName="on", DtsTag="'rotationChange'"] + void onRotationChange([TypeArguments="RotationChangeInfo,RotationChangeResult"] RotationChangeCallback callback_); + [Throws, DtsName="on", DtsTag="0|eventType|'uiExtensionSecureLimitChange'"] + void onUiExtensionSecureLimitChange(Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'windowSizeChange'"] + void offWindowSizeChange(optional Callback_Size_Void callback_); + [Deprecated, DtsName="off", DtsTag="'systemAvoidAreaChange'"] + void offSystemAvoidAreaChange(optional Callback_AvoidArea_Void callback_); + [Throws, DtsName="off", DtsTag="'avoidAreaChange'"] + void offAvoidAreaChange(optional Callback_AvoidAreaOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'keyboardHeightChange'"] + void offKeyboardHeightChange(optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'keyboardWillShow'"] + void offKeyboardWillShow(optional Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'keyboardWillHide'"] + void offKeyboardWillHide(optional Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'keyboardDidShow'"] + void offKeyboardDidShow(optional Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'keyboardDidHide'"] + void offKeyboardDidHide(optional Callback_KeyboardInfo_Void callback_); + [Throws, DtsName="off", DtsTag="'touchOutside'"] + void offTouchOutside(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'displayIdChange'"] + void offDisplayIdChange(optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'windowVisibilityChange'"] + void offWindowVisibilityChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'systemDensityChange'"] + void offSystemDensityChange(optional Callback_Number_Void callback_); + [Throws, DtsName="off", DtsTag="'mainWindowFullScreenAcrossDisplaysChanged'"] + void offMainWindowFullScreenAcrossDisplaysChanged(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'noInteractionDetected'"] + void offNoInteractionDetected(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'screenshot'"] + void offScreenshot(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'screenshotAppEvent'"] + void offScreenshotAppEvent(optional Callback_ScreenshotEventType_Void callback_); + [Throws, DtsName="off", DtsTag="'dialogTargetTouch'"] + void offDialogTargetTouch(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'windowEvent'"] + void offWindowEvent(optional Callback_WindowEventType_Void callback_); + [Throws, DtsName="off", DtsTag="'windowStatusChange'"] + void offWindowStatusChange(optional Callback_WindowStatusType_Void callback_); + [Throws, DtsName="off", DtsTag="'windowStatusDidChange'"] + void offWindowStatusDidChange(optional Callback_WindowStatusType_Void callback_); + [Throws, DtsName="off", DtsTag="'subWindowClose'"] + void offSubWindowClose(optional Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'windowWillClose'"] + void offWindowWillClose(optional Callback_Promise_Boolean callback_); [Throws, DtsName="off", DtsTag="'windowHighlightChange'"] void offWindowHighlightChange(optional Callback_Boolean_Void callback_); + [Throws, DtsName="off", DtsTag="'windowTitleButtonRectChange'"] + void offWindowTitleButtonRectChange(optional Callback_TitleButtonRect_Void callback_); + [Throws, DtsName="off", DtsTag="'windowRectChange'"] + void offWindowRectChange(optional Callback_RectChangeOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'rectChangeInGlobalDisplay'"] + void offRectChangeInGlobalDisplay(optional Callback_RectChangeOptions_Void callback_); + [Throws, DtsName="off", DtsTag="'rotationChange'"] + void offRotationChange(optional [TypeArguments="RotationChangeInfo,RotationChangeResult"] RotationChangeCallback callback_); + [Throws, DtsName="off", DtsTag="0|eventType|'uiExtensionSecureLimitChange'"] + void offUiExtensionSecureLimitChange(optional Callback_Boolean_Void callback_); [Throws] async void bindDialogTarget(rpc.RemoteObject token, Callback_Void deathCallback); [Throws] @@ -698,6 +875,8 @@ namespace window { void setBackgroundColor(String color, AsyncCallback_Void callback_); [Throws] void setWindowBackgroundColor((String or ColorMetrics) color); + [Throws] + async void setWindowShadowEnabled(boolean enable); [Deprecated] async void setBrightness(number brightness); [Deprecated] @@ -767,10 +946,14 @@ namespace window { [Throws] async void setForbidSplitMove(boolean isForbidSplitMove); [Throws] - void snapshot(AsyncCallback_image_PixelMap_Void callback_); + void snapshot(AsyncCallback_Image_PixelMap_Void callback_); [Throws] async image.PixelMap snapshot(); [Throws] + image.PixelMap snapshotSync(); + [Throws] + async image.PixelMap snapshotIgnorePrivacy(); + [Throws] void opacity(number opacity); [Throws] void scale(ScaleOptions scaleOptions); @@ -817,6 +1000,8 @@ namespace window { [Throws] async void raiseAboveTarget(number windowId); [Throws] + async void raiseMainWindowAboveTarget(number windowId); + [Throws] void setRaiseByClickEnabled(boolean enable, AsyncCallback_Void callback_); [Throws] async void setRaiseByClickEnabled(boolean enable); @@ -851,6 +1036,8 @@ namespace window { [Throws] void setWindowDecorVisible(boolean isVisible); [Throws] + boolean getWindowDecorVisible(); + [Throws] void setWindowTitleMoveEnabled(boolean enabled); [Throws] async void setWindowTitle(String titleName); @@ -875,8 +1062,6 @@ namespace window { [Throws] void setWindowTitleButtonVisible(boolean isMaximizeButtonVisible, boolean isMinimizeButtonVisible, optional boolean isCloseButtonVisible); [Throws] - boolean isWindowTitleButtonVisible(); - [Throws] async void enableLandscapeMultiWindow(); [Throws] async void startMoving(); @@ -888,20 +1073,16 @@ namespace window { async void enableDrag(boolean enable); [Throws] async void disableLandscapeMultiWindow(); - [Throws, DtsName="on", DtsTag="'windowTitleButtonRectChange'"] - void onWindowTitleButtonRectChange(Callback_TitleButtonRect_Void callback_); - [Throws, DtsName="off", DtsTag="'windowTitleButtonRectChange'"] - void offWindowTitleButtonRectChange(optional Callback_TitleButtonRect_Void callback_); - [Throws, DtsName="on", DtsTag="'windowTitleButtonVisibleChange'"] - void onWindowTitleButtonVisibleChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'windowTitleButtonVisibleChange'"] - void offWindowTitleButtonVisibleChange(optional Callback_Boolean_Void callback_); + [Throws] + async void setWindowTransitionAnimation(WindowTransitionType transitionType, TransitionAnimation animation); + [Throws] + (TransitionAnimation or undefined) getWindowTransitionAnimation(WindowTransitionType transitionType); [Throws] async void setWindowMask(sequence> windowMask); - [Throws, DtsName="on", DtsTag="'windowRectChange'"] - void onWindowRectChange(Callback_RectChangeOptions_Void callback_); - [Throws, DtsName="off", DtsTag="'windowRectChange'"] - void offWindowRectChange(optional Callback_RectChangeOptions_Void callback_); + [Throws] + Position clientToGlobalDisplay(number winX, number winY); + [Throws] + Position globalDisplayToClient(number globalDisplayX, number globalDisplayY); [Throws] async void setWindowGrayScale(number grayScale); [Throws] @@ -909,36 +1090,57 @@ namespace window { [Throws] boolean getImmersiveModeEnabledState(); [Throws] + boolean isImmersiveLayout(); + [Throws] WindowStatusType getWindowStatus(); [Throws] boolean isFocused(); [Throws] async Window createSubWindowWithOptions(String name, SubWindowOptions options); [Throws] + async void setParentWindow(number windowId); + [Throws] + Window getParentWindow(); + [Throws] + async void setFollowParentMultiScreenPolicy(boolean enabled); + [Throws] async void setTitleAndDockHoverShown(optional boolean isTitleHoverShown, optional boolean isDockHoverShown); [Throws] void setWindowContainerColor(String activeColor, String inactiveColor); - + [Throws] + void setWindowDelayRaiseOnDrag(boolean isEnabled); + [Throws] + async void setSubWindowZLevel(number zLevel); + [Throws] + number getSubWindowZLevel(); + [Throws] + async KeyFramePolicy setDragKeyFramePolicy(KeyFramePolicy keyFramePolicy); }; dictionary WindowStageEventType { - number SHOWN = 1; number ACTIVE = 2; number INACTIVE = 3; number HIDDEN = 4; number RESUMED = 5; number PAUSED = 6; - + }; + dictionary WindowStageLifecycleEventType { + number SHOWN = 1; + number RESUMED = 2; + number PAUSED = 3; + number HIDDEN = 4; }; dictionary ModalityType { - number WINDOW_MODALITY = 0; number APPLICATION_MODALITY = 1; - + }; + [Entity=Interface] + interface ShowWindowOptions { + [Optional] + attribute boolean focusOnShow; }; [Entity=Interface] interface SubWindowOptions { - attribute String title; attribute boolean decorEnabled; [Optional] @@ -949,15 +1151,21 @@ namespace window { attribute ModalityType modalityType; [Optional] attribute Rect windowRect; - + [Optional] + attribute boolean maximizeSupported; + [Optional] + attribute number zLevel; + [Optional] + attribute boolean outlineEnabled; }; [Async, Synthetic] callback AsyncCallback_Array_Window_Void = void (sequence result); [Synthetic] callback Callback_WindowStageEventType_Void = void (WindowStageEventType parameter); + [Synthetic] + callback Callback_WindowStageLifecycleEventType_Void = void (WindowStageLifecycleEventType parameter); [Entity=Interface] interface WindowStage { - [Throws] async Window getMainWindow(); [Throws] @@ -988,10 +1196,14 @@ namespace window { async void loadContentByName(String name, optional LocalStorage storage); [Throws, DtsName="on", DtsTag="0|eventType|'windowStageEvent'"] void onWindowStageEvent(Callback_WindowStageEventType_Void callback_); - [Throws, DtsName="off", DtsTag="0|eventType|'windowStageEvent'"] - void offWindowStageEvent(optional Callback_WindowStageEventType_Void callback_); + [Throws, DtsName="on", DtsTag="0|eventType|'windowStageLifecycleEvent'"] + void onWindowStageLifecycleEvent(Callback_WindowStageLifecycleEventType_Void callback_); [Throws, DtsName="on", DtsTag="0|eventType|'windowStageClose'"] void onWindowStageClose(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="0|eventType|'windowStageEvent'"] + void offWindowStageEvent(optional Callback_WindowStageEventType_Void callback_); + [Throws, DtsName="off", DtsTag="0|eventType|'windowStageLifecycleEvent'"] + void offWindowStageLifecycleEvent(optional Callback_WindowStageLifecycleEventType_Void callback_); [Throws, DtsName="off", DtsTag="0|eventType|'windowStageClose'"] void offWindowStageClose(optional Callback_Void callback_); [Throws] @@ -1001,7 +1213,7 @@ namespace window { [Throws] void setDefaultDensityEnabled(boolean enabled); [Throws] - void setCustomDensity(number density); + void setCustomDensity(number density, optional boolean applyToSubWindow); [Throws] async void removeStartingWindow(); [Throws] @@ -1009,26 +1221,26 @@ namespace window { [Throws] async void setWindowRectAutoSave(boolean enabled); [Throws] + async void setWindowRectAutoSave(boolean enabled, boolean isSaveBySpecifiedFlag); + [Throws] async boolean isWindowRectAutoSave(); [Throws] async void setSupportedWindowModes(sequence supportedWindowModes); - + [Throws] + async void setSupportedWindowModes(sequence supportedWindowModes, boolean grayOutMaximizeButton); + [Throws] + async void setImageForRecent(number imgResourceId, ImageFit value); }; dictionary ExtensionWindowAttribute { - number SYSTEM_WINDOW = 0; number SUB_WINDOW = 1; - }; [Entity=Interface] interface SystemWindowOptions { - attribute WindowType windowType; - }; [Entity=Interface] interface ExtensionWindowConfig { - attribute String windowName; attribute ExtensionWindowAttribute windowAttribute; attribute Rect windowRect; @@ -1036,92 +1248,47 @@ namespace window { attribute SubWindowOptions subWindowOptions; [Optional] attribute SystemWindowOptions systemWindowOptions; - }; [Entity=Interface] interface WindowLayoutInfo { - attribute Rect windowRect; - }; - [GlobalScope] - interface GlobalScope_window_ohos_window { - - [Throws] - static void createWindow(Configuration config, AsyncCallback_Window_Void callback_); - [Throws] - static async Window createWindow(Configuration config); - [Deprecated] - static void create(String id, WindowType type, AsyncCallback_Window_Void callback_); - [Deprecated] - static async Window create(String id, WindowType type); - [Deprecated] - static async Window create(BaseContext ctx, String id, WindowType type); - [Deprecated] - static void create(BaseContext ctx, String id, WindowType type, AsyncCallback_Window_Void callback_); - [Deprecated] - static void find(String id, AsyncCallback_Window_Void callback_); - [Deprecated] - static async Window find(String id); - [Throws] - static Window findWindow(String name); - [Deprecated] - static void getTopWindow(AsyncCallback_Window_Void callback_); - [Deprecated] - static async Window getTopWindow(); - [Deprecated] - static async Window getTopWindow(BaseContext ctx); - [Deprecated] - static void getTopWindow(BaseContext ctx, AsyncCallback_Window_Void callback_); - [Throws] - static void getLastWindow(BaseContext ctx, AsyncCallback_Window_Void callback_); - [Throws] - static async Window getLastWindow(BaseContext ctx); - [Throws] - static void minimizeAll(number id, AsyncCallback_Void callback_); - [Throws] - static async void minimizeAll(number id); - [Throws] - static void toggleShownStateForAllAppWindows(AsyncCallback_Void callback_); - [Throws] - static async void toggleShownStateForAllAppWindows(); - [Throws] - static void setWindowLayoutMode(WindowLayoutMode mode, AsyncCallback_Void callback_); - [Throws] - static async void setWindowLayoutMode(WindowLayoutMode mode); - [Throws] - static void setGestureNavigationEnabled(boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void setGestureNavigationEnabled(boolean enable); - [Throws] - static async void setWaterMarkImage(image.PixelMap pixelMap, boolean enable); - [Throws] - static void setWaterMarkImage(image.PixelMap pixelMap, boolean enable, AsyncCallback_Void callback_); - [Throws] - static async void shiftAppWindowFocus(number sourceWindowId, number targetWindowId); - [Throws] - static async void shiftAppWindowPointerEvent(number sourceWindowId, number targetWindowId); - [Throws] - static async sequence getVisibleWindowInfo(); - [Throws] - static async image.PixelMap getSnapshot(number windowId); - [Throws] - static async sequence getWindowsByCoordinate(number displayId, optional number windowNumber, optional number x, optional number y); - [Throws] - static async sequence getAllWindowLayoutInfo(number displayId); - [Throws, DtsName="on", DtsTag="'systemBarTintChange'"] - static void onSystemBarTintChange(Callback_SystemBarTintState_Void callback_); - [Throws, DtsName="off", DtsTag="'systemBarTintChange'"] - static void offSystemBarTintChange(optional Callback_SystemBarTintState_Void callback_); - [Throws, DtsName="on", DtsTag="'gestureNavigationEnabledChange'"] - static void onGestureNavigationEnabledChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'gestureNavigationEnabledChange'"] - static void offGestureNavigationEnabledChange(optional Callback_Boolean_Void callback_); - [Throws, DtsName="on", DtsTag="'waterMarkFlagChange'"] - static void onWaterMarkFlagChange(Callback_Boolean_Void callback_); - [Throws, DtsName="off", DtsTag="'waterMarkFlagChange'"] - static void offWaterMarkFlagChange(optional Callback_Boolean_Void callback_); - + dictionary GlobalWindowMode { + number FULLSCREEN = 1; + number SPLIT = 2; + number FLOAT = 4; + number PIP = 8; + }; + dictionary RotationChangeType { + number WINDOW_WILL_ROTATE = 0; + number WINDOW_DID_ROTATE = 1; + }; + dictionary RectType { + number RELATIVE_TO_SCREEN = 0; + number RELATIVE_TO_PARENT_WINDOW = 1; + }; + dictionary ScreenshotEventType { + number SYSTEM_SCREENSHOT = 0; + number SYSTEM_SCREENSHOT_ABORT = 1; + number SCROLL_SHOT_START = 2; + number SCROLL_SHOT_END = 3; + number SCROLL_SHOT_ABORT = 4; + }; + [Entity=Interface] + interface RotationChangeInfo { + attribute RotationChangeType type; + attribute number orientation; + attribute number displayId; + attribute Rect displayRect; + }; + [Entity=Interface] + interface RotationChangeResult { + attribute RectType rectType; + attribute Rect windowRect; + }; + [Entity=Interface, TypeParameters="T,U"] + interface RotationChangeCallback { + [CallSignature] + U invoke(T info); }; - }; \ No newline at end of file diff --git a/idl/@ohos.worker.idl b/idl/@ohos.worker.idl index f84b241..c844f04 100644 --- a/idl/@ohos.worker.idl +++ b/idl/@ohos.worker.idl @@ -1,7 +1,6 @@ -package ohos; +package ohos.worker; [Entity=Interface] interface WorkerOptions { - [Optional] attribute String type; [Optional] @@ -10,70 +9,54 @@ interface WorkerOptions { attribute boolean shared; [Optional] attribute ThreadWorkerPriority priority; - }; dictionary ThreadWorkerPriority { - number HIGH = 0; number MEDIUM = 1; number LOW = 2; number IDLE = 3; - + number DEADLINE = 4; + number VIP = 5; }; [Entity=Interface] interface Event { - readonly attribute String type; readonly attribute number timeStamp; - }; [Entity=Interface] interface ErrorEvent: Event { - readonly attribute String message; readonly attribute String filename; readonly attribute number lineno; readonly attribute number colno; readonly attribute Object error; - }; [Entity=Interface, TypeParameters="T"] interface MessageEvent: Event { - readonly attribute T data; - }; [Entity=Interface] interface MessageEvents: Event { - readonly attribute any data; - }; [Entity=Interface] interface PostMessageOptions { - [Optional] attribute sequence transfer; - }; [Entity=Interface, Deprecated] interface EventListener { - [Deprecated, CallSignature] async void invoke(Event evt); - }; [Entity=Interface] interface WorkerEventListener { - [CallSignature] async void invoke(Event event); - }; typedef String MessageType; [Entity=Interface, Deprecated] interface EventTarget { - [Deprecated] void addEventListener(String type, EventListener listener); [Deprecated] @@ -82,11 +65,9 @@ interface EventTarget { void removeEventListener(String type, optional EventListener callback_); [Deprecated] void removeAllListener(); - }; [Entity=Interface] interface WorkerEventTarget { - [Throws] void addEventListener(String type, WorkerEventListener listener); [Throws] @@ -95,45 +76,35 @@ interface WorkerEventTarget { void removeEventListener(String type, optional WorkerEventListener callback_); [Throws] void removeAllListener(); - }; [Synthetic] callback Callback_ErrorEvent_Void = void (ErrorEvent ev); [Entity=Intersection, Synthetic] -interface Intersection_WorkerGlobalScope_globalThis: WorkerGlobalScope { - - +interface Intersection_WorkerGlobalScope_GlobalThis: WorkerGlobalScope, globalThis { }; [Entity=Interface, Deprecated] interface WorkerGlobalScope: EventTarget { - [Deprecated] readonly attribute String name; [Optional, Deprecated] attribute Callback_ErrorEvent_Void onerror; [Deprecated] - readonly attribute Intersection_WorkerGlobalScope_globalThis self; - + readonly attribute Intersection_WorkerGlobalScope_GlobalThis self; }; [Entity=Intersection, Synthetic] -interface Intersection_GlobalScope_globalThis: GlobalScope { - - +interface Intersection_GlobalScope_GlobalThis: GlobalScope, globalThis { }; [Entity=Interface] interface GlobalScope: WorkerEventTarget { - readonly attribute String name; [Optional] attribute Callback_ErrorEvent_Void onerror; - readonly attribute Intersection_GlobalScope_globalThis self; - + readonly attribute Intersection_GlobalScope_GlobalThis self; }; [Synthetic] callback Callback_DedicatedWorkerGlobalScope_MessageEvent_Void = void (DedicatedWorkerGlobalScope this, MessageEvent ev); [Entity=Interface, Deprecated] interface DedicatedWorkerGlobalScope: WorkerGlobalScope { - [Optional, Deprecated] attribute Callback_DedicatedWorkerGlobalScope_MessageEvent_Void onmessage; [Optional, Deprecated] @@ -146,13 +117,11 @@ interface DedicatedWorkerGlobalScope: WorkerGlobalScope { void postMessage(Object messageObject, optional PostMessageOptions options); [Deprecated] void postMessage(Object messageObject, sequence transfer); - }; [Synthetic] callback Callback_ThreadWorkerGlobalScope_MessageEvents_Void = void (ThreadWorkerGlobalScope this, MessageEvents ev); [Entity=Interface] interface ThreadWorkerGlobalScope: GlobalScope { - [Optional] attribute Callback_ThreadWorkerGlobalScope_MessageEvents_Void onmessage; [Optional] @@ -167,18 +136,18 @@ interface ThreadWorkerGlobalScope: GlobalScope { void postMessageWithSharedSendable(Object message, optional sequence transfer); [Throws] Object callGlobalCallObjectMethod(String instanceName, String methodName, number timeout, sequence... args); - }; callback ErrorCallback = void (ErrorEvent err); +[DefaultExport] namespace worker { - [Synthetic] callback Callback_Number_Void = void (number code); [Synthetic] + callback Callback_ErrorEvent_Void = void (ErrorEvent err); + [Synthetic] callback Callback_MessageEvents_Void = void (MessageEvents event); [Entity=Class] - interface ThreadWorker { - + interface ThreadWorker: WorkerEventTarget { constructor(String scriptURL, optional WorkerOptions options); [Optional] attribute Callback_Number_Void onexit; @@ -216,19 +185,16 @@ namespace worker { void registerGlobalCallObject(String instanceName, Object globalCallObject); [Throws] void unregisterGlobalCallObject(optional String instanceName); - }; [Entity=Class] - interface RestrictedWorker: ThreadWorker { - + interface RestrictedWorker: [Extends] ThreadWorker { constructor(String scriptURL, optional WorkerOptions options); - }; [Synthetic] callback Callback_MessageEvent_Void = void (MessageEvent event); [Entity=Class, Deprecated] - interface Worker { - + interface Worker: EventTarget { + [Deprecated] constructor(String scriptURL, optional WorkerOptions options); [Optional, Deprecated] attribute Callback_Number_Void onexit; @@ -250,7 +216,5 @@ namespace worker { void off(String type, optional EventListener listener); [Deprecated] void terminate(); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.xml.idl b/idl/@ohos.xml.idl index da56c85..8ba4b80 100644 --- a/idl/@ohos.xml.idl +++ b/idl/@ohos.xml.idl @@ -1,9 +1,33 @@ -package ohos; +package ohos.xml; +[DefaultExport] namespace xml { - + [Entity=Class] + interface XmlDynamicSerializer { + constructor(optional String encoding); + [Throws] + void setAttributes(String name, String value); + [Throws] + void addEmptyElement(String name); + [Throws] + void setDeclaration(); + [Throws] + void startElement(String name); + [Throws] + void endElement(); + [Throws] + void setNamespace(String prefix, String namespace); + [Throws] + void setComment(String text); + [Throws] + void setCdata(String text); + [Throws] + void setText(String text); + [Throws] + void setDocType(String text); + buffer getOutput(); + }; [Entity=Class] interface XmlSerializer { - constructor(buffer buffer, optional String encoding); [Throws] void setAttributes(String name, String value); @@ -23,10 +47,8 @@ namespace xml { void setText(String text); [Throws] void setDocType(String text); - }; dictionary EventType { - number START_DOCUMENT = 0; number END_DOCUMENT = 1; number START_TAG = 2; @@ -38,11 +60,9 @@ namespace xml { number INSTRUCTION = 8; number ENTITY_REFERENCE = 9; number WHITESPACE = 10; - }; [Entity=Interface] interface ParseInfo { - number getColumnNumber(); number getDepth(); number getLineNumber(); @@ -53,7 +73,6 @@ namespace xml { boolean isEmptyElementTag(); boolean isWhitespace(); number getAttributeCount(); - }; [Synthetic] callback Callback_String_String_Boolean = boolean (String name, String value); @@ -61,7 +80,6 @@ namespace xml { callback Callback_EventType_ParseInfo_Boolean = boolean (EventType eventType, ParseInfo value); [Entity=Interface] interface ParseOptions { - [Optional] attribute boolean supportDoctype; [Optional] @@ -72,17 +90,16 @@ namespace xml { attribute Callback_String_String_Boolean attributeValueCallbackFunction; [Optional] attribute Callback_EventType_ParseInfo_Boolean tokenValueCallbackFunction; - + [Optional] + attribute AttributeWithTagCb attributeWithTagCallbackFunction; }; + callback AttributeWithTagCb = boolean (String tagName, String key, String value); [Entity=Class] interface XmlPullParser { - constructor(buffer buffer, optional String encoding); [Deprecated, Throws] void parse(ParseOptions option); [Throws] void parseXml(ParseOptions option); - }; - }; \ No newline at end of file diff --git a/idl/@ohos.zlib.idl b/idl/@ohos.zlib.idl index 69e6e36..bda938b 100644 --- a/idl/@ohos.zlib.idl +++ b/idl/@ohos.zlib.idl @@ -1,48 +1,37 @@ -package ohos; +package ohos.zlib; import ohos.base.AsyncCallback as AsyncCallback; +[DefaultExport] namespace zlib { - [Deprecated] dictionary ErrorCode { - [Deprecated] number ERROR_CODE_OK = 0; [Deprecated] number ERROR_CODE_ERRNO = -1; - }; dictionary CompressLevel { - number COMPRESS_LEVEL_NO_COMPRESSION = 0; number COMPRESS_LEVEL_BEST_SPEED = 1; number COMPRESS_LEVEL_BEST_COMPRESSION = 9; number COMPRESS_LEVEL_DEFAULT_COMPRESSION = -1; - }; dictionary CompressStrategy { - number COMPRESS_STRATEGY_DEFAULT_STRATEGY = 0; number COMPRESS_STRATEGY_FILTERED = 1; number COMPRESS_STRATEGY_HUFFMAN_ONLY = 2; number COMPRESS_STRATEGY_RLE = 3; number COMPRESS_STRATEGY_FIXED = 4; - }; dictionary ParallelStrategy { - number PARALLEL_STRATEGY_SEQUENTIAL = 0; number PARALLEL_STRATEGY_PARALLEL_DECOMPRESSION = 1; - }; dictionary MemLevel { - number MEM_LEVEL_MIN = 1; number MEM_LEVEL_MAX = 9; number MEM_LEVEL_DEFAULT = 8; - }; dictionary CompressFlushMode { - number NO_FLUSH = 0; number PARTIAL_FLUSH = 1; number SYNC_FLUSH = 2; @@ -50,29 +39,21 @@ namespace zlib { number FINISH = 4; number BLOCK = 5; number TREES = 6; - }; dictionary ReturnStatus { - number OK = 0; number STREAM_END = 1; number NEED_DICT = 2; - }; dictionary CompressMethod { - number DEFLATED = 8; - }; dictionary OffsetReferencePoint { - number SEEK_SET = 0; number SEEK_CUR = 1; - }; [Entity=Interface] interface Options { - [Optional] attribute CompressLevel level; [Optional] @@ -81,11 +62,9 @@ namespace zlib { attribute CompressStrategy strategy; [Optional] attribute ParallelStrategy parallel; - }; [Entity=Interface] interface ZStream { - [Optional] attribute buffer nextIn; [Optional] @@ -102,11 +81,9 @@ namespace zlib { attribute number dataType; [Optional] attribute number adler; - }; [Entity=Interface] interface GzHeader { - [Optional] attribute boolean isText; [Optional] @@ -127,52 +104,64 @@ namespace zlib { attribute boolean hcrc; [Optional] attribute boolean done; - }; [Entity=Interface] interface ZipOutputInfo { - attribute ReturnStatus status; attribute number destLen; - }; [Entity=Interface] interface DictionaryOutputInfo { - attribute ReturnStatus status; attribute number dictionaryLength; - }; [Entity=Interface] interface DecompressionOutputInfo { - attribute ReturnStatus status; attribute number destLength; attribute number sourceLength; - }; [Entity=Interface] interface DeflatePendingOutputInfo { - attribute ReturnStatus status; attribute number pending; attribute number bits; - }; [Entity=Interface] interface GzErrorOutputInfo { - attribute ReturnStatus status; attribute String statusMsg; - }; callback InflateBackInputCallback = buffer (Object inDesc); callback InflateBackOutputCallback = number (Object outDesc, buffer buf, number length); + [Deprecated] + async void zipFile(String inFile, String outFile, Options options); + [Deprecated] + async void unzipFile(String inFile, String outFile, Options options); [Async, Synthetic] callback AsyncCallback_Void = void (); + [Throws] + void compressFile(String inFile, String outFile, Options options, AsyncCallback_Void callback_); + [Throws] + async void compressFile(String inFile, String outFile, Options options); + [Throws] + async void compressFiles(sequence inFiles, String outFile, Options options); + [Throws] + void decompressFile(String inFile, String outFile, Options options, AsyncCallback_Void callback_); + [Throws] + void decompressFile(String inFile, String outFile, AsyncCallback_Void callback_); + [Throws] + async void decompressFile(String inFile, String outFile, optional Options options); + [Throws] + async number getOriginalSize(String compressedFile); + async Checksum createChecksum(); + Checksum createChecksumSync(); + async Zip createZip(); + Zip createZipSync(); + async GZip createGZip(); + GZip createGZipSync(); [Entity=Interface] interface Checksum { - [Throws] async number adler32(number adler, buffer buf); [Throws] @@ -185,11 +174,9 @@ namespace zlib { async number crc64(number crc, buffer buf); async sequence getCrcTable(); async sequence getCrc64Table(); - }; [Entity=Interface] interface Zip { - async ZStream getZStream(); async String zlibVersion(); async number zlibCompileFlags(); @@ -273,11 +260,9 @@ namespace zlib { async ReturnStatus deflateParams(ZStream strm, CompressLevel level, CompressStrategy strategy); [Throws] async ReturnStatus deflatePrime(ZStream strm, number bits, number value); - }; [Entity=Interface] interface GZip { - [Throws] async void gzdopen(number fd, String mode); [Throws] @@ -327,36 +312,5 @@ namespace zlib { async number gzoffset(); [Throws] async String gzgets(buffer buf); - - }; - [GlobalScope] - interface GlobalScope_zlib_ohos_zlib { - - [Deprecated] - static async void zipFile(String inFile, String outFile, Options options); - [Deprecated] - static async void unzipFile(String inFile, String outFile, Options options); - [Throws] - static void compressFile(String inFile, String outFile, Options options, AsyncCallback_Void callback_); - [Throws] - static async void compressFile(String inFile, String outFile, Options options); - [Throws] - static async void compressFiles(sequence inFiles, String outFile, Options options); - [Throws] - static void decompressFile(String inFile, String outFile, Options options, AsyncCallback_Void callback_); - [Throws] - static void decompressFile(String inFile, String outFile, AsyncCallback_Void callback_); - [Throws] - static async void decompressFile(String inFile, String outFile, optional Options options); - [Throws] - static async number getOriginalSize(String compressedFile); - static async Checksum createChecksum(); - static Checksum createChecksumSync(); - static async Zip createZip(); - static Zip createZipSync(); - static async GZip createGZip(); - static GZip createGZipSync(); - }; - }; \ No newline at end of file diff --git a/idl/@system.app.idl b/idl/@system.app.idl index ad8e206..2ac1b56 100644 --- a/idl/@system.app.idl +++ b/idl/@system.app.idl @@ -1,12 +1,10 @@ package system.app; [Entity=Interface] interface AppResponse { - attribute String appID; attribute String appName; attribute String versionName; attribute number versionCode; - }; [Synthetic] callback Callback_Void = void (); @@ -14,7 +12,6 @@ callback Callback_Void = void (); callback Callback_String_Number_Void = void (String data, number code); [Entity=Interface] interface ScreenOnVisibleOptions { - [Optional] attribute boolean visible; [Optional] @@ -23,17 +20,13 @@ interface ScreenOnVisibleOptions { attribute Callback_String_Number_Void fail; [Optional] attribute Callback_Void complete; - }; [Entity=Interface] interface RequestFullWindowOptions { - attribute number duration; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface App { - static AppResponse getInfo(); static void terminate(); [Deprecated] @@ -43,5 +36,4 @@ interface App { static void setImageCacheCount(number value); static void setImageRawDataCacheSize(number value); static void setImageFileCacheSize(number value); - }; \ No newline at end of file diff --git a/idl/@system.battery.idl b/idl/@system.battery.idl index 5f4806d..09c3465 100644 --- a/idl/@system.battery.idl +++ b/idl/@system.battery.idl @@ -1,12 +1,10 @@ package system.battery; [Entity=Interface, Deprecated] interface BatteryResponse { - [Deprecated] attribute boolean charging; [Deprecated] attribute number level; - }; [Synthetic] callback Callback_BatteryResponse_Void = void (BatteryResponse data); @@ -16,19 +14,15 @@ callback Callback_String_Number_Void = void (String data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface GetStatusOptions { - [Optional, Deprecated] attribute Callback_BatteryResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Battery { - [Deprecated] static void getStatus(optional GetStatusOptions options); - }; \ No newline at end of file diff --git a/idl/@system.bluetooth.idl b/idl/@system.bluetooth.idl index 815b290..646be64 100644 --- a/idl/@system.bluetooth.idl +++ b/idl/@system.bluetooth.idl @@ -5,52 +5,40 @@ callback Callback_Void = void (); callback Callback_String_Number_Void = void (String data, number code); [Entity=Interface] interface StartBLEScanOptions { - attribute number interval; attribute Callback_Void success; attribute Callback_String_Number_Void fail; attribute Callback_Void complete; - }; [Entity=Interface] interface StopBLEScanOptions { - attribute Callback_Void success; attribute Callback_String_Number_Void fail; attribute Callback_Void complete; - }; [Entity=Interface] interface BluetoothDevice { - attribute String addrType; attribute String addr; attribute number rssi; attribute String txpower; attribute String data; - }; [Entity=Interface] interface BLEFoundResponse { - attribute sequence devices; - }; [Synthetic] callback Callback_BLEFoundResponse_Void = void (BLEFoundResponse data); [Entity=Interface] interface SubscribeBLEFoundOptions { - attribute Callback_BLEFoundResponse_Void success; attribute Callback_String_Number_Void fail; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Bluetooth { - static void startBLEScan(StartBLEScanOptions options); static void stopBLEScan(StopBLEScanOptions options); static void subscribeBLEFound(SubscribeBLEFoundOptions options); static void unsubscribeBLEFound(); - }; \ No newline at end of file diff --git a/idl/@system.brightness.idl b/idl/@system.brightness.idl index d4c4342..8d826d4 100644 --- a/idl/@system.brightness.idl +++ b/idl/@system.brightness.idl @@ -1,10 +1,8 @@ package system.brightness; [Entity=Interface, Deprecated] interface BrightnessResponse { - [Deprecated] attribute number value; - }; [Synthetic] callback Callback_BrightnessResponse_Void = void (BrightnessResponse data); @@ -14,18 +12,15 @@ callback Callback_String_Number_Void = void (String data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface GetBrightnessOptions { - [Optional, Deprecated] attribute Callback_BrightnessResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface SetBrightnessOptions { - [Deprecated] attribute number value; [Optional, Deprecated] @@ -34,31 +29,25 @@ interface SetBrightnessOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface BrightnessModeResponse { - [Deprecated] attribute number mode; - }; [Synthetic] callback Callback_BrightnessModeResponse_Void = void (BrightnessModeResponse data); [Entity=Interface, Deprecated] interface GetBrightnessModeOptions { - [Optional, Deprecated] attribute Callback_BrightnessModeResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface SetBrightnessModeOptions { - [Deprecated] attribute number mode; [Optional, Deprecated] @@ -67,11 +56,9 @@ interface SetBrightnessModeOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface SetKeepScreenOnOptions { - [Deprecated] attribute boolean keepScreenOn; [Optional, Deprecated] @@ -80,11 +67,9 @@ interface SetKeepScreenOnOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Brightness { - [Deprecated] static void getValue(optional GetBrightnessOptions options); [Deprecated] @@ -95,5 +80,4 @@ interface Brightness { static void setMode(optional SetBrightnessModeOptions options); [Deprecated] static void setKeepScreenOn(optional SetKeepScreenOnOptions options); - }; \ No newline at end of file diff --git a/idl/@system.cipher.idl b/idl/@system.cipher.idl index 5a23f53..7e1d2ff 100644 --- a/idl/@system.cipher.idl +++ b/idl/@system.cipher.idl @@ -1,10 +1,8 @@ package system.cipher; [Entity=Interface, Deprecated] interface CipherResponse { - [Deprecated] attribute String text; - }; [Synthetic] callback Callback_CipherResponse_Void = void (CipherResponse data); @@ -14,7 +12,6 @@ callback Callback_String_Number_Void = void (String data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface CipherRsaOptions { - [Deprecated] attribute String action; [Deprecated] @@ -29,11 +26,9 @@ interface CipherRsaOptions { attribute Callback_String_Number_Void fail; [Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface CipherAesOptions { - [Deprecated] attribute String action; [Deprecated] @@ -54,14 +49,11 @@ interface CipherAesOptions { attribute Callback_String_Number_Void fail; [Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Cipher { - [Deprecated] static void rsa(CipherRsaOptions options); [Deprecated] static void aes(CipherAesOptions options); - }; \ No newline at end of file diff --git a/idl/@system.configuration.idl b/idl/@system.configuration.idl index e998288..1c00aaf 100644 --- a/idl/@system.configuration.idl +++ b/idl/@system.configuration.idl @@ -1,15 +1,11 @@ package system.configuration; [Entity=Interface] interface LocaleResponse { - attribute String language; attribute String countryOrRegion; attribute String dir; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Configuration { - static LocaleResponse getLocale(); - }; \ No newline at end of file diff --git a/idl/@system.device.idl b/idl/@system.device.idl index 9561005..6b95592 100644 --- a/idl/@system.device.idl +++ b/idl/@system.device.idl @@ -1,20 +1,30 @@ package system.device; -[Entity=Interface] +[Entity=Interface, Deprecated] interface DeviceResponse { - + [Deprecated] attribute String brand; + [Deprecated] attribute String manufacturer; + [Deprecated] attribute String model; + [Deprecated] attribute String product; + [Deprecated] attribute String language; + [Deprecated] attribute String region; + [Deprecated] attribute number windowWidth; + [Deprecated] attribute number windowHeight; + [Deprecated] attribute number screenDensity; + [Deprecated] attribute String screenShape; + [Deprecated] attribute number apiVersion; + [Deprecated] attribute String deviceType; - }; [Synthetic] callback Callback_DeviceResponse_Void = void (DeviceResponse data); @@ -22,21 +32,17 @@ callback Callback_DeviceResponse_Void = void (DeviceResponse data); callback Callback_Any_Number_Void = void (any data, number code); [Synthetic] callback Callback_Void = void (); -[Entity=Interface] +[Entity=Interface, Deprecated] interface GetDeviceOptions { - - [Optional] + [Optional, Deprecated] attribute Callback_DeviceResponse_Void success; - [Optional] + [Optional, Deprecated] attribute Callback_Any_Number_Void fail; - [Optional] + [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class] +[Entity=Class, Deprecated, DefaultExport] interface Device { - [Deprecated] static void getInfo(optional GetDeviceOptions options); - }; \ No newline at end of file diff --git a/idl/@system.fetch.idl b/idl/@system.fetch.idl index 84ef7ba..1082684 100644 --- a/idl/@system.fetch.idl +++ b/idl/@system.fetch.idl @@ -1,11 +1,9 @@ package system.fetch; [Entity=Interface] interface FetchResponse { - attribute number code; attribute (String or Object) data; attribute Object headers; - }; [Synthetic] callback Callback_FetchResponse_Void = void (FetchResponse data); @@ -15,7 +13,6 @@ callback Callback_Any_Number_Void = void (any data, number code); callback Callback_Void = void (); [Entity=Literal, Synthetic] interface Type_Fetch_fetch_options { - attribute String url; [Optional] attribute (String or Object) data; @@ -31,11 +28,8 @@ interface Type_Fetch_fetch_options { attribute Callback_Any_Number_Void fail; [Optional] attribute Callback_Void complete; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Fetch { - static void fetch(Type_Fetch_fetch_options options); - }; \ No newline at end of file diff --git a/idl/@system.file.idl b/idl/@system.file.idl index 9fc197d..f53644c 100644 --- a/idl/@system.file.idl +++ b/idl/@system.file.idl @@ -1,7 +1,6 @@ package system.file; [Entity=Interface, Deprecated] interface FileResponse { - [Deprecated] attribute String uri; [Deprecated] @@ -12,7 +11,6 @@ interface FileResponse { attribute String type; [Optional, Deprecated] attribute sequence subFiles; - }; [Synthetic] callback Callback_String_Void = void (String uri); @@ -22,7 +20,6 @@ callback Callback_String_Number_Void = void (String data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface FileMoveOption { - [Deprecated] attribute String srcUri; [Deprecated] @@ -33,20 +30,16 @@ interface FileMoveOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileListResponse { - [Deprecated] attribute sequence fileList; - }; [Synthetic] callback Callback_FileListResponse_Void = void (FileListResponse data); [Entity=Interface, Deprecated] interface FileListOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -55,11 +48,9 @@ interface FileListOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileCopyOption { - [Deprecated] attribute String srcUri; [Deprecated] @@ -70,13 +61,11 @@ interface FileCopyOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Synthetic] callback Callback_FileResponse_Void = void (FileResponse file); [Entity=Interface, Deprecated] interface FileGetOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -87,11 +76,9 @@ interface FileGetOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileDeleteOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -100,11 +87,9 @@ interface FileDeleteOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileWriteTextOption { - [Deprecated] attribute String uri; [Deprecated] @@ -119,20 +104,16 @@ interface FileWriteTextOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileReadTextResponse { - [Deprecated] attribute String text; - }; [Synthetic] callback Callback_FileReadTextResponse_Void = void (FileReadTextResponse data); [Entity=Interface, Deprecated] interface FileReadTextOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -147,11 +128,9 @@ interface FileReadTextOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileWriteArrayBufferOption { - [Deprecated] attribute String uri; [Deprecated] @@ -166,20 +145,16 @@ interface FileWriteArrayBufferOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileReadArrayBufferResponse { - [Deprecated] attribute buffer buffer; - }; [Synthetic] callback Callback_FileReadArrayBufferResponse_Void = void (FileReadArrayBufferResponse data); [Entity=Interface, Deprecated] interface FileReadArrayBufferOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -192,11 +167,9 @@ interface FileReadArrayBufferOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileAccessOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -205,11 +178,9 @@ interface FileAccessOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileMkdirOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -220,11 +191,9 @@ interface FileMkdirOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface FileRmdirOption { - [Deprecated] attribute String uri; [Optional, Deprecated] @@ -235,11 +204,9 @@ interface FileRmdirOption { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface File { - [Deprecated] static void move(FileMoveOption options); [Deprecated] @@ -264,5 +231,4 @@ interface File { static void mkdir(FileMkdirOption options); [Deprecated] static void rmdir(FileRmdirOption options); - }; \ No newline at end of file diff --git a/idl/@system.geolocation.idl b/idl/@system.geolocation.idl index 4cbe9a3..907df1d 100644 --- a/idl/@system.geolocation.idl +++ b/idl/@system.geolocation.idl @@ -1,13 +1,11 @@ package system.geolocation; [Entity=Interface, Deprecated] interface GeolocationResponse { - attribute number longitude; attribute number latitude; attribute number altitude; attribute number accuracy; attribute number time; - }; [Synthetic] callback Callback_GeolocationResponse_Void = void (GeolocationResponse data); @@ -17,7 +15,6 @@ callback Callback_String_Number_Void = void (String data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface GetLocationOption { - [Optional] attribute number timeout; [Optional] @@ -28,40 +25,32 @@ interface GetLocationOption { attribute Callback_String_Number_Void fail; [Optional] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface GetLocationTypeResponse { - attribute sequence types; - }; [Synthetic] callback Callback_GetLocationTypeResponse_Void = void (GetLocationTypeResponse data); [Entity=Interface, Deprecated] interface GetLocationTypeOption { - [Optional] attribute Callback_GetLocationTypeResponse_Void success; [Optional] attribute Callback_String_Number_Void fail; [Optional] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface SubscribeLocationOption { - [Optional] attribute String coordType; attribute Callback_GeolocationResponse_Void success; [Optional] attribute Callback_String_Number_Void fail; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Geolocation { - [Deprecated] static void getLocation(optional GetLocationOption options); [Deprecated] @@ -72,5 +61,4 @@ interface Geolocation { static void unsubscribe(); [Deprecated] static sequence getSupportedCoordTypes(); - }; \ No newline at end of file diff --git a/idl/@system.mediaquery.idl b/idl/@system.mediaquery.idl index 7e4b4de..f75de27 100644 --- a/idl/@system.mediaquery.idl +++ b/idl/@system.mediaquery.idl @@ -1,9 +1,7 @@ package system.mediaquery; [Entity=Interface] interface MediaQueryEvent { - attribute boolean matches; - }; [Synthetic] callback Callback_Boolean_Void = void (boolean matches); @@ -11,7 +9,6 @@ callback Callback_Boolean_Void = void (boolean matches); callback Callback_MediaQueryEvent_Void = void (MediaQueryEvent event); [Entity=Interface] interface MediaQueryList { - [Optional] attribute String media; [Optional] @@ -20,11 +17,12 @@ interface MediaQueryList { attribute Callback_Boolean_Void onchange; void addListener(Callback_MediaQueryEvent_Void callback_); void removeListener(Callback_MediaQueryEvent_Void callback_); - }; -[Entity=Class] +[Entity=Class, DefaultExport] +interface MediaQuery { + static MediaQueryList matchMedia(String condition); +}; +[Entity=Class, DefaultExport] interface MediaQuery { - static MediaQueryList matchMedia(String condition); - }; \ No newline at end of file diff --git a/idl/@system.network.idl b/idl/@system.network.idl index 96d14dd..18cf774 100644 --- a/idl/@system.network.idl +++ b/idl/@system.network.idl @@ -1,10 +1,8 @@ package system.network; [Entity=Interface] interface NetworkResponse { - attribute String type; attribute boolean metered; - }; [Synthetic] callback Callback_NetworkResponse_Void = void (NetworkResponse data); @@ -14,29 +12,23 @@ callback Callback_Any_Number_Void = void (any data, number code); callback Callback_Void = void (); [Entity=Literal, Synthetic] interface Type_Network_getType_options { - [Optional] attribute Callback_NetworkResponse_Void success; [Optional] attribute Callback_Any_Number_Void fail; [Optional] attribute Callback_Void complete; - }; [Entity=Literal, Synthetic] interface Type_Network_subscribe_options { - [Optional] attribute Callback_NetworkResponse_Void success; [Optional] attribute Callback_Any_Number_Void fail; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Network { - static void getType(optional Type_Network_getType_options options); static void subscribe(optional Type_Network_subscribe_options options); static void unsubscribe(); - }; \ No newline at end of file diff --git a/idl/@system.notification.idl b/idl/@system.notification.idl index 3daadac..34b7af5 100644 --- a/idl/@system.notification.idl +++ b/idl/@system.notification.idl @@ -1,26 +1,20 @@ package system.notification; [Entity=Interface] interface ActionResult { - attribute String bundleName; attribute String abilityName; attribute String uri; - }; [Entity=Interface] interface ShowNotificationOptions { - [Optional] attribute String contentTitle; [Optional] attribute String contentText; - [Optional] + [Optional, Deprecated] attribute ActionResult clickAction; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Notification { - static void show(optional ShowNotificationOptions options); - }; \ No newline at end of file diff --git a/idl/@system.package.idl b/idl/@system.package.idl index d05f79f..d0bccad 100644 --- a/idl/@system.package.idl +++ b/idl/@system.package.idl @@ -1,10 +1,8 @@ package system.package; [Entity=Interface, Deprecated] interface CheckPackageHasInstalledResponse { - [Deprecated] attribute boolean result; - }; [Synthetic] callback Callback_CheckPackageHasInstalledResponse_Void = void (CheckPackageHasInstalledResponse data); @@ -14,7 +12,6 @@ callback Callback_Any_Number_Void = void (any data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface CheckPackageHasInstalledOptions { - [Deprecated] attribute String bundleName; [Optional, Deprecated] @@ -23,12 +20,9 @@ interface CheckPackageHasInstalledOptions { attribute Callback_Any_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Package { - [Deprecated] static void hasInstalled(CheckPackageHasInstalledOptions options); - }; \ No newline at end of file diff --git a/idl/@system.prompt.idl b/idl/@system.prompt.idl index e41a4de..206ec78 100644 --- a/idl/@system.prompt.idl +++ b/idl/@system.prompt.idl @@ -1,37 +1,68 @@ package system.prompt; [Entity=Interface, Deprecated] interface ShowToastOptions { - [Deprecated] attribute String message; [Optional, Deprecated] attribute number duration; [Optional, Deprecated] attribute (String or number) bottom; - }; [Entity=Interface] interface Button { - attribute String text; attribute String color; - +}; +[Entity=Tuple] +interface PromptSingleButton { + attribute Button value0; +}; +[Entity=Tuple] +interface PromptDoubleButtons { + attribute Button value0; + attribute (Button or undefined) value1; +}; +[Entity=Tuple] +interface PromptTripleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; +}; +[Entity=Tuple] +interface PromptQuadrupleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + attribute (Button or undefined) value3; +}; +[Entity=Tuple] +interface PromptQuintupleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + attribute (Button or undefined) value3; + attribute (Button or undefined) value4; +}; +[Entity=Tuple] +interface PromptSextupleButtons { + attribute Button value0; + attribute (Button or undefined) value1; + attribute (Button or undefined) value2; + attribute (Button or undefined) value3; + attribute (Button or undefined) value4; + attribute (Button or undefined) value5; }; [Entity=Interface] interface ShowDialogSuccessResponse { - attribute number index; - }; [Entity=Tuple, Synthetic] interface Tuple_Button_Button_Button { - attribute Button value0; [Optional] attribute Button value1; [Optional] attribute Button value2; - }; [Synthetic] callback Callback_ShowDialogSuccessResponse_Void = void (ShowDialogSuccessResponse data); @@ -41,7 +72,6 @@ callback Callback_String_String_Void = void (String data, String code); callback Callback_String_Void = void (String data); [Entity=Interface] interface ShowDialogOptions { - [Optional] attribute String title; [Optional] @@ -49,16 +79,16 @@ interface ShowDialogOptions { [Optional] attribute Tuple_Button_Button_Button buttons; [Optional] + attribute (PromptSingleButton or PromptDoubleButtons or PromptTripleButtons) buttons; + [Optional] attribute Callback_ShowDialogSuccessResponse_Void success; [Optional] attribute Callback_String_String_Void cancel; [Optional] attribute Callback_String_Void complete; - }; [Entity=Tuple, Synthetic] interface Tuple_Button_Button_Button_Button_Button_Button { - attribute Button value0; [Optional] attribute Button value1; @@ -70,7 +100,6 @@ interface Tuple_Button_Button_Button_Button_Button_Button { attribute Button value4; [Optional] attribute Button value5; - }; [Synthetic] callback Callback_Number_String_Void = void (number tapIndex, String errMsg); @@ -78,23 +107,20 @@ callback Callback_Number_String_Void = void (number tapIndex, String errMsg); callback Callback_Void = void (); [Entity=Interface] interface ShowActionMenuOptions { - [Optional] attribute String title; attribute Tuple_Button_Button_Button_Button_Button_Button buttons; + attribute (PromptSingleButton or PromptDoubleButtons or PromptTripleButtons or PromptQuadrupleButtons or PromptQuintupleButtons or PromptSextupleButtons) buttons; [Optional] attribute Callback_Number_String_Void success; [Optional] attribute Callback_String_Void fail; [Optional] attribute Callback_Void complete; - }; -[Entity=Class] +[Entity=Class, DefaultExport] interface Prompt { - static void showToast(ShowToastOptions options); static void showDialog(ShowDialogOptions options); static void showActionMenu(ShowActionMenuOptions options); - }; \ No newline at end of file diff --git a/idl/@system.request.idl b/idl/@system.request.idl index f295d34..3778c19 100644 --- a/idl/@system.request.idl +++ b/idl/@system.request.idl @@ -1,32 +1,25 @@ package system.request; [Entity=Interface, Deprecated] interface UploadResponse { - [Deprecated] attribute number code; [Deprecated] attribute String data; [Deprecated] attribute Object headers; - }; [Entity=Interface, Deprecated] interface DownloadResponse { - [Deprecated] attribute String token; - }; [Entity=Interface, Deprecated] interface OnDownloadCompleteResponse { - [Deprecated] attribute String uri; - }; [Entity=Interface, Deprecated] interface RequestFile { - [Optional, Deprecated] attribute String filename; [Optional, Deprecated] @@ -35,16 +28,13 @@ interface RequestFile { attribute String uri; [Optional, Deprecated] attribute String type; - }; [Entity=Interface, Deprecated] interface RequestData { - [Deprecated] attribute String name; [Deprecated] attribute String value; - }; [Synthetic] callback Callback_UploadResponse_Void = void (UploadResponse data); @@ -54,7 +44,6 @@ callback Callback_Any_Number_Void = void (any data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface UploadRequestOptions { - [Deprecated] attribute String url; [Optional, Deprecated] @@ -71,13 +60,11 @@ interface UploadRequestOptions { attribute Callback_Any_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Synthetic] callback Callback_DownloadResponse_Void = void (DownloadResponse data); [Entity=Interface, Deprecated] interface DownloadRequestOptions { - [Deprecated] attribute String url; [Optional, Deprecated] @@ -92,13 +79,11 @@ interface DownloadRequestOptions { attribute Callback_Any_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Synthetic] callback Callback_OnDownloadCompleteResponse_Void = void (OnDownloadCompleteResponse data); [Entity=Interface, Deprecated] interface OnDownloadCompleteOptions { - [Deprecated] attribute String token; [Optional, Deprecated] @@ -107,16 +92,13 @@ interface OnDownloadCompleteOptions { attribute Callback_Any_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Request { - [Deprecated] static void upload(UploadRequestOptions options); [Deprecated] static void download(DownloadRequestOptions options); [Deprecated] static void onDownloadComplete(OnDownloadCompleteOptions options); - }; \ No newline at end of file diff --git a/idl/@system.router.idl b/idl/@system.router.idl index 14a8deb..4111b26 100644 --- a/idl/@system.router.idl +++ b/idl/@system.router.idl @@ -1,32 +1,26 @@ package system.router; [Entity=Interface, Deprecated] interface RouterOptions { - [Deprecated] attribute String uri; [Optional, Deprecated] attribute Object params; - }; [Entity=Interface, Deprecated] interface BackRouterOptions { - [Optional, Deprecated] attribute String uri; [Optional, Deprecated] attribute Object params; - }; [Entity=Interface, Deprecated] interface RouterState { - [Deprecated] attribute number index; [Deprecated] attribute String name; [Deprecated] attribute String path; - }; [Synthetic] callback Callback_String_Void = void (String errMsg); @@ -34,7 +28,6 @@ callback Callback_String_Void = void (String errMsg); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface EnableAlertBeforeBackPageOptions { - [Deprecated] attribute String message; [Optional, Deprecated] @@ -43,29 +36,23 @@ interface EnableAlertBeforeBackPageOptions { attribute Callback_String_Void cancel; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface DisableAlertBeforeBackPageOptions { - [Optional, Deprecated] attribute Callback_String_Void success; [Optional, Deprecated] attribute Callback_String_Void cancel; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Literal] interface ParamsInterface { - [IndexSignature] Object indexSignature(String key); - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Router { - [Deprecated] static void push(RouterOptions options); [Deprecated] @@ -84,5 +71,4 @@ interface Router { static void enableAlertBeforeBackPage(EnableAlertBeforeBackPageOptions options); [Deprecated] static void disableAlertBeforeBackPage(optional DisableAlertBeforeBackPageOptions options); - }; \ No newline at end of file diff --git a/idl/@system.sensor.idl b/idl/@system.sensor.idl index 70ea5ea..1e720e5 100644 --- a/idl/@system.sensor.idl +++ b/idl/@system.sensor.idl @@ -1,14 +1,12 @@ package system.sensor; [Entity=Interface, Deprecated] interface AccelerometerResponse { - [Deprecated] attribute number x; [Deprecated] attribute number y; [Deprecated] attribute number z; - }; [Synthetic] callback Callback_AccelerometerResponse_Void = void (AccelerometerResponse data); @@ -16,205 +14,164 @@ callback Callback_AccelerometerResponse_Void = void (AccelerometerResponse data) callback Callback_String_Number_Void = void (String data, number code); [Entity=Interface, Deprecated] interface subscribeAccelerometerOptions { - [Deprecated] attribute String interval; [Deprecated] attribute Callback_AccelerometerResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface CompassResponse { - [Deprecated] attribute number direction; - }; [Synthetic] callback Callback_CompassResponse_Void = void (CompassResponse data); [Entity=Interface, Deprecated] interface SubscribeCompassOptions { - [Deprecated] attribute Callback_CompassResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface ProximityResponse { - [Deprecated] attribute number distance; - }; [Synthetic] callback Callback_ProximityResponse_Void = void (ProximityResponse data); [Entity=Interface, Deprecated] interface SubscribeProximityOptions { - [Deprecated] attribute Callback_ProximityResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface LightResponse { - [Deprecated] attribute number intensity; - }; [Synthetic] callback Callback_LightResponse_Void = void (LightResponse data); [Entity=Interface, Deprecated] interface SubscribeLightOptions { - [Deprecated] attribute Callback_LightResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface StepCounterResponse { - [Deprecated] attribute number steps; - }; [Synthetic] callback Callback_StepCounterResponse_Void = void (StepCounterResponse data); [Entity=Interface, Deprecated] interface SubscribeStepCounterOptions { - [Deprecated] attribute Callback_StepCounterResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface BarometerResponse { - [Deprecated] attribute number pressure; - }; [Synthetic] callback Callback_BarometerResponse_Void = void (BarometerResponse data); [Entity=Interface, Deprecated] interface SubscribeBarometerOptions { - [Deprecated] attribute Callback_BarometerResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface HeartRateResponse { - [Deprecated] attribute number heartRate; - }; [Synthetic] callback Callback_HeartRateResponse_Void = void (HeartRateResponse data); [Entity=Interface, Deprecated] interface SubscribeHeartRateOptions { - [Deprecated] attribute Callback_HeartRateResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface OnBodyStateResponse { - [Deprecated] attribute boolean value; - }; [Synthetic] callback Callback_OnBodyStateResponse_Void = void (OnBodyStateResponse data); [Entity=Interface, Deprecated] interface SubscribeOnBodyStateOptions { - [Deprecated] attribute Callback_OnBodyStateResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface, Deprecated] interface GetOnBodyStateOptions { - [Deprecated] attribute Callback_OnBodyStateResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface DeviceOrientationResponse { - [Deprecated] attribute number alpha; [Deprecated] attribute number beta; [Deprecated] attribute number gamma; - }; [Synthetic] callback Callback_DeviceOrientationResponse_Void = void (DeviceOrientationResponse data); [Entity=Interface, Deprecated] interface SubscribeDeviceOrientationOptions { - [Deprecated] attribute String interval; [Deprecated] attribute Callback_DeviceOrientationResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; [Entity=Interface, Deprecated] interface GyroscopeResponse { - [Deprecated] attribute number x; [Deprecated] attribute number y; [Deprecated] attribute number z; - }; [Synthetic] callback Callback_GyroscopeResponse_Void = void (GyroscopeResponse data); [Entity=Interface, Deprecated] interface SubscribeGyroscopeOptions { - [Deprecated] attribute String interval; [Deprecated] attribute Callback_GyroscopeResponse_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Sensor { - [Deprecated] static void subscribeAccelerometer(subscribeAccelerometerOptions options); [Deprecated] @@ -257,5 +214,4 @@ interface Sensor { static void subscribeGyroscope(SubscribeGyroscopeOptions options); [Deprecated] static void unsubscribeGyroscope(); - }; \ No newline at end of file diff --git a/idl/@system.storage.idl b/idl/@system.storage.idl index d19ac18..f0f3940 100644 --- a/idl/@system.storage.idl +++ b/idl/@system.storage.idl @@ -7,7 +7,6 @@ callback Callback_String_Number_Void = void (String data, number code); callback Callback_Void = void (); [Entity=Interface, Deprecated] interface GetStorageOptions { - [Deprecated] attribute String key; [Optional, Deprecated] @@ -18,11 +17,9 @@ interface GetStorageOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface SetStorageOptions { - [Deprecated] attribute String key; [Deprecated] @@ -33,22 +30,18 @@ interface SetStorageOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface ClearStorageOptions { - [Optional, Deprecated] attribute Callback_Void success; [Optional, Deprecated] attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; [Entity=Interface, Deprecated] interface DeleteStorageOptions { - [Deprecated] attribute String key; [Optional, Deprecated] @@ -57,11 +50,9 @@ interface DeleteStorageOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Storage { - [Deprecated] static void get(GetStorageOptions options); [Deprecated] @@ -70,5 +61,4 @@ interface Storage { static void clear(optional ClearStorageOptions options); [Deprecated] static void delete(DeleteStorageOptions options); - }; \ No newline at end of file diff --git a/idl/@system.vibrator.idl b/idl/@system.vibrator.idl index b6d4be2..7c7f51e 100644 --- a/idl/@system.vibrator.idl +++ b/idl/@system.vibrator.idl @@ -5,7 +5,6 @@ callback Callback_Void = void (); callback Callback_String_Number_Void = void (String data, number code); [Entity=Interface, Deprecated] interface VibrateOptions { - [Optional, Deprecated] attribute String mode; [Deprecated] @@ -14,12 +13,9 @@ interface VibrateOptions { attribute Callback_String_Number_Void fail; [Optional, Deprecated] attribute Callback_Void complete; - }; -[Entity=Class, Deprecated] +[Entity=Class, Deprecated, DefaultExport] interface Vibrator { - [Deprecated] static void vibrate(optional VibrateOptions options); - }; \ No newline at end of file diff --git a/idl/AbilityStageContext.idl b/idl/AbilityStageContext.idl deleted file mode 100644 index 03c897c..0000000 --- a/idl/AbilityStageContext.idl +++ /dev/null @@ -1,11 +0,0 @@ -package application; -import bundleManager.HapModuleInfo as HapModuleInfo; -import ohos.app.ability.Configuration as Configuration; -import application.Context as Context; -[Entity=Class] -interface AbilityStageContext: Context { - - attribute HapModuleInfo currentHapModuleInfo; - attribute Configuration config; - -}; \ No newline at end of file diff --git a/idl/AutoFillExtensionContext.idl b/idl/AutoFillExtensionContext.idl deleted file mode 100644 index 2969cd3..0000000 --- a/idl/AutoFillExtensionContext.idl +++ /dev/null @@ -1,10 +0,0 @@ -package application; -import application.ExtensionContext as ExtensionContext; -import application.CustomData as CustomData; -[Entity=Class] -interface AutoFillExtensionContext: ExtensionContext { - - [Throws] - async void reloadInModal(CustomData customData); - -}; \ No newline at end of file diff --git a/idl/DriverExtensionContext.idl b/idl/DriverExtensionContext.idl deleted file mode 100644 index 51e2689..0000000 --- a/idl/DriverExtensionContext.idl +++ /dev/null @@ -1,8 +0,0 @@ -package application; -import application.ExtensionContext as ExtensionContext; -[Entity=Class] -interface DriverExtensionContext: ExtensionContext { - - void updateDriverState(); - -}; \ No newline at end of file diff --git a/idl/EmbeddableUIAbilityContext.idl b/idl/EmbeddableUIAbilityContext.idl deleted file mode 100644 index d6ba141..0000000 --- a/idl/EmbeddableUIAbilityContext.idl +++ /dev/null @@ -1,7 +0,0 @@ -package application; -import application.UIAbilityContext as UIAbilityContext; -[Entity=Class] -interface EmbeddableUIAbilityContext: UIAbilityContext { - - -}; \ No newline at end of file diff --git a/idl/ExtensionContext.idl b/idl/ExtensionContext.idl deleted file mode 100644 index 976bae7..0000000 --- a/idl/ExtensionContext.idl +++ /dev/null @@ -1,13 +0,0 @@ -package application; -import bundleManager.HapModuleInfo as HapModuleInfo; -import ohos.app.ability.Configuration as Configuration; -import application.Context as Context; -import bundleManager.ExtensionAbilityInfo as ExtensionAbilityInfo; -[Entity=Class] -interface ExtensionContext: Context { - - attribute HapModuleInfo currentHapModuleInfo; - attribute Configuration config; - attribute ExtensionAbilityInfo extensionAbilityInfo; - -}; \ No newline at end of file diff --git a/idl/NavRouterModifier.idl b/idl/NavRouterModifier.idl deleted file mode 100644 index 644f4c6..0000000 --- a/idl/NavRouterModifier.idl +++ /dev/null @@ -1,8 +0,0 @@ -package arkui; -[Entity=Class] -interface NavRouterModifier: NavRouterAttribute { - - [Optional] - void applyNormalAttribute(NavRouterAttribute instance); - -}; \ No newline at end of file diff --git a/idl/NavigatorModifier.idl b/idl/NavigatorModifier.idl deleted file mode 100644 index dac25a7..0000000 --- a/idl/NavigatorModifier.idl +++ /dev/null @@ -1,8 +0,0 @@ -package arkui; -[Entity=Class] -interface NavigatorModifier: NavigatorAttribute { - - [Optional] - void applyNormalAttribute(NavigatorAttribute instance); - -}; \ No newline at end of file diff --git a/idl/PanelModifier.idl b/idl/PanelModifier.idl deleted file mode 100644 index a2e63a1..0000000 --- a/idl/PanelModifier.idl +++ /dev/null @@ -1,8 +0,0 @@ -package arkui; -[Entity=Class] -interface PanelModifier: PanelAttribute { - - [Optional] - void applyNormalAttribute(PanelAttribute instance); - -}; \ No newline at end of file diff --git a/idl/ParticleModifier.idl b/idl/ParticleModifier.idl deleted file mode 100644 index f4987ed..0000000 --- a/idl/ParticleModifier.idl +++ /dev/null @@ -1 +0,0 @@ -package arkui; \ No newline at end of file diff --git a/idl/SymbolGlyphModifier.idl b/idl/SymbolGlyphModifier.idl deleted file mode 100644 index 9c77fc3..0000000 --- a/idl/SymbolGlyphModifier.idl +++ /dev/null @@ -1,9 +0,0 @@ -package arkui; -[Entity=Class] -interface SymbolGlyphModifier: SymbolGlyphAttribute { - - constructor(optional Resource src); - [Optional] - void applyNormalAttribute(SymbolGlyphAttribute instance); - -}; \ No newline at end of file diff --git a/idl/TextModifier.idl b/idl/TextModifier.idl deleted file mode 100644 index bf1953e..0000000 --- a/idl/TextModifier.idl +++ /dev/null @@ -1,8 +0,0 @@ -package arkui; -[Entity=Class] -interface TextModifier: TextAttribute { - - [Optional] - void applyNormalAttribute(TextAttribute instance); - -}; \ No newline at end of file diff --git a/idl/VpnExtensionContext.idl b/idl/VpnExtensionContext.idl deleted file mode 100644 index af749c1..0000000 --- a/idl/VpnExtensionContext.idl +++ /dev/null @@ -1,7 +0,0 @@ -package application; -import application.ExtensionContext as ExtensionContext; -[Entity=Class] -interface VpnExtensionContext: ExtensionContext { - - -}; \ No newline at end of file diff --git a/idl/abilityResult.idl b/idl/ability.abilityResult.idl similarity index 60% rename from idl/abilityResult.idl rename to idl/ability.abilityResult.idl index 7135e63..632be2a 100644 --- a/idl/abilityResult.idl +++ b/idl/ability.abilityResult.idl @@ -1,10 +1,8 @@ -package ability; -import ohos.app.ability.Want as Want; +package ability.abilityResult; +import ohos.app.ability.Want.default as Want; [Entity=Interface] interface AbilityResult { - attribute number resultCode; [Optional] attribute Want want; - }; \ No newline at end of file diff --git a/idl/connectOptions.idl b/idl/ability.connectOptions.idl similarity index 61% rename from idl/connectOptions.idl rename to idl/ability.connectOptions.idl index a995439..ad4f2ff 100644 --- a/idl/connectOptions.idl +++ b/idl/ability.connectOptions.idl @@ -1,11 +1,9 @@ -package ability; -import bundleManager.ElementName as ElementName; -import ohos.rpc as rpc; +package ability.connectOptions; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.rpc.default as rpc; [Entity=Interface] interface ConnectOptions { - void onConnect(ElementName elementName, rpc.IRemoteObject remote); void onDisconnect(ElementName elementName); void onFailed(number code); - }; \ No newline at end of file diff --git a/idl/dataAbilityHelper.idl b/idl/ability.dataAbilityHelper.idl similarity index 92% rename from idl/dataAbilityHelper.idl rename to idl/ability.dataAbilityHelper.idl index b34bbd4..9c198ef 100644 --- a/idl/dataAbilityHelper.idl +++ b/idl/ability.dataAbilityHelper.idl @@ -1,10 +1,10 @@ package ability.dataAbilityHelper; import ohos.base.AsyncCallback as AsyncCallback; -import data.rdb.ResultSet as ResultSet; -import ability.DataAbilityOperation as DataAbilityOperation; -import ability.DataAbilityResult as DataAbilityResult; -import ohos.data.dataAbility as dataAbility; -import ohos.data.rdb as rdb; +import data.rdb.resultSet.ResultSet as ResultSet; +import ability.dataAbilityOperation.DataAbilityOperation as DataAbilityOperation; +import ability.dataAbilityResult.DataAbilityResult as DataAbilityResult; +import ohos.data.dataAbility.default as dataAbility; +import ohos.data.rdb.default as rdb; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] @@ -21,7 +21,6 @@ callback AsyncCallback_PacMap_Void = void (PacMap result); callback AsyncCallback_Array_DataAbilityResult_Void = void (sequence result); [Entity=Interface] interface DataAbilityHelper { - void openFile(String uri, String mode, AsyncCallback_Number_Void callback_); async number openFile(String uri, String mode); [DtsName="on", DtsTag="'dataChange'"] @@ -57,10 +56,7 @@ interface DataAbilityHelper { async PacMap call(String uri, String method, String arg, PacMap extras); void executeBatch(String uri, sequence operations, AsyncCallback_Array_DataAbilityResult_Void callback_); async sequence executeBatch(String uri, sequence operations); - }; [Entity=Interface] interface PacMap { - - }; \ No newline at end of file diff --git a/idl/dataAbilityOperation.idl b/idl/ability.dataAbilityOperation.idl similarity index 73% rename from idl/dataAbilityOperation.idl rename to idl/ability.dataAbilityOperation.idl index c641f16..5a6cd42 100644 --- a/idl/dataAbilityOperation.idl +++ b/idl/ability.dataAbilityOperation.idl @@ -1,10 +1,9 @@ -package ability; -import ohos.ability.featureAbility as featureAbility; -import ohos.data.dataAbility as dataAbility; -import ohos.data.rdb as rdb; +package ability.dataAbilityOperation; +import ohos.ability.featureAbility.default as featureAbility; +import ohos.data.dataAbility.default as dataAbility; +import ohos.data.rdb.default as rdb; [Entity=Interface] interface DataAbilityOperation { - attribute String uri; attribute featureAbility.DataAbilityOperationType type; [Optional] @@ -19,5 +18,4 @@ interface DataAbilityOperation { attribute boolean interrupted; [Optional] attribute number expectedCount; - }; \ No newline at end of file diff --git a/idl/dataAbilityResult.idl b/idl/ability.dataAbilityResult.idl similarity index 79% rename from idl/dataAbilityResult.idl rename to idl/ability.dataAbilityResult.idl index 2c61181..0ba6272 100644 --- a/idl/dataAbilityResult.idl +++ b/idl/ability.dataAbilityResult.idl @@ -1,10 +1,8 @@ -package ability; +package ability.dataAbilityResult; [Entity=Interface] interface DataAbilityResult { - [Optional] attribute String uri; [Optional] attribute number count; - }; \ No newline at end of file diff --git a/idl/startAbilityParameter.idl b/idl/ability.startAbilityParameter.idl similarity index 79% rename from idl/startAbilityParameter.idl rename to idl/ability.startAbilityParameter.idl index 8a39cb1..3f8a112 100644 --- a/idl/startAbilityParameter.idl +++ b/idl/ability.startAbilityParameter.idl @@ -1,19 +1,15 @@ -package ability; -import ohos.app.ability.Want as Want; +package ability.startAbilityParameter; +import ohos.app.ability.Want.default as Want; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface StartAbilityParameter { - attribute Want want; [Optional] attribute Literal_Empty abilityStartSetting; [Optional] attribute record abilityStartSettings; - }; \ No newline at end of file diff --git a/idl/ability_component.idl b/idl/ability_component.idl index 14b6c4c..c45fa58 100644 --- a/idl/ability_component.idl +++ b/idl/ability_component.idl @@ -1,25 +1,19 @@ -package ability_component; +import ohos.app.ability.Want.default as _default; [Entity=Literal, Synthetic] -interface Literal_Want_want { - - attribute [Import="import('../api/@ohos.app.ability.Want').default"] Want want; - +interface Literal__want { + attribute _default want; }; [Entity=Interface, Deprecated] interface AbilityComponentInterface { - [Deprecated, CallSignature] - AbilityComponentAttribute invoke(Literal_Want_want value); - + AbilityComponentAttribute invoke(Literal__want value); }; [Synthetic] callback Callback_Void = void (); [Entity=Class, Deprecated] -interface AbilityComponentAttribute: [TypeArguments="AbilityComponentAttribute"] CommonMethod { - +interface AbilityComponentAttribute: [Extends, TypeArguments="AbilityComponentAttribute"] CommonMethod { [Deprecated] AbilityComponentAttribute onConnect(Callback_Void callback_); [Deprecated] AbilityComponentAttribute onDisconnect(Callback_Void callback_); - }; \ No newline at end of file diff --git a/idl/action_sheet.idl b/idl/action_sheet.idl index 2cab589..2ddc120 100644 --- a/idl/action_sheet.idl +++ b/idl/action_sheet.idl @@ -1,25 +1,50 @@ package action_sheet; +import resource.Resource as Resource; +import units.VoidCallback as VoidCallback; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.BorderRadiuses as BorderRadiuses; +import units.LocalizedEdgeColors as LocalizedEdgeColors; +import units.EdgeColors as EdgeColors; +import units.EdgeWidths as EdgeWidths; +import units.LocalizedEdgeWidths as LocalizedEdgeWidths; +import units.EdgeStyles as EdgeStyles; +import units.LocalizedBorderRadiuses as LocalizedBorderRadiuses; +import common.Callback as Callback; +import common.DismissReason as DismissReason; +import common.Rectangle as Rectangle; +import common.BlurStyle as BlurStyle; +import common.TransitionEffect as TransitionEffect; +import common.ShadowOptions as ShadowOptions; +import common.HoverModeAreaType as HoverModeAreaType; +import common.ShadowStyle as ShadowStyle; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import DialogButtonStyle as DialogButtonStyle; +import BorderStyle as BorderStyle; +import DialogAlignment as DialogAlignment; +import ohos.promptAction.LevelOrder as LevelOrder; +import ohos.promptAction.LevelMode as LevelMode; +import ohos.promptAction.ImmersiveMode as ImmersiveMode; +import ohos.promptAction.LevelMode as _LevelMode; +import ohos.promptAction.ImmersiveMode as _ImmersiveMode; [Entity=Interface] interface SheetInfo { - attribute (String or Resource) title; [Optional] attribute (String or Resource) icon; attribute VoidCallback action; - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface DismissDialogAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - }; [Entity=Interface] interface ActionSheetButtonOptions { - [Optional] attribute boolean enabled; [Optional] @@ -28,24 +53,18 @@ interface ActionSheetButtonOptions { attribute DialogButtonStyle style; attribute (String or Resource) value; attribute VoidCallback action; - }; [Entity=Interface] interface ActionSheetOffset { - attribute (number or String or Resource) dx; attribute (number or String or Resource) dy; - }; -[Import="import('../api/@ohos.promptAction').LevelMode"] -typedef [Import="import('../api/@ohos.promptAction').LevelMode"] LevelMode LevelMode; -[Import="import('../api/@ohos.promptAction').ImmersiveMode"] -typedef [Import="import('../api/@ohos.promptAction').ImmersiveMode"] ImmersiveMode ImmersiveMode; +typedef _LevelMode LevelMode; +typedef _ImmersiveMode ImmersiveMode; [Synthetic] callback Callback_DismissDialogAction_Void = void (DismissDialogAction parameter); [Entity=Interface] interface ActionSheetOptions { - attribute (String or Resource) title; [Optional] attribute ResourceStr subtitle; @@ -113,11 +132,9 @@ interface ActionSheetOptions { attribute ImmersiveMode immersiveMode; [Optional] attribute LevelOrder levelOrder; - }; [Entity=Class] interface ActionSheet { - - static undefined show(ActionSheetOptions value); - + [Deprecated] + static void show(ActionSheetOptions value); }; \ No newline at end of file diff --git a/idl/advertisement.idl b/idl/advertising.advertisement.idl similarity index 87% rename from idl/advertisement.idl rename to idl/advertising.advertisement.idl index 4b5a5cc..b020268 100644 --- a/idl/advertisement.idl +++ b/idl/advertising.advertisement.idl @@ -1,12 +1,10 @@ -package advertising; +package advertising.advertisement; [Entity=Interface] interface Advertisement { - attribute number adType; attribute record rewardVerifyConfig; attribute String uniqueId; attribute boolean rewarded; attribute boolean shown; attribute boolean clicked; - }; \ No newline at end of file diff --git a/idl/alert_dialog.idl b/idl/alert_dialog.idl index 54608bf..ce6bc97 100644 --- a/idl/alert_dialog.idl +++ b/idl/alert_dialog.idl @@ -1,6 +1,34 @@ package alert_dialog; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.VoidCallback as VoidCallback; +import units.Offset as Offset; +import units.Dimension as Dimension; +import units.BorderRadiuses as BorderRadiuses; +import units.LocalizedBorderRadiuses as LocalizedBorderRadiuses; +import units.EdgeWidths as EdgeWidths; +import units.LocalizedEdgeWidths as LocalizedEdgeWidths; +import units.EdgeColors as EdgeColors; +import units.LocalizedEdgeColors as LocalizedEdgeColors; +import units.EdgeStyles as EdgeStyles; +import WordBreak as WordBreak; +import DialogButtonStyle as DialogButtonStyle; +import BorderStyle as BorderStyle; +import common.Rectangle as Rectangle; +import common.BlurStyle as BlurStyle; +import common.Callback as Callback; +import common.TransitionEffect as TransitionEffect; +import common.ShadowOptions as ShadowOptions; +import common.ShadowStyle as ShadowStyle; +import common.HoverModeAreaType as HoverModeAreaType; +import common.DismissReason as DismissReason; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import ohos.promptAction.LevelOrder as LevelOrder; +import ohos.promptAction.ImmersiveMode as ImmersiveMode; +import ohos.promptAction.LevelMode as LevelMode; +import ohos.promptAction.LevelOrder as _LevelOrder; dictionary DialogAlignment { - [OriginalEnumMemberName=Top] number TOP = 0; [OriginalEnumMemberName=Center] @@ -21,18 +49,14 @@ dictionary DialogAlignment { number BOTTOM_START = 8; [OriginalEnumMemberName=BottomEnd] number BOTTOM_END = 9; - }; dictionary DialogButtonDirection { - number AUTO = 0; number HORIZONTAL = 1; number VERTICAL = 2; - }; [Entity=Interface] interface AlertDialogButtonBaseOptions { - [Optional] attribute boolean enabled; [Optional] @@ -45,31 +69,24 @@ interface AlertDialogButtonBaseOptions { [Optional] attribute ResourceColor backgroundColor; attribute VoidCallback action; - }; [Entity=Interface] interface AlertDialogButtonOptions: AlertDialogButtonBaseOptions { - [Optional] attribute boolean primary; - }; [Entity=Interface] interface TextStyle_alert_dialog { - [Optional] attribute WordBreak wordBreak; - }; -[Import="import('../api/@ohos.promptAction').LevelOrder"] -typedef [Import="import('../api/@ohos.promptAction').LevelOrder"] LevelOrder LevelOrder; +typedef _LevelOrder LevelOrder; [Synthetic] callback Callback_DismissDialogAction_Void = void (DismissDialogAction parameter); [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface AlertDialogParam { - [Optional] attribute ResourceStr title; [Optional] @@ -139,40 +156,30 @@ interface AlertDialogParam { attribute ImmersiveMode immersiveMode; [Optional] attribute LevelOrder levelOrder; - }; [Entity=Interface] interface AlertDialogParamWithConfirm: AlertDialogParam { - [Optional] attribute AlertDialogButtonBaseOptions confirm; - }; [Entity=Interface] interface DismissDialogAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - }; [Entity=Interface] interface AlertDialogParamWithButtons: AlertDialogParam { - attribute AlertDialogButtonBaseOptions primaryButton; attribute AlertDialogButtonBaseOptions secondaryButton; - }; [Entity=Interface] interface AlertDialogParamWithOptions: AlertDialogParam { - attribute sequence buttons; [Optional] attribute DialogButtonDirection buttonDirection; - }; [Entity=Class] interface AlertDialog { - - static undefined show((AlertDialogParamWithConfirm or AlertDialogParamWithButtons or AlertDialogParamWithOptions) value); - + [Deprecated] + static void show((AlertDialogParamWithConfirm or AlertDialogParamWithButtons or AlertDialogParamWithOptions) value); }; \ No newline at end of file diff --git a/idl/alphabet_indexer.idl b/idl/alphabet_indexer.idl index 5fc17e9..d931365 100644 --- a/idl/alphabet_indexer.idl +++ b/idl/alphabet_indexer.idl @@ -1,27 +1,27 @@ package alphabet_indexer; +import common.CommonMethod as CommonMethod; +import common.BlurStyle as BlurStyle; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.Position as Position; +import units.Font as Font; dictionary IndexerAlign { - [OriginalEnumMemberName=Left] number LEFT = 0; [OriginalEnumMemberName=Right] number RIGHT = 1; number START = 2; number END = 3; - }; [Entity=Interface] interface AlphabetIndexerOptions { - attribute sequence arrayValue; attribute number selected; - }; [Entity=Interface] interface AlphabetIndexerInterface { - [CallSignature] AlphabetIndexerAttribute invoke(AlphabetIndexerOptions options); - }; callback OnAlphabetIndexerSelectCallback = void (number index); callback OnAlphabetIndexerPopupSelectCallback = void (number index); @@ -29,8 +29,7 @@ callback OnAlphabetIndexerRequestPopupDataCallback = sequence (number in [Synthetic] callback Callback_Number_Void = void (number index); [Entity=Class] -interface AlphabetIndexerAttribute: [TypeArguments="AlphabetIndexerAttribute"] CommonMethod { - +interface AlphabetIndexerAttribute: [Extends, TypeArguments="AlphabetIndexerAttribute"] CommonMethod { [Deprecated] AlphabetIndexerAttribute onSelected(Callback_Number_Void callback_); AlphabetIndexerAttribute color(ResourceColor value); @@ -59,5 +58,4 @@ interface AlphabetIndexerAttribute: [TypeArguments="AlphabetIndexerAttribute"] C AlphabetIndexerAttribute popupBackgroundBlurStyle(BlurStyle value); AlphabetIndexerAttribute popupTitleBackground(ResourceColor value); AlphabetIndexerAttribute enableHapticFeedback(boolean value); - }; \ No newline at end of file diff --git a/idl/animator.idl b/idl/animator.idl index 5e78e86..0c88b3a 100644 --- a/idl/animator.idl +++ b/idl/animator.idl @@ -1,42 +1,36 @@ package animator; +import common.CommonMethod as CommonMethod; +import Curve as Curve; +import AnimationStatus as AnimationStatus; +import FillMode as FillMode; +import PlayMode as PlayMode; [Entity=Class] interface SpringProp { - constructor(number mass, number stiffness, number damping); - }; [Entity=Class] interface SpringMotion { - constructor(number start, number end, number velocity, SpringProp prop); - }; [Entity=Class] interface FrictionMotion { - constructor(number friction, number position, number velocity); - }; [Entity=Class] interface ScrollMotion { - constructor(number position, number velocity, number min, number max, SpringProp prop); - }; [Entity=Interface] interface AnimatorInterface { - [CallSignature] AnimatorAttribute invoke(String value); - }; [Synthetic] callback Callback_Void = void (); [Synthetic] callback Callback_Number_Void = void (number value); [Entity=Class] -interface AnimatorAttribute: [TypeArguments="AnimatorAttribute"] CommonMethod { - +interface AnimatorAttribute: [Extends, TypeArguments="AnimatorAttribute"] CommonMethod { AnimatorAttribute state(AnimationStatus value); AnimatorAttribute duration(number value); AnimatorAttribute curve(Curve value); @@ -51,5 +45,4 @@ interface AnimatorAttribute: [TypeArguments="AnimatorAttribute"] CommonMethod { AnimatorAttribute onCancel(Callback_Void event); AnimatorAttribute onFinish(Callback_Void event); AnimatorAttribute onFrame(Callback_Number_Void event); - }; \ No newline at end of file diff --git a/idl/appVersionInfo.idl b/idl/app.appVersionInfo.idl similarity index 86% rename from idl/appVersionInfo.idl rename to idl/app.appVersionInfo.idl index e7296a3..fb53441 100644 --- a/idl/appVersionInfo.idl +++ b/idl/app.appVersionInfo.idl @@ -1,9 +1,7 @@ -package app; +package app.appVersionInfo; [Entity=Interface] interface AppVersionInfo { - readonly attribute String appName; readonly attribute number versionCode; readonly attribute String versionName; - }; \ No newline at end of file diff --git a/idl/app.context.idl b/idl/app.context.idl new file mode 100644 index 0000000..1ac775d --- /dev/null +++ b/idl/app.context.idl @@ -0,0 +1,104 @@ +package app.context; +import ohos.base.AsyncCallback as AsyncCallback; +import bundle.applicationInfo.ApplicationInfo as ApplicationInfo; +import app.processInfo.ProcessInfo as ProcessInfo; +import bundle.elementName.ElementName as ElementName; +import application.BaseContext.default as BaseContext; +import bundle.hapModuleInfo.HapModuleInfo as HapModuleInfo; +import app.appVersionInfo.AppVersionInfo as AppVersionInfo; +import bundle.abilityInfo.AbilityInfo as AbilityInfo; +import ohos.bundle.default as bundle; +[Async, Synthetic] +callback AsyncCallback_String_Void = void (String result); +[Async, Synthetic] +callback AsyncCallback_Number_Void = void (number result); +[Async, Synthetic] +callback AsyncCallback_PermissionRequestResult_Void = void (PermissionRequestResult result); +[Async, Synthetic] +callback AsyncCallback_ApplicationInfo_Void = void (ApplicationInfo result); +[Async, Synthetic] +callback AsyncCallback_Bundle_DisplayOrientation_Void = void (bundle.DisplayOrientation result); +[Async, Synthetic] +callback AsyncCallback_Void = void (); +[Async, Synthetic] +callback AsyncCallback_ProcessInfo_Void = void (ProcessInfo result); +[Async, Synthetic] +callback AsyncCallback_ElementName_Void = void (ElementName result); +[Async, Synthetic] +callback AsyncCallback_HapModuleInfo_Void = void (HapModuleInfo result); +[Async, Synthetic] +callback AsyncCallback_AppVersionInfo_Void = void (AppVersionInfo result); +[Async, Synthetic] +callback AsyncCallback_AbilityInfo_Void = void (AbilityInfo result); +[Async, Synthetic] +callback AsyncCallback_Boolean_Void = void (boolean result); +[Entity=Interface] +interface Context: BaseContext { + async String getOrCreateLocalDir(); + void getOrCreateLocalDir(AsyncCallback_String_Void callback_); + async number verifyPermission(String permission, optional PermissionOptions options); + void verifyPermission(String permission, PermissionOptions options, AsyncCallback_Number_Void callback_); + void verifyPermission(String permission, AsyncCallback_Number_Void callback_); + void requestPermissionsFromUser(sequence permissions, number requestCode, AsyncCallback_PermissionRequestResult_Void resultCallback); + async PermissionRequestResult requestPermissionsFromUser(sequence permissions, number requestCode); + void getApplicationInfo(AsyncCallback_ApplicationInfo_Void callback_); + async ApplicationInfo getApplicationInfo(); + void getBundleName(AsyncCallback_String_Void callback_); + async String getBundleName(); + void getDisplayOrientation(AsyncCallback_Bundle_DisplayOrientation_Void callback_); + async bundle.DisplayOrientation getDisplayOrientation(); + [Deprecated] + void getExternalCacheDir(AsyncCallback_String_Void callback_); + [Deprecated] + async String getExternalCacheDir(); + void setDisplayOrientation(bundle.DisplayOrientation orientation, AsyncCallback_Void callback_); + async void setDisplayOrientation(bundle.DisplayOrientation orientation); + [Deprecated] + void setShowOnLockScreen(boolean show, AsyncCallback_Void callback_); + [Deprecated] + async void setShowOnLockScreen(boolean show); + [Deprecated] + void setWakeUpScreen(boolean wakeUp, AsyncCallback_Void callback_); + [Deprecated] + async void setWakeUpScreen(boolean wakeUp); + void getProcessInfo(AsyncCallback_ProcessInfo_Void callback_); + async ProcessInfo getProcessInfo(); + void getElementName(AsyncCallback_ElementName_Void callback_); + async ElementName getElementName(); + void getProcessName(AsyncCallback_String_Void callback_); + async String getProcessName(); + void getCallingBundle(AsyncCallback_String_Void callback_); + async String getCallingBundle(); + void getFilesDir(AsyncCallback_String_Void callback_); + async String getFilesDir(); + void getCacheDir(AsyncCallback_String_Void callback_); + async String getCacheDir(); + async String getOrCreateDistributedDir(); + void getOrCreateDistributedDir(AsyncCallback_String_Void callback_); + void getAppType(AsyncCallback_String_Void callback_); + async String getAppType(); + void getHapModuleInfo(AsyncCallback_HapModuleInfo_Void callback_); + async HapModuleInfo getHapModuleInfo(); + void getAppVersionInfo(AsyncCallback_AppVersionInfo_Void callback_); + async AppVersionInfo getAppVersionInfo(); + Context getApplicationContext(); + void getAbilityInfo(AsyncCallback_AbilityInfo_Void callback_); + async AbilityInfo getAbilityInfo(); + void isUpdatingConfigurations(AsyncCallback_Boolean_Void callback_); + async boolean isUpdatingConfigurations(); + void printDrawnCompleted(AsyncCallback_Void callback_); + async void printDrawnCompleted(); +}; +[Entity=Interface] +interface PermissionRequestResult { + attribute number requestCode; + attribute sequence permissions; + attribute sequence authResults; +}; +[Entity=Interface] +interface PermissionOptions { + [Optional] + attribute number pid; + [Optional] + attribute number uid; +}; \ No newline at end of file diff --git a/idl/processInfo.idl b/idl/app.processInfo.idl similarity index 80% rename from idl/processInfo.idl rename to idl/app.processInfo.idl index 9929755..cd72180 100644 --- a/idl/processInfo.idl +++ b/idl/app.processInfo.idl @@ -1,8 +1,6 @@ -package app; +package app.processInfo; [Entity=Interface] interface ProcessInfo { - attribute number pid; attribute String processName; - }; \ No newline at end of file diff --git a/idl/AbilityDelegator.idl b/idl/application.AbilityDelegator.idl similarity index 88% rename from idl/AbilityDelegator.idl rename to idl/application.AbilityDelegator.idl index 0d26e5e..13ab136 100644 --- a/idl/AbilityDelegator.idl +++ b/idl/application.AbilityDelegator.idl @@ -1,12 +1,12 @@ -package application; +package application.AbilityDelegator; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.app.ability.UIAbility as UIAbility; -import ohos.app.ability.AbilityStage as AbilityStage; -import application.AbilityMonitor as AbilityMonitor; -import application.AbilityStageMonitor as AbilityStageMonitor; -import application.Context as Context; -import ohos.app.ability.Want as Want; +import application.AbilityMonitor.AbilityMonitor as AbilityMonitor; +import application.Context.default as Context; +import ohos.app.ability.Want.default as Want; import application.shellCmdResult.ShellCmdResult as ShellCmdResult; +import ohos.app.ability.UIAbility.default as UIAbility; +import ohos.app.ability.AbilityStage.default as AbilityStage; +import application.AbilityStageMonitor.AbilityStageMonitor as AbilityStageMonitor; [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] @@ -15,9 +15,8 @@ callback AsyncCallback_UIAbility_Void = void (UIAbility result); callback AsyncCallback_AbilityStage_Void = void (AbilityStage result); [Async, Synthetic] callback AsyncCallback_ShellCmdResult_Void = void (ShellCmdResult result); -[Entity=Interface] +[Entity=Interface, DefaultExport] interface AbilityDelegator { - [Throws] void addAbilityMonitor(AbilityMonitor monitor, AsyncCallback_Void callback_); [Throws] @@ -86,5 +85,4 @@ interface AbilityDelegator { async void finishTest(String msg, number code); [Throws] void setMockList(record mockList); - }; \ No newline at end of file diff --git a/idl/AbilityFirstFrameStateData.idl b/idl/application.AbilityFirstFrameStateData.idl similarity index 71% rename from idl/AbilityFirstFrameStateData.idl rename to idl/application.AbilityFirstFrameStateData.idl index bfede49..cb2fb6b 100644 --- a/idl/AbilityFirstFrameStateData.idl +++ b/idl/application.AbilityFirstFrameStateData.idl @@ -1,11 +1,9 @@ -package application; -[Entity=Interface] +package application.AbilityFirstFrameStateData; +[Entity=Interface, DefaultExport] interface AbilityFirstFrameStateData { - attribute String bundleName; attribute String moduleName; attribute String abilityName; attribute number appIndex; attribute boolean isColdStart; - }; \ No newline at end of file diff --git a/idl/AbilityFirstFrameStateObserver.idl b/idl/application.AbilityFirstFrameStateObserver.idl similarity index 37% rename from idl/AbilityFirstFrameStateObserver.idl rename to idl/application.AbilityFirstFrameStateObserver.idl index d398a2c..3b21662 100644 --- a/idl/AbilityFirstFrameStateObserver.idl +++ b/idl/application.AbilityFirstFrameStateObserver.idl @@ -1,8 +1,6 @@ -package application; -import application.AbilityFirstFrameStateData as AbilityFirstFrameStateData; -[Entity=Interface] +package application.AbilityFirstFrameStateObserver; +import application.AbilityFirstFrameStateData.AbilityFirstFrameStateData as AbilityFirstFrameStateData; +[Entity=Interface, DefaultExport] interface AbilityFirstFrameStateObserver { - void onAbilityFirstFrameDrawn(AbilityFirstFrameStateData data); - }; \ No newline at end of file diff --git a/idl/AbilityForegroundStateObserver.idl b/idl/application.AbilityForegroundStateObserver.idl similarity index 43% rename from idl/AbilityForegroundStateObserver.idl rename to idl/application.AbilityForegroundStateObserver.idl index 1fd803d..48d5455 100644 --- a/idl/AbilityForegroundStateObserver.idl +++ b/idl/application.AbilityForegroundStateObserver.idl @@ -1,8 +1,6 @@ -package application; -import application.AbilityStateData as AbilityStateData; -[Entity=Class] +package application.AbilityForegroundStateObserver; +import application.AbilityStateData.default as AbilityStateData; +[Entity=Class, DefaultExport] interface AbilityForegroundStateObserver { - void onAbilityStateChanged(AbilityStateData abilityStateData); - }; \ No newline at end of file diff --git a/idl/AbilityMonitor.idl b/idl/application.AbilityMonitor.idl similarity index 84% rename from idl/AbilityMonitor.idl rename to idl/application.AbilityMonitor.idl index 0a3bcf3..f11beba 100644 --- a/idl/AbilityMonitor.idl +++ b/idl/application.AbilityMonitor.idl @@ -1,10 +1,9 @@ -package application; -import ohos.app.ability.UIAbility as UIAbility; +package application.AbilityMonitor; +import ohos.app.ability.UIAbility.default as UIAbility; [Synthetic] callback Callback_UIAbility_Void = void (UIAbility ability); -[Entity=Interface] +[Entity=Interface, DefaultExport] interface AbilityMonitor { - attribute String abilityName; [Optional] attribute String moduleName; @@ -22,5 +21,4 @@ interface AbilityMonitor { attribute Callback_UIAbility_Void onWindowStageRestore; [Optional] attribute Callback_UIAbility_Void onWindowStageDestroy; - }; \ No newline at end of file diff --git a/idl/AbilityRunningInfo.idl b/idl/application.AbilityRunningInfo.idl similarity index 60% rename from idl/AbilityRunningInfo.idl rename to idl/application.AbilityRunningInfo.idl index 742fdbc..655a601 100644 --- a/idl/AbilityRunningInfo.idl +++ b/idl/application.AbilityRunningInfo.idl @@ -1,14 +1,12 @@ -package application; -import bundleManager.ElementName as ElementName; -import ohos.app.ability.abilityManager as abilityManager; +package application.AbilityRunningInfo; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.app.ability.abilityManager.default as abilityManager; [Entity=Interface] interface AbilityRunningInfo { - attribute ElementName ability; attribute number pid; attribute number uid; attribute String processName; attribute number startTime; attribute abilityManager.AbilityState abilityState; - }; \ No newline at end of file diff --git a/idl/application.AbilityStageContext.idl b/idl/application.AbilityStageContext.idl new file mode 100644 index 0000000..d66016d --- /dev/null +++ b/idl/application.AbilityStageContext.idl @@ -0,0 +1,9 @@ +package application.AbilityStageContext; +import bundleManager.HapModuleInfo.HapModuleInfo as HapModuleInfo; +import ohos.app.ability.Configuration.Configuration as Configuration; +import application.Context.default as Context; +[Entity=Class, DefaultExport] +interface AbilityStageContext: [Extends] Context { + attribute HapModuleInfo currentHapModuleInfo; + attribute Configuration config; +}; \ No newline at end of file diff --git a/idl/AbilityStageMonitor.idl b/idl/application.AbilityStageMonitor.idl similarity index 57% rename from idl/AbilityStageMonitor.idl rename to idl/application.AbilityStageMonitor.idl index b4a4366..cd3d730 100644 --- a/idl/AbilityStageMonitor.idl +++ b/idl/application.AbilityStageMonitor.idl @@ -1,8 +1,6 @@ -package application; -[Entity=Interface] +package application.AbilityStageMonitor; +[Entity=Interface, DefaultExport] interface AbilityStageMonitor { - attribute String moduleName; attribute String srcEntrance; - }; \ No newline at end of file diff --git a/idl/AbilityStartCallback.idl b/idl/application.AbilityStartCallback.idl similarity index 53% rename from idl/AbilityStartCallback.idl rename to idl/application.AbilityStartCallback.idl index 30945ab..7d3c918 100644 --- a/idl/AbilityStartCallback.idl +++ b/idl/application.AbilityStartCallback.idl @@ -1,10 +1,8 @@ -package application; -import ability.AbilityResult as AbilityResult; -[Entity=Class] +package application.AbilityStartCallback; +import ability.abilityResult.AbilityResult as AbilityResult; +[Entity=Class, DefaultExport] interface AbilityStartCallback { - void onError(number code, String name, String message); [Optional] void onResult(AbilityResult parameter); - }; \ No newline at end of file diff --git a/idl/AbilityStateData.idl b/idl/application.AbilityStateData.idl similarity index 83% rename from idl/AbilityStateData.idl rename to idl/application.AbilityStateData.idl index 7479e60..69a7e2e 100644 --- a/idl/AbilityStateData.idl +++ b/idl/application.AbilityStateData.idl @@ -1,7 +1,6 @@ -package application; -[Entity=Class] +package application.AbilityStateData; +[Entity=Class, DefaultExport] interface AbilityStateData { - attribute String moduleName; attribute String bundleName; attribute String abilityName; @@ -12,5 +11,4 @@ interface AbilityStateData { attribute boolean isAtomicService; [Optional] attribute number appCloneIndex; - }; \ No newline at end of file diff --git a/idl/AccessibilityExtensionContext.idl b/idl/application.AccessibilityExtensionContext.idl similarity index 53% rename from idl/AccessibilityExtensionContext.idl rename to idl/application.AccessibilityExtensionContext.idl index b43ed59..b7b46a4 100644 --- a/idl/AccessibilityExtensionContext.idl +++ b/idl/application.AccessibilityExtensionContext.idl @@ -1,19 +1,22 @@ -package application; +package application.AccessibilityExtensionContext; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.BusinessError as BusinessError; -import application.ExtensionContext as ExtensionContext; -import ohos.accessibility as accessibility; -import ohos.accessibility.GesturePath as GesturePath; -import ohos.app.ability.Want as Want; +import ohos.base.Callback as Callback; +import application.ExtensionContext.default as ExtensionContext; +import ohos.accessibility.default as accessibility; +import ohos.accessibility.GesturePath.GesturePath as GesturePath; +import ohos.app.ability.Want.default as Want; +import ohos.accessibility.AccessibilityAction as AccessibilityAction; [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] callback AsyncCallback_AccessibilityElement_Void = void (AccessibilityElement result); [Async, Synthetic] callback AsyncCallback_Array_AccessibilityElement_Void = void (sequence result); -[Entity=Class] -interface AccessibilityExtensionContext: ExtensionContext { - +[Synthetic] +callback Callback_Void = void (); +[Entity=Class, DefaultExport] +interface AccessibilityExtensionContext: [Extends] ExtensionContext { [Deprecated, Throws] void setTargetBundleName(sequence targetNames, AsyncCallback_Void callback_); [Deprecated, Throws] @@ -48,7 +51,22 @@ interface AccessibilityExtensionContext: ExtensionContext { async sequence getElements(number windowId, optional number elementId); [Throws] async sequence getDefaultFocusedElementIds(number windowId); - + [Throws] + void holdRunningLockSync(); + [Throws] + void unholdRunningLockSync(); + [Throws, DtsName="on", DtsTag="'preDisconnect'"] + void onPreDisconnect(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'preDisconnect'"] + void offPreDisconnect(optional Callback_Void callback_); + [Throws] + void notifyDisconnect(); + [Throws] + async AccessibilityElement getAccessibilityFocusedElement(); + [Throws] + async AccessibilityElement getRootInActiveWindow(optional number windowId); + [Throws] + sequence getAccessibilityWindowsSync(optional number displayId); }; [Async, Synthetic] callback AsyncCallback_Array_T_Void = void (sequence result); @@ -60,14 +78,141 @@ callback AsyncCallback_Array_String_Void = void (sequence result); callback AsyncCallback_Number_Void = void (number result); [Entity=Interface] interface AccessibilityElement { - - [Deprecated, TypeParameters="T extends keyof ElementAttributeValues"] + [Optional] + attribute boolean accessibilityFocused; + [Optional] + attribute String bundleName; + [Optional] + attribute boolean checkable; + [Optional] + attribute boolean checked; + [Optional] + attribute boolean clickable; + [Optional] + attribute number componentId; + [Optional] + attribute String componentType; + [Optional] + attribute sequence contents; + [Optional] + attribute number currentIndex; + [Optional] + attribute String description; + [Optional] + attribute boolean editable; + [Optional] + attribute number endIndex; + [Optional] + attribute String error; + [Optional] + attribute boolean focusable; + [Optional] + attribute String hintText; + [Optional] + attribute number inputType; + [Optional] + attribute String inspectorKey; + [Optional] + attribute boolean isActive; + [Optional] + attribute boolean isEnable; + [Optional] + attribute boolean isHint; + [Optional] + attribute boolean isFocused; + [Optional] + attribute boolean isPassword; + [Optional] + attribute boolean isVisible; + [Optional] + attribute number itemCount; + [Optional] + attribute String lastContent; + [Optional] + attribute number layer; + [Optional] + attribute boolean longClickable; + [Optional] + attribute number pageId; + [Optional] + attribute boolean pluralLineSupported; + [Optional] + attribute Rect rect; + [Optional] + attribute String resourceName; + [Optional] + attribute Rect screenRect; + [Optional] + attribute boolean scrollable; + [Optional] + attribute boolean selected; + [Optional] + attribute number startIndex; + [Optional] + attribute String text; + [Optional] + attribute number textLengthLimit; + [Optional] + attribute accessibility.TextMoveUnit textMoveUnit; + [Optional] + attribute AccessibilityAction triggerAction; + [Optional] + attribute WindowType type; + [Optional] + attribute number valueMax; + [Optional] + attribute number valueMin; + [Optional] + attribute number valueNow; + [Optional] + attribute number windowId; + [Optional] + attribute number offset; + [Optional] + attribute String textType; + [Optional] + attribute String accessibilityText; + [Optional] + attribute Rect hotArea; + [Optional] + attribute String customComponentType; + [Optional] + attribute number accessibilityNextFocusId; + [Optional] + attribute number accessibilityPreviousFocusId; + [Optional] + attribute String extraInfo; + [Optional] + attribute boolean accessibilityScrollable; + [Optional] + attribute sequence supportedActionNames; + [Optional] + attribute boolean accessibilityGroup; + [Optional] + attribute String accessibilityLevel; + [Optional] + attribute number navDestinationId; + [Optional] + attribute AccessibilityGrid currentItem; + [Optional] + attribute sequence spans; + [Optional] + attribute boolean accessibilityVisible; + [Optional] + attribute number mainWindowId; + [Optional] + attribute boolean clip; + [Optional] + attribute number parentId; + [Optional] + attribute sequence childrenIds; + [Deprecated, TypeParameters="T"] void attributeNames(AsyncCallback_Array_T_Void callback_); - [Deprecated, TypeParameters="T extends keyof ElementAttributeValues"] + [Deprecated, TypeParameters="T"] async sequence attributeNames(); - [Deprecated, Throws, TypeParameters="T extends keyof ElementAttributeValues"] + [Deprecated, Throws, TypeParameters="T"] void attributeValue(T attributeName, AsyncCallback_String_Void callback_); - [Deprecated, Throws, TypeParameters="T extends keyof ElementAttributeValues"] + [Deprecated, Throws, TypeParameters="T"] async String attributeValue(T attributeName); [Deprecated] void actionNames(AsyncCallback_Array_String_Void callback_); @@ -99,11 +244,55 @@ interface AccessibilityElement { async sequence findElementTextType(String condition); [Throws, DtsName="findElement", DtsTag="'elementId'"] async AccessibilityElement findElementElementId(number condition); - + [Throws] + async void executeAction(AccessibilityAction action, optional Parameter parameters); + [Throws] + async AccessibilityElement getParent(); + [Throws] + async sequence getChildren(); + [Throws] + async AccessibilityElement getRoot(); + [Throws] + async sequence findElementByContent(String condition); + [Throws] + async AccessibilityElement findElementByFocusDirection(FocusDirection condition); + [Throws] + async sequence findElementsByAccessibilityHintText(String condition); + [Throws] + async AccessibilityElement findElementById(number condition); +}; +[Entity=Interface] +interface AccessibilityGrid { + attribute number rowIndex; + attribute number columnIndex; +}; +[Entity=Interface] +interface AccessibilitySpan { + attribute number spanId; + attribute String spanText; + attribute String accessibilityText; + attribute String accessibilityDescription; + attribute String accessibilityLevel; +}; +[Entity=Class] +interface Parameter { + [Optional] + attribute String setText; + [Optional] + attribute String selectTextBegin; + [Optional] + attribute String selectTextEnd; + [Optional] + attribute boolean selectTextInForWard; + [Optional] + attribute String offset; + [Optional] + attribute String spanId; + [Optional] + attribute String scrollType; }; [Entity=Interface] interface ElementAttributeValues { - attribute boolean accessibilityFocused; attribute String bundleName; attribute boolean checkable; @@ -165,17 +354,14 @@ interface ElementAttributeValues { attribute number accessibilityPreviousFocusId; [Optional] attribute boolean accessibilityScrollable; - }; typedef String FocusDirection; typedef String FocusType; typedef String WindowType; [Entity=Interface] interface Rect { - attribute number left; attribute number top; attribute number width; attribute number height; - }; \ No newline at end of file diff --git a/idl/AppForegroundStateObserver.idl b/idl/application.AppForegroundStateObserver.idl similarity index 41% rename from idl/AppForegroundStateObserver.idl rename to idl/application.AppForegroundStateObserver.idl index 42e2a0b..b7df622 100644 --- a/idl/AppForegroundStateObserver.idl +++ b/idl/application.AppForegroundStateObserver.idl @@ -1,8 +1,6 @@ -package application; -import application.AppStateData as AppStateData; -[Entity=Class] +package application.AppForegroundStateObserver; +import application.AppStateData.default as AppStateData; +[Entity=Class, DefaultExport] interface AppForegroundStateObserver { - void onAppStateChanged(AppStateData appStateData); - }; \ No newline at end of file diff --git a/idl/application.AppServiceExtensionContext.idl b/idl/application.AppServiceExtensionContext.idl new file mode 100644 index 0000000..139605b --- /dev/null +++ b/idl/application.AppServiceExtensionContext.idl @@ -0,0 +1,16 @@ +package application.AppServiceExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; +[Entity=Class, DefaultExport] +interface AppServiceExtensionContext: [Extends] ExtensionContext { + [Throws] + number connectServiceExtensionAbility(Want want, ConnectOptions callback_); + [Throws] + async void disconnectServiceExtensionAbility(number connection); + [Throws] + async void startAbility(Want want, optional StartOptions options); + [Throws] + async void terminateSelf(); +}; \ No newline at end of file diff --git a/idl/AppStateData.idl b/idl/application.AppStateData.idl similarity index 75% rename from idl/AppStateData.idl rename to idl/application.AppStateData.idl index 11d0c38..6676436 100644 --- a/idl/AppStateData.idl +++ b/idl/application.AppStateData.idl @@ -1,11 +1,9 @@ -package application; -[Entity=Class] +package application.AppStateData; +[Entity=Class, DefaultExport] interface AppStateData { - attribute String bundleName; attribute number uid; attribute number state; attribute boolean isSplitScreenMode; attribute boolean isFloatingWindowMode; - }; \ No newline at end of file diff --git a/idl/ApplicationContext.idl b/idl/application.ApplicationContext.idl similarity index 76% rename from idl/ApplicationContext.idl rename to idl/application.ApplicationContext.idl index bc41636..bafb529 100644 --- a/idl/ApplicationContext.idl +++ b/idl/application.ApplicationContext.idl @@ -1,33 +1,32 @@ -package application; +package application.ApplicationContext; +import application.Context.default as Context; import ohos.base.AsyncCallback as AsyncCallback; -import application.Context as Context; -import ohos.app.ability.AbilityLifecycleCallback as AbilityLifecycleCallback; -import ohos.app.ability.EnvironmentCallback as EnvironmentCallback; -import ohos.app.ability.ApplicationStateChangeCallback as ApplicationStateChangeCallback; -import application.ProcessInformation as ProcessInformation; -import ohos.app.ability.ConfigurationConstant as ConfigurationConstant; -import ohos.app.ability.Want as Want; +import application.ProcessInformation.ProcessInformation as ProcessInformation; +import ohos.app.ability.ConfigurationConstant.default as ConfigurationConstant; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.AbilityLifecycleCallback.default as AbilityLifecycleCallback; +import ohos.app.ability.EnvironmentCallback.default as EnvironmentCallback; +import ohos.app.ability.ApplicationStateChangeCallback.default as ApplicationStateChangeCallback; [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] callback AsyncCallback_Array_ProcessInformation_Void = void (sequence result); -[Entity=Class] -interface ApplicationContext: Context { - +[Entity=Class, DefaultExport] +interface ApplicationContext: [Extends] Context { [Throws, DtsName="on", DtsTag="'abilityLifecycle'"] number onAbilityLifecycle(AbilityLifecycleCallback callback_); + [Throws, DtsName="on", DtsTag="'environment'"] + number onEnvironment(EnvironmentCallback callback_); + [Throws, DtsName="on", DtsTag="'applicationStateChange'"] + void onApplicationStateChange(ApplicationStateChangeCallback callback_); [Throws, DtsName="off", DtsTag="'abilityLifecycle'"] void offAbilityLifecycle(number callbackId, AsyncCallback_Void callback_); [Throws, DtsName="off", DtsTag="'abilityLifecycle'"] async void offAbilityLifecycle(number callbackId); - [Throws, DtsName="on", DtsTag="'environment'"] - number onEnvironment(EnvironmentCallback callback_); [Throws, DtsName="off", DtsTag="'environment'"] void offEnvironment(number callbackId, AsyncCallback_Void callback_); [Throws, DtsName="off", DtsTag="'environment'"] async void offEnvironment(number callbackId); - [Throws, DtsName="on", DtsTag="'applicationStateChange'"] - void onApplicationStateChange(ApplicationStateChangeCallback callback_); [Throws, DtsName="off", DtsTag="'applicationStateChange'"] void offApplicationStateChange(optional ApplicationStateChangeCallback callback_); [Throws] @@ -39,7 +38,7 @@ interface ApplicationContext: Context { [Throws] async void killAllProcesses(boolean clearPageStack); [Throws] - undefined killAllProcesses(AsyncCallback_Void callback_); + void killAllProcesses(AsyncCallback_Void callback_); [Throws] void setColorMode(ConfigurationConstant.ColorMode colorMode); [Throws] @@ -64,5 +63,4 @@ interface ApplicationContext: Context { String getCurrentInstanceKey(); [Throws] async sequence getAllRunningInstanceKeys(); - }; \ No newline at end of file diff --git a/idl/ApplicationStateObserver.idl b/idl/application.ApplicationStateObserver.idl similarity index 65% rename from idl/ApplicationStateObserver.idl rename to idl/application.ApplicationStateObserver.idl index de3604b..f35dc65 100644 --- a/idl/ApplicationStateObserver.idl +++ b/idl/application.ApplicationStateObserver.idl @@ -1,10 +1,9 @@ -package application; -import application.AppStateData as AppStateData; -import application.AbilityStateData as AbilityStateData; -import application as _ProcessData; -[Entity=Class] +package application.ApplicationStateObserver; +import application.AppStateData.default as AppStateData; +import application.AbilityStateData.default as AbilityStateData; +import application.ProcessData as _ProcessData; +[Entity=Class, DefaultExport] interface ApplicationStateObserver { - void onForegroundApplicationChanged(AppStateData appStateData); void onAbilityStateChanged(AbilityStateData abilityStateData); void onProcessCreated(ProcessData processData); @@ -12,6 +11,5 @@ interface ApplicationStateObserver { void onProcessStateChanged(ProcessData processData); void onAppStarted(AppStateData appStateData); void onAppStopped(AppStateData appStateData); - }; typedef _ProcessData.default ProcessData; \ No newline at end of file diff --git a/idl/application.AutoFillExtensionContext.idl b/idl/application.AutoFillExtensionContext.idl new file mode 100644 index 0000000..42c6ede --- /dev/null +++ b/idl/application.AutoFillExtensionContext.idl @@ -0,0 +1,8 @@ +package application.AutoFillExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import application.CustomData.default as CustomData; +[Entity=Class, DefaultExport] +interface AutoFillExtensionContext: [Extends] ExtensionContext { + [Throws] + async void reloadInModal(CustomData customData); +}; \ No newline at end of file diff --git a/idl/AutoFillPopupConfig.idl b/idl/application.AutoFillPopupConfig.idl similarity index 88% rename from idl/AutoFillPopupConfig.idl rename to idl/application.AutoFillPopupConfig.idl index 2667f6b..09fcdce 100644 --- a/idl/AutoFillPopupConfig.idl +++ b/idl/application.AutoFillPopupConfig.idl @@ -1,22 +1,17 @@ -package application; -[Entity=Interface] +package application.AutoFillPopupConfig; +[Entity=Interface, DefaultExport] interface AutoFillPopupConfig { - [Optional] attribute PopupSize popupSize; [Optional] attribute PopupPlacement placement; - }; [Entity=Interface] interface PopupSize { - attribute number width; attribute number height; - }; dictionary PopupPlacement { - number LEFT = 0; number RIGHT = 1; number TOP = 2; @@ -30,5 +25,4 @@ dictionary PopupPlacement { number RIGHT_TOP = 10; number RIGHT_BOTTOM = 11; number NONE = 12; - }; \ No newline at end of file diff --git a/idl/AutoFillRect.idl b/idl/application.AutoFillRect.idl similarity index 66% rename from idl/AutoFillRect.idl rename to idl/application.AutoFillRect.idl index a8d7f03..655ae69 100644 --- a/idl/AutoFillRect.idl +++ b/idl/application.AutoFillRect.idl @@ -1,10 +1,8 @@ -package application; -[Entity=Interface] +package application.AutoFillRect; +[Entity=Interface, DefaultExport] interface AutoFillRect { - attribute number left; attribute number top; attribute number width; attribute number height; - }; \ No newline at end of file diff --git a/idl/AutoFillRequest.idl b/idl/application.AutoFillRequest.idl similarity index 78% rename from idl/AutoFillRequest.idl rename to idl/application.AutoFillRequest.idl index ff07565..16815f3 100644 --- a/idl/AutoFillRequest.idl +++ b/idl/application.AutoFillRequest.idl @@ -1,38 +1,29 @@ package application.AutoFillRequest; -import application.AutoFillType as AutoFillType; -import application.CustomData as CustomData; -import application.AutoFillPopupConfig as AutoFillPopupConfig; -import application.ViewData as ViewData; +import application.AutoFillType.AutoFillType as AutoFillType; +import application.CustomData.default as CustomData; +import application.AutoFillPopupConfig.default as AutoFillPopupConfig; +import application.ViewData.default as ViewData; [Entity=Interface] interface FillRequest { - attribute AutoFillType type; attribute ViewData viewData; attribute CustomData customData; attribute boolean isPopup; - }; [Entity=Interface] interface SaveRequest { - attribute ViewData viewData; - }; [Entity=Interface] interface UpdateRequest { - attribute ViewData viewData; - }; [Entity=Interface] interface FillResponse { - attribute ViewData viewData; - }; [Entity=Interface] interface FillRequestCallback { - [Throws] void onSuccess(FillResponse response); [Throws] @@ -41,14 +32,11 @@ interface FillRequestCallback { void onCancel(optional String fillContent); [Throws] void setAutoFillPopupConfig(AutoFillPopupConfig autoFillPopupConfig); - }; [Entity=Interface] interface SaveRequestCallback { - [Throws] void onSuccess(); [Throws] void onFailure(); - }; \ No newline at end of file diff --git a/idl/AutoFillType.idl b/idl/application.AutoFillType.idl similarity index 97% rename from idl/AutoFillType.idl rename to idl/application.AutoFillType.idl index 6b1698e..0a01ada 100644 --- a/idl/AutoFillType.idl +++ b/idl/application.AutoFillType.idl @@ -1,6 +1,5 @@ -package application; +package application.AutoFillType; dictionary AutoFillType { - number UNSPECIFIED = 0; number PASSWORD = 1; number USER_NAME = 2; @@ -35,5 +34,4 @@ dictionary AutoFillType { number LICENSE_PLATE = 36; number ENGINE_NUMBER = 37; number LICENSE_CHASSIS_NUMBER = 38; - }; \ No newline at end of file diff --git a/idl/AutoStartupCallback.idl b/idl/application.AutoStartupCallback.idl similarity index 47% rename from idl/AutoStartupCallback.idl rename to idl/application.AutoStartupCallback.idl index f5549f9..8dc64c5 100644 --- a/idl/AutoStartupCallback.idl +++ b/idl/application.AutoStartupCallback.idl @@ -1,9 +1,7 @@ -package application; -import application.AutoStartupInfo as AutoStartupInfo; -[Entity=Interface] +package application.AutoStartupCallback; +import application.AutoStartupInfo.AutoStartupInfo as AutoStartupInfo; +[Entity=Interface, DefaultExport] interface AutoStartupCallback { - void onAutoStartupOn(AutoStartupInfo info); void onAutoStartupOff(AutoStartupInfo info); - }; \ No newline at end of file diff --git a/idl/AutoStartupInfo.idl b/idl/application.AutoStartupInfo.idl similarity index 50% rename from idl/AutoStartupInfo.idl rename to idl/application.AutoStartupInfo.idl index cb16ae7..2fe1439 100644 --- a/idl/AutoStartupInfo.idl +++ b/idl/application.AutoStartupInfo.idl @@ -1,7 +1,6 @@ -package application; -[Entity=Interface] +package application.AutoStartupInfo; +[Entity=Interface, DefaultExport] interface AutoStartupInfo { - attribute String bundleName; [Optional] attribute String moduleName; @@ -10,5 +9,10 @@ interface AutoStartupInfo { attribute String abilityTypeName; [Optional] attribute number appCloneIndex; - + [Optional] + readonly attribute number userId; + [Optional] + readonly attribute number setterUserId; + [Optional] + readonly attribute boolean canUserModify; }; \ No newline at end of file diff --git a/idl/BaseContext.idl b/idl/application.BaseContext.idl similarity index 48% rename from idl/BaseContext.idl rename to idl/application.BaseContext.idl index c2f6476..644f5f8 100644 --- a/idl/BaseContext.idl +++ b/idl/application.BaseContext.idl @@ -1,7 +1,5 @@ -package application; -[Entity=Class] +package application.BaseContext; +[Entity=Class, DefaultExport] interface BaseContext { - attribute boolean stageMode; - }; \ No newline at end of file diff --git a/idl/BusinessAbilityInfo.idl b/idl/application.BusinessAbilityInfo.idl similarity index 69% rename from idl/BusinessAbilityInfo.idl rename to idl/application.BusinessAbilityInfo.idl index fd8f7cd..7c6fa2e 100644 --- a/idl/BusinessAbilityInfo.idl +++ b/idl/application.BusinessAbilityInfo.idl @@ -1,9 +1,8 @@ -package application; -import bundleManager.ApplicationInfo as ApplicationInfo; -import ohos.app.businessAbilityRouter as businessAbilityRouter; +package application.BusinessAbilityInfo; +import bundleManager.ApplicationInfo.ApplicationInfo as ApplicationInfo; +import ohos.app.businessAbilityRouter.default as businessAbilityRouter; [Entity=Interface] interface BusinessAbilityInfo { - readonly attribute String bundleName; readonly attribute String moduleName; readonly attribute String name; @@ -12,5 +11,4 @@ interface BusinessAbilityInfo { readonly attribute number iconId; readonly attribute businessAbilityRouter.BusinessType businessType; readonly attribute ApplicationInfo applicationInfo; - }; \ No newline at end of file diff --git a/idl/Context.idl b/idl/application.Context.idl similarity index 76% rename from idl/Context.idl rename to idl/application.Context.idl index 387999f..2a43304 100644 --- a/idl/Context.idl +++ b/idl/application.Context.idl @@ -1,16 +1,15 @@ -package application; -import bundleManager.ApplicationInfo as ApplicationInfo; +package application.Context; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.resmgr as resmgr; -import application.BaseContext as BaseContext; -import application.EventHub as EventHub; -import application.ApplicationContext as ApplicationContext; -import ohos.app.ability.contextConstant as contextConstant; +import application.EventHub.default as EventHub; +import bundleManager.ApplicationInfo.ApplicationInfo as ApplicationInfo; +import application.ApplicationContext.default as ApplicationContext; +import application.BaseContext.default as BaseContext; +import ohos.resourceManager.default as resmgr; +import ohos.app.ability.contextConstant.default as contextConstant; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); -[Entity=Class] -interface Context: BaseContext { - +[Entity=Class, DefaultExport] +interface Context: [Extends] BaseContext { attribute resmgr.ResourceManager resourceManager; attribute ApplicationInfo applicationInfo; attribute String cacheDir; @@ -23,8 +22,8 @@ interface Context: BaseContext { attribute String resourceDir; attribute String cloudFileDir; attribute EventHub eventHub; - attribute contextConstant.AreaMode area; attribute String processName; + attribute contextConstant.AreaMode area; [Deprecated, Throws] Context createBundleContext(String bundleName); [Deprecated, Throws] @@ -41,9 +40,7 @@ interface Context: BaseContext { async String getGroupDir(String dataGroupID); [Throws] resmgr.ResourceManager createModuleResourceManager(String bundleName, String moduleName); - [Throws] Context createAreaModeContext(contextConstant.AreaMode areaMode); [Throws] Context createDisplayContext(number displayId); - }; \ No newline at end of file diff --git a/idl/ContinuableInfo.idl b/idl/application.ContinuableInfo.idl similarity index 85% rename from idl/ContinuableInfo.idl rename to idl/application.ContinuableInfo.idl index 6eafda6..5f39ee1 100644 --- a/idl/ContinuableInfo.idl +++ b/idl/application.ContinuableInfo.idl @@ -1,12 +1,10 @@ -package application; +package application.ContinuableInfo; [Entity=Interface] interface ContinuableInfo { - attribute String srcDeviceId; attribute String bundleName; [Optional] attribute String srcBundleName; [Optional] attribute String continueType; - }; \ No newline at end of file diff --git a/idl/ContinueCallback.idl b/idl/application.ContinueCallback.idl similarity index 70% rename from idl/ContinueCallback.idl rename to idl/application.ContinueCallback.idl index 8403337..050b364 100644 --- a/idl/ContinueCallback.idl +++ b/idl/application.ContinueCallback.idl @@ -1,7 +1,5 @@ -package application; +package application.ContinueCallback; [Entity=Interface] interface ContinueCallback { - void onContinueDone(number result); - }; \ No newline at end of file diff --git a/idl/ContinueDeviceInfo.idl b/idl/application.ContinueDeviceInfo.idl similarity index 83% rename from idl/ContinueDeviceInfo.idl rename to idl/application.ContinueDeviceInfo.idl index 502184c..4c84969 100644 --- a/idl/ContinueDeviceInfo.idl +++ b/idl/application.ContinueDeviceInfo.idl @@ -1,10 +1,8 @@ -package application; +package application.ContinueDeviceInfo; [Entity=Interface] interface ContinueDeviceInfo { - attribute String srcDeviceId; attribute String dstDeviceId; attribute number missionId; attribute record wantParam; - }; \ No newline at end of file diff --git a/idl/ContinueMissionInfo.idl b/idl/application.ContinueMissionInfo.idl similarity index 88% rename from idl/ContinueMissionInfo.idl rename to idl/application.ContinueMissionInfo.idl index 84c6b55..1e25e7e 100644 --- a/idl/ContinueMissionInfo.idl +++ b/idl/application.ContinueMissionInfo.idl @@ -1,7 +1,6 @@ -package application; +package application.ContinueMissionInfo; [Entity=Interface] interface ContinueMissionInfo { - attribute String srcDeviceId; attribute String dstDeviceId; attribute String bundleName; @@ -10,5 +9,4 @@ interface ContinueMissionInfo { [Optional] attribute String continueType; attribute record wantParam; - }; \ No newline at end of file diff --git a/idl/CustomData.idl b/idl/application.CustomData.idl similarity index 50% rename from idl/CustomData.idl rename to idl/application.CustomData.idl index c2a46b1..5553a1b 100644 --- a/idl/CustomData.idl +++ b/idl/application.CustomData.idl @@ -1,7 +1,5 @@ -package application; -[Entity=Interface] +package application.CustomData; +[Entity=Interface, DefaultExport] interface CustomData { - attribute record data; - }; \ No newline at end of file diff --git a/idl/application.DriverExtensionContext.idl b/idl/application.DriverExtensionContext.idl new file mode 100644 index 0000000..289904a --- /dev/null +++ b/idl/application.DriverExtensionContext.idl @@ -0,0 +1,6 @@ +package application.DriverExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +[Entity=Class, DefaultExport] +interface DriverExtensionContext: [Extends] ExtensionContext { + void updateDriverState(); +}; \ No newline at end of file diff --git a/idl/application.EmbeddableUIAbilityContext.idl b/idl/application.EmbeddableUIAbilityContext.idl new file mode 100644 index 0000000..912d527 --- /dev/null +++ b/idl/application.EmbeddableUIAbilityContext.idl @@ -0,0 +1,5 @@ +package application.EmbeddableUIAbilityContext; +import application.UIAbilityContext.default as UIAbilityContext; +[Entity=Class, DefaultExport] +interface EmbeddableUIAbilityContext: [Extends] UIAbilityContext { +}; \ No newline at end of file diff --git a/idl/ErrorObserver.idl b/idl/application.ErrorObserver.idl similarity index 66% rename from idl/ErrorObserver.idl rename to idl/application.ErrorObserver.idl index cd1d062..efba488 100644 --- a/idl/ErrorObserver.idl +++ b/idl/application.ErrorObserver.idl @@ -1,9 +1,7 @@ -package application; -[Entity=Class] +package application.ErrorObserver; +[Entity=Class, DefaultExport] interface ErrorObserver { - void onUnhandledException(String errMsg); [Optional] void onException(Error errObject); - }; \ No newline at end of file diff --git a/idl/EventHub.idl b/idl/application.EventHub.idl similarity index 81% rename from idl/EventHub.idl rename to idl/application.EventHub.idl index 30f8d03..643fb53 100644 --- a/idl/EventHub.idl +++ b/idl/application.EventHub.idl @@ -1,13 +1,11 @@ -package application; +package application.EventHub; import ohos.base.BusinessError as BusinessError; -[Entity=Class] +[Entity=Class, DefaultExport] interface EventHub { - [Throws] void on(String event, Function callback_); [Throws] void off(String event, optional Function callback_); [Throws] void emit(String event, sequence... args); - }; \ No newline at end of file diff --git a/idl/application.ExtensionContext.idl b/idl/application.ExtensionContext.idl new file mode 100644 index 0000000..d555dcc --- /dev/null +++ b/idl/application.ExtensionContext.idl @@ -0,0 +1,11 @@ +package application.ExtensionContext; +import bundleManager.HapModuleInfo.HapModuleInfo as HapModuleInfo; +import ohos.app.ability.Configuration.Configuration as Configuration; +import application.Context.default as Context; +import bundleManager.ExtensionAbilityInfo.ExtensionAbilityInfo as ExtensionAbilityInfo; +[Entity=Class, DefaultExport] +interface ExtensionContext: [Extends] Context { + attribute HapModuleInfo currentHapModuleInfo; + attribute Configuration config; + attribute ExtensionAbilityInfo extensionAbilityInfo; +}; \ No newline at end of file diff --git a/idl/ExtensionRunningInfo.idl b/idl/application.ExtensionRunningInfo.idl similarity index 66% rename from idl/ExtensionRunningInfo.idl rename to idl/application.ExtensionRunningInfo.idl index f0b1dc8..09505bb 100644 --- a/idl/ExtensionRunningInfo.idl +++ b/idl/application.ExtensionRunningInfo.idl @@ -1,9 +1,8 @@ -package application; -import bundleManager.ElementName as ElementName; -import ohos.bundle.bundle as bundle; +package application.ExtensionRunningInfo; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.bundle.bundleManager.default as bundle; [Entity=Interface] interface ExtensionRunningInfo { - attribute ElementName extension; attribute number pid; attribute number uid; @@ -11,5 +10,4 @@ interface ExtensionRunningInfo { attribute number startTime; attribute sequence clientPackage; attribute bundle.ExtensionAbilityType type; - }; \ No newline at end of file diff --git a/idl/application.FormEditExtensionContext.idl b/idl/application.FormEditExtensionContext.idl new file mode 100644 index 0000000..18beea0 --- /dev/null +++ b/idl/application.FormEditExtensionContext.idl @@ -0,0 +1,9 @@ +package application.FormEditExtensionContext; +import application.UIExtensionContext.default as UIExtensionContext; +import ohos.app.ability.Want.default as Want; +import ability.abilityResult.AbilityResult as AbilityResult; +[Entity=Class, DefaultExport] +interface FormEditExtensionContext: [Extends] UIExtensionContext { + [Throws] + async AbilityResult startSecondPage(Want want); +}; \ No newline at end of file diff --git a/idl/FormExtensionContext.idl b/idl/application.FormExtensionContext.idl similarity index 62% rename from idl/FormExtensionContext.idl rename to idl/application.FormExtensionContext.idl index c8ec9f9..dbd5d21 100644 --- a/idl/FormExtensionContext.idl +++ b/idl/application.FormExtensionContext.idl @@ -1,13 +1,12 @@ -package application; +package application.FormExtensionContext; import ohos.base.AsyncCallback as AsyncCallback; -import ability.ConnectOptions as ConnectOptions; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import ohos.app.ability.Want.default as Want; +import application.ExtensionContext.default as ExtensionContext; [Async, Synthetic] callback AsyncCallback_Void = void (); -[Entity=Class] -interface FormExtensionContext: ExtensionContext { - +[Entity=Class, DefaultExport] +interface FormExtensionContext: [Extends] ExtensionContext { [Throws] void startAbility(Want want, AsyncCallback_Void callback_); [Throws] @@ -18,5 +17,4 @@ interface FormExtensionContext: ExtensionContext { void disconnectServiceExtensionAbility(number connection, AsyncCallback_Void callback_); [Throws] async void disconnectServiceExtensionAbility(number connection); - }; \ No newline at end of file diff --git a/idl/application.KioskStatus.idl b/idl/application.KioskStatus.idl new file mode 100644 index 0000000..00be287 --- /dev/null +++ b/idl/application.KioskStatus.idl @@ -0,0 +1,7 @@ +package application.KioskStatus; +[Entity=Interface] +interface KioskStatus { + attribute boolean isKioskMode; + attribute String kioskBundleName; + attribute number kioskBundleUid; +}; \ No newline at end of file diff --git a/idl/application.LiveFormExtensionContext.idl b/idl/application.LiveFormExtensionContext.idl new file mode 100644 index 0000000..e6de3b7 --- /dev/null +++ b/idl/application.LiveFormExtensionContext.idl @@ -0,0 +1,8 @@ +package application.LiveFormExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] +interface LiveFormExtensionContext: [Extends] ExtensionContext { + [Throws] + async void startAbilityByLiveForm(Want want); +}; \ No newline at end of file diff --git a/idl/LoopObserver.idl b/idl/application.LoopObserver.idl similarity index 74% rename from idl/LoopObserver.idl rename to idl/application.LoopObserver.idl index 54f48c7..58d4186 100644 --- a/idl/LoopObserver.idl +++ b/idl/application.LoopObserver.idl @@ -1,8 +1,6 @@ -package application; +package application.LoopObserver; [Entity=Interface] interface LoopObserver { - [Optional] void onLoopTimeOut(number timeout); - }; \ No newline at end of file diff --git a/idl/MissionCallbacks.idl b/idl/application.MissionCallbacks.idl similarity index 99% rename from idl/MissionCallbacks.idl rename to idl/application.MissionCallbacks.idl index f1b71ef..e2b68d9 100644 --- a/idl/MissionCallbacks.idl +++ b/idl/application.MissionCallbacks.idl @@ -1,9 +1,7 @@ package application.MissionCallbacks; [Entity=Interface] interface MissionCallback { - void notifyMissionsChanged(String deviceId); void notifySnapshot(String deviceId, number mission); void notifyNetDisconnect(String deviceId, number state); - }; \ No newline at end of file diff --git a/idl/MissionDeviceInfo.idl b/idl/application.MissionDeviceInfo.idl similarity index 67% rename from idl/MissionDeviceInfo.idl rename to idl/application.MissionDeviceInfo.idl index a812a42..54d6c83 100644 --- a/idl/MissionDeviceInfo.idl +++ b/idl/application.MissionDeviceInfo.idl @@ -1,7 +1,5 @@ -package application; +package application.MissionDeviceInfo; [Entity=Interface] interface MissionDeviceInfo { - attribute String deviceId; - }; \ No newline at end of file diff --git a/idl/MissionInfo.idl b/idl/application.MissionInfo.idl similarity index 82% rename from idl/MissionInfo.idl rename to idl/application.MissionInfo.idl index 647c641..d13d0de 100644 --- a/idl/MissionInfo.idl +++ b/idl/application.MissionInfo.idl @@ -1,8 +1,7 @@ -package application; -import ohos.app.ability.Want as Want; +package application.MissionInfo; +import ohos.app.ability.Want.default as Want; [Entity=Interface] interface MissionInfo { - attribute number missionId; attribute number runningState; attribute boolean lockedState; @@ -13,5 +12,4 @@ interface MissionInfo { attribute boolean continuable; attribute number abilityState; attribute boolean unclearable; - }; \ No newline at end of file diff --git a/idl/MissionListener.idl b/idl/application.MissionListener.idl similarity index 82% rename from idl/MissionListener.idl rename to idl/application.MissionListener.idl index 767f480..2d6313c 100644 --- a/idl/MissionListener.idl +++ b/idl/application.MissionListener.idl @@ -1,8 +1,7 @@ -package application; -import ohos.multimedia.image as image; +package application.MissionListener; +import ohos.multimedia.image.default as image; [Entity=Interface] interface MissionListener { - void onMissionCreated(number mission); void onMissionDestroyed(number mission); void onMissionSnapshotChanged(number mission); @@ -10,5 +9,4 @@ interface MissionListener { void onMissionLabelUpdated(number mission); void onMissionIconUpdated(number mission, image.PixelMap icon); void onMissionClosed(number mission); - }; \ No newline at end of file diff --git a/idl/MissionParameter.idl b/idl/application.MissionParameter.idl similarity index 78% rename from idl/MissionParameter.idl rename to idl/application.MissionParameter.idl index 4c90c4c..8b73464 100644 --- a/idl/MissionParameter.idl +++ b/idl/application.MissionParameter.idl @@ -1,9 +1,7 @@ -package application; +package application.MissionParameter; [Entity=Interface] interface MissionParameter { - attribute String deviceId; attribute boolean fixConflict; attribute number tag; - }; \ No newline at end of file diff --git a/idl/MissionSnapshot.idl b/idl/application.MissionSnapshot.idl similarity index 45% rename from idl/MissionSnapshot.idl rename to idl/application.MissionSnapshot.idl index 4687381..1af27e4 100644 --- a/idl/MissionSnapshot.idl +++ b/idl/application.MissionSnapshot.idl @@ -1,10 +1,8 @@ -package application; -import bundleManager.ElementName as ElementName; -import ohos.multimedia.image as image; +package application.MissionSnapshot; +import bundleManager.ElementName.ElementName as ElementName; +import ohos.multimedia.image.default as image; [Entity=Interface] interface MissionSnapshot { - attribute ElementName ability; attribute image.PixelMap snapshot; - }; \ No newline at end of file diff --git a/idl/MultiAppMode.idl b/idl/application.MultiAppMode.idl similarity index 77% rename from idl/MultiAppMode.idl rename to idl/application.MultiAppMode.idl index 485b4a3..e4270de 100644 --- a/idl/MultiAppMode.idl +++ b/idl/application.MultiAppMode.idl @@ -1,8 +1,6 @@ -package application; +package application.MultiAppMode; dictionary MultiAppMode { - number NOT_SUPPORTED = 0; number MULTI_INSTANCE = 1; number APP_CLONE = 2; - }; \ No newline at end of file diff --git a/idl/PageNodeInfo.idl b/idl/application.PageNodeInfo.idl similarity index 69% rename from idl/PageNodeInfo.idl rename to idl/application.PageNodeInfo.idl index b7232e9..ca4bf3b 100644 --- a/idl/PageNodeInfo.idl +++ b/idl/application.PageNodeInfo.idl @@ -1,9 +1,8 @@ -package application; -import application.AutoFillType as AutoFillType; -import application.AutoFillRect as AutoFillRect; -[Entity=Interface] +package application.PageNodeInfo; +import application.AutoFillType.AutoFillType as AutoFillType; +import application.AutoFillRect.default as AutoFillRect; +[Entity=Interface, DefaultExport] interface PageNodeInfo { - attribute number id; attribute number depth; attribute AutoFillType autoFillType; @@ -18,5 +17,4 @@ interface PageNodeInfo { attribute boolean isFocus; [Optional] attribute String metadata; - }; \ No newline at end of file diff --git a/idl/PhotoEditorExtensionContext.idl b/idl/application.PhotoEditorExtensionContext.idl similarity index 37% rename from idl/PhotoEditorExtensionContext.idl rename to idl/application.PhotoEditorExtensionContext.idl index aae6bf3..fac24b6 100644 --- a/idl/PhotoEditorExtensionContext.idl +++ b/idl/application.PhotoEditorExtensionContext.idl @@ -1,13 +1,11 @@ -package application; -import application.ExtensionContext as ExtensionContext; -import ability.AbilityResult as AbilityResult; -import ohos.multimedia.image as image; -[Entity=Class] -interface PhotoEditorExtensionContext: ExtensionContext { - +package application.PhotoEditorExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ability.abilityResult.AbilityResult as AbilityResult; +import ohos.multimedia.image.default as image; +[Entity=Class, DefaultExport] +interface PhotoEditorExtensionContext: [Extends] ExtensionContext { [Throws] async AbilityResult saveEditedContentWithUri(String uri); [Throws] async AbilityResult saveEditedContentWithImage(image.PixelMap pixeMap, image.PackingOption option); - }; \ No newline at end of file diff --git a/idl/ProcessData.idl b/idl/application.ProcessData.idl similarity index 77% rename from idl/ProcessData.idl rename to idl/application.ProcessData.idl index 4e50dc1..ace5fc4 100644 --- a/idl/ProcessData.idl +++ b/idl/application.ProcessData.idl @@ -1,12 +1,10 @@ -package application; -[Entity=Class] +package application.ProcessData; +[Entity=Class, DefaultExport] interface ProcessData { - attribute String bundleName; attribute number pid; attribute number uid; attribute number state; attribute boolean isContinuousTask; attribute boolean isKeepAlive; - }; \ No newline at end of file diff --git a/idl/ProcessInformation.idl b/idl/application.ProcessInformation.idl similarity index 60% rename from idl/ProcessInformation.idl rename to idl/application.ProcessInformation.idl index 29e5f73..9e8bb91 100644 --- a/idl/ProcessInformation.idl +++ b/idl/application.ProcessInformation.idl @@ -1,9 +1,9 @@ -package application; -import ohos.app.ability.appManager as appManager; -import ohos.bundle.bundleManager as bundleManager; +package application.ProcessInformation; +import ohos.app.ability.appManager.default as appManager; +import ohos.app.ability.appManager.default as appManager; +import ohos.bundle.bundleManager.default as bundleManager; [Entity=Interface] interface ProcessInformation { - attribute number pid; attribute number uid; attribute String processName; @@ -12,5 +12,4 @@ interface ProcessInformation { attribute bundleManager.BundleType bundleType; [Optional] attribute number appCloneIndex; - }; \ No newline at end of file diff --git a/idl/ProcessRunningInfo.idl b/idl/application.ProcessRunningInfo.idl similarity index 86% rename from idl/ProcessRunningInfo.idl rename to idl/application.ProcessRunningInfo.idl index aed0007..ee4e6bd 100644 --- a/idl/ProcessRunningInfo.idl +++ b/idl/application.ProcessRunningInfo.idl @@ -1,7 +1,6 @@ -package application; +package application.ProcessRunningInfo; [Entity=Interface, Deprecated] interface ProcessRunningInfo { - [Deprecated] attribute number pid; [Deprecated] @@ -10,5 +9,4 @@ interface ProcessRunningInfo { attribute String processName; [Deprecated] attribute sequence bundleNames; - }; \ No newline at end of file diff --git a/idl/RunningAppClone.idl b/idl/application.RunningAppClone.idl similarity index 80% rename from idl/RunningAppClone.idl rename to idl/application.RunningAppClone.idl index e286d7e..fdb0e55 100644 --- a/idl/RunningAppClone.idl +++ b/idl/application.RunningAppClone.idl @@ -1,9 +1,7 @@ -package application; +package application.RunningAppClone; [Entity=Interface] interface RunningAppClone { - attribute number appCloneIndex; attribute number uid; attribute sequence pids; - }; \ No newline at end of file diff --git a/idl/RunningMultiAppInfo.idl b/idl/application.RunningMultiAppInfo.idl similarity index 50% rename from idl/RunningMultiAppInfo.idl rename to idl/application.RunningMultiAppInfo.idl index a75f117..83f0105 100644 --- a/idl/RunningMultiAppInfo.idl +++ b/idl/application.RunningMultiAppInfo.idl @@ -1,15 +1,13 @@ -package application; -import application.MultiAppMode as MultiAppMode; -import application.RunningAppClone as RunningAppClone; -import application.RunningMultiInstanceInfo as RunningMultiInstanceInfo; +package application.RunningMultiAppInfo; +import application.MultiAppMode.MultiAppMode as MultiAppMode; +import application.RunningAppClone.RunningAppClone as RunningAppClone; +import application.RunningMultiInstanceInfo.RunningMultiInstanceInfo as RunningMultiInstanceInfo; [Entity=Interface] interface RunningMultiAppInfo { - attribute String bundleName; attribute MultiAppMode mode; [Optional] attribute sequence runningMultiInstances; [Optional] attribute sequence runningAppClones; - }; \ No newline at end of file diff --git a/idl/RunningMultiInstanceInfo.idl b/idl/application.RunningMultiInstanceInfo.idl similarity index 77% rename from idl/RunningMultiInstanceInfo.idl rename to idl/application.RunningMultiInstanceInfo.idl index 10c1a45..bb15e44 100644 --- a/idl/RunningMultiInstanceInfo.idl +++ b/idl/application.RunningMultiInstanceInfo.idl @@ -1,9 +1,7 @@ -package application; +package application.RunningMultiInstanceInfo; [Entity=Interface] interface RunningMultiInstanceInfo { - attribute String instanceKey; attribute number uid; attribute sequence pids; - }; \ No newline at end of file diff --git a/idl/ServiceExtensionContext.idl b/idl/application.ServiceExtensionContext.idl similarity index 83% rename from idl/ServiceExtensionContext.idl rename to idl/application.ServiceExtensionContext.idl index da41251..edf1169 100644 --- a/idl/ServiceExtensionContext.idl +++ b/idl/application.ServiceExtensionContext.idl @@ -1,17 +1,16 @@ -package application; +package application.ServiceExtensionContext; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import ohos.app.ability.UIAbility.Caller as Caller; +import ohos.app.ability.OpenLinkOptions.default as OpenLinkOptions; +import ohos.app.ability.AtomicServiceOptions.default as AtomicServiceOptions; import ohos.base.AsyncCallback as AsyncCallback; -import ability.ConnectOptions as ConnectOptions; -import ohos.app.ability.Caller as Caller; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; -import ohos.app.ability.OpenLinkOptions as OpenLinkOptions; -import ohos.app.ability.AtomicServiceOptions as AtomicServiceOptions; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.StartOptions.default as StartOptions; +import ohos.app.ability.Want.default as Want; [Async, Synthetic] callback AsyncCallback_Void = void (); -[Entity=Class] -interface ServiceExtensionContext: ExtensionContext { - +[Entity=Class, DefaultExport] +interface ServiceExtensionContext: [Extends] ExtensionContext { [Throws] void startAbility(Want want, AsyncCallback_Void callback_); [Throws] @@ -80,5 +79,6 @@ interface ServiceExtensionContext: ExtensionContext { async void startUIServiceExtensionAbility(Want want); [Throws] async void openAtomicService(String appId, optional AtomicServiceOptions options); - + [Throws] + async void startUIAbilities(sequence wantList); }; \ No newline at end of file diff --git a/idl/UIAbilityContext.idl b/idl/application.UIAbilityContext.idl similarity index 75% rename from idl/UIAbilityContext.idl rename to idl/application.UIAbilityContext.idl index fdadc29..1986763 100644 --- a/idl/UIAbilityContext.idl +++ b/idl/application.UIAbilityContext.idl @@ -1,33 +1,33 @@ -package application; -import bundleManager.AbilityInfo as AbilityInfo; -import ability.AbilityResult as AbilityResult; +package application.UIAbilityContext; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import ohos.app.ability.UIAbility.Caller as Caller; +import ohos.multimedia.image.default as image; +import ohos.app.ability.dialogRequest.default as dialogRequest; +import ohos.app.ability.AbilityConstant.default as AbilityConstant; +import ohos.app.ability.contextConstant.default as contextConstant; +import ohos.app.ability.AtomicServiceOptions.default as AtomicServiceOptions; +import ohos.app.ability.ConfigurationConstant.default as ConfigurationConstant; +import application.UIServiceProxy.default as UIServiceProxy; +import application.UIServiceExtensionConnectCallback.default as UIServiceExtensionConnectCallback; +import application.AbilityStartCallback.default as AbilityStartCallback; +import bundleManager.AbilityInfo.AbilityInfo as AbilityInfo; +import ability.abilityResult.AbilityResult as AbilityResult; import ohos.base.AsyncCallback as AsyncCallback; -import ability.ConnectOptions as ConnectOptions; -import bundleManager.HapModuleInfo as HapModuleInfo; -import application.Context as Context; -import ohos.app.ability.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; -import ohos.app.ability.OpenLinkOptions as OpenLinkOptions; -import ohos.app.ability.Configuration as Configuration; -import ohos.app.ability.Caller as Caller; -import ohos.multimedia.image as image; -import ohos.app.ability.dialogRequest as dialogRequest; -import ohos.app.ability.AbilityConstant as AbilityConstant; -import application.AbilityStartCallback as AbilityStartCallback; -import ohos.window as window; -import ohos.app.ability.AtomicServiceOptions as AtomicServiceOptions; -import ohos.app.ability.ConfigurationConstant as ConfigurationConstant; -import application.UIServiceProxy as UIServiceProxy; -import application.UIServiceExtensionConnectCallback as UIServiceExtensionConnectCallback; +import application.Context.default as Context; +import bundleManager.HapModuleInfo.HapModuleInfo as HapModuleInfo; +import ohos.app.ability.OpenLinkOptions.default as OpenLinkOptions; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; +import ohos.app.ability.Configuration.Configuration as Configuration; +import ohos.window.default as window; [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] callback AsyncCallback_AbilityResult_Void = void (AbilityResult result); [Async, Synthetic] -callback AsyncCallback_dialogRequest_RequestResult_Void = void (dialogRequest.RequestResult result); -[Entity=Class] -interface UIAbilityContext: Context { - +callback AsyncCallback_DialogRequest_RequestResult_Void = void (dialogRequest.RequestResult result); +[Entity=Class, DefaultExport] +interface UIAbilityContext: [Extends] Context { attribute AbilityInfo abilityInfo; attribute HapModuleInfo currentHapModuleInfo; attribute Configuration config; @@ -125,7 +125,7 @@ interface UIAbilityContext: Context { [Throws] async void startRecentAbility(Want want, optional StartOptions options); [Throws] - void requestDialogService(Want want, AsyncCallback_dialogRequest_RequestResult_Void result); + void requestDialogService(Want want, AsyncCallback_DialogRequest_RequestResult_Void result); [Throws] async dialogRequest.RequestResult requestDialogService(Want want); [Throws] @@ -157,6 +157,17 @@ interface UIAbilityContext: Context { [Throws] async void setAbilityInstanceInfo(String label, image.PixelMap icon); [Throws] + async void revokeDelegator(); + [Throws] void setColorMode(ConfigurationConstant.ColorMode colorMode); - + [Throws] + async void startAppServiceExtensionAbility(Want want); + [Throws] + async void stopAppServiceExtensionAbility(Want want); + [Throws] + number connectAppServiceExtensionAbility(Want want, ConnectOptions callback_); + [Throws] + async void disconnectAppServiceExtensionAbility(number connection); + [Throws] + async void setOnNewWantSkipScenarios(number scenarios); }; \ No newline at end of file diff --git a/idl/UIExtensionContext.idl b/idl/application.UIExtensionContext.idl similarity index 71% rename from idl/UIExtensionContext.idl rename to idl/application.UIExtensionContext.idl index 1bcffcb..08e98ff 100644 --- a/idl/UIExtensionContext.idl +++ b/idl/application.UIExtensionContext.idl @@ -1,22 +1,22 @@ -package application; -import ability.AbilityResult as AbilityResult; +package application.UIExtensionContext; import ohos.base.AsyncCallback as AsyncCallback; -import ability.ConnectOptions as ConnectOptions; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; -import ohos.app.ability.AtomicServiceOptions as AtomicServiceOptions; -import ohos.app.ability.OpenLinkOptions as OpenLinkOptions; -import ohos.app.ability.ConfigurationConstant as ConfigurationConstant; -import application.UIServiceProxy as UIServiceProxy; -import application.UIServiceExtensionConnectCallback as UIServiceExtensionConnectCallback; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; +import ability.abilityResult.AbilityResult as AbilityResult; +import ability.connectOptions.ConnectOptions as ConnectOptions; +import ohos.app.ability.AtomicServiceOptions.default as AtomicServiceOptions; +import ohos.app.ability.OpenLinkOptions.default as OpenLinkOptions; +import ohos.app.ability.ConfigurationConstant.default as ConfigurationConstant; +import application.UIServiceProxy.default as UIServiceProxy; +import application.UIServiceExtensionConnectCallback.default as UIServiceExtensionConnectCallback; +import ability.abilityResult.AbilityResult as AbilityResult; [Async, Synthetic] callback AsyncCallback_Void = void (); [Async, Synthetic] callback AsyncCallback_AbilityResult_Void = void (AbilityResult result); -[Entity=Class] -interface UIExtensionContext: ExtensionContext { - +[Entity=Class, DefaultExport] +interface UIExtensionContext: [Extends] ExtensionContext { [Throws] void startAbility(Want want, AsyncCallback_Void callback_); [Throws] @@ -64,5 +64,6 @@ interface UIExtensionContext: ExtensionContext { void setHostPageOverlayForbidden(boolean isForbidden); [Throws] void setColorMode(ConfigurationConstant.ColorMode colorMode); - + [Throws] + async void startUIAbilities(sequence wantList); }; \ No newline at end of file diff --git a/idl/UIServiceExtensionConnectCallback.idl b/idl/application.UIServiceExtensionConnectCallback.idl similarity index 57% rename from idl/UIServiceExtensionConnectCallback.idl rename to idl/application.UIServiceExtensionConnectCallback.idl index 5211888..893c51a 100644 --- a/idl/UIServiceExtensionConnectCallback.idl +++ b/idl/application.UIServiceExtensionConnectCallback.idl @@ -1,8 +1,6 @@ -package application; -[Entity=Interface] +package application.UIServiceExtensionConnectCallback; +[Entity=Interface, DefaultExport] interface UIServiceExtensionConnectCallback { - void onData(record data); void onDisconnect(); - }; \ No newline at end of file diff --git a/idl/UIServiceExtensionContext.idl b/idl/application.UIServiceExtensionContext.idl similarity index 48% rename from idl/UIServiceExtensionContext.idl rename to idl/application.UIServiceExtensionContext.idl index dd8f6b9..d83e3ff 100644 --- a/idl/UIServiceExtensionContext.idl +++ b/idl/application.UIServiceExtensionContext.idl @@ -1,12 +1,11 @@ -package application; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; -import application.AbilityStartCallback as AbilityStartCallback; -import ability.ConnectOptions as ConnectOptions; -[Entity=Class] -interface UIServiceExtensionContext: ExtensionContext { - +package application.UIServiceExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; +import application.AbilityStartCallback.default as AbilityStartCallback; +import ability.connectOptions.ConnectOptions as ConnectOptions; +[Entity=Class, DefaultExport] +interface UIServiceExtensionContext: [Extends] ExtensionContext { [Throws] async void startAbility(Want want, optional StartOptions options); async void terminateSelf(); @@ -16,5 +15,4 @@ interface UIServiceExtensionContext: ExtensionContext { number connectServiceExtensionAbility(Want want, ConnectOptions options); [Throws] async void disconnectServiceExtensionAbility(number connectionId); - }; \ No newline at end of file diff --git a/idl/UIServiceHostProxy.idl b/idl/application.UIServiceHostProxy.idl similarity index 55% rename from idl/UIServiceHostProxy.idl rename to idl/application.UIServiceHostProxy.idl index ec16ef3..9db4947 100644 --- a/idl/UIServiceHostProxy.idl +++ b/idl/application.UIServiceHostProxy.idl @@ -1,8 +1,6 @@ -package application; -[Entity=Interface] +package application.UIServiceHostProxy; +[Entity=Interface, DefaultExport] interface UIServiceHostProxy { - [Throws] void sendData(record data); - }; \ No newline at end of file diff --git a/idl/UIServiceProxy.idl b/idl/application.UIServiceProxy.idl similarity index 56% rename from idl/UIServiceProxy.idl rename to idl/application.UIServiceProxy.idl index 6de203d..39bcb20 100644 --- a/idl/UIServiceProxy.idl +++ b/idl/application.UIServiceProxy.idl @@ -1,8 +1,6 @@ -package application; -[Entity=Interface] +package application.UIServiceProxy; +[Entity=Interface, DefaultExport] interface UIServiceProxy { - [Throws] void sendData(record data); - }; \ No newline at end of file diff --git a/idl/ViewData.idl b/idl/application.ViewData.idl similarity index 64% rename from idl/ViewData.idl rename to idl/application.ViewData.idl index 4c7448a..ad4d3a0 100644 --- a/idl/ViewData.idl +++ b/idl/application.ViewData.idl @@ -1,9 +1,8 @@ -package application; -import application.PageNodeInfo as PageNodeInfo; -import application.AutoFillRect as AutoFillRect; -[Entity=Interface] +package application.ViewData; +import application.PageNodeInfo.default as PageNodeInfo; +import application.AutoFillRect.default as AutoFillRect; +[Entity=Interface, DefaultExport] interface ViewData { - attribute String bundleName; attribute String moduleName; attribute String abilityName; @@ -12,5 +11,4 @@ interface ViewData { attribute AutoFillRect pageRect; attribute boolean isUserSelected; attribute boolean isOtherAccount; - }; \ No newline at end of file diff --git a/idl/application.VpnExtensionContext.idl b/idl/application.VpnExtensionContext.idl new file mode 100644 index 0000000..8890582 --- /dev/null +++ b/idl/application.VpnExtensionContext.idl @@ -0,0 +1,5 @@ +package application.VpnExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +[Entity=Class, DefaultExport] +interface VpnExtensionContext: [Extends] ExtensionContext { +}; \ No newline at end of file diff --git a/idl/WindowExtensionContext.idl b/idl/application.WindowExtensionContext.idl similarity index 48% rename from idl/WindowExtensionContext.idl rename to idl/application.WindowExtensionContext.idl index eec545a..3c760f5 100644 --- a/idl/WindowExtensionContext.idl +++ b/idl/application.WindowExtensionContext.idl @@ -1,16 +1,14 @@ -package application; +package application.WindowExtensionContext; import ohos.base.AsyncCallback as AsyncCallback; -import application.ExtensionContext as ExtensionContext; -import ohos.application.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; +import application.ExtensionContext.default as ExtensionContext; +import ohos.application.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; [Async, Synthetic] callback AsyncCallback_Void = void (); -[Entity=Class] -interface WindowExtensionContext: ExtensionContext { - +[Entity=Class, DefaultExport] +interface WindowExtensionContext: [Extends] ExtensionContext { [Throws] void startAbility(Want want, StartOptions options, AsyncCallback_Void callback_); [Throws] async void startAbility(Want want, optional StartOptions options); - }; \ No newline at end of file diff --git a/idl/WorkSchedulerExtensionContext.idl b/idl/application.WorkSchedulerExtensionContext.idl similarity index 34% rename from idl/WorkSchedulerExtensionContext.idl rename to idl/application.WorkSchedulerExtensionContext.idl index 528db9c..4ba34ec 100644 --- a/idl/WorkSchedulerExtensionContext.idl +++ b/idl/application.WorkSchedulerExtensionContext.idl @@ -1,12 +1,10 @@ -package application; -import application.ExtensionContext as ExtensionContext; -import ohos.app.ability.Want as Want; -[Entity=Class] -interface WorkSchedulerExtensionContext: ExtensionContext { - +package application.WorkSchedulerExtensionContext; +import application.ExtensionContext.default as ExtensionContext; +import ohos.app.ability.Want.default as Want; +[Entity=Class, DefaultExport] +interface WorkSchedulerExtensionContext: [Extends] ExtensionContext { [Throws] async void startServiceExtensionAbility(Want want); [Throws] async void stopServiceExtensionAbility(Want want); - }; \ No newline at end of file diff --git a/idl/abilityDelegatorArgs.idl b/idl/application.abilityDelegatorArgs.idl similarity index 87% rename from idl/abilityDelegatorArgs.idl rename to idl/application.abilityDelegatorArgs.idl index d623f8a..e29f3e3 100644 --- a/idl/abilityDelegatorArgs.idl +++ b/idl/application.abilityDelegatorArgs.idl @@ -1,10 +1,8 @@ package application.abilityDelegatorArgs; -[Entity=Interface] +[Entity=Interface, DefaultExport] interface AbilityDelegatorArgs { - attribute String bundleName; attribute record parameters; attribute String testCaseNames; attribute String testRunnerClassName; - }; \ No newline at end of file diff --git a/idl/shellCmdResult.idl b/idl/application.shellCmdResult.idl similarity index 79% rename from idl/shellCmdResult.idl rename to idl/application.shellCmdResult.idl index dbcd7d2..5c55992 100644 --- a/idl/shellCmdResult.idl +++ b/idl/application.shellCmdResult.idl @@ -1,8 +1,6 @@ package application.shellCmdResult; -[Entity=Interface] +[Entity=Interface, DefaultExport] interface ShellCmdResult { - attribute String stdResult; attribute number exitCode; - }; \ No newline at end of file diff --git a/idl/AlphabetIndexerModifier.idl b/idl/arkui.AlphabetIndexerModifier.idl similarity index 36% rename from idl/AlphabetIndexerModifier.idl rename to idl/arkui.AlphabetIndexerModifier.idl index f5ecbeb..87c4f2b 100644 --- a/idl/AlphabetIndexerModifier.idl +++ b/idl/arkui.AlphabetIndexerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.AlphabetIndexerModifier; [Entity=Class] -interface AlphabetIndexerModifier: AlphabetIndexerAttribute { - +interface AlphabetIndexerModifier: [Extends] AlphabetIndexerAttribute, [TypeArguments="AlphabetIndexerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(AlphabetIndexerAttribute instance); - }; \ No newline at end of file diff --git a/idl/AttributeUpdater.idl b/idl/arkui.AttributeUpdater.idl similarity index 34% rename from idl/AttributeUpdater.idl rename to idl/arkui.AttributeUpdater.idl index 327e561..cb3d1ad 100644 --- a/idl/AttributeUpdater.idl +++ b/idl/arkui.AttributeUpdater.idl @@ -1,9 +1,8 @@ -package arkui; +package arkui.AttributeUpdater; [TypeParameters="T"] callback Initializer = T (); -[Entity=Class, TypeParameters="T,C = Initializer"] -interface AttributeUpdater { - +[Entity=Class, TypeParameters="T,C"] +interface AttributeUpdater: [TypeArguments="T"] AttributeModifier { attribute C updateConstructorParams; [Accessor=Getter] readonly attribute (T or undefined) attribute_; @@ -11,5 +10,15 @@ interface AttributeUpdater { void applyNormalAttribute(T instance); void initializeModifier(T instance); void onComponentChanged(T component); - +}; +[TypeParameters="T"] +callback Initializer = T (sequence... params); +[Entity=Class, TypeParameters="T"] +interface AttributeUpdater: [TypeArguments="T"] AttributeModifier { + [Accessor=Getter] + readonly attribute (T or undefined) attribute_; + [Accessor=Getter] + readonly attribute [TypeArguments="T"] Initializer updateConstructorParams; + void initializeModifier(T instance); + void onComponentChanged(T component); }; \ No newline at end of file diff --git a/idl/BlankModifier.idl b/idl/arkui.BlankModifier.idl similarity index 39% rename from idl/BlankModifier.idl rename to idl/arkui.BlankModifier.idl index f5eb552..5e20777 100644 --- a/idl/BlankModifier.idl +++ b/idl/arkui.BlankModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.BlankModifier; [Entity=Class] -interface BlankModifier: BlankAttribute { - +interface BlankModifier: [Extends] BlankAttribute, [TypeArguments="BlankAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(BlankAttribute instance); - }; \ No newline at end of file diff --git a/idl/BuilderNode.idl b/idl/arkui.BuilderNode.idl similarity index 40% rename from idl/BuilderNode.idl rename to idl/arkui.BuilderNode.idl index dc0fdb2..a8e771b 100644 --- a/idl/BuilderNode.idl +++ b/idl/arkui.BuilderNode.idl @@ -1,34 +1,36 @@ -package arkui; -import ohos.arkui.UIContext as UIContext; -import arkui.FrameNode as FrameNode; +package arkui.BuilderNode; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.FrameNode.FrameNode as FrameNode; import arkui.Graphics.Size as Size; +import arkui.component.common.TouchEvent as TouchEvent; +import arkui.component.builder.WrappedBuilder as WrappedBuilder; +import arkui.component.builder.CustomBuilder as CustomBuilder; +import arkui.component.builder.CustomBuilderT as CustomBuilderT; dictionary NodeRenderType { - number RENDER_TYPE_DISPLAY = 0; number RENDER_TYPE_TEXTURE = 1; - }; [Entity=Interface] interface RenderOptions { - [Optional] attribute Size selfIdealSize; [Optional] attribute NodeRenderType type; [Optional] attribute String surfaceId; - }; [Entity=Interface] interface BuildOptions { - [Optional] attribute boolean nestingBuilderSupported; - + [Optional] + attribute LocalStorage localStorage; + [Optional] + attribute boolean enableProvideConsumeCrossing; }; -[Entity=Class, TypeParameters="Args extends Object[]"] +typedef (TouchEvent or MouseEvent or AxisEvent) InputEventType; +[Entity=Class, TypeParameters="Args"] interface BuilderNode { - constructor(UIContext uiContext, optional RenderOptions options); void build([TypeArguments="Args"] WrappedBuilder builder, optional Object arg); void build([TypeArguments="Args"] WrappedBuilder builder, Object arg, BuildOptions options); @@ -39,5 +41,21 @@ interface BuilderNode { void reuse(optional Object param); void recycle(); void updateConfiguration(); - + boolean postInputEvent(InputEventType event); + void inheritFreezeOptions(boolean enabled); + boolean isDisposed(); +}; +[Entity=Class, TypeParameters="T"] +interface BuilderNode { + constructor(UIContext uiContext, optional RenderOptions options); + void build([TypeArguments="CustomBuilder"] WrappedBuilder builder); + void build([TypeArguments="[TypeArguments='T'] CustomBuilderT"] WrappedBuilder builder, T arg); + void build([TypeArguments="[TypeArguments='T'] CustomBuilderT"] WrappedBuilder builder, T arg, BuildOptions options); + void update(T arg); + (FrameNode or undefined) getFrameNode(); + boolean postTouchEvent(TouchEvent event); + void dispose(); + void reuse(optional record param); + void recycle(); + void updateConfiguration(); }; \ No newline at end of file diff --git a/idl/ButtonModifier.idl b/idl/arkui.ButtonModifier.idl similarity index 39% rename from idl/ButtonModifier.idl rename to idl/arkui.ButtonModifier.idl index 3d75ffa..4708f2c 100644 --- a/idl/ButtonModifier.idl +++ b/idl/arkui.ButtonModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ButtonModifier; [Entity=Class] -interface ButtonModifier: ButtonAttribute { - +interface ButtonModifier: [Extends] ButtonAttribute, [TypeArguments="ButtonAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ButtonAttribute instance); - }; \ No newline at end of file diff --git a/idl/CalendarPickerModifier.idl b/idl/arkui.CalendarPickerModifier.idl similarity index 36% rename from idl/CalendarPickerModifier.idl rename to idl/arkui.CalendarPickerModifier.idl index d6fc1fb..ea89524 100644 --- a/idl/CalendarPickerModifier.idl +++ b/idl/arkui.CalendarPickerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.CalendarPickerModifier; [Entity=Class] -interface CalendarPickerModifier: CalendarPickerAttribute { - +interface CalendarPickerModifier: [Extends] CalendarPickerAttribute, [TypeArguments="CalendarPickerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(CalendarPickerAttribute instance); - }; \ No newline at end of file diff --git a/idl/CheckboxGroupModifier.idl b/idl/arkui.CheckboxGroupModifier.idl similarity index 36% rename from idl/CheckboxGroupModifier.idl rename to idl/arkui.CheckboxGroupModifier.idl index 4736461..b8e8358 100644 --- a/idl/CheckboxGroupModifier.idl +++ b/idl/arkui.CheckboxGroupModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.CheckboxGroupModifier; [Entity=Class] -interface CheckboxGroupModifier: CheckboxGroupAttribute { - +interface CheckboxGroupModifier: [Extends] CheckboxGroupAttribute, [TypeArguments="CheckboxGroupAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(CheckboxGroupAttribute instance); - }; \ No newline at end of file diff --git a/idl/CheckboxModifier.idl b/idl/arkui.CheckboxModifier.idl similarity index 38% rename from idl/CheckboxModifier.idl rename to idl/arkui.CheckboxModifier.idl index 9575929..d5a8dff 100644 --- a/idl/CheckboxModifier.idl +++ b/idl/arkui.CheckboxModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.CheckboxModifier; [Entity=Class] -interface CheckboxModifier: CheckboxAttribute { - +interface CheckboxModifier: [Extends] CheckboxAttribute, [TypeArguments="CheckboxAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(CheckboxAttribute instance); - }; \ No newline at end of file diff --git a/idl/ColumnModifier.idl b/idl/arkui.ColumnModifier.idl similarity index 39% rename from idl/ColumnModifier.idl rename to idl/arkui.ColumnModifier.idl index 34f0127..2b98742 100644 --- a/idl/ColumnModifier.idl +++ b/idl/arkui.ColumnModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ColumnModifier; [Entity=Class] -interface ColumnModifier: ColumnAttribute { - +interface ColumnModifier: [Extends] ColumnAttribute, [TypeArguments="ColumnAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ColumnAttribute instance); - }; \ No newline at end of file diff --git a/idl/ColumnSplitModifier.idl b/idl/arkui.ColumnSplitModifier.idl similarity index 37% rename from idl/ColumnSplitModifier.idl rename to idl/arkui.ColumnSplitModifier.idl index c43529d..989ed6f 100644 --- a/idl/ColumnSplitModifier.idl +++ b/idl/arkui.ColumnSplitModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ColumnSplitModifier; [Entity=Class] -interface ColumnSplitModifier: ColumnSplitAttribute { - +interface ColumnSplitModifier: [Extends] ColumnSplitAttribute, [TypeArguments="ColumnSplitAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ColumnSplitAttribute instance); - }; \ No newline at end of file diff --git a/idl/CommonModifier.idl b/idl/arkui.CommonModifier.idl similarity index 39% rename from idl/CommonModifier.idl rename to idl/arkui.CommonModifier.idl index 773bb6c..f856571 100644 --- a/idl/CommonModifier.idl +++ b/idl/arkui.CommonModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.CommonModifier; [Entity=Class] -interface CommonModifier: CommonAttribute { - +interface CommonModifier: [Extends] CommonAttribute, [TypeArguments="CommonAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(CommonAttribute instance); - }; \ No newline at end of file diff --git a/idl/ComponentContent.idl b/idl/arkui.ComponentContent.idl similarity index 30% rename from idl/ComponentContent.idl rename to idl/arkui.ComponentContent.idl index 149bdb3..668453e 100644 --- a/idl/ComponentContent.idl +++ b/idl/arkui.ComponentContent.idl @@ -1,21 +1,23 @@ -package arkui; -import arkui.BuildOptions as BuildOptions; -import arkui.Content as Content; -import ohos.arkui.UIContext as UIContext; +package arkui.ComponentContent; +import arkui.BuilderNode.BuildOptions as BuildOptions; +import arkui.Content.Content as Content; +import ohos.arkui.UIContext.UIContext as UIContext; +import common.WrappedBuilder as WrappedBuilder; +import arkui.BuilderNode.BuildOptions as BuildOptions; +import arkui.Content.Content as Content; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.component.builder.WrappedBuilder as WrappedBuilder; +import arkui.component.builder.CustomBuilder as CustomBuilder; +import arkui.component.builder.CustomBuilderT as CustomBuilderT; [Entity=Tuple, Synthetic] interface Tuple_ { - - }; [Entity=Tuple, Synthetic, TypeParameters="T"] interface Tuple_T { - attribute T value0; - }; -[Entity=Class, TypeParameters="T extends Object"] -interface ComponentContent: Content { - +[Entity=Class, TypeParameters="T"] +interface ComponentContent: [Extends] Content { constructor(UIContext uiContext, [TypeArguments="Tuple_"] WrappedBuilder builder); constructor(UIContext uiContext, [TypeArguments="Tuple_T"] WrappedBuilder builder, T args); constructor(UIContext uiContext, [TypeArguments="Tuple_T"] WrappedBuilder builder, T args, BuildOptions options); @@ -24,5 +26,17 @@ interface ComponentContent: Content { void recycle(); void dispose(); void updateConfiguration(); - + void inheritFreezeOptions(boolean enabled); + boolean isDisposed(); +}; +[Entity=Class, TypeParameters="T"] +interface ComponentContent: [Extends] Content { + constructor(UIContext uiContext, [TypeArguments="CustomBuilder"] WrappedBuilder builder); + constructor(UIContext uiContext, [TypeArguments="[TypeArguments='T'] CustomBuilderT"] WrappedBuilder builder, T args); + constructor(UIContext uiContext, [TypeArguments="[TypeArguments='T'] CustomBuilderT"] WrappedBuilder builder, T args, BuildOptions options); + void update(T args); + void reuse(optional record param); + void recycle(); + void dispose(); + void updateConfiguration(); }; \ No newline at end of file diff --git a/idl/ContainerSpanModifier.idl b/idl/arkui.ContainerSpanModifier.idl similarity index 40% rename from idl/ContainerSpanModifier.idl rename to idl/arkui.ContainerSpanModifier.idl index d0719cf..74cfc96 100644 --- a/idl/ContainerSpanModifier.idl +++ b/idl/arkui.ContainerSpanModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ContainerSpanModifier; [Entity=Class] -interface ContainerSpanModifier: ContainerSpanAttribute { - +interface ContainerSpanModifier: [Extends] ContainerSpanAttribute, [TypeArguments="ContainerSpanAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ContainerSpanAttribute containerSpanAttribute); - }; \ No newline at end of file diff --git a/idl/Content.idl b/idl/arkui.Content.idl similarity index 61% rename from idl/Content.idl rename to idl/arkui.Content.idl index 099db4b..fb569e7 100644 --- a/idl/Content.idl +++ b/idl/arkui.Content.idl @@ -1,6 +1,4 @@ -package arkui; +package arkui.Content; [Entity=Class] interface Content { - - }; \ No newline at end of file diff --git a/idl/CounterModifier.idl b/idl/arkui.CounterModifier.idl similarity index 38% rename from idl/CounterModifier.idl rename to idl/arkui.CounterModifier.idl index 4adb39c..5f7248e 100644 --- a/idl/CounterModifier.idl +++ b/idl/arkui.CounterModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.CounterModifier; [Entity=Class] -interface CounterModifier: CounterAttribute { - +interface CounterModifier: [Extends] CounterAttribute, [TypeArguments="CounterAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(CounterAttribute instance); - }; \ No newline at end of file diff --git a/idl/DataPanelModifier.idl b/idl/arkui.DataPanelModifier.idl similarity index 38% rename from idl/DataPanelModifier.idl rename to idl/arkui.DataPanelModifier.idl index 344ea97..fa7adc0 100644 --- a/idl/DataPanelModifier.idl +++ b/idl/arkui.DataPanelModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.DataPanelModifier; [Entity=Class] -interface DataPanelModifier: DataPanelAttribute { - +interface DataPanelModifier: [Extends] DataPanelAttribute, [TypeArguments="DataPanelAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(DataPanelAttribute instance); - }; \ No newline at end of file diff --git a/idl/DatePickerModifier.idl b/idl/arkui.DatePickerModifier.idl similarity index 37% rename from idl/DatePickerModifier.idl rename to idl/arkui.DatePickerModifier.idl index 7288452..6b9100f 100644 --- a/idl/DatePickerModifier.idl +++ b/idl/arkui.DatePickerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.DatePickerModifier; [Entity=Class] -interface DatePickerModifier: DatePickerAttribute { - +interface DatePickerModifier: [Extends] DatePickerAttribute, [TypeArguments="DatePickerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(DatePickerAttribute instance); - }; \ No newline at end of file diff --git a/idl/DividerModifier.idl b/idl/arkui.DividerModifier.idl similarity index 38% rename from idl/DividerModifier.idl rename to idl/arkui.DividerModifier.idl index b3a762b..710f87a 100644 --- a/idl/DividerModifier.idl +++ b/idl/arkui.DividerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.DividerModifier; [Entity=Class] -interface DividerModifier: DividerAttribute { - +interface DividerModifier: [Extends] DividerAttribute, [TypeArguments="DividerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(DividerAttribute instance); - }; \ No newline at end of file diff --git a/idl/FormComponentModifier.idl b/idl/arkui.FormComponentModifier.idl similarity index 36% rename from idl/FormComponentModifier.idl rename to idl/arkui.FormComponentModifier.idl index 798582a..54d65d2 100644 --- a/idl/FormComponentModifier.idl +++ b/idl/arkui.FormComponentModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.FormComponentModifier; [Entity=Class] -interface FormComponentModifier: FormComponentAttribute { - +interface FormComponentModifier: [Extends] FormComponentAttribute, [TypeArguments="FormComponentAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(FormComponentAttribute instance); - }; \ No newline at end of file diff --git a/idl/FrameNode.idl b/idl/arkui.FrameNode.idl similarity index 39% rename from idl/FrameNode.idl rename to idl/arkui.FrameNode.idl index e1d09e5..e2be6ae 100644 --- a/idl/FrameNode.idl +++ b/idl/arkui.FrameNode.idl @@ -1,39 +1,53 @@ -package arkui; -import ohos.arkui.UIContext as UIContext; -import arkui.RenderNode as RenderNode; +package arkui.FrameNode; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.RenderNode.RenderNode as RenderNode; import arkui.Graphics.Size as Size; import arkui.Graphics.Position as Position; import arkui.Graphics.Edges as Edges; import arkui.Graphics.LengthMetrics as LengthMetrics; import arkui.Graphics.SizeT as SizeT; import arkui.Graphics.DrawContext as DrawContext; -import arkui.ComponentContent as ComponentContent; +import arkui.ComponentContent.ComponentContent as ComponentContent; import ohos.base.BusinessError as BusinessError; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.component.common.UICommonEvent as UICommonEvent; +import arkui.component.common.UIGestureEvent as UIGestureEvent; +import arkui.component.common.CommonAttribute as CommonAttribute; +import arkui.component.list.ListOptions as ListOptions; +import arkui.component.list.ListAttribute as ListAttribute; [Entity=Interface] interface LayoutConstraint { - attribute Size maxSize; attribute Size minSize; attribute Size percentReference; - }; [Entity=Interface] interface CrossLanguageOptions { - [Optional] attribute boolean attributeSetting; - +}; +[Entity=Interface] +interface InteractionEventBindingInfo { + attribute boolean baseEventRegistered; + attribute boolean nodeEventRegistered; + attribute boolean nativeEventRegistered; + attribute boolean builtInEventRegistered; }; dictionary ExpandMode { - number NOT_EXPAND = 0; number EXPAND = 1; number LAZY_EXPAND = 2; - }; +dictionary UIState { + number NORMAL = 0; + number PRESSED = 1; + number FOCUSED = 2; + number DISABLED = 4; + number SELECTED = 8; +}; +callback UIStatesChangeHandler = void (FrameNode node, number currentUIStates); [Entity=Class] interface FrameNode { - constructor(UIContext uiContext); [Accessor=Getter] readonly attribute UICommonEvent commonEvent; @@ -51,8 +65,7 @@ interface FrameNode { void removeChild(FrameNode node); [Throws] void clearChildren(); - (FrameNode or undefined) getChild(number index); - (FrameNode or undefined) getChild(number index, optional ExpandMode expandMode); + (FrameNode or undefined) getChild(number index, optional (ExpandMode or undefined) expandMode); number getFirstChildIndexWithoutExpand(); number getLastChildIndexWithoutExpand(); (FrameNode or undefined) getFirstChild(); @@ -78,6 +91,7 @@ interface FrameNode { boolean isVisible(); boolean isClipToFrame(); boolean isAttached(); + boolean isDisposed(); Object getInspectorInfo(); (Object or undefined) getCustomProperty(String name); [Optional] @@ -91,6 +105,7 @@ interface FrameNode { void setNeedsLayout(); void invalidate(); Position getPositionToScreen(); + Position getGlobalPositionOnDisplay(); Position getPositionToWindowWithTransform(); Position getPositionToParentWithTransform(); Position getPositionToScreenWithTransform(); @@ -102,154 +117,233 @@ interface FrameNode { CrossLanguageOptions getCrossLanguageOptions(); void recycle(); void reuse(); - + (InteractionEventBindingInfo or undefined) getInteractionEventBindingInfo(EventQueryType eventType); + void addSupportedUIStates(number uiStates, UIStatesChangeHandler statesChangeHandler, optional boolean excludeInner); + void removeSupportedUIStates(number uiStates); + boolean createAnimation(AnimationPropertyType property, (sequence or undefined) startValue, sequence endValue, AnimateParam param); + boolean cancelAnimations(sequence properties); + sequence getNodePropertyValue(AnimationPropertyType property); }; [Entity=Interface, TypeParameters="C,T"] interface TypedFrameNode: FrameNode { - attribute C initialize; [DtsName="attribute"] readonly attribute T attribute_; - +}; +[Entity=Class, TypeParameters="T"] +interface TypedFrameNode: [Extends] FrameNode { + [Accessor=Getter] + readonly attribute T attribute_; }; namespace typeNode { - typedef [TypeArguments="TextInterface,TextAttribute"] TypedFrameNode Text; + [DtsName="createNode", DtsTag="1|nodeType|'Text'"] + Text createNodeText(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Text'"] + (TextAttribute or undefined) getAttributeText(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'Text'"] + void bindControllerText(FrameNode node, TextController controller); typedef [TypeArguments="ColumnInterface,ColumnAttribute"] TypedFrameNode Column; + [DtsName="createNode", DtsTag="1|nodeType|'Column'"] + Column createNodeColumn(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Column'"] + (ColumnAttribute or undefined) getAttributeColumn(FrameNode node); typedef [TypeArguments="RowInterface,RowAttribute"] TypedFrameNode Row; + [DtsName="createNode", DtsTag="1|nodeType|'Row'"] + Row createNodeRow(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Row'"] + (RowAttribute or undefined) getAttributeRow(FrameNode node); typedef [TypeArguments="StackInterface,StackAttribute"] TypedFrameNode Stack; + [DtsName="createNode", DtsTag="1|nodeType|'Stack'"] + Stack createNodeStack(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Stack'"] + (StackAttribute or undefined) getAttributeStack(FrameNode node); typedef [TypeArguments="GridRowInterface,GridRowAttribute"] TypedFrameNode GridRow; + [DtsName="createNode", DtsTag="1|nodeType|'GridRow'"] + GridRow createNodeGridRow(UIContext context); typedef [TypeArguments="GridColInterface,GridColAttribute"] TypedFrameNode GridCol; + [DtsName="createNode", DtsTag="1|nodeType|'GridCol'"] + GridCol createNodeGridCol(UIContext context); typedef [TypeArguments="FlexInterface,FlexAttribute"] TypedFrameNode Flex; + [DtsName="createNode", DtsTag="1|nodeType|'Flex'"] + Flex createNodeFlex(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Flex'"] + (FlexAttribute or undefined) getAttributeFlex(FrameNode node); typedef [TypeArguments="SwiperInterface,SwiperAttribute"] TypedFrameNode Swiper; + [DtsName="createNode", DtsTag="1|nodeType|'Swiper'"] + Swiper createNodeSwiper(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Swiper'"] + (SwiperAttribute or undefined) getAttributeSwiper(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'Swiper'"] + void bindControllerSwiper(FrameNode node, SwiperController controller); typedef [TypeArguments="ProgressInterface,ProgressAttribute"] TypedFrameNode Progress; + [DtsName="createNode", DtsTag="1|nodeType|'Progress'"] + Progress createNodeProgress(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Progress'"] + (ProgressAttribute or undefined) getAttributeProgress(FrameNode node); typedef [TypeArguments="ScrollInterface,ScrollAttribute"] TypedFrameNode Scroll; + [DtsName="createNode", DtsTag="1|nodeType|'Scroll'"] + Scroll createNodeScroll(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Scroll'"] + (ScrollAttribute or undefined) getAttributeScroll(FrameNode node); + [DtsName="getEvent", DtsTag="1|nodeType|'Scroll'"] + (UIScrollEvent or undefined) getEventScroll(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'Scroll'"] + void bindControllerScroll(FrameNode node, Scroller controller); typedef [TypeArguments="RelativeContainerInterface,RelativeContainerAttribute"] TypedFrameNode RelativeContainer; + [DtsName="createNode", DtsTag="1|nodeType|'RelativeContainer'"] + RelativeContainer createNodeRelativeContainer(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'RelativeContainer'"] + (RelativeContainerAttribute or undefined) getAttributeRelativeContainer(FrameNode node); typedef [TypeArguments="DividerInterface,DividerAttribute"] TypedFrameNode Divider; + [DtsName="createNode", DtsTag="1|nodeType|'Divider'"] + Divider createNodeDivider(UIContext context); typedef [TypeArguments="LoadingProgressInterface,LoadingProgressAttribute"] TypedFrameNode LoadingProgress; + [DtsName="createNode", DtsTag="1|nodeType|'LoadingProgress'"] + LoadingProgress createNodeLoadingProgress(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'LoadingProgress'"] + (LoadingProgressAttribute or undefined) getAttributeLoadingProgress(FrameNode node); typedef [TypeArguments="SearchInterface,SearchAttribute"] TypedFrameNode Search; + [DtsName="createNode", DtsTag="1|nodeType|'Search'"] + Search createNodeSearch(UIContext context); typedef [TypeArguments="BlankInterface,BlankAttribute"] TypedFrameNode Blank; + [DtsName="createNode", DtsTag="1|nodeType|'Blank'"] + Blank createNodeBlank(UIContext context); typedef [TypeArguments="ImageInterface,ImageAttribute"] TypedFrameNode Image; + [DtsName="createNode", DtsTag="1|nodeType|'Image'"] + Image createNodeImage(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Image'"] + (ImageAttribute or undefined) getAttributeImage(FrameNode node); typedef [TypeArguments="ListInterface,ListAttribute"] TypedFrameNode List; + [Entity=Class] + interface ListFrameNode: [Extends, TypeArguments="ListAttribute"] TypedFrameNode { + ListAttribute initialize(optional ListOptions options); + }; + typedef ListFrameNode List; + [DtsName="createNode", DtsTag="1|nodeType|'List'"] + List createNodeList(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'List'"] + (ListAttribute or undefined) getAttributeList(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'List'"] + void bindControllerList(FrameNode node, Scroller controller); typedef [TypeArguments="ListItemInterface,ListItemAttribute"] TypedFrameNode ListItem; + [DtsName="getEvent", DtsTag="1|nodeType|'List'"] + (UIListEvent or undefined) getEventList(FrameNode node); + [DtsName="createNode", DtsTag="1|nodeType|'ListItem'"] + ListItem createNodeListItem(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'ListItem'"] + (ListItemAttribute or undefined) getAttributeListItem(FrameNode node); typedef [TypeArguments="TextInputInterface,TextInputAttribute"] TypedFrameNode TextInput; + [DtsName="createNode", DtsTag="1|nodeType|'TextInput'"] + TextInput createNodeTextInput(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'TextInput'"] + (TextInputAttribute or undefined) getAttributeTextInput(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'TextInput'"] + void bindControllerTextInput(FrameNode node, TextInputController controller); typedef [TypeArguments="ButtonInterface,ButtonAttribute"] TypedFrameNode Button; + [DtsName="createNode", DtsTag="1|nodeType|'Button'"] + Button createNodeButton(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Button'"] + (ButtonAttribute or undefined) getAttributeButton(FrameNode node); typedef [TypeArguments="ListItemGroupInterface,ListItemGroupAttribute"] TypedFrameNode ListItemGroup; + [DtsName="createNode", DtsTag="1|nodeType|'ListItemGroup'"] + ListItemGroup createNodeListItemGroup(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'ListItemGroup'"] + (ListItemGroupAttribute or undefined) getAttributeListItemGroup(FrameNode node); typedef [TypeArguments="WaterFlowInterface,WaterFlowAttribute"] TypedFrameNode WaterFlow; + [DtsName="createNode", DtsTag="1|nodeType|'WaterFlow'"] + WaterFlow createNodeWaterFlow(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'WaterFlow'"] + (WaterFlowAttribute or undefined) getAttributeWaterFlow(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'WaterFlow'"] + void bindControllerWaterFlow(FrameNode node, Scroller controller); + [DtsName="getEvent", DtsTag="1|nodeType|'WaterFlow'"] + (UIWaterFlowEvent or undefined) getEventWaterFlow(FrameNode node); typedef [TypeArguments="FlowItemInterface,FlowItemAttribute"] TypedFrameNode FlowItem; + [DtsName="createNode", DtsTag="1|nodeType|'FlowItem'"] + FlowItem createNodeFlowItem(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'FlowItem'"] + (FlowItemAttribute or undefined) getAttributeFlowItem(FrameNode node); typedef [TypeArguments="XComponentInterface,XComponentAttribute"] TypedFrameNode XComponent; + [DtsName="createNode", DtsTag="1|nodeType|'XComponent'"] + XComponent createNodeXComponent(UIContext context); + [DtsName="createNode", DtsTag="1|nodeType|'XComponent'"] + XComponent createNodeXComponent(UIContext context, XComponentOptions options); + [DtsName="createNode", DtsTag="1|nodeType|'XComponent'"] + XComponent createNodeXComponent(UIContext context, NativeXComponentParameters parameters); + [DtsName="getAttribute", DtsTag="1|nodeType|'XComponent'"] + (XComponentAttribute or undefined) getAttributeXComponent(FrameNode node); typedef [TypeArguments="CheckboxInterface,CheckboxAttribute"] TypedFrameNode Checkbox; + [DtsName="createNode", DtsTag="1|nodeType|'Checkbox'"] + Checkbox createNodeCheckbox(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Checkbox'"] + (CheckboxAttribute or undefined) getAttributeCheckbox(FrameNode node); typedef [TypeArguments="CheckboxGroupInterface,CheckboxGroupAttribute"] TypedFrameNode CheckboxGroup; + [DtsName="createNode", DtsTag="1|nodeType|'CheckboxGroup'"] + CheckboxGroup createNodeCheckboxGroup(UIContext context); typedef [TypeArguments="RadioInterface,RadioAttribute"] TypedFrameNode Radio; + [DtsName="createNode", DtsTag="1|nodeType|'Radio'"] + Radio createNodeRadio(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Radio'"] + (RadioAttribute or undefined) getAttributeRadio(FrameNode node); typedef [TypeArguments="RatingInterface,RatingAttribute"] TypedFrameNode Rating; + [DtsName="createNode", DtsTag="1|nodeType|'Rating'"] + Rating createNodeRating(UIContext context); typedef [TypeArguments="SelectInterface,SelectAttribute"] TypedFrameNode Select; + [DtsName="createNode", DtsTag="1|nodeType|'Select'"] + Select createNodeSelect(UIContext context); typedef [TypeArguments="SliderInterface,SliderAttribute"] TypedFrameNode Slider; + [DtsName="createNode", DtsTag="1|nodeType|'Slider'"] + Slider createNodeSlider(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Slider'"] + (SliderAttribute or undefined) getAttributeSlider(FrameNode node); typedef [TypeArguments="ToggleInterface,ToggleAttribute"] TypedFrameNode Toggle; + [DtsName="createNode", DtsTag="1|nodeType|'Toggle'"] + Toggle createNodeToggle(UIContext context, optional ToggleOptions options); + [DtsName="getAttribute", DtsTag="1|nodeType|'Toggle'"] + (ToggleAttribute or undefined) getAttributeToggle(FrameNode node); typedef [TypeArguments="MarqueeInterface,MarqueeAttribute"] TypedFrameNode Marquee; + [DtsName="createNode", DtsTag="1|nodeType|'Marquee'"] + Marquee createNodeMarquee(UIContext context); typedef [TypeArguments="TextAreaInterface,TextAreaAttribute"] TypedFrameNode TextArea; + [DtsName="createNode", DtsTag="1|nodeType|'TextArea'"] + TextArea createNodeTextArea(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'TextArea'"] + (TextAreaAttribute or undefined) getAttributeTextArea(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'TextArea'"] + void bindControllerTextArea(FrameNode node, TextAreaController controller); typedef [TypeArguments="SymbolGlyphInterface,SymbolGlyphAttribute"] TypedFrameNode SymbolGlyph; + [DtsName="createNode", DtsTag="1|nodeType|'SymbolGlyph'"] + SymbolGlyph createNodeSymbolGlyph(UIContext context); typedef [TypeArguments="QRCodeInterface,QRCodeAttribute"] TypedFrameNode QRCode; + [DtsName="createNode", DtsTag="1|nodeType|'QRCode'"] + QRCode createNodeQRCode(UIContext context); typedef [TypeArguments="BadgeInterface,BadgeAttribute"] TypedFrameNode Badge; + [DtsName="createNode", DtsTag="1|nodeType|'Badge'"] + Badge createNodeBadge(UIContext context); typedef [TypeArguments="TextClockInterface,TextClockAttribute"] TypedFrameNode TextClock; + [DtsName="createNode", DtsTag="1|nodeType|'TextClock'"] + TextClock createNodeTextClock(UIContext context); typedef [TypeArguments="TextTimerInterface,TextTimerAttribute"] TypedFrameNode TextTimer; + [DtsName="createNode", DtsTag="1|nodeType|'TextTimer'"] + TextTimer createNodeTextTimer(UIContext context); typedef [TypeArguments="GridInterface,GridAttribute"] TypedFrameNode Grid; + [DtsName="createNode", DtsTag="1|nodeType|'Grid'"] + Grid createNodeGrid(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'Grid'"] + (GridAttribute or undefined) getAttributeGrid(FrameNode node); + [Throws, DtsName="bindController", DtsTag="2|nodeType|'Grid'"] + void bindControllerGrid(FrameNode node, Scroller controller); + [DtsName="getEvent", DtsTag="1|nodeType|'Grid'"] + (UIGridEvent or undefined) getEventGrid(FrameNode node); typedef [TypeArguments="GridItemInterface,GridItemAttribute"] TypedFrameNode GridItem; - [GlobalScope] - interface GlobalScope_typeNode_FrameNode { - - [DtsName="createNode", DtsTag="1|nodeType|'Text'"] - static Text createNodeText(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Column'"] - static Column createNodeColumn(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Row'"] - static Row createNodeRow(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Stack'"] - static Stack createNodeStack(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'GridRow'"] - static GridRow createNodeGridRow(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'GridCol'"] - static GridCol createNodeGridCol(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Flex'"] - static Flex createNodeFlex(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Swiper'"] - static Swiper createNodeSwiper(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Progress'"] - static Progress createNodeProgress(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Scroll'"] - static Scroll createNodeScroll(UIContext context); - [DtsName="getAttribute", DtsTag="1|nodeType|'Scroll'"] - static (ScrollAttribute or undefined) getAttributeScroll(FrameNode node); - [Throws, DtsName="bindController", DtsTag="2|nodeType|'Scroll'"] - static void bindControllerScroll(FrameNode node, Scroller controller); - [DtsName="createNode", DtsTag="1|nodeType|'RelativeContainer'"] - static RelativeContainer createNodeRelativeContainer(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Divider'"] - static Divider createNodeDivider(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'LoadingProgress'"] - static LoadingProgress createNodeLoadingProgress(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Search'"] - static Search createNodeSearch(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Blank'"] - static Blank createNodeBlank(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Image'"] - static Image createNodeImage(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'List'"] - static List createNodeList(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'ListItem'"] - static ListItem createNodeListItem(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'TextInput'"] - static TextInput createNodeTextInput(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Button'"] - static Button createNodeButton(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'ListItemGroup'"] - static ListItemGroup createNodeListItemGroup(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'WaterFlow'"] - static WaterFlow createNodeWaterFlow(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'FlowItem'"] - static FlowItem createNodeFlowItem(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'XComponent'"] - static XComponent createNodeXComponent(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'XComponent'"] - static XComponent createNodeXComponent(UIContext context, XComponentOptions options); - [DtsName="createNode", DtsTag="1|nodeType|'Checkbox'"] - static Checkbox createNodeCheckbox(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'CheckboxGroup'"] - static CheckboxGroup createNodeCheckboxGroup(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Radio'"] - static Radio createNodeRadio(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Rating'"] - static Rating createNodeRating(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Select'"] - static Select createNodeSelect(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Slider'"] - static Slider createNodeSlider(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Toggle'"] - static Toggle createNodeToggle(UIContext context, optional ToggleOptions options); - [DtsName="createNode", DtsTag="1|nodeType|'Marquee'"] - static Marquee createNodeMarquee(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'TextArea'"] - static TextArea createNodeTextArea(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'SymbolGlyph'"] - static SymbolGlyph createNodeSymbolGlyph(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'QRCode'"] - static QRCode createNodeQRCode(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Badge'"] - static Badge createNodeBadge(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'TextClock'"] - static TextClock createNodeTextClock(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'TextTimer'"] - static TextTimer createNodeTextTimer(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'Grid'"] - static Grid createNodeGrid(UIContext context); - [DtsName="createNode", DtsTag="1|nodeType|'GridItem'"] - static GridItem createNodeGridItem(UIContext context); - - }; - + [DtsName="createNode", DtsTag="1|nodeType|'GridItem'"] + GridItem createNodeGridItem(UIContext context); + [DtsName="getAttribute", DtsTag="1|nodeType|'GridItem'"] + (GridItemAttribute or undefined) getAttributeGridItem(FrameNode node); }; [Entity=Class] interface NodeAdapter { - constructor(); attribute number totalNodeCount; void dispose(); @@ -273,5 +367,5 @@ interface NodeAdapter { void onUpdateChild(number id, FrameNode node); static boolean attachNodeAdapter(NodeAdapter adapter, FrameNode node); static void detachNodeAdapter(FrameNode node); - + boolean isDisposed(); }; \ No newline at end of file diff --git a/idl/GaugeModifier.idl b/idl/arkui.GaugeModifier.idl similarity index 39% rename from idl/GaugeModifier.idl rename to idl/arkui.GaugeModifier.idl index f6d93d2..bdf28ba 100644 --- a/idl/GaugeModifier.idl +++ b/idl/arkui.GaugeModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.GaugeModifier; [Entity=Class] -interface GaugeModifier: GaugeAttribute { - +interface GaugeModifier: [Extends] GaugeAttribute, [TypeArguments="GaugeAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(GaugeAttribute instance); - }; \ No newline at end of file diff --git a/idl/Graphics.idl b/idl/arkui.Graphics.idl similarity index 87% rename from idl/Graphics.idl rename to idl/arkui.Graphics.idl index 9b8fa84..b74e98f 100644 --- a/idl/Graphics.idl +++ b/idl/arkui.Graphics.idl @@ -1,50 +1,41 @@ package arkui.Graphics; -import ohos.graphics.drawing as drawing; -import ohos.graphics.common2D as common2D; -import Resource as Resource; +import ohos.graphics.drawing.default as drawing; +import ohos.graphics.common2D.default as common2D; +import resource.Resource as Resource; +import arkui.component.units.ResourceColor as ResourceColor; +import arkui.component.enums.BorderStyle as BorderStyle; [Entity=Interface] interface Size { - attribute number width; attribute number height; - }; [Entity=Class] interface DrawContext { - [Accessor=Getter] readonly attribute Size size; [Accessor=Getter] readonly attribute Size sizeInPixel; [Accessor=Getter] readonly attribute drawing.Canvas canvas; - }; [Entity=Interface] interface Vector2 { - attribute number x; attribute number y; - }; [Entity=Interface, TypeParameters="T"] interface Vector2T { - attribute T x; attribute T y; - }; [Entity=Interface] interface Vector3 { - attribute number x; attribute number y; attribute number z; - }; [Entity=Tuple] interface Matrix4 { - attribute number value0; attribute number value1; attribute number value2; @@ -61,7 +52,6 @@ interface Matrix4 { attribute number value13; attribute number value14; attribute number value15; - }; typedef Vector2 Offset; typedef Vector2 Position; @@ -73,47 +63,36 @@ typedef Vector2 Translation; typedef Vector3 Rotation; [Entity=Interface] interface Frame { - attribute number x; attribute number y; attribute number width; attribute number height; - }; [Entity=Interface, TypeParameters="T"] interface Edges { - attribute T left; attribute T right; attribute T top; attribute T bottom; - }; dictionary LengthUnit { - number PX = 0; number VP = 1; number FP = 2; number PERCENT = 3; number LPX = 4; - }; [Entity=Interface, TypeParameters="T"] interface SizeT { - attribute T width; attribute T height; - }; dictionary LengthMetricsUnit { - number DEFAULT = 0; number PX = 1; - }; [Entity=Class] interface LengthMetrics { - constructor(number value, optional LengthUnit unit); attribute LengthUnit unit; attribute number value; @@ -124,11 +103,9 @@ interface LengthMetrics { static LengthMetrics lpx(number value); [Throws] static LengthMetrics resource(Resource value); - }; [Entity=Class] interface ColorMetrics { - [Accessor=Getter] readonly attribute String color; [Accessor=Getter] @@ -141,48 +118,39 @@ interface ColorMetrics { readonly attribute number alpha; static ColorMetrics numeric(number value); static ColorMetrics rgba(number red, number green, number blue, optional number alpha); + static ColorMetrics colorWithSpace(ColorSpace colorSpace, number red, number green, number blue, optional number alpha); [Throws] static ColorMetrics resourceColor(ResourceColor color); [Throws] ColorMetrics blendColor(ColorMetrics overlayColor); - }; [Entity=Interface, TypeParameters="T"] interface Corners { - attribute T topLeft; attribute T topRight; attribute T bottomLeft; attribute T bottomRight; - }; typedef [TypeArguments="Vector2"] Corners CornerRadius; typedef [TypeArguments="number"] Corners BorderRadiuses; typedef common2D.Rect Rect; [Entity=Interface] interface RoundRect { - attribute Rect rect; attribute CornerRadius corners; - }; [Entity=Interface] interface Circle { - attribute number centerX; attribute number centerY; attribute number radius; - }; [Entity=Interface] interface CommandPath { - attribute String commands; - }; [Entity=Class] interface ShapeMask { - constructor(); attribute number fillColor; attribute number strokeColor; @@ -192,25 +160,17 @@ interface ShapeMask { void setCircleShape(Circle circle); void setOvalShape(Rect oval); void setCommandPath(CommandPath path); - }; [Entity=Class] interface ShapeClip { - constructor(); void setRectShape(Rect rect); void setRoundRectShape(RoundRect roundRect); void setCircleShape(Circle circle); void setOvalShape(Rect oval); void setCommandPath(CommandPath path); - -}; -[GlobalScope] -interface GlobalScope_Graphics { - - static ([TypeArguments="number"] Edges) edgeColors(number all); - static ([TypeArguments="number"] Edges) edgeWidths(number all); - static ([TypeArguments="BorderStyle"] Edges) borderStyles(BorderStyle all); - static BorderRadiuses borderRadiuses(number all); - -}; \ No newline at end of file +}; +([TypeArguments="number"] Edges) edgeColors(number all); +([TypeArguments="number"] Edges) edgeWidths(number all); +([TypeArguments="BorderStyle"] Edges) borderStyles(BorderStyle all); +BorderRadiuses borderRadiuses(number all); \ No newline at end of file diff --git a/idl/GridColModifier.idl b/idl/arkui.GridColModifier.idl similarity index 38% rename from idl/GridColModifier.idl rename to idl/arkui.GridColModifier.idl index 4ced395..7aaf67f 100644 --- a/idl/GridColModifier.idl +++ b/idl/arkui.GridColModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.GridColModifier; [Entity=Class] -interface GridColModifier: GridColAttribute { - +interface GridColModifier: [Extends] GridColAttribute, [TypeArguments="GridColAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(GridColAttribute instance); - }; \ No newline at end of file diff --git a/idl/GridItemModifier.idl b/idl/arkui.GridItemModifier.idl similarity index 38% rename from idl/GridItemModifier.idl rename to idl/arkui.GridItemModifier.idl index a255f31..4c15b1a 100644 --- a/idl/GridItemModifier.idl +++ b/idl/arkui.GridItemModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.GridItemModifier; [Entity=Class] -interface GridItemModifier: GridItemAttribute { - +interface GridItemModifier: [Extends] GridItemAttribute, [TypeArguments="GridItemAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(GridItemAttribute instance); - }; \ No newline at end of file diff --git a/idl/GridModifier.idl b/idl/arkui.GridModifier.idl similarity index 40% rename from idl/GridModifier.idl rename to idl/arkui.GridModifier.idl index f04d74b..437fb76 100644 --- a/idl/GridModifier.idl +++ b/idl/arkui.GridModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.GridModifier; [Entity=Class] -interface GridModifier: GridAttribute { - +interface GridModifier: [Extends] GridAttribute, [TypeArguments="GridAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(GridAttribute instance); - }; \ No newline at end of file diff --git a/idl/GridRowModifier.idl b/idl/arkui.GridRowModifier.idl similarity index 38% rename from idl/GridRowModifier.idl rename to idl/arkui.GridRowModifier.idl index 9f1d8ba..5ea8f63 100644 --- a/idl/GridRowModifier.idl +++ b/idl/arkui.GridRowModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.GridRowModifier; [Entity=Class] -interface GridRowModifier: GridRowAttribute { - +interface GridRowModifier: [Extends] GridRowAttribute, [TypeArguments="GridRowAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(GridRowAttribute instance); - }; \ No newline at end of file diff --git a/idl/HyperlinkModifier.idl b/idl/arkui.HyperlinkModifier.idl similarity index 38% rename from idl/HyperlinkModifier.idl rename to idl/arkui.HyperlinkModifier.idl index 16e98bd..edf8bb3 100644 --- a/idl/HyperlinkModifier.idl +++ b/idl/arkui.HyperlinkModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.HyperlinkModifier; [Entity=Class] -interface HyperlinkModifier: HyperlinkAttribute { - +interface HyperlinkModifier: [Extends] HyperlinkAttribute, [TypeArguments="HyperlinkAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(HyperlinkAttribute instance); - }; \ No newline at end of file diff --git a/idl/ImageAnimatorModifier.idl b/idl/arkui.ImageAnimatorModifier.idl similarity index 36% rename from idl/ImageAnimatorModifier.idl rename to idl/arkui.ImageAnimatorModifier.idl index b8f2e78..360d7bc 100644 --- a/idl/ImageAnimatorModifier.idl +++ b/idl/arkui.ImageAnimatorModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ImageAnimatorModifier; [Entity=Class] -interface ImageAnimatorModifier: ImageAnimatorAttribute { - +interface ImageAnimatorModifier: [Extends] ImageAnimatorAttribute, [TypeArguments="ImageAnimatorAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ImageAnimatorAttribute instance); - }; \ No newline at end of file diff --git a/idl/ImageModifier.idl b/idl/arkui.ImageModifier.idl similarity index 39% rename from idl/ImageModifier.idl rename to idl/arkui.ImageModifier.idl index d12d84d..5542bc2 100644 --- a/idl/ImageModifier.idl +++ b/idl/arkui.ImageModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ImageModifier; [Entity=Class] -interface ImageModifier: ImageAttribute { - +interface ImageModifier: [Extends] ImageAttribute, [TypeArguments="ImageAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ImageAttribute instance); - }; \ No newline at end of file diff --git a/idl/ImageSpanModifier.idl b/idl/arkui.ImageSpanModifier.idl similarity index 38% rename from idl/ImageSpanModifier.idl rename to idl/arkui.ImageSpanModifier.idl index b015848..8ac1f43 100644 --- a/idl/ImageSpanModifier.idl +++ b/idl/arkui.ImageSpanModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ImageSpanModifier; [Entity=Class] -interface ImageSpanModifier: ImageSpanAttribute { - +interface ImageSpanModifier: [Extends] ImageSpanAttribute, [TypeArguments="ImageSpanAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ImageSpanAttribute instance); - }; \ No newline at end of file diff --git a/idl/LineModifier.idl b/idl/arkui.LineModifier.idl similarity index 40% rename from idl/LineModifier.idl rename to idl/arkui.LineModifier.idl index d790bf9..868d2fa 100644 --- a/idl/LineModifier.idl +++ b/idl/arkui.LineModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.LineModifier; [Entity=Class] -interface LineModifier: LineAttribute { - +interface LineModifier: [Extends] LineAttribute, [TypeArguments="LineAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(LineAttribute instance); - }; \ No newline at end of file diff --git a/idl/ListItemGroupModifier.idl b/idl/arkui.ListItemGroupModifier.idl similarity index 36% rename from idl/ListItemGroupModifier.idl rename to idl/arkui.ListItemGroupModifier.idl index da78fd4..bbc9e2d 100644 --- a/idl/ListItemGroupModifier.idl +++ b/idl/arkui.ListItemGroupModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ListItemGroupModifier; [Entity=Class] -interface ListItemGroupModifier: ListItemGroupAttribute { - +interface ListItemGroupModifier: [Extends] ListItemGroupAttribute, [TypeArguments="ListItemGroupAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ListItemGroupAttribute instance); - }; \ No newline at end of file diff --git a/idl/ListItemModifier.idl b/idl/arkui.ListItemModifier.idl similarity index 38% rename from idl/ListItemModifier.idl rename to idl/arkui.ListItemModifier.idl index 485d3d7..c5ee0c5 100644 --- a/idl/ListItemModifier.idl +++ b/idl/arkui.ListItemModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ListItemModifier; [Entity=Class] -interface ListItemModifier: ListItemAttribute { - +interface ListItemModifier: [Extends] ListItemAttribute, [TypeArguments="ListItemAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ListItemAttribute instance); - }; \ No newline at end of file diff --git a/idl/ListModifier.idl b/idl/arkui.ListModifier.idl similarity index 40% rename from idl/ListModifier.idl rename to idl/arkui.ListModifier.idl index a842daf..c2606c7 100644 --- a/idl/ListModifier.idl +++ b/idl/arkui.ListModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ListModifier; [Entity=Class] -interface ListModifier: ListAttribute { - +interface ListModifier: [Extends] ListAttribute, [TypeArguments="ListAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ListAttribute instance); - }; \ No newline at end of file diff --git a/idl/LoadingProgressModifier.idl b/idl/arkui.LoadingProgressModifier.idl similarity index 36% rename from idl/LoadingProgressModifier.idl rename to idl/arkui.LoadingProgressModifier.idl index 89e5bb1..b651cca 100644 --- a/idl/LoadingProgressModifier.idl +++ b/idl/arkui.LoadingProgressModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.LoadingProgressModifier; [Entity=Class] -interface LoadingProgressModifier: LoadingProgressAttribute { - +interface LoadingProgressModifier: [Extends] LoadingProgressAttribute, [TypeArguments="LoadingProgressAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(LoadingProgressAttribute instance); - }; \ No newline at end of file diff --git a/idl/MarqueeModifier.idl b/idl/arkui.MarqueeModifier.idl similarity index 38% rename from idl/MarqueeModifier.idl rename to idl/arkui.MarqueeModifier.idl index c5dc892..470578f 100644 --- a/idl/MarqueeModifier.idl +++ b/idl/arkui.MarqueeModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.MarqueeModifier; [Entity=Class] -interface MarqueeModifier: MarqueeAttribute { - +interface MarqueeModifier: [Extends] MarqueeAttribute, [TypeArguments="MarqueeAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(MarqueeAttribute instance); - }; \ No newline at end of file diff --git a/idl/MenuItemModifier.idl b/idl/arkui.MenuItemModifier.idl similarity index 38% rename from idl/MenuItemModifier.idl rename to idl/arkui.MenuItemModifier.idl index c5f639a..7fa8611 100644 --- a/idl/MenuItemModifier.idl +++ b/idl/arkui.MenuItemModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.MenuItemModifier; [Entity=Class] -interface MenuItemModifier: MenuItemAttribute { - +interface MenuItemModifier: [Extends] MenuItemAttribute, [TypeArguments="MenuItemAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(MenuItemAttribute instance); - }; \ No newline at end of file diff --git a/idl/MenuModifier.idl b/idl/arkui.MenuModifier.idl similarity index 40% rename from idl/MenuModifier.idl rename to idl/arkui.MenuModifier.idl index 0b94ba3..19f42a7 100644 --- a/idl/MenuModifier.idl +++ b/idl/arkui.MenuModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.MenuModifier; [Entity=Class] -interface MenuModifier: MenuAttribute { - +interface MenuModifier: [Extends] MenuAttribute, [TypeArguments="MenuAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(MenuAttribute instance); - }; \ No newline at end of file diff --git a/idl/NavDestinationModifier.idl b/idl/arkui.NavDestinationModifier.idl similarity index 36% rename from idl/NavDestinationModifier.idl rename to idl/arkui.NavDestinationModifier.idl index c01f292..9d9e2fd 100644 --- a/idl/NavDestinationModifier.idl +++ b/idl/arkui.NavDestinationModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.NavDestinationModifier; [Entity=Class] -interface NavDestinationModifier: NavDestinationAttribute { - +interface NavDestinationModifier: [Extends] NavDestinationAttribute, [TypeArguments="NavDestinationAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(NavDestinationAttribute instance); - }; \ No newline at end of file diff --git a/idl/arkui.NavRouterModifier.idl b/idl/arkui.NavRouterModifier.idl new file mode 100644 index 0000000..93ab6ce --- /dev/null +++ b/idl/arkui.NavRouterModifier.idl @@ -0,0 +1,6 @@ +package arkui.NavRouterModifier; +[Entity=Class, Deprecated] +interface NavRouterModifier: [Extends] NavRouterAttribute, [TypeArguments="NavRouterAttribute"] AttributeModifier { + [Deprecated, Optional] + void applyNormalAttribute(NavRouterAttribute instance); +}; \ No newline at end of file diff --git a/idl/NavigationModifier.idl b/idl/arkui.NavigationModifier.idl similarity index 37% rename from idl/NavigationModifier.idl rename to idl/arkui.NavigationModifier.idl index aaff9c9..a82c0fb 100644 --- a/idl/NavigationModifier.idl +++ b/idl/arkui.NavigationModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.NavigationModifier; [Entity=Class] -interface NavigationModifier: NavigationAttribute { - +interface NavigationModifier: [Extends] NavigationAttribute, [TypeArguments="NavigationAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(NavigationAttribute instance); - }; \ No newline at end of file diff --git a/idl/arkui.NavigatorModifier.idl b/idl/arkui.NavigatorModifier.idl new file mode 100644 index 0000000..2f916a2 --- /dev/null +++ b/idl/arkui.NavigatorModifier.idl @@ -0,0 +1,6 @@ +package arkui.NavigatorModifier; +[Entity=Class, Deprecated] +interface NavigatorModifier: [Extends] NavigatorAttribute, [TypeArguments="NavigatorAttribute"] AttributeModifier { + [Deprecated, Optional] + void applyNormalAttribute(NavigatorAttribute instance); +}; \ No newline at end of file diff --git a/idl/NodeContent.idl b/idl/arkui.NodeContent.idl similarity index 42% rename from idl/NodeContent.idl rename to idl/arkui.NodeContent.idl index c38f49f..00c8f3b 100644 --- a/idl/NodeContent.idl +++ b/idl/arkui.NodeContent.idl @@ -1,11 +1,9 @@ -package arkui; -import arkui.Content as Content; -import arkui.FrameNode as FrameNode; +package arkui.NodeContent; +import arkui.Content.Content as Content; +import arkui.FrameNode.FrameNode as FrameNode; [Entity=Class] -interface NodeContent: Content { - +interface NodeContent: [Extends] Content { constructor(); void addFrameNode(FrameNode node); void removeFrameNode(FrameNode node); - }; \ No newline at end of file diff --git a/idl/NodeController.idl b/idl/arkui.NodeController.idl similarity index 66% rename from idl/NodeController.idl rename to idl/arkui.NodeController.idl index 35ee160..098be59 100644 --- a/idl/NodeController.idl +++ b/idl/arkui.NodeController.idl @@ -1,31 +1,21 @@ -package arkui; -import ohos.arkui.UIContext as UIContext; -import arkui.FrameNode as FrameNode; +package arkui.NodeController; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.FrameNode.FrameNode as FrameNode; import arkui.Graphics.Size as Size; +import ohos.base.Callback as Callback; +import arkui.component.common.TouchEvent as TouchEvent; [Entity=Class] interface NodeController { - (FrameNode or undefined) makeNode(UIContext uiContext); - [Optional] void aboutToResize(Size size); - [Optional] void aboutToAppear(); - [Optional] void aboutToDisappear(); void rebuild(); - [Optional] void onTouchEvent(TouchEvent event); - [Optional] void onAttach(); - [Optional] void onDetach(); - [Optional] void onWillBind(number containerId); - [Optional] void onWillUnbind(number containerId); - [Optional] void onBind(number containerId); - [Optional] void onUnbind(number containerId); - }; \ No newline at end of file diff --git a/idl/arkui.PanelModifier.idl b/idl/arkui.PanelModifier.idl new file mode 100644 index 0000000..80eb9ed --- /dev/null +++ b/idl/arkui.PanelModifier.idl @@ -0,0 +1,6 @@ +package arkui.PanelModifier; +[Entity=Class, Deprecated] +interface PanelModifier: [Extends] PanelAttribute, [TypeArguments="PanelAttribute"] AttributeModifier { + [Deprecated, Optional] + void applyNormalAttribute(PanelAttribute instance); +}; \ No newline at end of file diff --git a/idl/arkui.ParticleModifier.idl b/idl/arkui.ParticleModifier.idl new file mode 100644 index 0000000..7c584d2 --- /dev/null +++ b/idl/arkui.ParticleModifier.idl @@ -0,0 +1 @@ +package arkui.ParticleModifier; \ No newline at end of file diff --git a/idl/PathModifier.idl b/idl/arkui.PathModifier.idl similarity index 40% rename from idl/PathModifier.idl rename to idl/arkui.PathModifier.idl index 475e5a3..08e7187 100644 --- a/idl/PathModifier.idl +++ b/idl/arkui.PathModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.PathModifier; [Entity=Class] -interface PathModifier: PathAttribute { - +interface PathModifier: [Extends] PathAttribute, [TypeArguments="PathAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(PathAttribute instance); - }; \ No newline at end of file diff --git a/idl/PatternLockModifier.idl b/idl/arkui.PatternLockModifier.idl similarity index 37% rename from idl/PatternLockModifier.idl rename to idl/arkui.PatternLockModifier.idl index 2f35ba0..d9f79b3 100644 --- a/idl/PatternLockModifier.idl +++ b/idl/arkui.PatternLockModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.PatternLockModifier; [Entity=Class] -interface PatternLockModifier: PatternLockAttribute { - +interface PatternLockModifier: [Extends] PatternLockAttribute, [TypeArguments="PatternLockAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(PatternLockAttribute instance); - }; \ No newline at end of file diff --git a/idl/PolygonModifier.idl b/idl/arkui.PolygonModifier.idl similarity index 38% rename from idl/PolygonModifier.idl rename to idl/arkui.PolygonModifier.idl index 0861f65..fcdd507 100644 --- a/idl/PolygonModifier.idl +++ b/idl/arkui.PolygonModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.PolygonModifier; [Entity=Class] -interface PolygonModifier: PolygonAttribute { - +interface PolygonModifier: [Extends] PolygonAttribute, [TypeArguments="PolygonAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(PolygonAttribute instance); - }; \ No newline at end of file diff --git a/idl/PolylineModifier.idl b/idl/arkui.PolylineModifier.idl similarity index 38% rename from idl/PolylineModifier.idl rename to idl/arkui.PolylineModifier.idl index 209e2f4..869804e 100644 --- a/idl/PolylineModifier.idl +++ b/idl/arkui.PolylineModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.PolylineModifier; [Entity=Class] -interface PolylineModifier: PolylineAttribute { - +interface PolylineModifier: [Extends] PolylineAttribute, [TypeArguments="PolylineAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(PolylineAttribute instance); - }; \ No newline at end of file diff --git a/idl/ProgressModifier.idl b/idl/arkui.ProgressModifier.idl similarity index 38% rename from idl/ProgressModifier.idl rename to idl/arkui.ProgressModifier.idl index 8b3f390..d231b6b 100644 --- a/idl/ProgressModifier.idl +++ b/idl/arkui.ProgressModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ProgressModifier; [Entity=Class] -interface ProgressModifier: ProgressAttribute { - +interface ProgressModifier: [Extends] ProgressAttribute, [TypeArguments="ProgressAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ProgressAttribute instance); - }; \ No newline at end of file diff --git a/idl/QRCodeModifier.idl b/idl/arkui.QRCodeModifier.idl similarity index 39% rename from idl/QRCodeModifier.idl rename to idl/arkui.QRCodeModifier.idl index 0329f3f..b6e24c7 100644 --- a/idl/QRCodeModifier.idl +++ b/idl/arkui.QRCodeModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.QRCodeModifier; [Entity=Class] -interface QRCodeModifier: QRCodeAttribute { - +interface QRCodeModifier: [Extends] QRCodeAttribute, [TypeArguments="QRCodeAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(QRCodeAttribute instance); - }; \ No newline at end of file diff --git a/idl/RadioModifier.idl b/idl/arkui.RadioModifier.idl similarity index 39% rename from idl/RadioModifier.idl rename to idl/arkui.RadioModifier.idl index e0b3ed2..cddcbfe 100644 --- a/idl/RadioModifier.idl +++ b/idl/arkui.RadioModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RadioModifier; [Entity=Class] -interface RadioModifier: RadioAttribute { - +interface RadioModifier: [Extends] RadioAttribute, [TypeArguments="RadioAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RadioAttribute instance); - }; \ No newline at end of file diff --git a/idl/RatingModifier.idl b/idl/arkui.RatingModifier.idl similarity index 39% rename from idl/RatingModifier.idl rename to idl/arkui.RatingModifier.idl index 8b3274e..737b96d 100644 --- a/idl/RatingModifier.idl +++ b/idl/arkui.RatingModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RatingModifier; [Entity=Class] -interface RatingModifier: RatingAttribute { - +interface RatingModifier: [Extends] RatingAttribute, [TypeArguments="RatingAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RatingAttribute instance); - }; \ No newline at end of file diff --git a/idl/RectModifier.idl b/idl/arkui.RectModifier.idl similarity index 40% rename from idl/RectModifier.idl rename to idl/arkui.RectModifier.idl index c3b5ad4..6c48947 100644 --- a/idl/RectModifier.idl +++ b/idl/arkui.RectModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RectModifier; [Entity=Class] -interface RectModifier: RectAttribute { - +interface RectModifier: [Extends] RectAttribute, [TypeArguments="RectAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RectAttribute instance); - }; \ No newline at end of file diff --git a/idl/RefreshModifier.idl b/idl/arkui.RefreshModifier.idl similarity index 38% rename from idl/RefreshModifier.idl rename to idl/arkui.RefreshModifier.idl index ec8669b..6c48777 100644 --- a/idl/RefreshModifier.idl +++ b/idl/arkui.RefreshModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RefreshModifier; [Entity=Class] -interface RefreshModifier: RefreshAttribute { - +interface RefreshModifier: [Extends] RefreshAttribute, [TypeArguments="RefreshAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RefreshAttribute instance); - }; \ No newline at end of file diff --git a/idl/RenderNode.idl b/idl/arkui.RenderNode.idl similarity index 95% rename from idl/RenderNode.idl rename to idl/arkui.RenderNode.idl index 8824554..cbc7f0b 100644 --- a/idl/RenderNode.idl +++ b/idl/arkui.RenderNode.idl @@ -1,4 +1,4 @@ -package arkui; +package arkui.RenderNode; import arkui.Graphics.DrawContext as DrawContext; import arkui.Graphics.Size as Size; import arkui.Graphics.Offset as Offset; @@ -14,9 +14,9 @@ import arkui.Graphics.ShapeMask as ShapeMask; import arkui.Graphics.ShapeClip as ShapeClip; import arkui.Graphics.Edges as Edges; import arkui.Graphics.LengthMetricsUnit as LengthMetricsUnit; +import arkui.component.enums.BorderStyle as BorderStyle; [Entity=Class] interface RenderNode { - constructor(); attribute number backgroundColor; attribute boolean clipToFrame; @@ -54,5 +54,5 @@ interface RenderNode { void draw(DrawContext context); void invalidate(); void dispose(); - + boolean isDisposed(); }; \ No newline at end of file diff --git a/idl/RichEditorModifier.idl b/idl/arkui.RichEditorModifier.idl similarity index 37% rename from idl/RichEditorModifier.idl rename to idl/arkui.RichEditorModifier.idl index 733229a..5f03c45 100644 --- a/idl/RichEditorModifier.idl +++ b/idl/arkui.RichEditorModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RichEditorModifier; [Entity=Class] -interface RichEditorModifier: RichEditorAttribute { - +interface RichEditorModifier: [Extends] RichEditorAttribute, [TypeArguments="RichEditorAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RichEditorAttribute instance); - }; \ No newline at end of file diff --git a/idl/RowModifier.idl b/idl/arkui.RowModifier.idl similarity index 40% rename from idl/RowModifier.idl rename to idl/arkui.RowModifier.idl index d9fce83..0555618 100644 --- a/idl/RowModifier.idl +++ b/idl/arkui.RowModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RowModifier; [Entity=Class] -interface RowModifier: RowAttribute { - +interface RowModifier: [Extends] RowAttribute, [TypeArguments="RowAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RowAttribute instance); - }; \ No newline at end of file diff --git a/idl/RowSplitModifier.idl b/idl/arkui.RowSplitModifier.idl similarity index 38% rename from idl/RowSplitModifier.idl rename to idl/arkui.RowSplitModifier.idl index 793e9f9..b4bf1c7 100644 --- a/idl/RowSplitModifier.idl +++ b/idl/arkui.RowSplitModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.RowSplitModifier; [Entity=Class] -interface RowSplitModifier: RowSplitAttribute { - +interface RowSplitModifier: [Extends] RowSplitAttribute, [TypeArguments="RowSplitAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(RowSplitAttribute instance); - }; \ No newline at end of file diff --git a/idl/ScrollModifier.idl b/idl/arkui.ScrollModifier.idl similarity index 39% rename from idl/ScrollModifier.idl rename to idl/arkui.ScrollModifier.idl index f879efc..ccd9d24 100644 --- a/idl/ScrollModifier.idl +++ b/idl/arkui.ScrollModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ScrollModifier; [Entity=Class] -interface ScrollModifier: ScrollAttribute { - +interface ScrollModifier: [Extends] ScrollAttribute, [TypeArguments="ScrollAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ScrollAttribute instance); - }; \ No newline at end of file diff --git a/idl/SearchModifier.idl b/idl/arkui.SearchModifier.idl similarity index 39% rename from idl/SearchModifier.idl rename to idl/arkui.SearchModifier.idl index dc4b038..b810959 100644 --- a/idl/SearchModifier.idl +++ b/idl/arkui.SearchModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.SearchModifier; [Entity=Class] -interface SearchModifier: SearchAttribute { - +interface SearchModifier: [Extends] SearchAttribute, [TypeArguments="SearchAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(SearchAttribute instance); - }; \ No newline at end of file diff --git a/idl/SelectModifier.idl b/idl/arkui.SelectModifier.idl similarity index 39% rename from idl/SelectModifier.idl rename to idl/arkui.SelectModifier.idl index 5b3dade..7860d31 100644 --- a/idl/SelectModifier.idl +++ b/idl/arkui.SelectModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.SelectModifier; [Entity=Class] -interface SelectModifier: SelectAttribute { - +interface SelectModifier: [Extends] SelectAttribute, [TypeArguments="SelectAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(SelectAttribute instance); - }; \ No newline at end of file diff --git a/idl/ShapeModifier.idl b/idl/arkui.ShapeModifier.idl similarity index 39% rename from idl/ShapeModifier.idl rename to idl/arkui.ShapeModifier.idl index 8dd4f01..e372f62 100644 --- a/idl/ShapeModifier.idl +++ b/idl/arkui.ShapeModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ShapeModifier; [Entity=Class] -interface ShapeModifier: ShapeAttribute { - +interface ShapeModifier: [Extends] ShapeAttribute, [TypeArguments="ShapeAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ShapeAttribute instance); - }; \ No newline at end of file diff --git a/idl/SideBarContainerModifier.idl b/idl/arkui.SideBarContainerModifier.idl similarity index 35% rename from idl/SideBarContainerModifier.idl rename to idl/arkui.SideBarContainerModifier.idl index 5b9c495..606e473 100644 --- a/idl/SideBarContainerModifier.idl +++ b/idl/arkui.SideBarContainerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.SideBarContainerModifier; [Entity=Class] -interface SideBarContainerModifier: SideBarContainerAttribute { - +interface SideBarContainerModifier: [Extends] SideBarContainerAttribute, [TypeArguments="SideBarContainerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(SideBarContainerAttribute instance); - }; \ No newline at end of file diff --git a/idl/SliderModifier.idl b/idl/arkui.SliderModifier.idl similarity index 39% rename from idl/SliderModifier.idl rename to idl/arkui.SliderModifier.idl index b4a7e34..5bdcebd 100644 --- a/idl/SliderModifier.idl +++ b/idl/arkui.SliderModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.SliderModifier; [Entity=Class] -interface SliderModifier: SliderAttribute { - +interface SliderModifier: [Extends] SliderAttribute, [TypeArguments="SliderAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(SliderAttribute instance); - }; \ No newline at end of file diff --git a/idl/SpanModifier.idl b/idl/arkui.SpanModifier.idl similarity index 40% rename from idl/SpanModifier.idl rename to idl/arkui.SpanModifier.idl index 7d228d3..a2a5799 100644 --- a/idl/SpanModifier.idl +++ b/idl/arkui.SpanModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.SpanModifier; [Entity=Class] -interface SpanModifier: SpanAttribute { - +interface SpanModifier: [Extends] SpanAttribute, [TypeArguments="SpanAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(SpanAttribute instance); - }; \ No newline at end of file diff --git a/idl/StackModifier.idl b/idl/arkui.StackModifier.idl similarity index 39% rename from idl/StackModifier.idl rename to idl/arkui.StackModifier.idl index 1789f04..16f76e4 100644 --- a/idl/StackModifier.idl +++ b/idl/arkui.StackModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.StackModifier; [Entity=Class] -interface StackModifier: StackAttribute { - +interface StackModifier: [Extends] StackAttribute, [TypeArguments="StackAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(StackAttribute instance); - }; \ No newline at end of file diff --git a/idl/StepperItemModifier.idl b/idl/arkui.StepperItemModifier.idl similarity index 37% rename from idl/StepperItemModifier.idl rename to idl/arkui.StepperItemModifier.idl index 74b2ba9..af32b92 100644 --- a/idl/StepperItemModifier.idl +++ b/idl/arkui.StepperItemModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.StepperItemModifier; [Entity=Class] -interface StepperItemModifier: StepperItemAttribute { - +interface StepperItemModifier: [Extends] StepperItemAttribute, [TypeArguments="StepperItemAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(StepperItemAttribute instance); - }; \ No newline at end of file diff --git a/idl/arkui.StepperModifier.idl b/idl/arkui.StepperModifier.idl new file mode 100644 index 0000000..c5bee85 --- /dev/null +++ b/idl/arkui.StepperModifier.idl @@ -0,0 +1,6 @@ +package arkui.StepperModifier; +[Entity=Class] +interface StepperModifier: [Extends] StepperAttribute, [TypeArguments="StepperAttribute"] AttributeModifier { + [Optional] + void applyNormalAttribute(StepperAttribute instance); +}; \ No newline at end of file diff --git a/idl/SwiperModifier.idl b/idl/arkui.SwiperModifier.idl similarity index 39% rename from idl/SwiperModifier.idl rename to idl/arkui.SwiperModifier.idl index 6597b16..4483433 100644 --- a/idl/SwiperModifier.idl +++ b/idl/arkui.SwiperModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.SwiperModifier; [Entity=Class] -interface SwiperModifier: SwiperAttribute { - +interface SwiperModifier: [Extends] SwiperAttribute, [TypeArguments="SwiperAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(SwiperAttribute instance); - }; \ No newline at end of file diff --git a/idl/arkui.SymbolGlyphModifier.idl b/idl/arkui.SymbolGlyphModifier.idl new file mode 100644 index 0000000..3b03615 --- /dev/null +++ b/idl/arkui.SymbolGlyphModifier.idl @@ -0,0 +1,21 @@ +package arkui.SymbolGlyphModifier; +import arkui.component.symbolglyph.SymbolGlyphAttribute as SymbolGlyphAttribute; +import arkui.component.common.AttributeModifier as AttributeModifier; +import resource.Resource as Resource; +callback SymbolGlyphApplyNormalFunction = void (SymbolGlyphAttribute symbolGlyphAttribute); +[Synthetic] +callback Callback_SymbolGlyphAttribute_Void = void (SymbolGlyphAttribute instance); +[Entity=Interface] +interface SymbolGlyphModifier: SymbolGlyphAttribute, [TypeArguments="SymbolGlyphAttribute"] AttributeModifier { + attribute (Callback_SymbolGlyphAttribute_Void or undefined) applyNormalAttribute; + attribute (Callback_SymbolGlyphAttribute_Void or undefined) applyPressedAttribute; + attribute (Callback_SymbolGlyphAttribute_Void or undefined) applyFocusedAttribute; + attribute (Callback_SymbolGlyphAttribute_Void or undefined) applyDisabledAttribute; + attribute (Callback_SymbolGlyphAttribute_Void or undefined) applySelectedAttribute; +}; +[Entity=Class] +interface SymbolGlyphModifier: [Extends] SymbolGlyphAttribute, [TypeArguments="SymbolGlyphAttribute"] AttributeModifier { + constructor(optional Resource src); + [Optional] + void applyNormalAttribute(SymbolGlyphAttribute instance); +}; \ No newline at end of file diff --git a/idl/SymbolSpanModifier.idl b/idl/arkui.SymbolSpanModifier.idl similarity index 46% rename from idl/SymbolSpanModifier.idl rename to idl/arkui.SymbolSpanModifier.idl index 23d8872..a3d1c1e 100644 --- a/idl/SymbolSpanModifier.idl +++ b/idl/arkui.SymbolSpanModifier.idl @@ -1,9 +1,7 @@ -package arkui; +package arkui.SymbolSpanModifier; [Entity=Class] -interface SymbolSpanModifier: SymbolSpanAttribute { - +interface SymbolSpanModifier: [Extends] SymbolSpanAttribute, [TypeArguments="SymbolSpanAttribute"] AttributeModifier { constructor(optional Resource src); [Optional] void applyNormalAttribute(SymbolSpanAttribute attribute_); - }; \ No newline at end of file diff --git a/idl/TabsModifier.idl b/idl/arkui.TabsModifier.idl similarity index 40% rename from idl/TabsModifier.idl rename to idl/arkui.TabsModifier.idl index f50c23d..d1e1260 100644 --- a/idl/TabsModifier.idl +++ b/idl/arkui.TabsModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TabsModifier; [Entity=Class] -interface TabsModifier: TabsAttribute { - +interface TabsModifier: [Extends] TabsAttribute, [TypeArguments="TabsAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TabsAttribute instance); - }; \ No newline at end of file diff --git a/idl/TextAreaModifier.idl b/idl/arkui.TextAreaModifier.idl similarity index 38% rename from idl/TextAreaModifier.idl rename to idl/arkui.TextAreaModifier.idl index 8521643..366fb99 100644 --- a/idl/TextAreaModifier.idl +++ b/idl/arkui.TextAreaModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TextAreaModifier; [Entity=Class] -interface TextAreaModifier: TextAreaAttribute { - +interface TextAreaModifier: [Extends] TextAreaAttribute, [TypeArguments="TextAreaAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TextAreaAttribute instance); - }; \ No newline at end of file diff --git a/idl/TextClockModifier.idl b/idl/arkui.TextClockModifier.idl similarity index 38% rename from idl/TextClockModifier.idl rename to idl/arkui.TextClockModifier.idl index 40283ff..6a0e87a 100644 --- a/idl/TextClockModifier.idl +++ b/idl/arkui.TextClockModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TextClockModifier; [Entity=Class] -interface TextClockModifier: TextClockAttribute { - +interface TextClockModifier: [Extends] TextClockAttribute, [TypeArguments="TextClockAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TextClockAttribute instance); - }; \ No newline at end of file diff --git a/idl/TextInputModifier.idl b/idl/arkui.TextInputModifier.idl similarity index 38% rename from idl/TextInputModifier.idl rename to idl/arkui.TextInputModifier.idl index 5d4ea5a..c3d2cf6 100644 --- a/idl/TextInputModifier.idl +++ b/idl/arkui.TextInputModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TextInputModifier; [Entity=Class] -interface TextInputModifier: TextInputAttribute { - +interface TextInputModifier: [Extends] TextInputAttribute, [TypeArguments="TextInputAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TextInputAttribute instance); - }; \ No newline at end of file diff --git a/idl/arkui.TextModifier.idl b/idl/arkui.TextModifier.idl new file mode 100644 index 0000000..ab584d6 --- /dev/null +++ b/idl/arkui.TextModifier.idl @@ -0,0 +1,19 @@ +package arkui.TextModifier; +import arkui.component.text.TextAttribute as TextAttribute; +import arkui.component.common.AttributeModifier as AttributeModifier; +callback TextApplyNormalFunction = void (TextAttribute textAttribute); +[Synthetic] +callback Callback_TextAttribute_Void = void (TextAttribute instance); +[Entity=Interface] +interface TextModifier: TextAttribute, [TypeArguments="TextAttribute"] AttributeModifier { + attribute (Callback_TextAttribute_Void or undefined) applyNormalAttribute; + attribute (Callback_TextAttribute_Void or undefined) applyPressedAttribute; + attribute (Callback_TextAttribute_Void or undefined) applyFocusedAttribute; + attribute (Callback_TextAttribute_Void or undefined) applyDisabledAttribute; + attribute (Callback_TextAttribute_Void or undefined) applySelectedAttribute; +}; +[Entity=Class] +interface TextModifier: [Extends] TextAttribute, [TypeArguments="TextAttribute"] AttributeModifier { + [Optional] + void applyNormalAttribute(TextAttribute instance); +}; \ No newline at end of file diff --git a/idl/TextPickerModifier.idl b/idl/arkui.TextPickerModifier.idl similarity index 37% rename from idl/TextPickerModifier.idl rename to idl/arkui.TextPickerModifier.idl index 7608cf6..bfabf51 100644 --- a/idl/TextPickerModifier.idl +++ b/idl/arkui.TextPickerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TextPickerModifier; [Entity=Class] -interface TextPickerModifier: TextPickerAttribute { - +interface TextPickerModifier: [Extends] TextPickerAttribute, [TypeArguments="TextPickerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TextPickerAttribute instance); - }; \ No newline at end of file diff --git a/idl/TextTimerModifier.idl b/idl/arkui.TextTimerModifier.idl similarity index 38% rename from idl/TextTimerModifier.idl rename to idl/arkui.TextTimerModifier.idl index 9e16db8..30985ef 100644 --- a/idl/TextTimerModifier.idl +++ b/idl/arkui.TextTimerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TextTimerModifier; [Entity=Class] -interface TextTimerModifier: TextTimerAttribute { - +interface TextTimerModifier: [Extends] TextTimerAttribute, [TypeArguments="TextTimerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TextTimerAttribute instance); - }; \ No newline at end of file diff --git a/idl/TimePickerModifier.idl b/idl/arkui.TimePickerModifier.idl similarity index 37% rename from idl/TimePickerModifier.idl rename to idl/arkui.TimePickerModifier.idl index 70991ca..db7f3e7 100644 --- a/idl/TimePickerModifier.idl +++ b/idl/arkui.TimePickerModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.TimePickerModifier; [Entity=Class] -interface TimePickerModifier: TimePickerAttribute { - +interface TimePickerModifier: [Extends] TimePickerAttribute, [TypeArguments="TimePickerAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(TimePickerAttribute instance); - }; \ No newline at end of file diff --git a/idl/ToggleModifier.idl b/idl/arkui.ToggleModifier.idl similarity index 39% rename from idl/ToggleModifier.idl rename to idl/arkui.ToggleModifier.idl index acc2f72..3200e5f 100644 --- a/idl/ToggleModifier.idl +++ b/idl/arkui.ToggleModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.ToggleModifier; [Entity=Class] -interface ToggleModifier: ToggleAttribute { - +interface ToggleModifier: [Extends] ToggleAttribute, [TypeArguments="ToggleAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(ToggleAttribute instance); - }; \ No newline at end of file diff --git a/idl/VideoModifier.idl b/idl/arkui.VideoModifier.idl similarity index 39% rename from idl/VideoModifier.idl rename to idl/arkui.VideoModifier.idl index 9a070c3..964458d 100644 --- a/idl/VideoModifier.idl +++ b/idl/arkui.VideoModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.VideoModifier; [Entity=Class] -interface VideoModifier: VideoAttribute { - +interface VideoModifier: [Extends] VideoAttribute, [TypeArguments="VideoAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(VideoAttribute instance); - }; \ No newline at end of file diff --git a/idl/WaterFlowModifier.idl b/idl/arkui.WaterFlowModifier.idl similarity index 38% rename from idl/WaterFlowModifier.idl rename to idl/arkui.WaterFlowModifier.idl index 6cd250c..a9b70f6 100644 --- a/idl/WaterFlowModifier.idl +++ b/idl/arkui.WaterFlowModifier.idl @@ -1,8 +1,6 @@ -package arkui; +package arkui.WaterFlowModifier; [Entity=Class] -interface WaterFlowModifier: WaterFlowAttribute { - +interface WaterFlowModifier: [Extends] WaterFlowAttribute, [TypeArguments="WaterFlowAttribute"] AttributeModifier { [Optional] void applyNormalAttribute(WaterFlowAttribute instance); - }; \ No newline at end of file diff --git a/idl/XComponentNode.idl b/idl/arkui.XComponentNode.idl similarity index 50% rename from idl/XComponentNode.idl rename to idl/arkui.XComponentNode.idl index cd9bcda..abb438a 100644 --- a/idl/XComponentNode.idl +++ b/idl/arkui.XComponentNode.idl @@ -1,11 +1,11 @@ -package arkui; -import ohos.arkui.UIContext as UIContext; -import arkui.NodeRenderType as NodeRenderType; -import arkui.RenderOptions as RenderOptions; -import arkui.FrameNode as FrameNode; +package arkui.XComponentNode; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.BuilderNode.NodeRenderType as NodeRenderType; +import arkui.BuilderNode.RenderOptions as RenderOptions; +import arkui.FrameNode.FrameNode as FrameNode; [Entity=Class, Deprecated] -interface XComponentNode: FrameNode { - +interface XComponentNode: [Extends] FrameNode { + [Deprecated] constructor(UIContext uiContext, RenderOptions options, String id, XComponentType type, optional String libraryName); [Deprecated] void onCreate(optional Object event); @@ -13,5 +13,4 @@ interface XComponentNode: FrameNode { void onDestroy(); [Deprecated] boolean changeRenderType(NodeRenderType type); - }; \ No newline at end of file diff --git a/idl/badge.idl b/idl/badge.idl index 149a4c1..d8cd588 100644 --- a/idl/badge.idl +++ b/idl/badge.idl @@ -1,22 +1,29 @@ package badge; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.Position as Position; +import units.Resource as Resource; +import FontWeight as FontWeight; +import common.CommonMethod as CommonMethod; dictionary BadgePosition { - [OriginalEnumMemberName=RightTop] number RIGHT_TOP = 0; [OriginalEnumMemberName=Right] number RIGHT = 1; [OriginalEnumMemberName=Left] number LEFT = 2; - }; [Entity=Interface] interface BadgeStyle { - [Optional] attribute ResourceColor color; [Optional] + attribute (number or ResourceStr) fontSize; + [Optional] attribute (number or String) fontSize; [Optional] + attribute (number or ResourceStr) badgeSize; + [Optional] attribute (number or String) badgeSize; [Optional] attribute ResourceColor badgeColor; @@ -25,42 +32,34 @@ interface BadgeStyle { [Optional] attribute Length borderWidth; [Optional] + attribute (number or FontWeight or ResourceStr) fontWeight; + [Optional] attribute (number or FontWeight or String) fontWeight; - }; [Entity=Interface] interface BadgeParam { - [Optional] attribute (BadgePosition or Position) position; attribute BadgeStyle style; - }; [Entity=Interface] interface BadgeParamWithNumber: BadgeParam { - attribute number count; [Optional] attribute number maxCount; - }; [Entity=Interface] interface BadgeParamWithString: BadgeParam { - + attribute ResourceStr value; attribute String value; - }; [Entity=Interface] interface BadgeInterface { - [CallSignature] BadgeAttribute invoke(BadgeParamWithNumber value); [CallSignature] BadgeAttribute invoke(BadgeParamWithString value); - }; [Entity=Class] -interface BadgeAttribute: [TypeArguments="BadgeAttribute"] CommonMethod { - - +interface BadgeAttribute: [Extends, TypeArguments="BadgeAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/blank.idl b/idl/blank.idl index 34cee11..929797a 100644 --- a/idl/blank.idl +++ b/idl/blank.idl @@ -1,14 +1,12 @@ package blank; +import common.CommonMethod as CommonMethod; +import units.ResourceColor as ResourceColor; [Entity=Interface] interface BlankInterface { - [CallSignature] BlankAttribute invoke(optional (number or String) min); - }; [Entity=Class] -interface BlankAttribute: [TypeArguments="BlankAttribute"] CommonMethod { - +interface BlankAttribute: [Extends, TypeArguments="BlankAttribute"] CommonMethod { BlankAttribute color(ResourceColor value); - }; \ No newline at end of file diff --git a/idl/PermissionDef.idl b/idl/bundle.PermissionDef.idl similarity index 89% rename from idl/PermissionDef.idl rename to idl/bundle.PermissionDef.idl index 3aac644..2c38348 100644 --- a/idl/PermissionDef.idl +++ b/idl/bundle.PermissionDef.idl @@ -1,7 +1,6 @@ -package bundle; +package bundle.PermissionDef; [Entity=Interface, Deprecated] interface PermissionDef { - [Deprecated] attribute String permissionName; [Deprecated] @@ -10,5 +9,4 @@ interface PermissionDef { attribute number labelId; [Deprecated] attribute number descriptionId; - }; \ No newline at end of file diff --git a/idl/AbilityInfo.idl b/idl/bundle.abilityInfo.idl similarity index 90% rename from idl/AbilityInfo.idl rename to idl/bundle.abilityInfo.idl index 26bd1b8..98d4a3c 100644 --- a/idl/AbilityInfo.idl +++ b/idl/bundle.abilityInfo.idl @@ -1,10 +1,9 @@ -package bundle; -import bundle.ApplicationInfo as ApplicationInfo; -import bundle.CustomizeData as CustomizeData; -import ohos.bundle as bundle; +package bundle.abilityInfo; +import bundle.applicationInfo.ApplicationInfo as ApplicationInfo; +import bundle.customizeData.CustomizeData as CustomizeData; +import ohos.bundle.default as bundle; [Entity=Interface, Deprecated] interface AbilityInfo { - [Deprecated] readonly attribute String bundleName; [Deprecated] @@ -59,5 +58,4 @@ interface AbilityInfo { readonly attribute sequence metaData; [Deprecated] readonly attribute boolean enabled; - }; \ No newline at end of file diff --git a/idl/ApplicationInfo.idl b/idl/bundle.applicationInfo.idl similarity index 90% rename from idl/ApplicationInfo.idl rename to idl/bundle.applicationInfo.idl index 4130d7d..afd1737 100644 --- a/idl/ApplicationInfo.idl +++ b/idl/bundle.applicationInfo.idl @@ -1,9 +1,8 @@ -package bundle; -import bundle.ModuleInfo as ModuleInfo; -import bundle.CustomizeData as CustomizeData; +package bundle.applicationInfo; +import bundle.moduleInfo.ModuleInfo as ModuleInfo; +import bundle.customizeData.CustomizeData as CustomizeData; [Entity=Interface, Deprecated] interface ApplicationInfo { - [Deprecated] readonly attribute String name; [Deprecated] @@ -46,5 +45,4 @@ interface ApplicationInfo { readonly attribute number uid; [Deprecated] readonly attribute String entityType; - }; \ No newline at end of file diff --git a/idl/BundleInfo.idl b/idl/bundle.bundleInfo.idl similarity index 91% rename from idl/BundleInfo.idl rename to idl/bundle.bundleInfo.idl index 2d8354f..7be2b9b 100644 --- a/idl/BundleInfo.idl +++ b/idl/bundle.bundleInfo.idl @@ -1,30 +1,25 @@ package bundle.bundleInfo; -import bundle.AbilityInfo as AbilityInfo; -import bundle.ApplicationInfo as ApplicationInfo; -import bundle.HapModuleInfo as HapModuleInfo; +import bundle.abilityInfo.AbilityInfo as AbilityInfo; +import bundle.applicationInfo.ApplicationInfo as ApplicationInfo; +import bundle.hapModuleInfo.HapModuleInfo as HapModuleInfo; [Entity=Interface, Deprecated] interface UsedScene { - [Deprecated] attribute sequence abilities; [Deprecated] attribute String when; - }; [Entity=Interface, Deprecated] interface ReqPermissionDetail { - [Deprecated] attribute String name; [Deprecated] attribute String reason; [Deprecated] attribute UsedScene usedScene; - }; [Entity=Interface, Deprecated] interface BundleInfo { - [Deprecated] readonly attribute String name; [Deprecated] @@ -71,5 +66,4 @@ interface BundleInfo { readonly attribute boolean entryInstallationFree; [Deprecated] readonly attribute sequence reqPermissionStates; - }; \ No newline at end of file diff --git a/idl/bundleInstaller.idl b/idl/bundle.bundleInstaller.idl similarity index 96% rename from idl/bundleInstaller.idl rename to idl/bundle.bundleInstaller.idl index 1e47561..803c742 100644 --- a/idl/bundleInstaller.idl +++ b/idl/bundle.bundleInstaller.idl @@ -1,36 +1,30 @@ package bundle.bundleInstaller; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.bundle as bundle; +import ohos.bundle.default as bundle; [Entity=Interface, Deprecated] interface InstallParam { - [Deprecated] attribute number userId; [Deprecated] attribute number installFlag; [Deprecated] attribute boolean isKeepData; - }; [Entity=Interface, Deprecated] interface InstallStatus { - [Deprecated] attribute bundle.InstallErrorCode status; [Deprecated] attribute String statusMessage; - }; [Async, Synthetic] callback AsyncCallback_InstallStatus_Void = void (InstallStatus result); [Entity=Interface, Deprecated] interface BundleInstaller { - [Deprecated] void install(sequence bundleFilePaths, InstallParam param, AsyncCallback_InstallStatus_Void callback_); [Deprecated] void uninstall(String bundleName, InstallParam param, AsyncCallback_InstallStatus_Void callback_); [Deprecated] void recover(String bundleName, InstallParam param, AsyncCallback_InstallStatus_Void callback_); - }; \ No newline at end of file diff --git a/idl/bundleStatusCallback.idl b/idl/bundle.bundleStatusCallback.idl similarity index 90% rename from idl/bundleStatusCallback.idl rename to idl/bundle.bundleStatusCallback.idl index 117d2f2..26d2d1e 100644 --- a/idl/bundleStatusCallback.idl +++ b/idl/bundle.bundleStatusCallback.idl @@ -1,14 +1,12 @@ -package bundle; +package bundle.bundleStatusCallback; [Synthetic] callback Callback_String_Number_Void = void (String bundleName, number userId); [Entity=Interface, Deprecated] interface BundleStatusCallback { - [Deprecated] attribute Callback_String_Number_Void add; [Deprecated] attribute Callback_String_Number_Void update; [Deprecated] attribute Callback_String_Number_Void remove; - }; \ No newline at end of file diff --git a/idl/customizeData.idl b/idl/bundle.customizeData.idl similarity index 86% rename from idl/customizeData.idl rename to idl/bundle.customizeData.idl index 58fec1b..d44af66 100644 --- a/idl/customizeData.idl +++ b/idl/bundle.customizeData.idl @@ -1,12 +1,10 @@ -package bundle; +package bundle.customizeData; [Entity=Interface, Deprecated] interface CustomizeData { - [Deprecated] attribute String name; [Deprecated] attribute String value; [Deprecated] attribute String extra; - }; \ No newline at end of file diff --git a/idl/ElementName.idl b/idl/bundle.elementName.idl similarity index 92% rename from idl/ElementName.idl rename to idl/bundle.elementName.idl index 5f68d2e..075445c 100644 --- a/idl/ElementName.idl +++ b/idl/bundle.elementName.idl @@ -1,7 +1,6 @@ -package bundle; +package bundle.elementName; [Entity=Interface, Deprecated] interface ElementName { - [Optional, Deprecated] attribute String deviceId; [Deprecated] @@ -12,5 +11,4 @@ interface ElementName { attribute String uri; [Optional, Deprecated] attribute String shortName; - }; \ No newline at end of file diff --git a/idl/HapModuleInfo.idl b/idl/bundle.hapModuleInfo.idl similarity index 92% rename from idl/HapModuleInfo.idl rename to idl/bundle.hapModuleInfo.idl index 9b64c89..9c33dd6 100644 --- a/idl/HapModuleInfo.idl +++ b/idl/bundle.hapModuleInfo.idl @@ -1,8 +1,7 @@ -package bundle; -import bundle.AbilityInfo as AbilityInfo; +package bundle.hapModuleInfo; +import bundle.abilityInfo.AbilityInfo as AbilityInfo; [Entity=Interface, Deprecated] interface HapModuleInfo { - [Deprecated] readonly attribute String name; [Deprecated] @@ -33,5 +32,4 @@ interface HapModuleInfo { readonly attribute String mainAbilityName; [Deprecated] readonly attribute boolean installationFree; - }; \ No newline at end of file diff --git a/idl/bundle.launcherAbilityInfo.idl b/idl/bundle.launcherAbilityInfo.idl new file mode 100644 index 0000000..abb14ab --- /dev/null +++ b/idl/bundle.launcherAbilityInfo.idl @@ -0,0 +1,18 @@ +package bundle.launcherAbilityInfo; +import bundle.applicationInfo.ApplicationInfo as ApplicationInfo; +import bundle.elementName.ElementName as ElementName; +[Entity=Interface, Deprecated] +interface LauncherAbilityInfo { + [Deprecated] + readonly attribute ApplicationInfo applicationInfo; + [Deprecated] + readonly attribute ElementName elementName; + [Deprecated] + readonly attribute number labelId; + [Deprecated] + readonly attribute number iconId; + [Deprecated] + readonly attribute number userId; + [Deprecated] + readonly attribute number installTime; +}; \ No newline at end of file diff --git a/idl/moduleInfo.idl b/idl/bundle.moduleInfo.idl similarity index 86% rename from idl/moduleInfo.idl rename to idl/bundle.moduleInfo.idl index 2f8624b..6ec5bd8 100644 --- a/idl/moduleInfo.idl +++ b/idl/bundle.moduleInfo.idl @@ -1,10 +1,8 @@ -package bundle; +package bundle.moduleInfo; [Entity=Interface, Deprecated] interface ModuleInfo { - [Deprecated] readonly attribute String moduleName; [Deprecated] readonly attribute String moduleSourceDir; - }; \ No newline at end of file diff --git a/idl/RemoteAbilityInfo.idl b/idl/bundle.remoteAbilityInfo.idl similarity index 72% rename from idl/RemoteAbilityInfo.idl rename to idl/bundle.remoteAbilityInfo.idl index 6600f8b..48d0141 100644 --- a/idl/RemoteAbilityInfo.idl +++ b/idl/bundle.remoteAbilityInfo.idl @@ -1,13 +1,11 @@ -package bundle; -import bundle.ElementName as ElementName; +package bundle.remoteAbilityInfo; +import bundle.elementName.ElementName as ElementName; [Entity=Interface, Deprecated] interface RemoteAbilityInfo { - [Deprecated] readonly attribute ElementName elementName; [Deprecated] readonly attribute String label; [Deprecated] readonly attribute String icon; - }; \ No newline at end of file diff --git a/idl/bundle.shortcutInfo.idl b/idl/bundle.shortcutInfo.idl new file mode 100644 index 0000000..8756091 --- /dev/null +++ b/idl/bundle.shortcutInfo.idl @@ -0,0 +1,35 @@ +package bundle.shortcutInfo; +[Entity=Interface, Deprecated] +interface ShortcutWant { + [Deprecated] + readonly attribute String targetBundle; + [Deprecated] + readonly attribute String targetClass; +}; +[Entity=Interface, Deprecated] +interface ShortcutInfo { + [Deprecated] + readonly attribute String id; + [Deprecated] + readonly attribute String bundleName; + [Deprecated] + readonly attribute String hostAbility; + [Deprecated] + readonly attribute String icon; + [Deprecated] + readonly attribute number iconId; + [Deprecated] + readonly attribute String label; + [Deprecated] + readonly attribute number labelId; + [Deprecated] + readonly attribute String disableMessage; + [Deprecated] + readonly attribute sequence wants; + [Optional, Deprecated] + readonly attribute boolean isStatic; + [Optional, Deprecated] + readonly attribute boolean isHomeShortcut; + [Optional, Deprecated] + readonly attribute boolean isEnabled; +}; \ No newline at end of file diff --git a/idl/bundleManager.AbilityInfo.idl b/idl/bundleManager.AbilityInfo.idl new file mode 100644 index 0000000..f705861 --- /dev/null +++ b/idl/bundleManager.AbilityInfo.idl @@ -0,0 +1,45 @@ +package bundleManager.AbilityInfo; +import bundleManager.ApplicationInfo.ApplicationInfo as ApplicationInfo; +import bundleManager.Metadata.Metadata as Metadata; +import ohos.bundle.bundleManager.default as bundleManager; +import bundleManager.Skill.Skill as Skill; +[Entity=Interface] +interface AbilityInfo { + readonly attribute String bundleName; + readonly attribute String moduleName; + readonly attribute String name; + readonly attribute String label; + readonly attribute number labelId; + readonly attribute String description; + readonly attribute number descriptionId; + readonly attribute String icon; + readonly attribute number iconId; + readonly attribute String process; + readonly attribute boolean exported; + readonly attribute bundleManager.AbilityType type; + readonly attribute bundleManager.DisplayOrientation orientation; + readonly attribute bundleManager.LaunchType launchType; + readonly attribute sequence permissions; + readonly attribute String readPermission; + readonly attribute String writePermission; + readonly attribute String uri; + readonly attribute sequence deviceTypes; + readonly attribute ApplicationInfo applicationInfo; + readonly attribute sequence metadata; + readonly attribute boolean enabled; + readonly attribute sequence supportWindowModes; + readonly attribute WindowSize windowSize; + readonly attribute boolean excludeFromDock; + readonly attribute sequence skills; + readonly attribute number appIndex; + readonly attribute number orientationId; +}; +[Entity=Interface] +interface WindowSize { + readonly attribute number maxWindowRatio; + readonly attribute number minWindowRatio; + readonly attribute number maxWindowWidth; + readonly attribute number minWindowWidth; + readonly attribute number maxWindowHeight; + readonly attribute number minWindowHeight; +}; \ No newline at end of file diff --git a/idl/AppProvisionInfo.idl b/idl/bundleManager.AppProvisionInfo.idl similarity index 94% rename from idl/AppProvisionInfo.idl rename to idl/bundleManager.AppProvisionInfo.idl index ffd568a..8e854ff 100644 --- a/idl/AppProvisionInfo.idl +++ b/idl/bundleManager.AppProvisionInfo.idl @@ -1,7 +1,6 @@ -package bundleManager; +package bundleManager.AppProvisionInfo; [Entity=Interface] interface AppProvisionInfo { - readonly attribute number versionCode; readonly attribute String versionName; readonly attribute String uuid; @@ -14,12 +13,9 @@ interface AppProvisionInfo { readonly attribute String issuer; readonly attribute String appIdentifier; readonly attribute String organization; - }; [Entity=Interface] interface Validity { - readonly attribute number notBefore; readonly attribute number notAfter; - }; \ No newline at end of file diff --git a/idl/bundleManager.ApplicationInfo.idl b/idl/bundleManager.ApplicationInfo.idl new file mode 100644 index 0000000..27a9f90 --- /dev/null +++ b/idl/bundleManager.ApplicationInfo.idl @@ -0,0 +1,60 @@ +package bundleManager.ApplicationInfo; +import bundleManager.Metadata.Metadata as Metadata; +import resource.Resource as Resource; +import ohos.bundle.bundleManager.default as bundleManager; +[Entity=Interface] +interface ApplicationInfo { + readonly attribute String name; + readonly attribute String description; + readonly attribute number descriptionId; + readonly attribute boolean enabled; + readonly attribute String label; + readonly attribute number labelId; + readonly attribute String icon; + readonly attribute number iconId; + readonly attribute String process; + readonly attribute sequence permissions; + readonly attribute String codePath; + [Deprecated] + readonly attribute record> metadata; + readonly attribute sequence metadataArray; + readonly attribute boolean removable; + readonly attribute number accessTokenId; + readonly attribute number uid; + readonly attribute Resource iconResource; + readonly attribute Resource labelResource; + readonly attribute Resource descriptionResource; + readonly attribute String appDistributionType; + readonly attribute String appProvisionType; + readonly attribute boolean systemApp; + readonly attribute bundleManager.BundleType bundleType; + readonly attribute boolean debug; + readonly attribute boolean dataUnclearable; + readonly attribute String nativeLibraryPath; + readonly attribute MultiAppMode multiAppMode; + readonly attribute number appIndex; + readonly attribute String installSource; + readonly attribute String releaseType; + readonly attribute boolean cloudFileSyncEnabled; + [Optional] + readonly attribute boolean cloudStructuredDataSyncEnabled; + [Optional] + readonly attribute number flags; +}; +[Entity=Interface] +interface ModuleMetadata { + readonly attribute String moduleName; + readonly attribute sequence metadata; +}; +[Entity=Interface] +interface MultiAppMode { + readonly attribute bundleManager.MultiAppModeType multiAppModeType; + readonly attribute number maxCount; +}; +[Entity=Interface] +interface PreinstalledApplicationInfo { + readonly attribute String bundleName; + readonly attribute String moduleName; + readonly attribute number iconId; + readonly attribute number labelId; +}; \ No newline at end of file diff --git a/idl/bundleManager.BundleInfo.idl b/idl/bundleManager.BundleInfo.idl new file mode 100644 index 0000000..129de34 --- /dev/null +++ b/idl/bundleManager.BundleInfo.idl @@ -0,0 +1,65 @@ +package bundleManager.BundleInfo; +import bundleManager.ApplicationInfo.ApplicationInfo as ApplicationInfo; +import bundleManager.HapModuleInfo.HapModuleInfo as HapModuleInfo; +import bundleManager.HapModuleInfo.RouterItem as RouterItem; +import ohos.bundle.bundleManager.default as bundleManager; +[Entity=Interface] +interface BundleInfo { + readonly attribute String name; + readonly attribute String vendor; + readonly attribute number versionCode; + readonly attribute String versionName; + readonly attribute number minCompatibleVersionCode; + readonly attribute number targetVersion; + readonly attribute ApplicationInfo appInfo; + readonly attribute sequence hapModulesInfo; + readonly attribute sequence reqPermissionDetails; + readonly attribute sequence permissionGrantStates; + readonly attribute SignatureInfo signatureInfo; + readonly attribute number installTime; + readonly attribute number updateTime; + readonly attribute sequence routerMap; + readonly attribute number appIndex; + [Optional] + readonly attribute number firstInstallTime; +}; +[Entity=Interface] +interface ReqPermissionDetail { + attribute String name; + attribute String moduleName; + attribute String reason; + attribute number reasonId; + attribute UsedScene usedScene; +}; +[Entity=Interface] +interface UsedScene { + attribute sequence abilities; + attribute String when; +}; +[Entity=Interface] +interface SignatureInfo { + readonly attribute String appId; + readonly attribute String fingerprint; + readonly attribute String appIdentifier; + [Optional] + readonly attribute String certificate; +}; +[Entity=Interface] +interface AppCloneIdentity { + readonly attribute String bundleName; + readonly attribute number appIndex; +}; +[Entity=Interface] +interface DynamicIconInfo { + readonly attribute String bundleName; + readonly attribute String moduleName; + readonly attribute number userId; + readonly attribute number appIndex; +}; +[Entity=Interface] +interface BundleOptions { + [Optional] + attribute number userId; + [Optional] + attribute number appIndex; +}; \ No newline at end of file diff --git a/idl/BundlePackInfo.idl b/idl/bundleManager.BundlePackInfo.idl similarity index 98% rename from idl/BundlePackInfo.idl rename to idl/bundleManager.BundlePackInfo.idl index 79cb716..9ce3585 100644 --- a/idl/BundlePackInfo.idl +++ b/idl/bundleManager.BundlePackInfo.idl @@ -1,73 +1,56 @@ -package bundleManager; +package bundleManager.BundlePackInfo; [Entity=Interface] interface BundlePackInfo { - readonly attribute sequence packages; readonly attribute PackageSummary summary; - }; [Entity=Interface] interface PackageConfig { - readonly attribute sequence deviceTypes; readonly attribute String name; readonly attribute String moduleType; readonly attribute boolean deliveryWithInstall; - }; [Entity=Interface] interface PackageSummary { - readonly attribute BundleConfigInfo app; readonly attribute sequence modules; - }; [Entity=Interface] interface BundleConfigInfo { - readonly attribute String bundleName; readonly attribute Version version; - }; [Entity=Interface] interface ExtensionAbility { - readonly attribute String name; readonly attribute sequence forms; - }; [Entity=Interface] interface ModuleConfigInfo { - readonly attribute String mainAbility; readonly attribute ApiVersion apiVersion; readonly attribute sequence deviceTypes; readonly attribute ModuleDistroInfo distro; readonly attribute sequence abilities; readonly attribute sequence extensionAbilities; - }; [Entity=Interface] interface ModuleDistroInfo { - readonly attribute boolean deliveryWithInstall; readonly attribute boolean installationFree; readonly attribute String moduleName; readonly attribute String moduleType; - }; [Entity=Interface] interface ModuleAbilityInfo { - readonly attribute String name; readonly attribute String label; readonly attribute boolean exported; readonly attribute sequence forms; - }; [Entity=Interface] interface AbilityFormInfo { - readonly attribute String name; readonly attribute String type; readonly attribute boolean updateEnabled; @@ -75,21 +58,16 @@ interface AbilityFormInfo { readonly attribute number updateDuration; readonly attribute sequence supportDimensions; readonly attribute String defaultDimension; - }; [Entity=Interface] interface Version { - readonly attribute number minCompatibleVersionCode; readonly attribute String name; readonly attribute number code; - }; [Entity=Interface] interface ApiVersion { - readonly attribute String releaseType; readonly attribute number compatible; readonly attribute number target; - }; \ No newline at end of file diff --git a/idl/BundleResourceInfo.idl b/idl/bundleManager.BundleResourceInfo.idl similarity index 89% rename from idl/BundleResourceInfo.idl rename to idl/bundleManager.BundleResourceInfo.idl index 1daec76..3d3a9e5 100644 --- a/idl/BundleResourceInfo.idl +++ b/idl/bundleManager.BundleResourceInfo.idl @@ -1,12 +1,10 @@ -package bundleManager; +package bundleManager.BundleResourceInfo; import ohos.arkui.drawableDescriptor.DrawableDescriptor as DrawableDescriptor; [Entity=Interface] interface BundleResourceInfo { - readonly attribute String bundleName; readonly attribute String icon; readonly attribute String label; readonly attribute DrawableDescriptor drawableDescriptor; readonly attribute number appIndex; - }; \ No newline at end of file diff --git a/idl/DispatchInfo.idl b/idl/bundleManager.DispatchInfo.idl similarity index 78% rename from idl/DispatchInfo.idl rename to idl/bundleManager.DispatchInfo.idl index f01dc2d..650bf10 100644 --- a/idl/DispatchInfo.idl +++ b/idl/bundleManager.DispatchInfo.idl @@ -1,8 +1,6 @@ -package bundleManager; +package bundleManager.DispatchInfo; [Entity=Interface] interface DispatchInfo { - readonly attribute String version; readonly attribute String dispatchAPIVersion; - }; \ No newline at end of file diff --git a/idl/bundleManager.ElementName.idl b/idl/bundleManager.ElementName.idl new file mode 100644 index 0000000..f09ac39 --- /dev/null +++ b/idl/bundleManager.ElementName.idl @@ -0,0 +1,14 @@ +package bundleManager.ElementName; +[Entity=Interface] +interface ElementName { + [Optional] + attribute String deviceId; + attribute String bundleName; + [Optional] + attribute String moduleName; + attribute String abilityName; + [Optional] + attribute String uri; + [Optional] + attribute String shortName; +}; \ No newline at end of file diff --git a/idl/ExtensionAbilityInfo.idl b/idl/bundleManager.ExtensionAbilityInfo.idl similarity index 75% rename from idl/ExtensionAbilityInfo.idl rename to idl/bundleManager.ExtensionAbilityInfo.idl index 53a7ac3..ace3aff 100644 --- a/idl/ExtensionAbilityInfo.idl +++ b/idl/bundleManager.ExtensionAbilityInfo.idl @@ -1,11 +1,10 @@ -package bundleManager; -import bundleManager.ApplicationInfo as ApplicationInfo; -import bundleManager.Metadata as Metadata; -import ohos.bundle.bundleManager as bundleManager; -import bundleManager.Skill as Skill; +package bundleManager.ExtensionAbilityInfo; +import bundleManager.ApplicationInfo.ApplicationInfo as ApplicationInfo; +import bundleManager.Metadata.Metadata as Metadata; +import ohos.bundle.bundleManager.default as bundleManager; +import bundleManager.Skill.Skill as Skill; [Entity=Interface] interface ExtensionAbilityInfo { - readonly attribute String bundleName; readonly attribute String moduleName; readonly attribute String name; @@ -23,5 +22,4 @@ interface ExtensionAbilityInfo { readonly attribute String writePermission; readonly attribute sequence skills; readonly attribute number appIndex; - }; \ No newline at end of file diff --git a/idl/bundleManager.HapModuleInfo.idl b/idl/bundleManager.HapModuleInfo.idl new file mode 100644 index 0000000..cf93bb7 --- /dev/null +++ b/idl/bundleManager.HapModuleInfo.idl @@ -0,0 +1,52 @@ +package bundleManager.HapModuleInfo; +import bundleManager.AbilityInfo.AbilityInfo as AbilityInfo; +import bundleManager.ExtensionAbilityInfo.ExtensionAbilityInfo as ExtensionAbilityInfo; +import bundleManager.Metadata.Metadata as Metadata; +import ohos.bundle.bundleManager.default as bundleManager; +[Entity=Interface] +interface HapModuleInfo { + readonly attribute String name; + readonly attribute String icon; + readonly attribute number iconId; + readonly attribute String label; + readonly attribute number labelId; + readonly attribute String description; + readonly attribute number descriptionId; + readonly attribute String mainElementName; + readonly attribute sequence abilitiesInfo; + readonly attribute sequence extensionAbilitiesInfo; + readonly attribute sequence metadata; + readonly attribute sequence deviceTypes; + readonly attribute boolean installationFree; + readonly attribute String hashValue; + readonly attribute bundleManager.ModuleType type; + readonly attribute sequence dependencies; + readonly attribute sequence preloads; + readonly attribute String fileContextMenuConfig; + readonly attribute sequence routerMap; + readonly attribute String nativeLibraryPath; + readonly attribute String codePath; +}; +[Entity=Interface] +interface Dependency { + readonly attribute String moduleName; + readonly attribute String bundleName; + readonly attribute number versionCode; +}; +[Entity=Interface] +interface PreloadItem { + readonly attribute String moduleName; +}; +[Entity=Interface] +interface RouterItem { + readonly attribute String name; + readonly attribute String pageSourceFile; + readonly attribute String buildFunction; + readonly attribute String customData; + readonly attribute sequence data; +}; +[Entity=Interface] +interface DataItem { + readonly attribute String key; + readonly attribute String value; +}; \ No newline at end of file diff --git a/idl/launcherAbilityInfo.idl b/idl/bundleManager.LauncherAbilityInfo.idl similarity index 64% rename from idl/launcherAbilityInfo.idl rename to idl/bundleManager.LauncherAbilityInfo.idl index 3597b9c..67d4a6e 100644 --- a/idl/launcherAbilityInfo.idl +++ b/idl/bundleManager.LauncherAbilityInfo.idl @@ -1,14 +1,12 @@ -package bundleManager; -import bundleManager.ApplicationInfo as ApplicationInfo; -import bundleManager.ElementName as ElementName; +package bundleManager.LauncherAbilityInfo; +import bundleManager.ApplicationInfo.ApplicationInfo as ApplicationInfo; +import bundleManager.ElementName.ElementName as ElementName; [Entity=Interface] interface LauncherAbilityInfo { - readonly attribute ApplicationInfo applicationInfo; readonly attribute ElementName elementName; readonly attribute number labelId; readonly attribute number iconId; readonly attribute number userId; readonly attribute number installTime; - }; \ No newline at end of file diff --git a/idl/LauncherAbilityResourceInfo.idl b/idl/bundleManager.LauncherAbilityResourceInfo.idl similarity index 89% rename from idl/LauncherAbilityResourceInfo.idl rename to idl/bundleManager.LauncherAbilityResourceInfo.idl index 44bcf68..10a0c56 100644 --- a/idl/LauncherAbilityResourceInfo.idl +++ b/idl/bundleManager.LauncherAbilityResourceInfo.idl @@ -1,8 +1,7 @@ -package bundleManager; +package bundleManager.LauncherAbilityResourceInfo; import ohos.arkui.drawableDescriptor.DrawableDescriptor as DrawableDescriptor; [Entity=Interface] interface LauncherAbilityResourceInfo { - readonly attribute String bundleName; readonly attribute String moduleName; readonly attribute String abilityName; @@ -10,5 +9,4 @@ interface LauncherAbilityResourceInfo { readonly attribute String label; readonly attribute DrawableDescriptor drawableDescriptor; readonly attribute number appIndex; - }; \ No newline at end of file diff --git a/idl/Metadata.idl b/idl/bundleManager.Metadata.idl similarity index 85% rename from idl/Metadata.idl rename to idl/bundleManager.Metadata.idl index 64fb55a..0d494b7 100644 --- a/idl/Metadata.idl +++ b/idl/bundleManager.Metadata.idl @@ -1,11 +1,9 @@ -package bundleManager; +package bundleManager.Metadata; [Entity=Interface] interface Metadata { - attribute String name; attribute String value; attribute String resource; [Optional] readonly attribute number valueId; - }; \ No newline at end of file diff --git a/idl/OverlayModuleInfo.idl b/idl/bundleManager.OverlayModuleInfo.idl similarity index 86% rename from idl/OverlayModuleInfo.idl rename to idl/bundleManager.OverlayModuleInfo.idl index eb230ae..6b6352c 100644 --- a/idl/OverlayModuleInfo.idl +++ b/idl/bundleManager.OverlayModuleInfo.idl @@ -1,11 +1,9 @@ -package bundleManager; +package bundleManager.OverlayModuleInfo; [Entity=Interface] interface OverlayModuleInfo { - readonly attribute String bundleName; readonly attribute String moduleName; readonly attribute String targetModuleName; readonly attribute number priority; readonly attribute number state; - }; \ No newline at end of file diff --git a/idl/bundleManager.PermissionDef.idl b/idl/bundleManager.PermissionDef.idl new file mode 100644 index 0000000..bde0837 --- /dev/null +++ b/idl/bundleManager.PermissionDef.idl @@ -0,0 +1,8 @@ +package bundleManager.PermissionDef; +[Entity=Interface] +interface PermissionDef { + readonly attribute String permissionName; + readonly attribute number grantMode; + readonly attribute number labelId; + readonly attribute number descriptionId; +}; \ No newline at end of file diff --git a/idl/bundleManager.PluginBundleInfo.idl b/idl/bundleManager.PluginBundleInfo.idl new file mode 100644 index 0000000..ad1feb5 --- /dev/null +++ b/idl/bundleManager.PluginBundleInfo.idl @@ -0,0 +1,18 @@ +package bundleManager.PluginBundleInfo; +[Entity=Interface] +interface PluginBundleInfo { + readonly attribute String label; + readonly attribute number labelId; + readonly attribute String icon; + readonly attribute number iconId; + readonly attribute String pluginBundleName; + readonly attribute number versionCode; + readonly attribute String versionName; + readonly attribute sequence pluginModuleInfos; +}; +[Entity=Interface] +interface PluginModuleInfo { + readonly attribute String moduleName; + readonly attribute number descriptionId; + readonly attribute String description; +}; \ No newline at end of file diff --git a/idl/RecoverableApplicationInfo.idl b/idl/bundleManager.RecoverableApplicationInfo.idl similarity index 77% rename from idl/RecoverableApplicationInfo.idl rename to idl/bundleManager.RecoverableApplicationInfo.idl index f8dfd36..c799df4 100644 --- a/idl/RecoverableApplicationInfo.idl +++ b/idl/bundleManager.RecoverableApplicationInfo.idl @@ -1,8 +1,7 @@ -package bundleManager; -import ohos.bundle.bundleManager as bundleManager; +package bundleManager.RecoverableApplicationInfo; +import ohos.bundle.bundleManager.default as bundleManager; [Entity=Interface] interface RecoverableApplicationInfo { - readonly attribute String bundleName; readonly attribute String moduleName; readonly attribute number labelId; @@ -10,5 +9,4 @@ interface RecoverableApplicationInfo { readonly attribute boolean systemApp; readonly attribute bundleManager.BundleType bundleType; readonly attribute sequence codePaths; - }; \ No newline at end of file diff --git a/idl/bundleManager.RemoteAbilityInfo.idl b/idl/bundleManager.RemoteAbilityInfo.idl new file mode 100644 index 0000000..0c24818 --- /dev/null +++ b/idl/bundleManager.RemoteAbilityInfo.idl @@ -0,0 +1,8 @@ +package bundleManager.RemoteAbilityInfo; +import bundleManager.ElementName.ElementName as ElementName; +[Entity=Interface] +interface RemoteAbilityInfo { + readonly attribute ElementName elementName; + readonly attribute String label; + readonly attribute String icon; +}; \ No newline at end of file diff --git a/idl/SharedBundleInfo.idl b/idl/bundleManager.SharedBundleInfo.idl similarity index 75% rename from idl/SharedBundleInfo.idl rename to idl/bundleManager.SharedBundleInfo.idl index f72ade8..33a8b31 100644 --- a/idl/SharedBundleInfo.idl +++ b/idl/bundleManager.SharedBundleInfo.idl @@ -1,21 +1,17 @@ -package bundleManager; -import bundleManager.Dependency as Dependency; -import ohos.bundle.bundleManager as bundleManager; +package bundleManager.SharedBundleInfo; +import bundleManager.HapModuleInfo.Dependency as Dependency; +import ohos.bundle.bundleManager.default as bundleManager; [Entity=Interface] interface SharedBundleInfo { - readonly attribute String name; readonly attribute bundleManager.CompatiblePolicy compatiblePolicy; readonly attribute sequence sharedModuleInfo; - }; [Entity=Interface] interface SharedModuleInfo { - readonly attribute String name; readonly attribute number versionCode; readonly attribute String versionName; readonly attribute String description; readonly attribute number descriptionId; - }; \ No newline at end of file diff --git a/idl/shortcutInfo.idl b/idl/bundleManager.ShortcutInfo.idl similarity index 91% rename from idl/shortcutInfo.idl rename to idl/bundleManager.ShortcutInfo.idl index 129182a..c5e83c2 100644 --- a/idl/shortcutInfo.idl +++ b/idl/bundleManager.ShortcutInfo.idl @@ -1,7 +1,6 @@ -package bundleManager; +package bundleManager.ShortcutInfo; [Entity=Interface] interface ShortcutInfo { - attribute String id; attribute String bundleName; [Optional] @@ -20,23 +19,20 @@ interface ShortcutInfo { attribute sequence wants; attribute number appIndex; attribute number sourceType; - + [Optional] + attribute boolean visible; }; [Entity=Interface] interface ShortcutWant { - attribute String targetBundle; [Optional] attribute String targetModule; attribute String targetAbility; [Optional] attribute sequence parameters; - }; [Entity=Interface] interface ParameterItem { - attribute String key; attribute String value; - }; \ No newline at end of file diff --git a/idl/Skill.idl b/idl/bundleManager.Skill.idl similarity index 95% rename from idl/Skill.idl rename to idl/bundleManager.Skill.idl index ccca485..c4f8a9f 100644 --- a/idl/Skill.idl +++ b/idl/bundleManager.Skill.idl @@ -1,16 +1,13 @@ -package bundleManager; +package bundleManager.Skill; [Entity=Interface] interface Skill { - readonly attribute sequence actions; readonly attribute sequence entities; readonly attribute sequence uris; readonly attribute boolean domainVerify; - }; [Entity=Interface] interface SkillUri { - readonly attribute String scheme; readonly attribute String host; readonly attribute number port; @@ -21,5 +18,4 @@ interface SkillUri { readonly attribute String utd; readonly attribute number maxFileSupported; readonly attribute String linkFeature; - }; \ No newline at end of file diff --git a/idl/button.idl b/idl/button.idl index 5379a0e..bd5e233 100644 --- a/idl/button.idl +++ b/idl/button.idl @@ -1,6 +1,17 @@ package button; +import resource.Resource as Resource; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.Font as Font; +import TextOverflow as TextOverflow; +import FontWeight as FontWeight; +import FontStyle as FontStyle; +import TextHeightAdaptivePolicy as TextHeightAdaptivePolicy; +import common.CommonConfiguration as CommonConfiguration; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; dictionary ButtonType { - [OriginalEnumMemberName=Capsule] number CAPSULE = 0; [OriginalEnumMemberName=Circle] @@ -8,39 +19,29 @@ dictionary ButtonType { [OriginalEnumMemberName=Normal] number NORMAL = 2; number ROUNDED_RECTANGLE = 3; - }; dictionary ButtonStyleMode { - number NORMAL = 0; number EMPHASIZED = 1; number TEXTUAL = 2; - }; dictionary ButtonRole { - number NORMAL = 0; number ERROR = 1; - }; callback ButtonTriggerClickCallback = void (number xPos, number yPos); [Entity=Interface] interface ButtonConfiguration: [TypeArguments="ButtonConfiguration"] CommonConfiguration { - attribute String label; attribute boolean pressed; attribute ButtonTriggerClickCallback triggerClick; - }; dictionary ControlSize { - String SMALL = "small"; String NORMAL = "normal"; - }; [Entity=Interface] interface ButtonOptions { - [Optional] attribute ButtonType type; [Optional] @@ -51,22 +52,18 @@ interface ButtonOptions { attribute ControlSize controlSize; [Optional] attribute ButtonRole role; - }; [Entity=Interface] interface ButtonInterface { - [CallSignature] ButtonAttribute invoke(); [CallSignature] ButtonAttribute invoke(ButtonOptions options); [CallSignature] ButtonAttribute invoke(ResourceStr label, optional ButtonOptions options); - }; [Entity=Interface] interface LabelStyle { - [Optional] attribute TextOverflow overflow; [Optional] @@ -79,11 +76,24 @@ interface LabelStyle { attribute TextHeightAdaptivePolicy heightAdaptivePolicy; [Optional] attribute Font font; - +}; +[Entity=Interface] +interface ButtonLabelStyle { + [Optional] + attribute TextOverflow overflow; + [Optional] + attribute number maxLines; + [Optional] + attribute (number or ResourceStr) minFontSize; + [Optional] + attribute (number or ResourceStr) maxFontSize; + [Optional] + attribute TextHeightAdaptivePolicy heightAdaptivePolicy; + [Optional] + attribute Font font; }; [Entity=Class] -interface ButtonAttribute: [TypeArguments="ButtonAttribute"] CommonMethod { - +interface ButtonAttribute: [Extends, TypeArguments="ButtonAttribute"] CommonMethod { ButtonAttribute type(ButtonType value); ButtonAttribute stateEffect(boolean value); ButtonAttribute buttonStyle(ButtonStyleMode value); @@ -96,7 +106,7 @@ interface ButtonAttribute: [TypeArguments="ButtonAttribute"] CommonMethod { ButtonAttribute fontFamily((String or Resource) value); ButtonAttribute contentModifier([TypeArguments="ButtonConfiguration"] ContentModifier modifier); ButtonAttribute labelStyle(LabelStyle value); + ButtonAttribute labelStyle(ButtonLabelStyle value); ButtonAttribute minFontScale((number or Resource) scale); ButtonAttribute maxFontScale((number or Resource) scale); - }; \ No newline at end of file diff --git a/idl/calendar.idl b/idl/calendar.idl index b844cc9..d0ffc97 100644 --- a/idl/calendar.idl +++ b/idl/calendar.idl @@ -1,214 +1,235 @@ package calendar; -[Entity=Interface] +import units.ResourceColor as ResourceColor; +import Axis as Axis; +[Entity=Interface, Deprecated] interface CalendarDay { - + [Deprecated] attribute number index; + [Deprecated] attribute String lunarMonth; + [Deprecated] attribute String lunarDay; + [Deprecated] attribute String dayMark; + [Deprecated] attribute String dayMarkValue; + [Deprecated] attribute number year; + [Deprecated] attribute number month; + [Deprecated] attribute number day; + [Deprecated] attribute boolean isFirstOfLunar; + [Deprecated] attribute boolean hasSchedule; + [Deprecated] attribute boolean markLunarDay; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface MonthData { - + [Deprecated] attribute number year; + [Deprecated] attribute number month; + [Deprecated] attribute sequence data; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface CurrentDayStyle { - - [Optional] + [Optional, Deprecated] attribute ResourceColor dayColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor lunarColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor markLunarColor; - [Optional] + [Optional, Deprecated] attribute number dayFontSize; - [Optional] + [Optional, Deprecated] attribute number lunarDayFontSize; - [Optional] + [Optional, Deprecated] attribute number dayHeight; - [Optional] + [Optional, Deprecated] attribute number dayWidth; - [Optional] + [Optional, Deprecated] attribute number gregorianCalendarHeight; - [Optional] + [Optional, Deprecated] attribute number dayYAxisOffset; - [Optional] + [Optional, Deprecated] attribute number lunarDayYAxisOffset; - [Optional] + [Optional, Deprecated] attribute number underscoreXAxisOffset; - [Optional] + [Optional, Deprecated] attribute number underscoreYAxisOffset; - [Optional] + [Optional, Deprecated] attribute number scheduleMarkerXAxisOffset; - [Optional] + [Optional, Deprecated] attribute number scheduleMarkerYAxisOffset; - [Optional] + [Optional, Deprecated] attribute number colSpace; - [Optional] + [Optional, Deprecated] attribute number dailyFiveRowSpace; - [Optional] + [Optional, Deprecated] attribute number dailySixRowSpace; - [Optional] + [Optional, Deprecated] attribute number lunarHeight; - [Optional] + [Optional, Deprecated] attribute number underscoreWidth; - [Optional] + [Optional, Deprecated] attribute number underscoreLength; - [Optional] + [Optional, Deprecated] attribute number scheduleMarkerRadius; - [Optional] + [Optional, Deprecated] attribute number boundaryRowOffset; - [Optional] + [Optional, Deprecated] attribute number boundaryColOffset; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface NonCurrentDayStyle { - - [Optional] + [Optional, Deprecated] attribute ResourceColor nonCurrentMonthDayColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor nonCurrentMonthLunarColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor nonCurrentMonthWorkDayMarkColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor nonCurrentMonthOffDayMarkColor; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface TodayStyle { - - [Optional] + [Optional, Deprecated] attribute ResourceColor focusedDayColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor focusedLunarColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor focusedAreaBackgroundColor; - [Optional] + [Optional, Deprecated] attribute number focusedAreaRadius; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface WeekStyle { - - [Optional] + [Optional, Deprecated] attribute ResourceColor weekColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor weekendDayColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor weekendLunarColor; - [Optional] + [Optional, Deprecated] attribute number weekFontSize; - [Optional] + [Optional, Deprecated] attribute number weekHeight; - [Optional] + [Optional, Deprecated] attribute number weekWidth; - [Optional] + [Optional, Deprecated] attribute number weekAndDayRowSpace; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface WorkStateStyle { - - [Optional] + [Optional, Deprecated] attribute ResourceColor workDayMarkColor; - [Optional] + [Optional, Deprecated] attribute ResourceColor offDayMarkColor; - [Optional] + [Optional, Deprecated] attribute number workDayMarkSize; - [Optional] + [Optional, Deprecated] attribute number offDayMarkSize; - [Optional] + [Optional, Deprecated] attribute number workStateWidth; - [Optional] + [Optional, Deprecated] attribute number workStateHorizontalMovingDistance; - [Optional] + [Optional, Deprecated] attribute number workStateVerticalMovingDistance; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface CalendarSelectedDate { - + [Deprecated] attribute number year; + [Deprecated] attribute number month; + [Deprecated] attribute number day; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface CalendarRequestedData { - + [Deprecated] attribute number year; + [Deprecated] attribute number month; + [Deprecated] attribute number currentYear; + [Deprecated] attribute number currentMonth; + [Deprecated] attribute number monthState; - }; [Entity=Literal, Synthetic] interface Literal_Number_day_month_year { - attribute number year; attribute number month; attribute number day; - }; -[Entity=Class] +[Entity=Class, Deprecated] interface CalendarController { - + [Deprecated] constructor(); - undefined backToToday(); - undefined goTo(Literal_Number_day_month_year value); - + [Deprecated] + void backToToday(); + [Deprecated] + void goTo(Literal_Number_day_month_year value); +}; +[Entity=Interface] +interface CalendarRequestedMonths { + attribute CalendarSelectedDate date; + attribute MonthData currentData; + attribute MonthData preData; + attribute MonthData nextData; + [Optional] + attribute CalendarController controller; }; [Entity=Literal, Synthetic] -interface Type_CalendarInterface_value { - +interface Type_CalendarInterface_callable0_value { attribute Literal_Number_day_month_year date; attribute MonthData currentData; attribute MonthData preData; attribute MonthData nextData; [Optional] attribute CalendarController controller; - }; -[Entity=Interface] +[Entity=Interface, Deprecated] interface CalendarInterface { - - [CallSignature] - CalendarAttribute invoke(Type_CalendarInterface_value value); - + [Deprecated, CallSignature] + CalendarAttribute invoke(Type_CalendarInterface_callable0_value value); }; [Synthetic] callback Callback_CalendarSelectedDate_Void = void (CalendarSelectedDate event); [Synthetic] callback Callback_CalendarRequestedData_Void = void (CalendarRequestedData event); -[Entity=Class] +[Entity=Class, Deprecated] interface CalendarAttribute { - + [Deprecated] CalendarAttribute showLunar(boolean value); + [Deprecated] CalendarAttribute showHoliday(boolean value); + [Deprecated] CalendarAttribute needSlide(boolean value); + [Deprecated] CalendarAttribute startOfWeek(number value); + [Deprecated] CalendarAttribute offDays(number value); + [Deprecated] CalendarAttribute direction(Axis value); + [Deprecated] CalendarAttribute currentDayStyle(CurrentDayStyle value); + [Deprecated] CalendarAttribute nonCurrentDayStyle(NonCurrentDayStyle value); + [Deprecated] CalendarAttribute todayStyle(TodayStyle value); + [Deprecated] CalendarAttribute weekStyle(WeekStyle value); + [Deprecated] CalendarAttribute workStateStyle(WorkStateStyle value); + [Deprecated] CalendarAttribute onSelectChange(Callback_CalendarSelectedDate_Void event); + [Deprecated] CalendarAttribute onRequestData(Callback_CalendarRequestedData_Void event); - }; \ No newline at end of file diff --git a/idl/calendar_picker.idl b/idl/calendar_picker.idl index b383674..a6deee2 100644 --- a/idl/calendar_picker.idl +++ b/idl/calendar_picker.idl @@ -1,50 +1,54 @@ package calendar_picker; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import common.PickerTextStyle as PickerTextStyle; +import common.Callback as Callback; +import common.BlurStyle as BlurStyle; +import common.PickerDialogButtonStyle as PickerDialogButtonStyle; +import common.ShadowOptions as ShadowOptions; +import common.ShadowStyle as ShadowStyle; +import common.HoverModeAreaType as HoverModeAreaType; +import common.DateRange as DateRange; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import common.Optional as Optional; +import units.Offset as Offset; +import units.VoidCallback as VoidCallback; +import units.ResourceColor as ResourceColor; dictionary CalendarAlign { - number START = 0; number CENTER = 1; number END = 2; - }; [Entity=Interface] interface CalendarOptions { - [Optional] attribute (number or Resource) hintRadius; [Optional] - attribute Date selected; + attribute date selected; [Optional] - attribute Date start; + attribute date start; [Optional] - attribute Date end; + attribute date end; [Optional] attribute sequence disabledDateRange; - }; [Entity=Interface] interface CalendarPickerInterface { - [CallSignature] CalendarPickerAttribute invoke(optional CalendarOptions options); - }; [Synthetic] -callback Callback_Date_Void = void (Date parameter); +callback Callback_Date_Void = void (date parameter); [Entity=Class] -interface CalendarPickerAttribute: [TypeArguments="CalendarPickerAttribute"] CommonMethod { - - CalendarPickerAttribute edgeAlign(CalendarAlign alignType, optional Offset offset); +interface CalendarPickerAttribute: [Extends, TypeArguments="CalendarPickerAttribute"] CommonMethod { CalendarPickerAttribute edgeAlign((CalendarAlign or undefined) alignType, optional Offset offset); - CalendarPickerAttribute textStyle(PickerTextStyle value); CalendarPickerAttribute textStyle((PickerTextStyle or undefined) style); - CalendarPickerAttribute onChange(Callback_Date_Void callback_); CalendarPickerAttribute onChange((Callback_Date_Void or undefined) callback_); CalendarPickerAttribute markToday(boolean enabled); - }; [Entity=Interface] interface CalendarDialogOptions: CalendarOptions { - [Optional] attribute Callback_Date_Void onAccept; [Optional] @@ -79,11 +83,8 @@ interface CalendarDialogOptions: CalendarOptions { attribute HoverModeAreaType hoverModeArea; [Optional] attribute boolean markToday; - }; [Entity=Class] interface CalendarPickerDialog { - static void show(optional CalendarDialogOptions options); - }; \ No newline at end of file diff --git a/idl/canvas.idl b/idl/canvas.idl index 1d2ebc3..64461c6 100644 --- a/idl/canvas.idl +++ b/idl/canvas.idl @@ -1,6 +1,18 @@ package canvas; -[Import="import('../api/@ohos.graphics.drawing').default.Canvas"] -typedef [Import="import('../api/@ohos.graphics.drawing').default.Canvas"] DrawingCanvas DrawingCanvas; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.PixelMap as PixelMap; +import FrameNode as FrameNode; +import ImageAIOptions as ImageAIOptions; +import ImageAnalyzerConfig as ImageAnalyzerConfig; +import matrix2d.Matrix2D as Matrix2D; +import units.VoidCallback as VoidCallback; +import units.LengthMetricsUnit as LengthMetricsUnit; +import units.LengthMetrics as LengthMetrics; +import Size as Size; +import ohos.graphics.drawing.default.Canvas as _Canvas; +import arkui.FrameNode.FrameNode as _FrameNode; +typedef _Canvas DrawingCanvas; typedef String CanvasFillRule; typedef String CanvasLineCap; typedef String CanvasLineJoin; @@ -8,17 +20,14 @@ typedef String CanvasDirection; typedef String CanvasTextAlign; typedef String CanvasTextBaseline; typedef String ImageSmoothingQuality; -[Import="import('../api/arkui/FrameNode').FrameNode"] -typedef [Import="import('../api/arkui/FrameNode').FrameNode"] FrameNode FrameNode; +typedef _FrameNode FrameNode; [Entity=Class] interface CanvasGradient { - - void addColorStop(number offset, String color); - + [Throws] + void addColorStop(number offset, (String or ColorMetrics) color); }; [Entity=Class] interface CanvasPath { - void arc(number x, number y, number radius, number startAngle, number endAngle, optional boolean counterclockwise); void arcTo(number x1, number y1, number x2, number y2, number radius); void bezierCurveTo(number cp1x, number cp1y, number cp2x, number cp2y, number x, number y); @@ -28,11 +37,11 @@ interface CanvasPath { void moveTo(number x, number y); void quadraticCurveTo(number cpx, number cpy, number x, number y); void rect(number x, number y, number w, number h); - + [Throws] + void roundRect(number x, number y, number w, number h, optional (number or sequence) radii); }; [Entity=Class] -interface Path2D: CanvasPath { - +interface Path2D: [Extends] CanvasPath { constructor(); constructor(LengthMetricsUnit unit); constructor(Path2D path); @@ -40,17 +49,13 @@ interface Path2D: CanvasPath { constructor(String d); constructor(String description, LengthMetricsUnit unit); void addPath(Path2D path, optional Matrix2D transform); - }; [Entity=Interface] interface CanvasPattern { - void setTransform(optional Matrix2D transform); - }; [Entity=Interface] interface TextMetrics { - readonly attribute number actualBoundingBoxAscent; readonly attribute number actualBoundingBoxDescent; readonly attribute number actualBoundingBoxLeft; @@ -64,41 +69,44 @@ interface TextMetrics { readonly attribute number ideographicBaseline; readonly attribute number width; readonly attribute number height; - }; [Entity=Class] interface ImageBitmap { - constructor(String src); constructor(String src, LengthMetricsUnit unit); constructor(PixelMap data); constructor(PixelMap data, LengthMetricsUnit unit); + constructor((PixelMap or String) src, optional LengthMetricsUnit unit); + readonly attribute number height; + readonly attribute number width; + [Accessor=Getter] readonly attribute number height; + [Accessor=Getter] readonly attribute number width; void close(); - }; [Entity=Class] interface ImageData { - constructor(number width, number height, optional buffer data); constructor(number width, number height, optional buffer data, optional LengthMetricsUnit unit); readonly attribute buffer data; readonly attribute number height; readonly attribute number width; - + [Accessor=Getter] + readonly attribute buffer data; + [Accessor=Getter] + readonly attribute number height; + [Accessor=Getter] + readonly attribute number width; }; [Entity=Class] interface RenderingContextSettings { - constructor(optional boolean antialias); [Optional] attribute boolean antialias; - }; [Entity=Class] -interface CanvasRenderer: CanvasPath { - +interface CanvasRenderer: [Extends] CanvasPath { attribute (LengthMetrics or String) letterSpacing; attribute number globalAlpha; attribute String globalCompositeOperation; @@ -128,8 +136,7 @@ interface CanvasRenderer: CanvasPath { void clip(Path2D path, optional CanvasFillRule fillRule); void fill(optional CanvasFillRule fillRule); void fill(Path2D path, optional CanvasFillRule fillRule); - void stroke(); - void stroke(Path2D path); + void stroke(optional Path2D path); CanvasGradient createLinearGradient(number x0, number y0, number x1, number y1); (CanvasPattern or undefined) createPattern(ImageBitmap image, (String or undefined) repetition); CanvasGradient createRadialGradient(number x0, number y0, number r0, number x1, number y1, number r1); @@ -163,84 +170,76 @@ interface CanvasRenderer: CanvasPath { void saveLayer(); void restoreLayer(); void reset(); - }; [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface CanvasRenderingContext2D: CanvasRenderer { - +interface CanvasRenderingContext2D: [Extends] CanvasRenderer { constructor(optional RenderingContextSettings settings); constructor(optional RenderingContextSettings settings, optional LengthMetricsUnit unit); readonly attribute number height; readonly attribute number width; readonly attribute FrameNode canvas; + [Accessor=Getter] + readonly attribute number height; + [Accessor=Getter] + readonly attribute number width; + [Accessor=Getter] + readonly attribute FrameNode canvas; String toDataURL(optional String type, optional f32 quality); [Throws] async void startImageAnalyzer(ImageAnalyzerConfig config); void stopImageAnalyzer(); [Throws, DtsName="on", DtsTag="'onAttach'"] void onOnAttach(Callback_Void callback_); - [Throws, DtsName="off", DtsTag="'onAttach'"] - void offOnAttach(optional Callback_Void callback_); [Throws, DtsName="on", DtsTag="'onDetach'"] void onOnDetach(Callback_Void callback_); + [Throws, DtsName="off", DtsTag="'onAttach'"] + void offOnAttach(optional Callback_Void callback_); [Throws, DtsName="off", DtsTag="'onDetach'"] void offOnDetach(optional Callback_Void callback_); - }; [Entity=Class] -interface OffscreenCanvasRenderingContext2D: CanvasRenderer { - +interface OffscreenCanvasRenderingContext2D: [Extends] CanvasRenderer { constructor(number width, number height, optional RenderingContextSettings settings); constructor(number width, number height, optional RenderingContextSettings settings, optional LengthMetricsUnit unit); String toDataURL(optional String type, optional f32 quality); ImageBitmap transferToImageBitmap(); - }; [Entity=Class] interface OffscreenCanvas { - constructor(number width, number height); constructor(number width, number height, LengthMetricsUnit unit); + constructor(number width, number height, optional LengthMetricsUnit unit); attribute number height; attribute number width; ImageBitmap transferToImageBitmap(); [DtsName="getContext", DtsTag="0|contextType|'2d'"] OffscreenCanvasRenderingContext2D getContext2d(optional RenderingContextSettings options); - }; [Entity=Interface] interface Size { - attribute number width; attribute number height; - }; [Entity=Class] interface DrawingRenderingContext { - constructor(optional LengthMetricsUnit unit); [Accessor=Getter] readonly attribute Size size; [Accessor=Getter] readonly attribute DrawingCanvas canvas; void invalidate(); - }; [Entity=Interface] interface CanvasInterface { - [CallSignature] CanvasAttribute invoke(optional (CanvasRenderingContext2D or DrawingRenderingContext) context); [CallSignature] CanvasAttribute invoke((CanvasRenderingContext2D or DrawingRenderingContext) context, ImageAIOptions imageAIOptions); - }; [Entity=Class] -interface CanvasAttribute: [TypeArguments="CanvasAttribute"] CommonMethod { - +interface CanvasAttribute: [Extends, TypeArguments="CanvasAttribute"] CommonMethod { CanvasAttribute onReady(VoidCallback event); CanvasAttribute enableAnalyzer(boolean enable); - }; \ No newline at end of file diff --git a/idl/checkbox.idl b/idl/checkbox.idl index ebb9d69..a090f2e 100644 --- a/idl/checkbox.idl +++ b/idl/checkbox.idl @@ -1,49 +1,43 @@ package checkbox; +import common.CommonConfiguration as CommonConfiguration; +import common.Callback as Callback; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; +import common.Optional as Optional; +import CustomBuilder as CustomBuilder; +import units.ResourceColor as ResourceColor; +import units.MarkStyle as MarkStyle; +import CheckBoxShape as CheckBoxShape; [Entity=Interface] interface CheckboxOptions { - [Optional] attribute String name; [Optional] attribute String group; [Optional] attribute CustomBuilder indicatorBuilder; - }; [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); [Entity=Interface] interface CheckBoxConfiguration: [TypeArguments="CheckBoxConfiguration"] CommonConfiguration { - attribute String name; attribute boolean selected; attribute Callback_Boolean_Void triggerChange; - }; [Entity=Interface] interface CheckboxInterface { - [CallSignature] CheckboxAttribute invoke(optional CheckboxOptions options); - }; callback OnCheckboxChangeCallback = void (boolean value); [Entity=Class] -interface CheckboxAttribute: [TypeArguments="CheckboxAttribute"] CommonMethod { - - CheckboxAttribute select(boolean value); +interface CheckboxAttribute: [Extends, TypeArguments="CheckboxAttribute"] CommonMethod { CheckboxAttribute select((boolean or undefined) isSelected); - CheckboxAttribute selectedColor(ResourceColor value); CheckboxAttribute selectedColor((ResourceColor or undefined) resColor); - CheckboxAttribute shape(CheckBoxShape value); CheckboxAttribute shape((CheckBoxShape or undefined) shape); - CheckboxAttribute unselectedColor(ResourceColor value); CheckboxAttribute unselectedColor((ResourceColor or undefined) resColor); - CheckboxAttribute mark(MarkStyle value); CheckboxAttribute mark((MarkStyle or undefined) style); - CheckboxAttribute onChange(OnCheckboxChangeCallback callback_); CheckboxAttribute onChange((OnCheckboxChangeCallback or undefined) callback_); - CheckboxAttribute contentModifier([TypeArguments="CheckBoxConfiguration"] ContentModifier modifier); CheckboxAttribute contentModifier(([TypeArguments="CheckBoxConfiguration"] ContentModifier or undefined) modifier); - }; \ No newline at end of file diff --git a/idl/checkboxgroup.idl b/idl/checkboxgroup.idl index 3c69116..935980d 100644 --- a/idl/checkboxgroup.idl +++ b/idl/checkboxgroup.idl @@ -1,50 +1,39 @@ package checkboxgroup; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import units.ResourceColor as ResourceColor; +import units.MarkStyle as MarkStyle; +import CheckBoxShape as CheckBoxShape; dictionary SelectStatus { - [OriginalEnumMemberName=All] number ALL = 0; [OriginalEnumMemberName=Part] number PART = 1; [OriginalEnumMemberName=None] number NONE = 2; - }; [Entity=Interface] interface CheckboxGroupOptions { - [Optional] attribute String group; - }; [Entity=Interface] interface CheckboxGroupResult { - attribute sequence name; attribute SelectStatus status; - }; [Entity=Interface] interface CheckboxGroupInterface { - [CallSignature] CheckboxGroupAttribute invoke(optional CheckboxGroupOptions options); - }; callback OnCheckboxGroupChangeCallback = void (CheckboxGroupResult value); [Entity=Class] -interface CheckboxGroupAttribute: [TypeArguments="CheckboxGroupAttribute"] CommonMethod { - - CheckboxGroupAttribute selectAll(boolean value); +interface CheckboxGroupAttribute: [Extends, TypeArguments="CheckboxGroupAttribute"] CommonMethod { CheckboxGroupAttribute selectAll((boolean or undefined) isAllSelected); - CheckboxGroupAttribute selectedColor(ResourceColor value); CheckboxGroupAttribute selectedColor((ResourceColor or undefined) resColor); - CheckboxGroupAttribute unselectedColor(ResourceColor value); CheckboxGroupAttribute unselectedColor((ResourceColor or undefined) resColor); - CheckboxGroupAttribute mark(MarkStyle value); CheckboxGroupAttribute mark((MarkStyle or undefined) style); - CheckboxGroupAttribute onChange(OnCheckboxGroupChangeCallback callback_); CheckboxGroupAttribute onChange((OnCheckboxGroupChangeCallback or undefined) callback_); - CheckboxGroupAttribute checkboxShape(CheckBoxShape value); CheckboxGroupAttribute checkboxShape((CheckBoxShape or undefined) shape); - }; \ No newline at end of file diff --git a/idl/circle.idl b/idl/circle.idl index 4de76f8..bbdcd14 100644 --- a/idl/circle.idl +++ b/idl/circle.idl @@ -1,23 +1,28 @@ package circle; +import common.CommonShapeMethod as CommonShapeMethod; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface CircleOptions { - + [Optional] + attribute Length width; [Optional] attribute (String or number) width; [Optional] + attribute Length height; + [Optional] attribute (String or number) height; - }; [Entity=Interface] interface CircleInterface { - constructor(optional CircleOptions value); [CallSignature] CircleAttribute invoke(optional CircleOptions value); - }; [Entity=Class] -interface CircleAttribute: [TypeArguments="CircleAttribute"] CommonShapeMethod { - - +interface CircleAttribute: [Extends, TypeArguments="CircleAttribute"] CommonShapeMethod { +}; +[Entity=Interface] +interface CircleInterface { + [CallSignature] + CircleAttribute invoke(optional CircleOptions value); }; \ No newline at end of file diff --git a/idl/column.idl b/idl/column.idl index 63e77e0..8da5635 100644 --- a/idl/column.idl +++ b/idl/column.idl @@ -1,32 +1,30 @@ package column; +import common.PointLightStyle as PointLightStyle; +import common.Optional as Optional; +import common.CommonMethod as CommonMethod; +import HorizontalAlign as HorizontalAlign; +import FlexAlign as FlexAlign; +import resource.Resource as Resource; typedef (String or number or Resource) SpaceType; [Entity=Interface] interface ColumnOptions { - [Optional] attribute (String or number) space; - }; interface ColumnOptionsV2 { - attribute String stub; - }; [Entity=Interface] interface ColumnInterface { - [CallSignature] ColumnAttribute invoke(optional ColumnOptions options); [CallSignature] ColumnAttribute invoke(optional (ColumnOptions or ColumnOptionsV2) options); - }; [Entity=Class] -interface ColumnAttribute: [TypeArguments="ColumnAttribute"] CommonMethod { - +interface ColumnAttribute: [Extends, TypeArguments="ColumnAttribute"] CommonMethod { ColumnAttribute alignItems(HorizontalAlign value); ColumnAttribute justifyContent(FlexAlign value); ColumnAttribute pointLight(PointLightStyle value); ColumnAttribute reverse((boolean or undefined) isReversed); - }; \ No newline at end of file diff --git a/idl/column_split.idl b/idl/column_split.idl index 1a25bb5..e6cae02 100644 --- a/idl/column_split.idl +++ b/idl/column_split.idl @@ -1,24 +1,20 @@ package column_split; +import units.Dimension as Dimension; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface ColumnSplitInterface { - [CallSignature] ColumnSplitAttribute invoke(); - }; [Entity=Interface] interface ColumnSplitDividerStyle { - [Optional] attribute Dimension startMargin; [Optional] attribute Dimension endMargin; - }; [Entity=Class] -interface ColumnSplitAttribute: [TypeArguments="ColumnSplitAttribute"] CommonMethod { - +interface ColumnSplitAttribute: [Extends, TypeArguments="ColumnSplitAttribute"] CommonMethod { ColumnSplitAttribute resizeable(boolean value); ColumnSplitAttribute divider((ColumnSplitDividerStyle or undefined) value); - }; \ No newline at end of file diff --git a/idl/common.idl b/idl/common.idl index 793042d..2f2207b 100644 --- a/idl/common.idl +++ b/idl/common.idl @@ -1,76 +1,222 @@ package common; +import application.Context.default as OriginalContext; +import resource.Resource as Resource; +import ohos.multimodalInput.pointer.default as pointer; +import ohos.multimedia.image.default as image; +import ohos.data.unifiedDataChannel.default as unifiedDataChannel; +import ohos.promptAction.default as promptAction; +import ohos.data.uniformTypeDescriptor.default as uniformTypeDescriptor; +import ohos.app.ability.Want.default as Want; +import ohos.multimodalInput.intentionCode.IntentionCode as IntentionCode; +import arkui.SymbolGlyphModifier.SymbolGlyphModifier as SymbolGlyphModifier; +import ohos.arkui.shape.CircleShape as CircleShape; +import ohos.arkui.shape.EllipseShape as EllipseShape; +import ohos.arkui.shape.PathShape as PathShape; +import ohos.arkui.shape.RectShape as RectShape; +import ohos.arkui.observer.default as uiObserver; +import ohos.arkui.UIContext.UIContext as UIContext; +import arkui.Graphics.DrawContext as DrawContext; +import arkui.Graphics.LengthMetrics as LengthMetrics; +import ohos.graphics.uiEffect.default as uiEffect; +import focus.FocusBoxStyle as FocusBoxStyle; +import focus.FocusPriority as FocusPriority; +import arkui.ComponentContent.ComponentContent as ComponentContent; +import image.ResizableOptions as ResizableOptions; +import ohos.arkui.theme.Theme as Theme; +import ohos.intl.default as intl; +import button.ButtonType as ButtonType; +import button.ButtonStyleMode as ButtonStyleMode; +import button.ButtonRole as ButtonRole; +import units.Area as Area; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.ResourceStr as ResourceStr; +import units.Font as Font; +import units.Length as Length; +import units.EdgeColors as EdgeColors; +import units.LocalizedEdgeColors as LocalizedEdgeColors; +import units.BorderRadiuses as BorderRadiuses; +import units.EdgeWidths as EdgeWidths; +import units.LocalizedEdgeWidths as LocalizedEdgeWidths; +import units.SizeOptions as SizeOptions; +import units.Bias as Bias; +import units.EdgeStyles as EdgeStyles; +import units.Position as Position; +import units.LocalizedBorderRadiuses as LocalizedBorderRadiuses; +import units.Margin as Margin; +import units.ChainWeightOptions as ChainWeightOptions; +import units.Padding as Padding; +import units.LocalizedPadding as LocalizedPadding; +import units.LocalizedMargin as LocalizedMargin; +import units.BorderOptions as BorderOptions; +import units.OutlineOptions as OutlineOptions; +import units.EdgeOutlineStyles as EdgeOutlineStyles; +import units.EdgeOutlineWidths as EdgeOutlineWidths; +import units.OutlineRadiuses as OutlineRadiuses; +import units.Edges as Edges; +import units.LocalizedEdges as LocalizedEdges; +import units.LocalizedPosition as LocalizedPosition; +import units.AccessibilityOptions as AccessibilityOptions; +import units.ConstraintSizeOptions as ConstraintSizeOptions; +import units.EdgeWidth as EdgeWidth; +import units.DirectionalEdgesT as DirectionalEdgesT; +import units.VoidCallback as VoidCallback; +import gesture.BaseGestureEvent as BaseGestureEvent; +import gesture.GestureRecognizer as GestureRecognizer; +import gesture.GestureJudgeResult as GestureJudgeResult; +import gesture.GestureType as GestureType; +import gesture.GestureMask as GestureMask; +import gesture.GestureHandler as GestureHandler; +import gesture.GesturePriority as GesturePriority; +import gesture.GestureInfo as GestureInfo; +import list.ScrollState as ScrollState; +import AccessibilityHoverType as AccessibilityHoverType; +import Curve as Curve; +import PlayMode as PlayMode; +import SharedTransitionEffectType as SharedTransitionEffectType; +import KeySource as KeySource; +import BorderStyle as BorderStyle; +import HorizontalAlign as HorizontalAlign; +import VerticalAlign as VerticalAlign; +import MouseButton as MouseButton; +import MouseAction as MouseAction; +import TransitionType as TransitionType; +import FontWeight as FontWeight; +import TouchType as TouchType; +import FontStyle as FontStyle; +import Color as Color; +import ColoringStrategy as ColoringStrategy; +import Placement as Placement; +import ArrowPointPosition as ArrowPointPosition; +import ClickEffectLevel as ClickEffectLevel; +import NestedScrollMode as NestedScrollMode; +import HitTestMode as HitTestMode; +import Alignment as Alignment; +import ImageRepeat as ImageRepeat; +import ImageSize as ImageSize; +import HoverEffect as HoverEffect; +import Visibility as Visibility; +import ItemAlign as ItemAlign; +import Direction as Direction; +import Axis as Axis; +import GradientDirection as GradientDirection; +import FunctionKey as FunctionKey; +import ModifierKey as ModifierKey; +import ObscuredReasons as ObscuredReasons; +import RenderFit as RenderFit; +import LineCapStyle as LineCapStyle; +import LineJoinStyle as LineJoinStyle; +import PixelRoundCalcPolicy as PixelRoundCalcPolicy; +import IlluminatedType as IlluminatedType; +import TextDecorationType as TextDecorationType; +import TextDecorationStyle as TextDecorationStyle; +import KeyType as KeyType; +import ResponseType as ResponseType; +import BarState as BarState; +import EdgeEffect as EdgeEffect; +import ScrollSource as ScrollSource; +import InteractionHand as InteractionHand; +import AxisAction as AxisAction; +import AxisModel as AxisModel; +import CrownAction as CrownAction; +import FocusDrawLevel as FocusDrawLevel; +import CrownSensitivity as CrownSensitivity; +import TextRange as TextRange; +import StyledString as StyledString; +import circle.CircleAttribute as CircleAttribute; +import rect.RectAttribute as RectAttribute; +import path.PathAttribute as PathAttribute; +import ellipse.EllipseAttribute as EllipseAttribute; +import LocalStorage as LocalStorage; +import CustomBuilder as CustomBuilder; +import application.Context.default as _default; +import ohos.multimodalInput.pointer.default.PointerStyle as _PointerStyle; +import ohos.multimedia.image.default.PixelMap as _PixelMap; +import ohos.data.unifiedDataChannel.default.UnifiedData as _UnifiedData; +import ohos.data.unifiedDataChannel.default.Summary as _Summary; +import ohos.data.uniformTypeDescriptor.default.UniformDataType as _UniformDataType; +import ohos.data.unifiedDataChannel.default.GetDataParams as _GetDataParams; +import ohos.arkui.dragController.default.SpringLoadingContext as _SpringLoadingContext; +import ohos.arkui.dragController.default.DragSpringLoadingConfiguration as _DragSpringLoadingConfiguration; +import ohos.data.unifiedDataChannel.default.DataLoadParams as _DataLoadParams; +import ohos.multimodalInput.intentionCode.IntentionCode as _IntentionCode; +import arkui.ImageModifier.ImageModifier as _ImageModifier; +import arkui.SymbolGlyphModifier.SymbolGlyphModifier as _SymbolGlyphModifier; +import ohos.arkui.shape.CircleShape as _CircleShape; +import ohos.arkui.shape.EllipseShape as _EllipseShape; +import ohos.arkui.shape.PathShape as _PathShape; +import ohos.arkui.shape.RectShape as _RectShape; +import ohos.matrix4.default.Matrix4Transit as _Matrix4Transit; +import ohos.arkui.observer.default.NavDestinationInfo as _NavDestinationInfo; +import ohos.arkui.observer.default.NavigationInfo as _NavigationInfo; +import ohos.arkui.observer.default.RouterPageInfo as _RouterPageInfo; +import ohos.arkui.UIContext.UIContext as _UIContext; +import arkui.Graphics.DrawContext as _DrawContext; +import ohos.graphics.uiEffect.default.VisualEffect as _VisualEffect; +import ohos.graphics.uiEffect.default.Filter as _Filter; +import ohos.graphics.uiEffect.default.Blender as _Blender; +import arkui.ComponentContent.ComponentContent as _ComponentContent; +import ohos.arkui.theme.Theme as _Theme; +import ohos.promptAction.promptAction.DialogController as _DialogController; [Entity=Interface] interface ComponentOptions { - attribute boolean freezeWhenInactive; - }; [Entity=Interface] interface InputCounterOptions { - [Optional] attribute number thresholdPercentage; [Optional] attribute boolean highlightBorder; - }; [Entity=Interface] interface TextDecorationOptions { - attribute TextDecorationType type; [Optional] attribute ResourceColor color; [Optional] attribute TextDecorationStyle style; - }; [Entity=Interface] -interface EntryOptions { - +interface DividerStyle { + attribute Length strokeWidth; [Optional] - attribute String routeName; + attribute ResourceColor color; [Optional] - attribute LocalStorage storage; + attribute Length startMargin; [Optional] - attribute boolean useSharedStorage; - + attribute Length endMargin; }; [Entity=Interface] interface ProvideOptions { - [Optional] attribute String allowOverride; - }; [Entity=Interface, TypeParameters="T"] interface AnimatableArithmetic { - ([TypeArguments="T"] AnimatableArithmetic) plus([TypeArguments="T"] AnimatableArithmetic rhs); ([TypeArguments="T"] AnimatableArithmetic) subtract([TypeArguments="T"] AnimatableArithmetic rhs); ([TypeArguments="T"] AnimatableArithmetic) multiply(number scale); boolean equals([TypeArguments="T"] AnimatableArithmetic rhs); - }; +[Deprecated] +Context getContext(optional Object component); callback ReuseIdCallback = String (); [Entity=Interface] interface ReuseOptions { - [Optional] attribute ReuseIdCallback reuseId; - }; -[Import="import('../api/application/Context').default"] -typedef [Import="import('../api/application/Context').default"] Context Context; +typedef _default Context; +typedef OriginalContext Context; +void postCardAction(Object component, Object action); [Entity=Interface] interface Configuration { - readonly attribute String colorMode; readonly attribute number fontScale; - }; [Entity=Interface] interface Rectangle { - [Optional] attribute Length x; [Optional] @@ -79,24 +225,24 @@ interface Rectangle { attribute Length width; [Optional] attribute Length height; - }; [Entity=Interface] interface ExpectedFrameRateRange { - attribute number min; attribute number max; attribute number expected; - }; +[DtsName="$r"] +Resource dollar_r(String value, sequence... params); +[DtsName="$r"] +Resource dollar_r(String value, sequence<(Object or undefined)>... params); +[DtsName="$rawfile"] +Resource dollar_rawfile(String value); dictionary AccessibilitySamePageMode { - number SEMI_SILENT = 0; number FULL_SILENT = 1; - }; dictionary AccessibilityRoleType { - number ACTION_SHEET = 0; number ALERT_DIALOG = 1; number INDEXER_COMPONENT = 2; @@ -222,27 +368,31 @@ dictionary AccessibilityRoleType { number WEB = 122; number XCOMPONENT = 123; number ROLE_NONE = 124; - }; callback AccessibilityFocusCallback = void (boolean isFocus); +dictionary AccessibilityAction { + number UNDEFINED_ACTION = 0; + number ACCESSIBILITY_CLICK = 1; +}; +dictionary AccessibilityActionInterceptResult { + number ACTION_INTERCEPT = 0; + number ACTION_CONTINUE = 1; + number ACTION_RISE = 2; +}; +callback AccessibilityActionInterceptCallback = AccessibilityActionInterceptResult (AccessibilityAction action); dictionary FinishCallbackType { - number REMOVED = 0; number LOGICALLY = 1; - }; dictionary TouchTestStrategy { - number DEFAULT = 0; number FORWARD_COMPETITION = 1; number FORWARD = 2; - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface AnimateParam { - [Optional] attribute number duration; [Optional] @@ -261,17 +411,13 @@ interface AnimateParam { attribute FinishCallbackType finishCallbackType; [Optional] attribute ExpectedFrameRateRange expectedFrameRateRange; - }; [Entity=Interface] interface ICurve { - number interpolate(number fraction); - }; [Entity=Interface] interface MotionPathOptions { - attribute String path; [Optional] attribute number from; @@ -279,11 +425,9 @@ interface MotionPathOptions { attribute number to; [Optional] attribute boolean rotatable; - }; [Entity=Interface] interface sharedTransitionOptions { - [Optional] attribute number duration; [Optional] @@ -296,27 +440,21 @@ interface sharedTransitionOptions { attribute number zIndex; [Optional] attribute SharedTransitionEffectType type; - }; [Entity=Interface] interface GeometryTransitionOptions { - [Optional] attribute boolean follow; [Optional] attribute TransitionHierarchyStrategy hierarchyStrategy; - }; [Entity=Tuple, Synthetic] interface Tuple_ResourceColor_Number { - attribute ResourceColor value0; attribute number value1; - }; [Entity=Interface] interface LinearGradientOptions { - [Optional] attribute (number or String) angle; [Optional] @@ -324,18 +462,19 @@ interface LinearGradientOptions { attribute sequence colors; [Optional] attribute boolean repeating; - }; [Entity=Tuple, Synthetic] interface Tuple_Length_Length { - attribute Length value0; attribute Length value1; - +}; +[Entity=Tuple, Synthetic] +interface Tuple_ColorMetrics_Number { + attribute ColorMetrics value0; + attribute number value1; }; [Entity=Interface] interface SweepGradientOptions { - attribute Tuple_Length_Length center; [Optional] attribute (number or String) start; @@ -345,39 +484,33 @@ interface SweepGradientOptions { attribute (number or String) rotation; attribute sequence colors; [Optional] + attribute sequence metricsColors; + [Optional] attribute boolean repeating; - }; [Entity=Interface] interface RadialGradientOptions { - attribute Tuple_Length_Length center; - attribute (number or String) radius; + attribute Length radius; attribute sequence colors; [Optional] attribute boolean repeating; - }; dictionary TransitionHierarchyStrategy { - number NONE = 0; number ADAPTIVE = 1; - }; [Entity=Interface] interface TranslateOptions { - [Optional] attribute (number or String) x; [Optional] attribute (number or String) y; [Optional] attribute (number or String) z; - }; [Entity=Interface] interface ScaleOptions { - [Optional] attribute number x; [Optional] @@ -388,25 +521,41 @@ interface ScaleOptions { attribute (number or String) centerX; [Optional] attribute (number or String) centerY; - +}; +[Entity=Interface, TypeParameters="T"] +interface AlignRuleParam { + attribute String anchor; + attribute T align; +}; +[Entity=Interface] +interface AlignRuleOption { + [Optional] + attribute [TypeArguments="HorizontalAlign"] AlignRuleParam left; + [Optional] + attribute [TypeArguments="HorizontalAlign"] AlignRuleParam right; + [Optional] + attribute [TypeArguments="HorizontalAlign"] AlignRuleParam middle; + [Optional] + attribute [TypeArguments="VerticalAlign"] AlignRuleParam top; + [Optional] + attribute [TypeArguments="VerticalAlign"] AlignRuleParam bottom; + [Optional] + attribute [TypeArguments="VerticalAlign"] AlignRuleParam center; + [Optional] + attribute Bias bias; }; [Entity=Literal, Synthetic] interface Literal_String_anchor_HorizontalAlign_align { - attribute String anchor; attribute HorizontalAlign align; - }; [Entity=Literal, Synthetic] interface Literal_String_anchor_VerticalAlign_align { - attribute String anchor; attribute VerticalAlign align; - }; [Entity=Interface] interface AlignRuleOption { - [Optional] attribute Literal_String_anchor_HorizontalAlign_align left; [Optional] @@ -421,25 +570,19 @@ interface AlignRuleOption { attribute Literal_String_anchor_VerticalAlign_align center; [Optional] attribute Bias bias; - }; [Entity=Interface] interface LocalizedHorizontalAlignParam { - attribute String anchor; attribute HorizontalAlign align; - }; [Entity=Interface] interface LocalizedVerticalAlignParam { - attribute String anchor; attribute VerticalAlign align; - }; [Entity=Interface] interface LocalizedAlignRuleOptions { - [Optional] attribute LocalizedHorizontalAlignParam start; [Optional] @@ -454,18 +597,14 @@ interface LocalizedAlignRuleOptions { attribute LocalizedVerticalAlignParam center; [Optional] attribute Bias bias; - }; dictionary ChainStyle { - number SPREAD = 0; number SPREAD_INSIDE = 1; number PACKED = 2; - }; [Entity=Interface] interface RotateOptions { - [Optional] attribute number x; [Optional] @@ -481,11 +620,26 @@ interface RotateOptions { [Optional] attribute number perspective; attribute (number or String) angle; - +}; +[Entity=Interface] +interface RotateAngleOptions { + [Optional] + attribute (number or String) angleX; + [Optional] + attribute (number or String) angleY; + [Optional] + attribute (number or String) angleZ; + [Optional] + attribute (number or String) centerX; + [Optional] + attribute (number or String) centerY; + [Optional] + attribute number centerZ; + [Optional] + attribute number perspective; }; [Entity=Interface, Deprecated] interface TransitionOptions { - [Optional, Deprecated] attribute TransitionType type; [Optional, Deprecated] @@ -496,26 +650,20 @@ interface TransitionOptions { attribute ScaleOptions scale; [Optional, Deprecated] attribute RotateOptions rotate; - }; dictionary TransitionEdge { - number TOP = 0; number BOTTOM = 1; number START = 2; number END = 3; - }; [Entity=Literal, Synthetic] interface Literal_TransitionEffect_appear_disappear { - attribute TransitionEffect appear; attribute TransitionEffect disappear; - }; [Entity=Literal] interface TransitionEffects { - attribute undefined identity; attribute number opacity; attribute undefined slideSwitch; @@ -524,23 +672,22 @@ interface TransitionEffects { attribute RotateOptions rotate; attribute ScaleOptions scale; attribute Literal_TransitionEffect_appear_disappear asymmetric; - +}; +[Entity=Interface] +interface AsymmetricTransitionOption { + attribute TransitionEffect appear; + attribute TransitionEffect disappear; }; [Entity=Class] interface DrawModifier { - - [Optional] void drawBehind(DrawContext drawContext); - [Optional] void drawContent(DrawContext drawContext); - [Optional] void drawFront(DrawContext drawContext); + void drawForeground(DrawContext drawContext); void invalidate(); - }; [Entity=Class] interface TransitionEffect { - constructor(String type, TransitionEffects effect); static readonly attribute TransitionEffect IDENTITY; static readonly attribute TransitionEffect OPACITY; @@ -554,11 +701,31 @@ interface TransitionEffect { static TransitionEffect asymmetric(TransitionEffect appear, TransitionEffect disappear); TransitionEffect animation(AnimateParam value); TransitionEffect combine(TransitionEffect transitionEffect); - +}; +[Entity=Class] +interface TransitionEffect { + constructor(String type, undefined effect); + constructor(String type, number effect); + constructor(String type, TransitionEdge effect); + constructor(String type, TranslateOptions effect); + constructor(String type, RotateOptions effect); + constructor(String type, ScaleOptions effect); + constructor(String type, AsymmetricTransitionOption effect); + static readonly attribute TransitionEffect IDENTITY; + static readonly attribute TransitionEffect OPACITY; + static readonly attribute TransitionEffect SLIDE; + static readonly attribute TransitionEffect SLIDE_SWITCH; + static TransitionEffect translate(TranslateOptions options); + static TransitionEffect rotate(RotateOptions options); + static TransitionEffect scale(ScaleOptions options); + static TransitionEffect opacity(number alpha); + static TransitionEffect move(TransitionEdge edge); + static TransitionEffect asymmetric(TransitionEffect appear, TransitionEffect disappear); + TransitionEffect animation(AnimateParam value); + TransitionEffect combine(TransitionEffect transitionEffect); }; [Entity=Interface] interface PreviewParams { - [Optional] attribute String title; [Optional] @@ -577,23 +744,17 @@ interface PreviewParams { attribute String orientation; [Optional] attribute boolean roundScreen; - }; [Entity=Interface] interface ItemDragInfo { - attribute number x; attribute number y; - }; dictionary EffectType { - number DEFAULT = 0; number WINDOW_EFFECT = 1; - }; dictionary PreDragStatus { - number ACTION_DETECTING_STATUS = 0; number READY_TO_TRIGGER_DRAG_ACTION = 1; number PREVIEW_LIFT_STARTED = 2; @@ -602,62 +763,55 @@ dictionary PreDragStatus { number PREVIEW_LANDING_FINISHED = 5; number ACTION_CANCELED_BEFORE_DRAG = 6; number PREPARING_FOR_DRAG_DETECTION = 7; - }; [Entity=Interface] interface DragItemInfo { - [Optional] attribute PixelMap pixelMap; [Optional] attribute CustomBuilder builder; [Optional] attribute String extraInfo; - }; +[Deprecated] +void animateTo(AnimateParam value, Callback_Void event); +void animateToImmediately(AnimateParam value, Callback_Void event); +[Deprecated] +number vp2px(number value); +[Deprecated] +number px2vp(number value); +[Deprecated] +number fp2px(number value); +[Deprecated] +number px2fp(number value); +[Deprecated] +number lpx2px(number value); +[Deprecated] +number px2lpx(number value); namespace focusControl { - - [GlobalScope] - interface GlobalScope_focusControl_common { - - static boolean requestFocus(String value); - - }; - -}; -[Import="import('../api/@ohos.multimodalInput.pointer').default.PointerStyle"] -typedef [Import="import('../api/@ohos.multimodalInput.pointer').default.PointerStyle"] PointerStyle PointerStyle; + boolean requestFocus(String value); +}; +typedef _PointerStyle PointerStyle; +typedef pointer.PointerStyle PointerStyle; namespace cursorControl { - - [GlobalScope] - interface GlobalScope_cursorControl_common { - - static void setCursor(PointerStyle value); - static void restoreDefault(); - - }; - + void setCursor(PointerStyle value); + void restoreDefault(); }; [Entity=Interface] interface EventTarget { - attribute Area area; [Optional] attribute String id; - }; dictionary SourceType { - [OriginalEnumMemberName=Unknown] number UNKNOWN = 0; [OriginalEnumMemberName=Mouse] number MOUSE = 1; [OriginalEnumMemberName=TouchScreen] number TOUCH_SCREEN = 2; - }; dictionary SourceTool { - [OriginalEnumMemberName=Unknown] number UNKNOWN = 0; [OriginalEnumMemberName=Finger] @@ -667,10 +821,8 @@ dictionary SourceTool { number MOUSE = 3; number TOUCHPAD = 4; number JOYSTICK = 5; - }; dictionary RepeatMode { - [OriginalEnumMemberName=Repeat] number REPEAT = 0; [OriginalEnumMemberName=Stretch] @@ -679,10 +831,8 @@ dictionary RepeatMode { number ROUND = 2; [OriginalEnumMemberName=Space] number SPACE = 3; - }; dictionary BlurStyle { - [OriginalEnumMemberName=Thin] number THIN = 0; [OriginalEnumMemberName=Regular] @@ -699,65 +849,52 @@ dictionary BlurStyle { number COMPONENT_REGULAR = 10; number COMPONENT_THICK = 11; number COMPONENT_ULTRA_THICK = 12; - }; dictionary BlurStyleActivePolicy { - number FOLLOWS_WINDOW_ACTIVE_STATE = 0; number ALWAYS_ACTIVE = 1; number ALWAYS_INACTIVE = 2; - }; dictionary ThemeColorMode { - number SYSTEM = 0; number LIGHT = 1; number DARK = 2; - }; dictionary AdaptiveColor { - number DEFAULT = 0; number AVERAGE = 1; - }; dictionary ModalTransition { - number DEFAULT = 0; number NONE = 1; number ALPHA = 2; - }; [Entity=Interface] interface BackgroundBlurStyleOptions: BlurStyleOptions { - [Optional] attribute BlurStyleActivePolicy policy; [Optional] attribute ResourceColor inactiveColor; - }; [Entity=Interface] interface ForegroundBlurStyleOptions: BlurStyleOptions { - - }; [Entity=Tuple, Synthetic] interface Tuple_Number_Number { - attribute number value0; attribute number value1; - }; [Entity=Interface] interface BlurOptions { - attribute Tuple_Number_Number grayscale; - +}; +[Entity=Interface] +interface SystemAdaptiveOptions { + [Optional] + attribute boolean disableSystemAdaptation; }; [Entity=Interface] interface BlurStyleOptions { - [Optional] attribute ThemeColorMode colorMode; [Optional] @@ -766,11 +903,9 @@ interface BlurStyleOptions { attribute number scale; [Optional] attribute BlurOptions blurOptions; - }; [Entity=Interface] interface BackgroundEffectOptions { - attribute number radius; [Optional] attribute number saturation; @@ -786,26 +921,20 @@ interface BackgroundEffectOptions { attribute BlurStyleActivePolicy policy; [Optional] attribute ResourceColor inactiveColor; - }; [Entity=Interface] interface ForegroundEffectOptions { - attribute number radius; - }; [Entity=Interface] interface PickerTextStyle { - [Optional] attribute ResourceColor color; [Optional] attribute Font font; - }; [Entity=Interface] interface PickerDialogButtonStyle { - [Optional] attribute ButtonType type; [Optional] @@ -828,17 +957,13 @@ interface PickerDialogButtonStyle { attribute (Length or BorderRadiuses) borderRadius; [Optional] attribute boolean primary; - }; dictionary ShadowType { - number COLOR = 0; number BLUR = 1; - }; [Entity=Interface] interface ShadowOptions { - attribute (number or Resource) radius; [Optional] attribute ShadowType type; @@ -850,65 +975,55 @@ interface ShadowOptions { attribute (number or Resource) offsetY; [Optional] attribute boolean fill; - }; dictionary ShadowStyle { - number OUTER_DEFAULT_XS = 0; number OUTER_DEFAULT_SM = 1; number OUTER_DEFAULT_MD = 2; number OUTER_DEFAULT_LG = 3; number OUTER_FLOATING_SM = 4; number OUTER_FLOATING_MD = 5; - }; [Entity=Interface] interface MultiShadowOptions { - [Optional] attribute (number or Resource) radius; [Optional] attribute (number or Resource) offsetX; [Optional] attribute (number or Resource) offsetY; - }; dictionary SafeAreaType { - number SYSTEM = 0; number CUTOUT = 1; number KEYBOARD = 2; - }; dictionary SafeAreaEdge { - number TOP = 0; number BOTTOM = 1; number START = 2; number END = 3; - }; dictionary LayoutSafeAreaType { - number SYSTEM = 0; - }; dictionary LayoutSafeAreaEdge { - number TOP = 0; number BOTTOM = 1; - + number START = 2; + number END = 3; + number VERTICAL = 4; + number HORIZONTAL = 5; + number ALL = 6; }; dictionary SheetSize { - number MEDIUM = 0; number LARGE = 1; number FIT_CONTENT = 2; - }; +callback ModifierKeyStateGetter = boolean (sequence keys); [Entity=Interface] interface BaseEvent { - attribute EventTarget target; attribute number timestamp; attribute SourceType source; @@ -919,18 +1034,20 @@ interface BaseEvent { attribute number pressure; attribute number tiltX; attribute number tiltY; + [Optional] + attribute number rollAngle; attribute SourceTool sourceTool; [Optional] + attribute ModifierKeyStateGetter getModifierKeyState; + [Optional] attribute number deviceId; [Optional] attribute number targetDisplayId; [Throws, Optional] boolean getModifierKeyState(sequence keys); - }; [Entity=Interface] interface BorderImageOption { - [Optional] attribute (Length or EdgeWidths or LocalizedEdgeWidths) slice; [Optional] @@ -943,17 +1060,19 @@ interface BorderImageOption { attribute (Length or EdgeWidths or LocalizedEdgeWidths) outset; [Optional] attribute boolean fill; - }; [Entity=Class] interface LayoutPolicy { - static readonly attribute LayoutPolicy matchParent; - + static readonly attribute LayoutPolicy wrapContent; + static readonly attribute LayoutPolicy fixAtIdealSize; }; [Entity=Interface] interface ClickEvent: BaseEvent { - + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; attribute number displayX; attribute number displayY; attribute number windowX; @@ -967,11 +1086,9 @@ interface ClickEvent: BaseEvent { [Optional] attribute InteractionHand hand; attribute Callback_Void preventDefault; - }; [Entity=Interface] interface HoverEvent: BaseEvent { - [Optional] attribute number x; [Optional] @@ -984,14 +1101,20 @@ interface HoverEvent: BaseEvent { attribute number displayX; [Optional] attribute number displayY; + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; attribute Callback_Void stopPropagation; - }; [Entity=Interface] interface MouseEvent: BaseEvent { - attribute MouseButton button; attribute MouseAction action; + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; attribute number displayX; attribute number displayY; attribute number windowX; @@ -1009,11 +1132,9 @@ interface MouseEvent: BaseEvent { attribute number rawDeltaY; [Optional] attribute sequence pressedButtons; - }; [Entity=Interface] interface AccessibilityHoverEvent: BaseEvent { - attribute AccessibilityHoverType type; attribute number x; attribute number y; @@ -1021,13 +1142,19 @@ interface AccessibilityHoverEvent: BaseEvent { attribute number displayY; attribute number windowX; attribute number windowY; - + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; }; [Entity=Interface] interface TouchObject { - attribute TouchType type; attribute number id; + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; attribute number displayX; attribute number displayY; attribute number windowX; @@ -1048,32 +1175,30 @@ interface TouchObject { attribute number width; [Optional] attribute number height; - }; [Entity=Interface] interface HistoricalPoint { - attribute TouchObject touchObject; attribute number size; attribute number force; attribute number timestamp; - }; [Entity=Interface] interface TouchEvent: BaseEvent { - attribute TouchType type; attribute sequence touches; attribute sequence changedTouches; attribute Callback_Void stopPropagation; attribute Callback_Void preventDefault; sequence getHistoricalPoints(); - }; [Entity=Interface] interface AxisEvent: BaseEvent { - attribute AxisAction action; + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; attribute number displayX; attribute number displayY; attribute number windowX; @@ -1085,45 +1210,42 @@ interface AxisEvent: BaseEvent { attribute Callback_Void propagation; number getHorizontalAxisValue(); number getVerticalAxisValue(); - }; callback SizeChangeCallback = void (SizeOptions oldValue, SizeOptions newValue); +callback GestureRecognizerJudgeBeginCallback = GestureJudgeResult (BaseGestureEvent event, GestureRecognizer current, sequence recognizers, optional sequence touchRecognizers); callback GestureRecognizerJudgeBeginCallback = GestureJudgeResult (BaseGestureEvent event, GestureRecognizer current, sequence recognizers); callback ShouldBuiltInRecognizerParallelWithCallback = GestureRecognizer (GestureRecognizer current, sequence others); callback TransitionFinishCallback = void (boolean transitionIn); -[Import="import('../api/@ohos.multimedia.image').default.PixelMap"] -typedef [Import="import('../api/@ohos.multimedia.image').default.PixelMap"] PixelMap PixelMap; +callback TouchTestDoneCallback = void (BaseGestureEvent event, sequence recognizers); +typedef _PixelMap PixelMap; +typedef image.PixelMap PixelMap; [Entity=Interface] interface PixelMapMock { - void release(); - }; dictionary DragBehavior { - number COPY = 0; number MOVE = 1; - -}; -[Import="import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData"] -typedef [Import="import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData"] UnifiedData UnifiedData; -[Import="import('../api/@ohos.data.unifiedDataChannel').default.Summary"] -typedef [Import="import('../api/@ohos.data.unifiedDataChannel').default.Summary"] Summary Summary; -[Import="import('../api/@ohos.data.uniformTypeDescriptor').default.UniformDataType"] -typedef [Import="import('../api/@ohos.data.uniformTypeDescriptor').default.UniformDataType"] UniformDataType UniformDataType; -[Import="import('../api/@ohos.data.unifiedDataChannel').default.GetDataParams"] -typedef [Import="import('../api/@ohos.data.unifiedDataChannel').default.GetDataParams"] DataSyncOptions DataSyncOptions; +}; +typedef _UnifiedData UnifiedData; +typedef unifiedDataChannel.UnifiedData UnifiedData; +typedef _Summary Summary; +typedef unifiedDataChannel.Summary Summary; +typedef _UniformDataType UniformDataType; +typedef _GetDataParams DataSyncOptions; +typedef uniformTypeDescriptor.UniformDataType UniformDataType; +typedef _SpringLoadingContext SpringLoadingContext; +typedef _DragSpringLoadingConfiguration DragSpringLoadingConfiguration; +typedef _DataLoadParams DataLoadParams; dictionary DragResult { - + number UNKNOWN = -1; number DRAG_SUCCESSFUL = 0; number DRAG_FAILED = 1; number DRAG_CANCELED = 2; number DROP_ENABLED = 3; number DROP_DISABLED = 4; - }; dictionary BlendMode { - number NONE = 0; number CLEAR = 1; number SRC = 2; @@ -1154,19 +1276,19 @@ dictionary BlendMode { number SATURATION = 27; number COLOR = 28; number LUMINOSITY = 29; - }; dictionary BlendApplyType { - number FAST = 0; number OFFSCREEN = 1; - }; [Entity=Interface] interface DragEvent { - attribute DragBehavior dragBehavior; attribute boolean useCustomDropAnimation; + [Optional] + attribute ModifierKeyStateGetter getModifierKeyState; + number getGlobalDisplayX(); + number getGlobalDisplayY(); number getDisplayX(); number getDisplayY(); number getWindowX(); @@ -1190,21 +1312,22 @@ interface DragEvent { void executeDropAnimation(Callback_Void customDropAnimation); [Throws] String startDataLoading(DataSyncOptions options); - + String getDragSource(); + boolean isRemote(); + number getDisplayId(); + void setDataLoadParams(DataLoadParams dataLoadParams); + [Throws] + void enableInternalDropAnimation(String configuration); }; callback OnDragEventCallback = void (DragEvent event, optional String extraParams); [Entity=Interface] interface DropOptions { - [Optional] attribute boolean disableDataPrefetch; - }; -[Import="import('../api/@ohos.multimodalInput.intentionCode').IntentionCode"] -typedef [Import="import('../api/@ohos.multimodalInput.intentionCode').IntentionCode"] IntentionCode IntentionCode; +typedef _IntentionCode IntentionCode; [Entity=Interface] interface KeyEvent { - attribute KeyType type; attribute number keyCode; attribute String keyText; @@ -1215,31 +1338,33 @@ interface KeyEvent { attribute Callback_Void stopPropagation; attribute IntentionCode intentionCode; [Optional] + attribute ModifierKeyStateGetter getModifierKeyState; + [Optional] attribute number unicode; + [Optional] + attribute boolean isNumLockOn; + [Optional] + attribute boolean isCapsLockOn; + [Optional] + attribute boolean isScrollLockOn; [Throws, Optional] boolean getModifierKeyState(sequence keys); - }; [Entity=Interface] interface FocusAxisEvent: BaseEvent { - attribute record axisMap; attribute Callback_Void stopPropagation; - }; [Entity=Interface] interface CrownEvent { - attribute number timestamp; attribute number angularVelocity; attribute number degree; attribute CrownAction action; attribute Callback_Void stopPropagation; - }; [Entity=Interface] interface BindOptions { - [Optional] attribute ResourceColor backgroundColor; [Optional] @@ -1250,91 +1375,106 @@ interface BindOptions { attribute Callback_Void onWillAppear; [Optional] attribute Callback_Void onWillDisappear; - }; [Entity=Interface] interface DismissContentCoverAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - +}; +[Entity=Interface] +interface DismissContentCoverAction { + attribute VoidCallback dismiss; + attribute DismissReason reason; }; [Synthetic] callback Callback_DismissContentCoverAction_Void = void (DismissContentCoverAction parameter); [Entity=Interface] interface ContentCoverOptions: BindOptions { - [Optional] attribute ModalTransition modalTransition; [Optional] attribute Callback_DismissContentCoverAction_Void onWillDismiss; [Optional] attribute TransitionEffect transition; - + [Optional] + attribute boolean enableSafeArea; }; [Entity=Interface] interface SheetTitleOptions { - attribute ResourceStr title; [Optional] attribute ResourceStr subtitle; - }; dictionary SheetType { - number BOTTOM = 0; number CENTER = 1; number POPUP = 2; - + number SIDE = 3; + number CONTENT_COVER = 4; }; dictionary SheetMode { - number OVERLAY = 0; number EMBEDDED = 1; - }; dictionary ScrollSizeMode { - number FOLLOW_DETENT = 0; number CONTINUOUS = 1; - }; dictionary SheetKeyboardAvoidMode { - number NONE = 0; number TRANSLATE_AND_RESIZE = 1; number RESIZE_ONLY = 2; number TRANSLATE_AND_SCROLL = 3; - + number POPUP_SHEET = 4; }; [Entity=Interface] interface SheetDismiss { - attribute Callback_Void dismiss; - +}; +[Entity=Interface] +interface SheetDismiss { + attribute VoidCallback dismiss; }; [Entity=Interface] interface DismissSheetAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - +}; +[Entity=Interface] +interface DismissSheetAction { + attribute VoidCallback dismiss; + attribute DismissReason reason; }; [Entity=Interface] interface SpringBackAction { - attribute Callback_Void springBack; - +}; +[Entity=Interface] +interface SpringBackAction { + attribute VoidCallback springBack; +}; +[Entity=Tuple] +interface SingleLengthDetent { + attribute (SheetSize or Length) value0; +}; +[Entity=Tuple] +interface DoubleLengthDetents { + attribute (SheetSize or Length) value0; + attribute ((SheetSize or Length) or undefined) value1; +}; +[Entity=Tuple] +interface TripleLengthDetents { + attribute (SheetSize or Length) value0; + attribute ((SheetSize or Length) or undefined) value1; + attribute ((SheetSize or Length) or undefined) value2; }; [Entity=Tuple, Synthetic] interface Type_SheetOptions_detents { - attribute (SheetSize or Length) value0; [Optional] attribute (SheetSize or Length) value1; [Optional] attribute (SheetSize or Length) value2; - }; [Synthetic] callback Callback_SheetDismiss_Void = void (SheetDismiss sheetDismiss); @@ -1348,16 +1488,21 @@ callback Callback_Number_Void = void (number parameter); callback Callback_SheetType_Void = void (SheetType parameter); [Entity=Interface] interface SheetOptions: BindOptions { - [Optional] attribute (SheetSize or Length) height; [Optional] attribute boolean dragBar; [Optional] + attribute boolean enableFloatingDragBar; + [Optional] + attribute ModalTransition modalTransition; + [Optional] attribute ResourceColor maskColor; [Optional] attribute Type_SheetOptions_detents detents; [Optional] + attribute (SingleLengthDetent or DoubleLengthDetents or TripleLengthDetents) detents; + [Optional] attribute BlurStyle blurStyle; [Optional] attribute (boolean or Resource) showClose; @@ -1417,67 +1562,73 @@ interface SheetOptions: BindOptions { attribute Placement placement; [Optional] attribute boolean placementOnTarget; - }; +callback CustomStyles = void (CommonMethod instance); [Entity=Interface] interface StateStyles { - [Optional] attribute any normal; [Optional] + attribute CustomStyles normal; + [Optional] attribute any pressed; [Optional] + attribute CustomStyles pressed; + [Optional] attribute any disabled; [Optional] + attribute CustomStyles disabled; + [Optional] attribute any focused; [Optional] + attribute CustomStyles focused; + [Optional] attribute any clicked; [Optional] + attribute CustomStyles clicked; + [Optional] attribute Object selected; - + [Optional] + attribute CustomStyles selected; }; [Entity=Interface] interface PopupMessageOptions { - [Optional] attribute ResourceColor textColor; [Optional] attribute Font font; - }; dictionary DismissReason { - number PRESS_BACK = 0; number TOUCH_OUTSIDE = 1; number CLOSE_BUTTON = 2; number SLIDE_DOWN = 3; - + number SLIDE = 4; }; [Entity=Interface] interface DismissPopupAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - }; [Entity=Interface] interface PopupStateChangeParam { - attribute boolean isVisible; - }; callback PopupStateChangeCallback = void (PopupStateChangeParam event); [Entity=Interface] interface PopupMaskType { - attribute ResourceColor color; - +}; +[Entity=Interface] +interface PopupBorderLinearGradient { + [Optional] + attribute GradientDirection direction; + attribute sequence colors; }; [Synthetic] callback Callback_DismissPopupAction_Void = void (DismissPopupAction parameter); [Entity=Interface] interface PopupCommonOptions { - [Optional] attribute Placement placement; [Optional] @@ -1522,32 +1673,60 @@ interface PopupCommonOptions { attribute boolean enableHoverMode; [Optional] attribute boolean followTransformOfTarget; - + [Optional] + attribute AvoidanceMode avoidTarget; + [Optional] + attribute Dimension outlineWidth; + [Optional] + attribute Dimension borderWidth; + [Optional] + attribute PopupBorderLinearGradient outlineLinearGradient; + [Optional] + attribute PopupBorderLinearGradient borderLinearGradient; +}; +[Entity=Interface] +interface TipsOptions { + [Optional] + attribute number appearingTime; + [Optional] + attribute number disappearingTime; + [Optional] + attribute number appearingTimeWithContinuousOperation; + [Optional] + attribute number disappearingTimeWithContinuousOperation; + [Optional] + attribute boolean enableArrow; + [Optional] + attribute ArrowPointPosition arrowPointPosition; + [Optional] + attribute Dimension arrowWidth; + [Optional] + attribute Dimension arrowHeight; + [Optional] + attribute TipsAnchorType showAtAnchor; +}; +[Entity=Interface] +interface PopupButton { + attribute String value; + attribute VoidCallback action; }; [Entity=Literal, Synthetic] interface Literal_String_value_Callback_Void_action { - attribute String value; attribute Callback_Void action; - }; [Entity=Literal, Synthetic] interface Literal_Boolean_isVisible { - attribute boolean isVisible; - }; [Synthetic] callback Callback_Literal_Boolean_isVisible_Void = void (Literal_Boolean_isVisible event); [Entity=Literal, Synthetic] interface Literal_ResourceColor_color { - attribute ResourceColor color; - }; [Entity=Interface] interface PopupOptions { - attribute String message; [Optional, Deprecated] attribute boolean placementOnTop; @@ -1556,16 +1735,24 @@ interface PopupOptions { [Optional] attribute Literal_String_value_Callback_Void_action primaryButton; [Optional] + attribute PopupButton primaryButton; + [Optional] attribute Literal_String_value_Callback_Void_action secondaryButton; [Optional] + attribute PopupButton secondaryButton; + [Optional] attribute Callback_Literal_Boolean_isVisible_Void onStateChange; [Optional] + attribute PopupStateChangeCallback onStateChange; + [Optional] attribute Length arrowOffset; [Optional] attribute boolean showInSubWindow; [Optional] attribute (boolean or Literal_ResourceColor_color) mask; [Optional] + attribute (boolean or PopupMaskType) mask; + [Optional] attribute PopupMessageOptions messageOptions; [Optional] attribute Length targetSpace; @@ -1601,11 +1788,19 @@ interface PopupOptions { attribute boolean followTransformOfTarget; [Optional] attribute KeyboardAvoidMode keyboardAvoidMode; - + [Optional] + attribute AvoidanceMode avoidTarget; + [Optional] + attribute Dimension outlineWidth; + [Optional] + attribute Dimension borderWidth; + [Optional] + attribute PopupBorderLinearGradient outlineLinearGradient; + [Optional] + attribute PopupBorderLinearGradient borderLinearGradient; }; [Entity=Interface] interface CustomPopupOptions { - attribute CustomBuilder builder; [Optional] attribute Placement placement; @@ -1620,12 +1815,16 @@ interface CustomPopupOptions { [Optional] attribute Callback_Literal_Boolean_isVisible_Void onStateChange; [Optional] + attribute PopupStateChangeCallback onStateChange; + [Optional] attribute Length arrowOffset; [Optional] attribute boolean showInSubWindow; [Optional] attribute (boolean or Literal_ResourceColor_color) mask; [Optional] + attribute (boolean or PopupMaskType) mask; + [Optional] attribute Length targetSpace; [Optional] attribute Position offset; @@ -1655,36 +1854,75 @@ interface CustomPopupOptions { attribute boolean followTransformOfTarget; [Optional] attribute KeyboardAvoidMode keyboardAvoidMode; - + [Optional] + attribute AvoidanceMode avoidTarget; + [Optional] + attribute Dimension outlineWidth; + [Optional] + attribute Dimension borderWidth; + [Optional] + attribute PopupBorderLinearGradient outlineLinearGradient; + [Optional] + attribute PopupBorderLinearGradient borderLinearGradient; }; dictionary MenuPreviewMode { - number NONE = 0; number IMAGE = 1; - }; [Entity=NamedTuple, TypeParameters="T"] interface AnimationRange { - attribute T from; attribute T to; - +}; +[Entity=Tuple] +interface AnimationNumberRange { + attribute number value0; + attribute number value1; +}; +[Synthetic, Entity=Tuple, Synthetic, Synthetic, Synthetic, Synthetic, Synthetic, Synthetic, Synthetic] +interface AnimationRange_Number { + attribute number value0; + attribute number value1; }; [Entity=Interface] interface ContextMenuAnimationOptions { - [Optional] - attribute [TypeArguments="number"] AnimationRange scale; + attribute AnimationRange_Number scale; [Optional] attribute TransitionEffect transition; [Optional] - attribute [TypeArguments="number"] AnimationRange hoverScale; - + attribute AnimationRange_Number hoverScale; + [Optional] + attribute boolean hoverScaleInterruption; }; typedef (Length or BorderRadiuses or LocalizedBorderRadiuses) BorderRadiusType; +dictionary HapticFeedbackMode { + number DISABLED = 0; + number ENABLED = 1; + number AUTO = 2; +}; +dictionary ModalMode { + number AUTO = 0; + number NONE = 1; + number TARGET_WINDOW = 2; +}; +[Entity=Interface] +interface MenuMaskType { + [Optional] + attribute ResourceColor color; + [Optional] + attribute BlurStyle backgroundBlurStyle; +}; +dictionary PreviewScaleMode { + number AUTO = 0; + number CONSTANT = 1; + number MAINTAIN = 2; +}; +dictionary AvailableLayoutArea { + number SAFE_AREA = 0; +}; [Entity=Interface] interface ContextMenuOptions { - [Optional] attribute Position offset; [Optional] @@ -1723,29 +1961,47 @@ interface ContextMenuOptions { attribute TransitionEffect transition; [Optional] attribute boolean enableHoverMode; - + [Optional] + attribute (ResourceColor or EdgeColors) outlineColor; + [Optional] + attribute (Dimension or EdgeOutlineWidths) outlineWidth; + [Optional] + attribute HapticFeedbackMode hapticFeedbackMode; + [Optional] + attribute (boolean or MenuMaskType) mask; + [Optional] + attribute ModalMode modalMode; + [Optional] + attribute Callback_Void onDidAppear; + [Optional] + attribute Callback_Void onDidDisappear; + [Optional] + attribute Callback_Void onWillAppear; + [Optional] + attribute Callback_Void onWillDisappear; + [Optional] + attribute PreviewScaleMode previewScaleMode; + [Optional] + attribute AvailableLayoutArea availableLayoutArea; + [Optional] + attribute Position anchorPosition; }; [Entity=Interface] interface MenuOptions: ContextMenuOptions { - [Optional] attribute ResourceStr title; [Optional] attribute boolean showInSubWindow; - }; [Entity=Class] interface ProgressMask { - constructor(number value, number total, ResourceColor color); void updateProgress(number value); void updateColor(ResourceColor value); void enableBreathingAnimation(boolean value); - }; [Entity=Class] interface TouchTestInfo { - attribute number windowX; attribute number windowY; attribute number parentX; @@ -1754,19 +2010,15 @@ interface TouchTestInfo { attribute number y; attribute RectResult rect; attribute String id; - }; [Entity=Class] interface TouchResult { - attribute TouchTestStrategy strategy; [Optional] attribute String id; - }; [Entity=Interface] interface PixelStretchEffectOptions { - [Optional] attribute Length top; [Optional] @@ -1775,33 +2027,25 @@ interface PixelStretchEffectOptions { attribute Length left; [Optional] attribute Length right; - }; [Entity=Interface] interface ClickEffect { - attribute ClickEffectLevel level; [Optional] attribute number scale; - }; [Entity=Interface] interface FadingEdgeOptions { - [Optional] attribute LengthMetrics fadingEdgeLength; - }; [Entity=Interface] interface NestedScrollOptions { - attribute NestedScrollMode scrollForward; attribute NestedScrollMode scrollBackward; - }; [Entity=Interface] interface MenuElement { - attribute ResourceStr value; [Optional] attribute ResourceStr icon; @@ -1810,11 +2054,9 @@ interface MenuElement { [Optional] attribute boolean enabled; attribute Callback_Void action; - }; [Entity=Interface, TypeParameters="T"] interface AttributeModifier { - [Optional] void applyNormalAttribute(T instance); [Optional] @@ -1825,63 +2067,75 @@ interface AttributeModifier { void applyDisabledAttribute(T instance); [Optional] void applySelectedAttribute(T instance); - }; -[TypeParameters="T"] +[Synthetic] +callback Callback_T_Void = void (T instance); +[Entity=Interface, TypeParameters="T"] +interface AttributeModifier { + [Optional] + attribute Callback_T_Void applyNormalAttribute; + [Optional] + attribute Callback_T_Void applyPressedAttribute; + [Optional] + attribute Callback_T_Void applyFocusedAttribute; + [Optional] + attribute Callback_T_Void applyDisabledAttribute; + [Optional] + attribute Callback_T_Void applySelectedAttribute; +}; +[Entity=Tuple, Synthetic, TypeParameters="T"] +interface Tuple_T { + attribute T value0; +}; +[Entity=Interface, TypeParameters="T"] interface ContentModifier { - - attribute String stub; - + ([TypeArguments="Tuple_T"] WrappedBuilder) applyContent(); + ([TypeArguments="sequence"] WrappedBuilder) applyContent(); }; [Entity=Interface, TypeParameters="T"] interface CommonConfiguration { - attribute boolean enabled; attribute [TypeArguments="T"] ContentModifier contentModifier; - }; dictionary OutlineStyle { - number SOLID = 0; number DASHED = 1; number DOTTED = 2; - }; dictionary DragPreviewMode { - number AUTO = 1; number DISABLE_SCALE = 2; number ENABLE_DEFAULT_SHADOW = 3; number ENABLE_DEFAULT_RADIUS = 4; number ENABLE_DRAG_ITEM_GRAY_EFFECT = 5; number ENABLE_MULTI_TILE_EFFECT = 6; - + number ENABLE_TOUCH_POINT_CALCULATION_BASED_ON_FINAL_PREVIEW = 7; +}; +dictionary DraggingSizeChangeEffect { + number DEFAULT = 0; + number SIZE_TRANSITION = 1; + number SIZE_CONTENT_TRANSITION = 2; }; dictionary MenuPolicy { - number DEFAULT = 0; number HIDE = 1; number SHOW = 2; - }; -[Import="import('../api/arkui/ImageModifier').ImageModifier"] -typedef [Import="import('../api/arkui/ImageModifier').ImageModifier"] ImageModifier ImageModifier; -[Import="import('../api/arkui/SymbolGlyphModifier').SymbolGlyphModifier"] -typedef [Import="import('../api/arkui/SymbolGlyphModifier').SymbolGlyphModifier"] SymbolGlyphModifier SymbolGlyphModifier; +typedef _ImageModifier ImageModifier; +typedef _SymbolGlyphModifier SymbolGlyphModifier; [Entity=Interface] interface DragPreviewOptions { - [Optional] attribute (DragPreviewMode or sequence) mode; [Optional] attribute ImageModifier modifier; [Optional] attribute (boolean or number) numberBadge; - + [Optional] + attribute DraggingSizeChangeEffect sizeChangeEffect; }; [Entity=Interface] interface DragInteractionOptions { - [Optional] attribute boolean isMultiSelectionEnabled; [Optional] @@ -1892,55 +2146,46 @@ interface DragInteractionOptions { attribute boolean enableHapticFeedback; [Optional] attribute boolean isLiftingDisabled; - }; [Entity=Interface] interface PreviewConfiguration { - [Optional] attribute boolean onlyForLifting; [Optional] attribute boolean delayCreating; - }; [Entity=Interface] interface InvertOptions { - attribute number low; attribute number high; attribute number threshold; attribute number thresholdRange; - -}; -[Import="import('../api/@ohos.arkui.shape').CircleShape"] -typedef [Import="import('../api/@ohos.arkui.shape').CircleShape"] CircleShape CircleShape; -[Import="import('../api/@ohos.arkui.shape').EllipseShape"] -typedef [Import="import('../api/@ohos.arkui.shape').EllipseShape"] EllipseShape EllipseShape; -[Import="import('../api/@ohos.arkui.shape').PathShape"] -typedef [Import="import('../api/@ohos.arkui.shape').PathShape"] PathShape PathShape; -[Import="import('../api/@ohos.arkui.shape').RectShape"] -typedef [Import="import('../api/@ohos.arkui.shape').RectShape"] RectShape RectShape; +}; +typedef _CircleShape CircleShape; +typedef _EllipseShape EllipseShape; +typedef _PathShape PathShape; +typedef _RectShape RectShape; [TypeParameters="T"] typedef (T or undefined) Optional; +typedef (ResourceStr or StyledString) TipsMessageType; +typedef _Matrix4Transit Matrix4Transit; [Entity=Interface] interface BackgroundImageOptions { - [Optional] attribute boolean syncLoad; [Optional] attribute ImageRepeat repeat; - }; -[Synthetic] -callback Callback_Array_TouchTestInfo_TouchResult = TouchResult (sequence value); -[Entity=Literal, Synthetic] -interface Literal_Alignment_align { - +[Entity=Interface] +interface BackgroundOptions { [Optional] attribute Alignment align; - + [Optional] + attribute sequence ignoresLayoutSafeAreaEdges; }; [Synthetic] +callback Callback_Array_TouchTestInfo_TouchResult = TouchResult (sequence value); +[Synthetic] callback Callback_ClickEvent_Void = void (ClickEvent event); [Synthetic] callback Callback_Boolean_HoverEvent_Void = void (boolean isHover, HoverEvent event); @@ -1964,14 +2209,11 @@ callback Callback_AxisEvent_Void = void (AxisEvent parameter); callback Callback_Area_Area_Void = void (Area oldValue, Area newValue); [Entity=Literal, Synthetic] interface Literal_Number_offset_span { - attribute number span; attribute number offset; - }; [Entity=Literal, Synthetic] interface Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs { - [Optional] attribute (number or Literal_Number_offset_span) xs; [Optional] @@ -1980,12 +2222,13 @@ interface Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs { attribute (number or Literal_Number_offset_span) md; [Optional] attribute (number or Literal_Number_offset_span) lg; - }; [Synthetic] -callback Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo = (CustomBuilder or DragItemInfo) (DragEvent event, optional String extraParams); +callback Type_CommonMethod_onDragStart_event = (CustomBuilder or DragItemInfo) (DragEvent event, optional String extraParams); [Synthetic] -callback Callback_DragEvent_String_Void = void (DragEvent event, optional String extraParams); +callback Callback_DragEvent_Opt_String_Void = void (DragEvent event, optional String extraParams); +[Synthetic] +callback Callback_SpringLoadingContext_Void = void (SpringLoadingContext parameter); [Synthetic] callback Callback_PreDragStatus_Void = void (PreDragStatus parameter); [Synthetic] @@ -1994,15 +2237,13 @@ callback Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult = GestureJudge callback Callback_TouchEvent_HitTestMode = HitTestMode (TouchEvent parameter); [Entity=Class, TypeParameters="T"] interface CommonMethod { - constructor(); - T width(Length value); T width((Length or LayoutPolicy) widthValue); - T height(Length value); T height((Length or LayoutPolicy) heightValue); T drawModifier((DrawModifier or undefined) modifier); T customProperty(String name, (Object or undefined) value); T expandSafeArea(optional sequence types, optional sequence edges); + T ignoreLayoutSafeArea(optional sequence types, optional sequence edges); T responseRegion((sequence or Rectangle) value); T mouseResponseRegion((sequence or Rectangle) value); T size(SizeOptions value); @@ -2016,27 +2257,22 @@ interface CommonMethod { T padding((Padding or Length or LocalizedPadding) value); T safeAreaPadding((Padding or LengthMetrics or LocalizedPadding) paddingValue); T margin((Margin or Length or LocalizedMargin) value); - T background(CustomBuilder builder, optional Literal_Alignment_align options); - T backgroundColor(ResourceColor value); - T backgroundColor((ResourceColor or undefined) color); + T background((CustomBuilder or ResourceColor) content, optional BackgroundOptions options); + T backgroundColor(((ResourceColor or ColorMetrics) or undefined) color); T pixelRound(PixelRoundPolicy value); T backgroundImage((ResourceStr or PixelMap) src, optional ImageRepeat repeat); T backgroundImage((ResourceStr or PixelMap) src, optional BackgroundImageOptions options); T backgroundImageSize((SizeOptions or ImageSize) value); T backgroundImagePosition((Position or Alignment) value); - T backgroundBlurStyle(BlurStyle value, optional BackgroundBlurStyleOptions options); - T backgroundBlurStyle((BlurStyle or undefined) style, optional BackgroundBlurStyleOptions options); - T backgroundEffect(BackgroundEffectOptions options); - T backgroundEffect((BackgroundEffectOptions or undefined) options); + T backgroundBlurStyle((BlurStyle or undefined) style, optional BackgroundBlurStyleOptions options, optional SystemAdaptiveOptions sysOptions); + T backgroundEffect((BackgroundEffectOptions or undefined) options, optional SystemAdaptiveOptions sysOptions); T backgroundImageResizable(ResizableOptions value); T foregroundEffect(ForegroundEffectOptions options); T visualEffect(VisualEffect effect); T backgroundFilter(Filter filter); T foregroundFilter(Filter filter); T compositingFilter(Filter filter); - T foregroundBlurStyle(BlurStyle value, optional ForegroundBlurStyleOptions options); - T foregroundBlurStyle((BlurStyle or undefined) style, optional ForegroundBlurStyleOptions options); - T opacity((number or Resource) value); + T foregroundBlurStyle((BlurStyle or undefined) style, optional ForegroundBlurStyleOptions options, optional SystemAdaptiveOptions sysOptions); T opacity(((number or Resource) or undefined) opacity); T border(BorderOptions value); T borderStyle((BorderStyle or EdgeStyles) value); @@ -2044,23 +2280,18 @@ interface CommonMethod { T borderColor((ResourceColor or EdgeColors or LocalizedEdgeColors) value); T borderRadius((Length or BorderRadiuses or LocalizedBorderRadiuses) value); T borderImage(BorderImageOption value); - T outline(OutlineOptions value); T outline((OutlineOptions or undefined) options); - T outlineStyle((OutlineStyle or EdgeOutlineStyles) value); T outlineStyle(((OutlineStyle or EdgeOutlineStyles) or undefined) style); - T outlineWidth((Dimension or EdgeOutlineWidths) value); T outlineWidth(((Dimension or EdgeOutlineWidths) or undefined) width); - T outlineColor((ResourceColor or EdgeColors or LocalizedEdgeColors) value); T outlineColor(((ResourceColor or EdgeColors or LocalizedEdgeColors) or undefined) color); - T outlineRadius((Dimension or OutlineRadiuses) value); T outlineRadius(((Dimension or OutlineRadiuses) or undefined) radius); - T foregroundColor((ResourceColor or ColoringStrategy) value); T foregroundColor(((ResourceColor or ColoringStrategy) or undefined) color); T onClick(Callback_ClickEvent_Void event); T onClick(Callback_ClickEvent_Void event, number distanceThreshold); T onHover(Callback_Boolean_HoverEvent_Void event); T onHoverMove(Callback_HoverEvent_Void event); T onAccessibilityHover(AccessibilityCallback callback_); + T onAccessibilityHoverTransparent(AccessibilityTransparentCallback callback_); T hoverEffect(HoverEffect value); T onMouse(Callback_MouseEvent_Void event); T onTouch(Callback_TouchEvent_Void event); @@ -2081,7 +2312,6 @@ interface CommonMethod { T groupDefaultFocus(boolean value); T focusOnTouch(boolean value); T focusBox(FocusBoxStyle style); - T focusScopeId(String id, optional boolean isGroup); T focusScopeId(String id, optional boolean isGroup, optional boolean arrowStepOut); T focusScopePriority(String scopeId, optional FocusPriority priority); T animation(AnimateParam value); @@ -2090,67 +2320,50 @@ interface CommonMethod { T gesture(GestureType gesture, optional GestureMask mask); T priorityGesture(GestureType gesture, optional GestureMask mask); T parallelGesture(GestureType gesture, optional GestureMask mask); - T blur(number value, optional BlurOptions options); - T blur((number or undefined) blurRadius, optional BlurOptions options); - T linearGradientBlur(number value, LinearGradientBlurOptions options); + T blur((number or undefined) blurRadius, optional BlurOptions options, optional SystemAdaptiveOptions sysOptions); T linearGradientBlur((number or undefined) blurRadius, (LinearGradientBlurOptions or undefined) options); - T motionBlur(MotionBlurOptions value); T motionBlur((MotionBlurOptions or undefined) motionBlur); - T brightness(number value); T brightness((number or undefined) brightness); - T contrast(number value); T contrast((number or undefined) contrast); - T grayscale(number value); T grayscale((number or undefined) grayscale); - T colorBlend((Color or String or Resource) value); T colorBlend(((Color or String or Resource) or undefined) color); - T saturate(number value); T saturate((number or undefined) saturate); - T sepia(number value); T sepia((number or undefined) sepia); - T invert((number or InvertOptions) value); T invert(((number or InvertOptions) or undefined) options); T systemBarEffect(); - T hueRotate((number or String) value); T hueRotate(((number or String) or undefined) rotation); - T useShadowBatching(boolean value); T useShadowBatching((boolean or undefined) use); - T useEffect(boolean useEffect, EffectType effectType); T useEffect((boolean or undefined) useEffect, optional EffectType effectType); - T useEffect(boolean value); - T backdropBlur(number value, optional BlurOptions options); - T backdropBlur((number or undefined) radius, optional BlurOptions options); - T renderGroup(boolean value); + T backdropBlur((number or undefined) radius, optional BlurOptions options, optional SystemAdaptiveOptions sysOptions); T renderGroup((boolean or undefined) isGroup); - T freeze(boolean value); T freeze((boolean or undefined) freeze); - T translate(TranslateOptions value); T translate((TranslateOptions or undefined) translate); - T scale(ScaleOptions value); T scale((ScaleOptions or undefined) options); [Deprecated] T gridSpan(number value); [Deprecated] T gridOffset(number value); - T rotate(RotateOptions value); - T rotate((RotateOptions or undefined) options); - T transform(Object value); + T rotate(((RotateOptions or RotateAngleOptions) or undefined) options); T transform((Object or undefined) transform); + T transform3D((Matrix4Transit or undefined) transform); T onAppear(Callback_Void event); T onDisAppear(Callback_Void event); T onAttach(Callback_Void callback_); + T onAttach(VoidCallback callback_); T onDetach(Callback_Void callback_); + T onDetach(VoidCallback callback_); T onAreaChange(Callback_Area_Area_Void event); T visibility(Visibility value); T flexGrow(number value); T flexShrink(number value); T flexBasis((number or String) value); T alignSelf(ItemAlign value); + T layoutGravity(LocalizedAlignment alignment); T displayPriority(number value); T zIndex(number value); T sharedTransition(String id, optional sharedTransitionOptions options); T direction(Direction value); - T align(Alignment value); + T align((Alignment or LocalizedAlignment) alignment); T position((Position or Edges or LocalizedEdges) value); T markAnchor((Position or LocalizedPosition) value); T offset((Position or Edges or LocalizedEdges) value); @@ -2161,50 +2374,41 @@ interface CommonMethod { T alignRules(LocalizedAlignRuleOptions alignRule); T chainMode(Axis direction, ChainStyle style); T aspectRatio(number value); - T clickEffect((ClickEffect or undefined) value); T clickEffect((ClickEffect or undefined) effect); - T onDragStart(Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo event); - T onDragEnter(Callback_DragEvent_String_Void event); - T onDragMove(Callback_DragEvent_String_Void event); - T onDragLeave(Callback_DragEvent_String_Void event); - T onDrop(Callback_DragEvent_String_Void event); + T onDragStart(Type_CommonMethod_onDragStart_event event); + T onDragEnter(Callback_DragEvent_Opt_String_Void event); + T onDragMove(Callback_DragEvent_Opt_String_Void event); + T onDragLeave(Callback_DragEvent_Opt_String_Void event); + T onDrop(Callback_DragEvent_Opt_String_Void event); T onDrop(OnDragEventCallback eventCallback, optional DropOptions dropOptions); - T onDragEnd(Callback_DragEvent_String_Void event); + T onDragEnd(Callback_DragEvent_Opt_String_Void event); + T onDragSpringLoading((Callback_SpringLoadingContext_Void or undefined) callback_, optional DragSpringLoadingConfiguration configuration); T allowDrop((sequence or undefined) value); T draggable(boolean value); - T dragPreview((CustomBuilder or DragItemInfo or String) value); T dragPreview((CustomBuilder or DragItemInfo or String) preview, optional PreviewConfiguration config); T dragPreviewOptions(DragPreviewOptions value, optional DragInteractionOptions options); T onPreDrag(Callback_PreDragStatus_Void callback_); T overlay((String or CustomBuilder or ComponentContent) value, optional OverlayOptions options); - T linearGradient(LinearGradientOptions value); + T toolbar(CustomBuilder value); T linearGradient((LinearGradientOptions or undefined) options); - T sweepGradient(SweepGradientOptions value); T sweepGradient((SweepGradientOptions or undefined) options); - T radialGradient(RadialGradientOptions value); T radialGradient((RadialGradientOptions or undefined) options); T motionPath(MotionPathOptions value); - T shadow((ShadowOptions or ShadowStyle) value); T shadow(((ShadowOptions or ShadowStyle) or undefined) options); - T blendMode(BlendMode value, optional BlendApplyType type); T blendMode((BlendMode or undefined) mode, optional BlendApplyType type); T advancedBlendMode((BlendMode or Blender) effect, optional BlendApplyType type); - T clip((boolean or undefined) value); T clip((boolean or undefined) clip); [Deprecated] - T clip((boolean or undefined) value); - T clipShape((CircleShape or EllipseShape or PathShape or RectShape) value); + T clip((boolean or CircleAttribute or EllipseAttribute or PathAttribute or RectAttribute) value); T clipShape(((CircleShape or EllipseShape or PathShape or RectShape) or undefined) shape); - T mask((ProgressMask or undefined) value); T mask((ProgressMask or undefined) mask); [Deprecated] - T mask((ProgressMask or undefined) value); - T maskShape((CircleShape or EllipseShape or PathShape or RectShape) value); + T mask((CircleAttribute or EllipseAttribute or PathAttribute or RectAttribute or ProgressMask) value); T maskShape(((CircleShape or EllipseShape or PathShape or RectShape) or undefined) shape); T key(String value); T id(String value); - T geometryTransition(String id); T geometryTransition(String id, optional GeometryTransitionOptions options); + T bindTips(TipsMessageType message, optional TipsOptions options); T bindPopup(boolean show, (PopupOptions or CustomPopupOptions) popup); T bindMenu((sequence or CustomBuilder) content, optional MenuOptions options); T bindMenu(boolean isShow, (sequence or CustomBuilder) content, optional MenuOptions options); @@ -2217,23 +2421,21 @@ interface CommonMethod { T restoreId(number value); T onVisibleAreaChange(sequence ratios, VisibleAreaChangeCallback event); void onVisibleAreaApproximateChange(VisibleAreaEventOptions options, (VisibleAreaChangeCallback or undefined) event); - T sphericalEffect(number value); T sphericalEffect((number or undefined) effect); - T lightUpEffect(number value); T lightUpEffect((number or undefined) degree); - T pixelStretchEffect(PixelStretchEffectOptions options); T pixelStretchEffect((PixelStretchEffectOptions or undefined) options); T keyboardShortcut((String or FunctionKey) value, sequence keys, optional Callback_Void action); T accessibilityGroup(boolean value); T accessibilityGroup(boolean isGroup, AccessibilityOptions accessibilityOptions); T accessibilityText(String value); + T accessibilityText(Resource text); T accessibilityNextFocusId(String nextId); T accessibilityDefaultFocus(boolean focus); T accessibilityUseSamePage(AccessibilitySamePageMode pageMode); T accessibilityScrollTriggerable(boolean isTriggerable); - T accessibilityText(Resource text); T accessibilityRole(AccessibilityRoleType role); T onAccessibilityFocus(AccessibilityFocusCallback callback_); + T onAccessibilityActionIntercept(AccessibilityActionInterceptCallback callback_); T accessibilityTextHint(String value); T accessibilityDescription(String value); T accessibilityDescription(Resource description); @@ -2244,11 +2446,9 @@ interface CommonMethod { T obscured(sequence reasons); T reuseId(String id); T reuse(ReuseOptions options); - T renderFit(RenderFit fitMode); T renderFit((RenderFit or undefined) fitMode); T attributeModifier([TypeArguments="T"] AttributeModifier modifier); T gestureModifier(GestureModifier modifier); - T backgroundBrightness(BackgroundBrightnessOptions params); T backgroundBrightness((BackgroundBrightnessOptions or undefined) options); T onGestureJudgeBegin(Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult callback_); T onGestureRecognizerJudgeBegin(GestureRecognizerJudgeBeginCallback callback_); @@ -2257,49 +2457,40 @@ interface CommonMethod { T monopolizeEvents(boolean monopolize); T onTouchIntercept(Callback_TouchEvent_HitTestMode callback_); T onSizeChange(SizeChangeCallback event); - + T accessibilityFocusDrawLevel(FocusDrawLevel drawLevel); + T onTouchTestDone(TouchTestDoneCallback callback_); }; [Entity=Class] -interface CommonAttribute: [TypeArguments="CommonAttribute"] CommonMethod { - - +interface CommonAttribute: [Extends, TypeArguments="CommonAttribute"] CommonMethod { }; +typedef CommonMethod CommonAttribute; [Entity=Interface] interface CommonInterface { - [CallSignature] CommonAttribute invoke(); - }; callback CustomBuilder = void (); [Entity=Interface] interface OverlayOptions { - [Optional] attribute Alignment align; [Optional] attribute OverlayOffset offset; - }; [Entity=Interface] interface OverlayOffset { - [Optional] attribute number x; [Optional] attribute number y; - }; [Entity=Tuple] interface FractionStop { - attribute number value0; attribute number value1; - }; [Entity=Class, TypeParameters="T"] -interface CommonShapeMethod: [TypeArguments="T"] CommonMethod { - +interface CommonShapeMethod: [Extends, TypeArguments="T"] CommonMethod { constructor(); T stroke(ResourceColor value); T fill(ResourceColor value); @@ -2312,11 +2503,9 @@ interface CommonShapeMethod: [TypeArguments="T"] CommonMethod { T strokeWidth(Length value); T antiAlias(boolean value); T strokeDashArray(sequence value); - }; [Entity=Interface] interface LinearGradient_common { - [Optional] attribute (number or String) angle; [Optional] @@ -2324,11 +2513,9 @@ interface LinearGradient_common { attribute sequence colors; [Optional] attribute boolean repeating; - }; [Entity=Interface] interface PixelRoundPolicy { - [Optional] attribute PixelRoundCalcPolicy start; [Optional] @@ -2337,140 +2524,108 @@ interface PixelRoundPolicy { attribute PixelRoundCalcPolicy end; [Optional] attribute PixelRoundCalcPolicy bottom; - }; [Entity=Interface] interface LinearGradientBlurOptions { - attribute sequence fractionStops; attribute GradientDirection direction; - }; [Entity=Interface] interface MotionBlurAnchor { - attribute number x; attribute number y; - }; [Entity=Interface] interface MotionBlurOptions { - attribute number radius; attribute MotionBlurAnchor anchor; - }; [Entity=Interface, Deprecated] interface LayoutBorderInfo { - [Deprecated] attribute EdgeWidths borderWidth; [Deprecated] attribute Margin margin; [Deprecated] attribute Padding padding; - }; [Entity=Interface, Deprecated] interface LayoutInfo { - [Deprecated] attribute Position position; [Deprecated] attribute ConstraintSizeOptions constraint; - }; interface LayoutChild { - attribute String stub; - }; [Entity=Interface] interface GeometryInfo: SizeResult { - attribute EdgeWidth borderWidth; attribute Margin margin; attribute Padding padding; - }; +[Entity=Interface] interface Layoutable { - - attribute String stub; - + attribute MeasureResult measureResult; + [Optional] + attribute number uniqueId; + void layout(Position position); + DirectionalEdgesT getMargin(); + DirectionalEdgesT getPadding(); + DirectionalEdgesT getBorderWidth(); }; [Entity=Interface] interface Measurable { - [Optional] attribute number uniqueId; MeasureResult measure(ConstraintSizeOptions constraint); DirectionalEdgesT getMargin(); DirectionalEdgesT getPadding(); DirectionalEdgesT getBorderWidth(); - }; [Entity=Interface] interface SizeResult { - attribute number width; attribute number height; - }; [Entity=Interface] interface MeasureResult: SizeResult { - - -}; -[Import="import('../api/@ohos.arkui.observer').default.NavDestinationInfo"] -typedef [Import="import('../api/@ohos.arkui.observer').default.NavDestinationInfo"] NavDestinationInfo NavDestinationInfo; -[Import="import('../api/@ohos.arkui.observer').default.NavigationInfo"] -typedef [Import="import('../api/@ohos.arkui.observer').default.NavigationInfo"] NavigationInfo NavigationInfo; -[Import="import('../api/@ohos.arkui.observer').default.RouterPageInfo"] -typedef [Import="import('../api/@ohos.arkui.observer').default.RouterPageInfo"] RouterPageInfo RouterPageInfo; -[Import="import('../api/@ohos.arkui.UIContext').UIContext"] -typedef [Import="import('../api/@ohos.arkui.UIContext').UIContext"] UIContext UIContext; -[Import="import('../api/arkui/Graphics').DrawContext"] -typedef [Import="import('../api/arkui/Graphics').DrawContext"] DrawContext DrawContext; -[Import="import('../api/@ohos.graphics.uiEffect').default.VisualEffect"] -typedef [Import="import('../api/@ohos.graphics.uiEffect').default.VisualEffect"] VisualEffect VisualEffect; -[Import="import('../api/@ohos.graphics.uiEffect').default.Filter"] -typedef [Import="import('../api/@ohos.graphics.uiEffect').default.Filter"] Filter Filter; -[Import="import('../api/@ohos.graphics.uiEffect').default.Blender"] -typedef [Import="import('../api/@ohos.graphics.uiEffect').default.Blender"] Blender Blender; -[Import="import('../api/arkui/ComponentContent').ComponentContent"] -typedef [Import="import('../api/arkui/ComponentContent').ComponentContent"] ComponentContent ComponentContent; -[Import="import('../api/@ohos.arkui.theme').Theme"] -typedef [Import="import('../api/@ohos.arkui.theme').Theme"] Theme Theme; -[Import="import('../api/@ohos.promptAction').promptAction.DialogController"] -typedef [Import="import('../api/@ohos.promptAction').promptAction.DialogController"] PromptActionDialogController PromptActionDialogController; -[Entity=Literal, Synthetic] -interface Literal_Empty { - - [IndexSignature] - unknown indexSignature(String key); - }; +typedef _NavDestinationInfo NavDestinationInfo; +typedef uiObserver.NavDestinationInfo NavDestinationInfo; +typedef uiObserver.NavigationInfo NavigationInfo; +typedef _NavigationInfo NavigationInfo; +typedef _RouterPageInfo RouterPageInfo; +typedef uiObserver.RouterPageInfo RouterPageInfo; +typedef _UIContext UIContext; +typedef _DrawContext DrawContext; +typedef _VisualEffect VisualEffect; +typedef uiEffect.VisualEffect VisualEffect; +typedef _Filter Filter; +typedef uiEffect.Filter Filter; +typedef _Blender Blender; +typedef uiEffect.Blender Blender; +typedef [TypeArguments="T"] _ComponentContent ComponentContent; +typedef _Theme Theme; +typedef _DialogController PromptActionDialogController; +typedef promptAction.DialogController PromptActionDialogController; [Entity=Class] -interface CustomComponent: BaseCustomComponent { - +interface CustomComponent: [Extends] BaseCustomComponent { [Optional] - void aboutToReuse(Literal_Empty params); + void aboutToReuse(record params); [Deprecated, Optional] void onLayout(sequence children, ConstraintSizeOptions constraint); [Deprecated, Optional] void onMeasure(sequence children, ConstraintSizeOptions constraint); - }; [Entity=Class] -interface CustomComponentV2: BaseCustomComponent { - +interface CustomComponentV2: [Extends] BaseCustomComponent { [Optional] void aboutToReuse(); - }; [Entity=Class] -interface BaseCustomComponent: CommonAttribute { - +interface BaseCustomComponent: [Extends] CommonAttribute { void build(); [Optional] void aboutToAppear(); @@ -2505,62 +2660,53 @@ interface BaseCustomComponent: CommonAttribute { [Optional] void onDidBuild(); (PromptActionDialogController or undefined) getDialogController(); - + [Optional] + void onNewParam(Object param); }; [Entity=Class] interface View { - any create(any value); - }; [Entity=Interface] interface RectResult { - attribute number x; attribute number y; attribute number width; attribute number height; - }; [Entity=Interface] interface CaretOffset { - attribute number index; attribute number x; attribute number y; - }; [Entity=Interface] interface TextContentControllerOptions { - [Optional] attribute number offset; - }; [Entity=Class] interface TextContentControllerBase { - CaretOffset getCaretOffset(); RectResult getTextContentRect(); number getTextContentLineCount(); number addText(String text, optional TextContentControllerOptions textOperationOptions); void deleteText(optional TextRange range); TextRange getSelection(); - + void clearPreviewText(); + String getText(optional TextRange range); }; dictionary ContentClipMode { - number CONTENT_ONLY = 0; number BOUNDARY = 1; number SAFE_AREA = 2; - }; [Entity=Class, TypeParameters="T"] -interface ScrollableCommonMethod: [TypeArguments="T"] CommonMethod { - +interface ScrollableCommonMethod: [Extends, TypeArguments="T"] CommonMethod { T scrollBar(BarState barState); T scrollBarColor((Color or number or String) color); T scrollBarWidth((number or String) value); + T scrollBarMargin(ScrollBarMargin margin); T edgeEffect(EdgeEffect edgeEffect, optional EdgeEffectOptions options); T fadingEdge((boolean or undefined) enabled, optional FadingEdgeOptions options); T nestedScroll(NestedScrollOptions value); @@ -2568,8 +2714,7 @@ interface ScrollableCommonMethod: [TypeArguments="T"] CommonMethod { T friction((number or Resource) value); [Deprecated] T onScroll(Callback_Number_Number_Void event); - T onWillScroll((ScrollOnWillScrollCallback or undefined) handler); - T onDidScroll(ScrollOnScrollCallback handler); + T onWillStopDragging(OnWillStopDraggingCallback handler); T onReachStart(Callback_Void event); T onReachEnd(Callback_Void event); T onScrollStart(Callback_Void event); @@ -2578,84 +2723,96 @@ interface ScrollableCommonMethod: [TypeArguments="T"] CommonMethod { T clipContent((ContentClipMode or RectShape) clip); T digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); T backToTop(boolean backToTop); - }; [Entity=Class] interface ScrollResult { - attribute number offsetRemain; - }; interface OnWillScrollCallback { - attribute String stub; - +}; +interface OnWillScrollCallback { + attribute String stub; }; callback OnScrollCallback = void (number scrollOffset, ScrollState scrollState); +callback OnItemDragStartCallback = (CustomBuilder or undefined) (ItemDragInfo event, number itemIndex); +callback OnWillStopDraggingCallback = void (number velocity); callback OnMoveHandler = void (number from, number to); +[Entity=Interface] +interface ItemDragEventHandler { + [Optional] + attribute Callback_Number_Void onLongPress; + [Optional] + attribute Callback_Number_Void onDragStart; + [Optional] + attribute OnMoveHandler onMoveThrough; + [Optional] + attribute Callback_Number_Void onDrop; +}; [Entity=Class, TypeParameters="T"] interface DynamicNode { - T onMove((OnMoveHandler or undefined) handler); - + T onMove((OnMoveHandler or undefined) handler, ItemDragEventHandler eventHandler); +}; +[Entity=Interface] +interface DynamicNode { + this onMove((OnMoveHandler or undefined) handler); + this onMove((OnMoveHandler or undefined) handler, ItemDragEventHandler eventHandler); }; [Entity=Interface] interface EdgeEffectOptions { - attribute boolean alwaysEnabled; [Optional] attribute number effectEdge; - }; dictionary EffectEdge { - number START = 1; number END = 2; - }; [Entity=Class] interface ChildrenMainSize { - constructor(number childDefaultSize); attribute number childDefaultSize; [Throws] void splice(number start, optional number deleteCount, optional sequence childrenSize); [Throws] void update(number index, number childSize); - }; [Entity=Interface] interface BackgroundBrightnessOptions { - attribute number rate; attribute number lightUpDegree; - }; [Entity=Interface] interface PointLightStyle { - [Optional] attribute LightSource lightSource; [Optional] attribute IlluminatedType illuminated; [Optional] attribute number bloom; - }; [Entity=Interface] interface LightSource { - attribute Dimension positionX; attribute Dimension positionY; attribute Dimension positionZ; attribute number intensity; [Optional] attribute ResourceColor color; - +}; +[Synthetic, Synthetic, Synthetic, Synthetic, Synthetic] +callback Dummy_Callback = void (); +[Entity=Class, TypeParameters="Args"] +interface WrappedBuilder { + attribute Dummy_Callback builder; +}; +[Entity=Class, TypeParameters="Args"] +interface WrappedBuilder { + attribute Dummy_Callback builder; }; [Entity=Interface] interface KeyframeAnimateParam { - [Optional] attribute number delay; [Optional] @@ -2664,38 +2821,33 @@ interface KeyframeAnimateParam { attribute Callback_Void onFinish; [Optional] attribute ExpectedFrameRateRange expectedFrameRateRange; - }; [Entity=Interface] interface KeyframeState { - attribute number duration; [Optional] attribute (Curve or String or ICurve) curve; attribute Callback_Void event; - }; -[Entity=Interface, TypeParameters="T,V = void"] +[Entity=Interface, TypeParameters="T,V"] interface Callback { - [CallSignature] V invoke(T data); - }; +[TypeParameters="T,V"] +callback Callback = V (T data); callback HoverCallback = void (boolean isHover, HoverEvent event); callback AccessibilityCallback = void (boolean isHover, AccessibilityHoverEvent event); +callback AccessibilityTransparentCallback = void (TouchEvent event); [Entity=Interface] interface VisibleAreaEventOptions { - attribute sequence ratios; [Optional] attribute number expectedUpdateInterval; - }; callback VisibleAreaChangeCallback = void (boolean isExpanding, number currentRatio); [Entity=Interface] interface UICommonEvent { - void setOnClick((Callback_ClickEvent_Void or undefined) callback_); void setOnTouch((Callback_TouchEvent_Void or undefined) callback_); void setOnAppear((Callback_Void or undefined) callback_); @@ -2707,35 +2859,37 @@ interface UICommonEvent { void setOnMouse((Callback_MouseEvent_Void or undefined) callback_); void setOnSizeChange((SizeChangeCallback or undefined) callback_); void setOnVisibleAreaApproximateChange(VisibleAreaEventOptions options, (VisibleAreaChangeCallback or undefined) event); - +}; +[Entity=Interface] +interface UIScrollableCommonEvent: UICommonEvent { + void setOnReachStart((Callback_Void or undefined) callback_); + void setOnReachEnd((Callback_Void or undefined) callback_); + void setOnScrollStart((Callback_Void or undefined) callback_); + void setOnScrollStop((Callback_Void or undefined) callback_); + void setOnScrollFrameBegin((OnScrollFrameBeginCallback or undefined) callback_); }; [Entity=Interface] interface UIGestureEvent { - [TypeParameters="T"] void addGesture([TypeArguments="T"] GestureHandler gesture, optional GesturePriority priority, optional GestureMask mask); + void addGesture(GestureHandler gesture, optional GesturePriority priority, optional GestureMask mask); [TypeParameters="T"] void addParallelGesture([TypeArguments="T"] GestureHandler gesture, optional GestureMask mask); + void addParallelGesture(GestureHandler gesture, optional GestureMask mask); void removeGestureByTag(String tag); void clearGestures(); - }; [Entity=Interface] interface GestureModifier { - void applyGesture(UIGestureEvent event); - }; [Entity=Interface] interface SelectionOptions { - [Optional] attribute MenuPolicy menuPolicy; - }; [Entity=Interface] interface FocusMovement { - [Optional] attribute String forward; [Optional] @@ -2748,45 +2902,33 @@ interface FocusMovement { attribute String left; [Optional] attribute String right; - }; dictionary KeyboardAvoidMode { - number DEFAULT = 0; number NONE = 1; - }; dictionary HoverModeAreaType { - number TOP_SCREEN = 0; number BOTTOM_SCREEN = 1; - }; [Entity=Interface] interface DateRange { - - [Optional] - attribute Date start; - [Optional] - attribute Date end; - -}; -[GlobalScope] -interface GlobalScope_common { - - static Context getContext(optional Object component); - static void postCardAction(Object component, Object action); - [DtsName="$r"] - static Resource dollar_r(String value, sequence... params); - [DtsName="$rawfile"] - static Resource dollar_rawfile(String value); - static void animateTo(AnimateParam value, Callback_Void event); - static void animateToImmediately(AnimateParam value, Callback_Void event); - static number vp2px(number value); - static number px2vp(number value); - static number fp2px(number value); - static number px2fp(number value); - static number lpx2px(number value); - static number px2lpx(number value); - -}; \ No newline at end of file + [Optional] + attribute date start; + [Optional] + attribute date end; +}; +[Entity=Interface] +interface TerminationInfo { + attribute number code; + [Optional] + attribute Want want; +}; +typedef intl.DateTimeOptions DateTimeOptions; +[Entity=Interface, TypeParameters="T"] +interface Bindable { + readonly attribute T value; + readonly attribute Callback_T_Void onChange; +}; +[DtsName="$$", TypeParameters="T"] +([TypeArguments="T"] Bindable) dollar_$(T value); \ No newline at end of file diff --git a/idl/commonEventData.idl b/idl/commonEvent.commonEventData.idl similarity index 78% rename from idl/commonEventData.idl rename to idl/commonEvent.commonEventData.idl index c1b4ca4..a8311a5 100644 --- a/idl/commonEventData.idl +++ b/idl/commonEvent.commonEventData.idl @@ -1,14 +1,11 @@ -package commonEvent; +package commonEvent.commonEventData; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface CommonEventData { - attribute String event; [Optional] attribute String bundleName; @@ -18,5 +15,6 @@ interface CommonEventData { attribute String data; [Optional] attribute Literal_Empty parameters; - + [Optional] + attribute record parameters; }; \ No newline at end of file diff --git a/idl/commonEventPublishData.idl b/idl/commonEvent.commonEventPublishData.idl similarity index 82% rename from idl/commonEventPublishData.idl rename to idl/commonEvent.commonEventPublishData.idl index 76e046a..0e1f2a6 100644 --- a/idl/commonEventPublishData.idl +++ b/idl/commonEvent.commonEventPublishData.idl @@ -1,14 +1,11 @@ -package commonEvent; +package commonEvent.commonEventPublishData; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface CommonEventPublishData { - [Optional] attribute String bundleName; [Optional] @@ -23,5 +20,6 @@ interface CommonEventPublishData { attribute boolean isSticky; [Optional] attribute Literal_Empty parameters; - + [Optional] + attribute record parameters; }; \ No newline at end of file diff --git a/idl/commonEventSubscribeInfo.idl b/idl/commonEvent.commonEventSubscribeInfo.idl similarity index 88% rename from idl/commonEventSubscribeInfo.idl rename to idl/commonEvent.commonEventSubscribeInfo.idl index aee89a7..b094cc0 100644 --- a/idl/commonEventSubscribeInfo.idl +++ b/idl/commonEvent.commonEventSubscribeInfo.idl @@ -1,7 +1,6 @@ -package commonEvent; +package commonEvent.commonEventSubscribeInfo; [Entity=Interface] interface CommonEventSubscribeInfo { - attribute sequence events; [Optional] attribute String publisherPermission; @@ -13,5 +12,4 @@ interface CommonEventSubscribeInfo { attribute number priority; [Optional] attribute String publisherBundleName; - }; \ No newline at end of file diff --git a/idl/commonEventSubscriber.idl b/idl/commonEvent.commonEventSubscriber.idl similarity index 89% rename from idl/commonEventSubscriber.idl rename to idl/commonEvent.commonEventSubscriber.idl index b1d377c..4602b4f 100644 --- a/idl/commonEventSubscriber.idl +++ b/idl/commonEvent.commonEventSubscriber.idl @@ -1,6 +1,8 @@ -package commonEvent; +package commonEvent.commonEventSubscriber; import ohos.base.AsyncCallback as AsyncCallback; -import commonEvent.CommonEventSubscribeInfo as CommonEventSubscribeInfo; +import commonEvent.commonEventSubscribeInfo.CommonEventSubscribeInfo as CommonEventSubscribeInfo; +import ohos.base.AsyncCallback as AsyncCallback; +import commonEvent.commonEventSubscribeInfo.CommonEventSubscribeInfo as CommonEventSubscribeInfo; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); [Async, Synthetic] @@ -13,7 +15,6 @@ callback AsyncCallback_Boolean_Void = void (boolean result); callback AsyncCallback_CommonEventSubscribeInfo_Void = void (CommonEventSubscribeInfo result); [Entity=Interface] interface CommonEventSubscriber { - [Throws] void getCode(AsyncCallback_Number_Void callback_); async number getCode(); @@ -67,5 +68,4 @@ interface CommonEventSubscriber { [Throws] void finishCommonEvent(AsyncCallback_Void callback_); async void finishCommonEvent(); - }; \ No newline at end of file diff --git a/idl/common_ts_ets_api.idl b/idl/common_ts_ets_api.idl index fb42f4f..f761297 100644 --- a/idl/common_ts_ets_api.idl +++ b/idl/common_ts_ets_api.idl @@ -1,7 +1,5 @@ -package common_ts_ets_api; [Entity=Class] interface AppStorage { - [TypeParameters="T"] static ([TypeArguments="T"] AbstractProperty or undefined) ref(String propName); [TypeParameters="T"] @@ -41,8 +39,8 @@ interface AppStorage { static boolean Delete(String propName); static boolean delete(String propName); [Deprecated] - static ([TypeArguments="String"] IterableIterator) Keys(); - static ([TypeArguments="String"] IterableIterator) keys(); + static sequence Keys(); + static sequence keys(); [Deprecated] static boolean staticClear(); [Deprecated] @@ -53,22 +51,18 @@ interface AppStorage { [Deprecated] static number Size(); static number size(); - }; [Entity=Interface, TypeParameters="T"] interface AbstractProperty { - T get(); void set(T newValue); String info(); - }; [Entity=Class, TypeParameters="T"] interface SubscribedAbstractProperty { - constructor(optional IPropertySubscriber subscribeMe, optional String info); [Protected] - attribute [TypeArguments="number"] Set subscribers_; + attribute sequence subscribers_; number id(); String info(); T get(); @@ -82,69 +76,53 @@ interface SubscribedAbstractProperty { void notifyPropertyRead(); number numberOfSubscrbers(); void aboutToBeDeleted(); - }; [Entity=Interface] interface IPropertySubscriber { - number id(); void aboutToBeDeleted(optional IPropertySubscriber owningView); - }; [Entity=Class, TypeParameters="T"] -interface SyncedPropertyTwoWay: [TypeArguments="T"] SubscribedAbstractProperty { - +interface SyncedPropertyTwoWay: [Extends, TypeArguments="T"] SubscribedAbstractProperty, [TypeArguments="T"] ISinglePropertyChangeSubscriber { constructor([TypeArguments="T"] SubscribedAbstractProperty source, optional IPropertySubscriber subscribeMe, optional String info); void aboutToBeDeleted(optional IPropertySubscriber unsubscribeMe); void hasChanged(T newValue); T get(); void set(T newValue); - }; [Entity=Class, TypeParameters="T"] -interface SyncedPropertyOneWay: [TypeArguments="T"] SubscribedAbstractProperty { - +interface SyncedPropertyOneWay: [Extends, TypeArguments="T"] SubscribedAbstractProperty, [TypeArguments="T"] ISinglePropertyChangeSubscriber { constructor([TypeArguments="T"] SubscribedAbstractProperty source, optional IPropertySubscriber subscribeMe, optional String info); void aboutToBeDeleted(optional IPropertySubscriber unsubscribeMe); void hasChanged(T newValue); T get(); void set(T newValue); - }; [Entity=Interface, TypeParameters="T"] interface ISinglePropertyChangeSubscriber: IPropertySubscriber { - void hasChanged(T newValue); - }; [Entity=Class] interface SubscribaleAbstract { - constructor(); [Protected] void notifyPropertyHasChanged(String propName, any newValue); void addOwningProperty(IPropertySubscriber subscriber); void removeOwningProperty(IPropertySubscriber property); void removeOwningPropertyById(number subscriberId); - }; [Entity=Interface] interface EnvPropsOptions { - attribute String key; attribute (number or String or boolean) defaultValue; - }; [Entity=Literal, Synthetic] interface Literal_String_key_Any_defaultValue { - attribute String key; attribute any defaultValue; - }; [Entity=Class] interface Environment { - constructor(); [Deprecated, TypeParameters="S"] static boolean EnvProp(String key, S value); @@ -156,18 +134,14 @@ interface Environment { [Deprecated] static sequence Keys(); static sequence keys(); - }; [Entity=Interface] interface PersistPropsOptions { - attribute String key; attribute (number or String or boolean or Object) defaultValue; - }; [Entity=Class] interface PersistentStorage { - constructor(AppStorage appStorage, Storage storage); [Deprecated, TypeParameters="T"] static void PersistProp(String key, T defaultValue); @@ -182,21 +156,20 @@ interface PersistentStorage { [Deprecated] static sequence Keys(); static sequence keys(); - }; [Entity=Class] interface LocalStorage { - constructor(optional Object initializingProperties); [Deprecated] static LocalStorage GetShared(); + [Deprecated] static LocalStorage getShared(); [TypeParameters="T"] ([TypeArguments="T"] AbstractProperty or undefined) ref(String propName); [TypeParameters="T"] ([TypeArguments="T"] AbstractProperty) setAndRef(String propName, T defaultValue); boolean has(String propName); - ([TypeArguments="String"] IterableIterator) keys(); + sequence keys(); number size(); [TypeParameters="T"] (T or undefined) get(String propName); @@ -214,5 +187,4 @@ interface LocalStorage { ([TypeArguments="S"] SubscribedAbstractProperty) setAndProp(String propName, S defaultValue); boolean delete(String propName); boolean clear(); - }; \ No newline at end of file diff --git a/idl/component3d.idl b/idl/component3d.idl index 70e265b..3820baf 100644 --- a/idl/component3d.idl +++ b/idl/component3d.idl @@ -1,31 +1,28 @@ package component3d; -[Import="import('../api/@ohos.graphics.scene').Scene"] -typedef [Import="import('../api/@ohos.graphics.scene').Scene"] Scene Scene; +import graphics3d.Scene.Scene as Scene; +import units.ResourceStr as ResourceStr; +import units.Dimension as Dimension; +import common.CommonMethod as CommonMethod; +import graphics3d.Scene.Scene as _Scene; +typedef _Scene Scene; dictionary ModelType { - number TEXTURE = 0; number SURFACE = 1; - }; [Entity=Interface] interface SceneOptions { - [Optional] attribute (ResourceStr or Scene) scene; [Optional] attribute ModelType modelType; - }; [Entity=Interface] interface Component3DInterface { - [CallSignature] Component3DAttribute invoke(optional SceneOptions sceneOptions); - }; [Entity=Class] -interface Component3DAttribute: [TypeArguments="Component3DAttribute"] CommonMethod { - +interface Component3DAttribute: [Extends, TypeArguments="Component3DAttribute"] CommonMethod { Component3DAttribute environment(ResourceStr uri); Component3DAttribute customRender(ResourceStr uri, boolean selfRenderUpdate); Component3DAttribute shader(ResourceStr uri); @@ -33,5 +30,4 @@ interface Component3DAttribute: [TypeArguments="Component3DAttribute"] CommonMet Component3DAttribute shaderInputBuffer(sequence buffer); Component3DAttribute renderWidth(Dimension value); Component3DAttribute renderHeight(Dimension value); - }; \ No newline at end of file diff --git a/idl/container_span.idl b/idl/container_span.idl index ff1ed51..1121cfc 100644 --- a/idl/container_span.idl +++ b/idl/container_span.idl @@ -1,15 +1,13 @@ package container_span; +import span.TextBackgroundStyle as TextBackgroundStyle; +import common.AttributeModifier as AttributeModifier; [Entity=Interface] interface ContainerSpanInterface { - [CallSignature] ContainerSpanAttribute invoke(); - }; [Entity=Class] interface ContainerSpanAttribute { - ContainerSpanAttribute textBackgroundStyle(TextBackgroundStyle style); ContainerSpanAttribute attributeModifier([TypeArguments="ContainerSpanAttribute"] AttributeModifier modifier); - }; \ No newline at end of file diff --git a/idl/content_slot.idl b/idl/content_slot.idl index 3cfed40..80708f4 100644 --- a/idl/content_slot.idl +++ b/idl/content_slot.idl @@ -1,15 +1,12 @@ package content_slot; -[Import="import('../api/@ohos.arkui.node').Content"] -typedef [Import="import('../api/@ohos.arkui.node').Content"] Content Content; +import arkui.Content.Content as Content; +import arkui.Content.Content as _Content; +typedef _Content Content; [Entity=Class] interface ContentSlotAttribute { - - }; [Entity=Interface] interface ContentSlotInterface { - [CallSignature] ContentSlotAttribute invoke(Content content); - }; \ No newline at end of file diff --git a/idl/context_menu.idl b/idl/context_menu.idl index 4c38841..b339af0 100644 --- a/idl/context_menu.idl +++ b/idl/context_menu.idl @@ -1,7 +1,5 @@ -package context_menu; [Entity=Class] interface ContextMenu { - - static undefined close(); - + [Deprecated] + static void close(); }; \ No newline at end of file diff --git a/idl/continuationExtraParams.idl b/idl/continuation.continuationExtraParams.idl similarity index 76% rename from idl/continuationExtraParams.idl rename to idl/continuation.continuationExtraParams.idl index d6a5f22..9735872 100644 --- a/idl/continuationExtraParams.idl +++ b/idl/continuation.continuationExtraParams.idl @@ -1,8 +1,7 @@ -package continuation; -import ohos.continuation.continuationManager as continuationManager; +package continuation.continuationExtraParams; +import ohos.continuation.continuationManager.default as continuationManager; [Entity=Interface] interface ContinuationExtraParams { - [Optional] attribute sequence deviceType; [Optional] @@ -15,5 +14,4 @@ interface ContinuationExtraParams { attribute continuationManager.ContinuationMode continuationMode; [Optional] attribute record authInfo; - }; \ No newline at end of file diff --git a/idl/continuationResult.idl b/idl/continuation.continuationResult.idl similarity index 76% rename from idl/continuationResult.idl rename to idl/continuation.continuationResult.idl index aef0b1d..fdfb0b4 100644 --- a/idl/continuationResult.idl +++ b/idl/continuation.continuationResult.idl @@ -1,9 +1,7 @@ -package continuation; +package continuation.continuationResult; [Entity=Interface] interface ContinuationResult { - attribute String id; attribute String type; attribute String name; - }; \ No newline at end of file diff --git a/idl/counter.idl b/idl/counter.idl index 7b01d89..e5b7e93 100644 --- a/idl/counter.idl +++ b/idl/counter.idl @@ -1,17 +1,15 @@ package counter; +import common.CommonMethod as CommonMethod; +import units.VoidCallback as VoidCallback; [Entity=Interface] interface CounterInterface { - [CallSignature] CounterAttribute invoke(); - }; [Entity=Class] -interface CounterAttribute: [TypeArguments="CounterAttribute"] CommonMethod { - +interface CounterAttribute: [Extends, TypeArguments="CounterAttribute"] CommonMethod { CounterAttribute onInc(VoidCallback event); CounterAttribute onDec(VoidCallback event); CounterAttribute enableDec(boolean value); CounterAttribute enableInc(boolean value); - }; \ No newline at end of file diff --git a/idl/custom_dialog_controller.idl b/idl/custom_dialog_controller.idl index 448a466..b2eab3f 100644 --- a/idl/custom_dialog_controller.idl +++ b/idl/custom_dialog_controller.idl @@ -1,12 +1,39 @@ package custom_dialog_controller; +import common.Rectangle as Rectangle; +import common.AnimateParam as AnimateParam; +import common.Callback as Callback; +import common.ShadowOptions as ShadowOptions; +import common.ShadowStyle as ShadowStyle; +import common.KeyboardAvoidMode as KeyboardAvoidMode; +import common.BlurStyle as BlurStyle; +import common.HoverModeAreaType as HoverModeAreaType; +import common.DismissReason as DismissReason; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import CustomBuilder as CustomBuilder; +import DialogAlignment as DialogAlignment; +import units.Offset as Offset; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.BorderRadiuses as BorderRadiuses; +import units.EdgeWidths as EdgeWidths; +import units.EdgeColors as EdgeColors; +import units.EdgeStyles as EdgeStyles; +import BorderStyle as BorderStyle; +import LengthMetrics as LengthMetrics; +import ohos.promptAction.LevelMode as LevelMode; +import ohos.promptAction.LevelOrder as LevelOrder; +import ohos.promptAction.ImmersiveMode as ImmersiveMode; +import CustomBuilder as CustomBuilder; +import ohos.promptAction.promptAction.CommonState as _CommonState; [Synthetic] callback Callback_Void = void (); [Synthetic] callback Callback_DismissDialogAction_Void = void (DismissDialogAction parameter); [Entity=Interface] interface CustomDialogControllerOptions { - attribute any builder; + attribute CustomBuilder builder; [Optional] attribute Callback_Void cancel; [Optional] @@ -79,20 +106,19 @@ interface CustomDialogControllerOptions { attribute ImmersiveMode immersiveMode; [Optional] attribute LevelOrder levelOrder; - + [Optional] + attribute boolean focusable; }; [Entity=Interface] interface DismissDialogAction { - attribute Callback_Void dismiss; attribute DismissReason reason; - }; +typedef _CommonState PromptActionCommonState; [Entity=Class] interface CustomDialogController { - constructor(CustomDialogControllerOptions value); - undefined open(); - undefined close(); - + void open(); + void close(); + PromptActionCommonState getState(); }; \ No newline at end of file diff --git a/idl/resultSet.idl b/idl/data.rdb.resultSet.idl similarity index 97% rename from idl/resultSet.idl rename to idl/data.rdb.resultSet.idl index 64afdc7..d77daeb 100644 --- a/idl/resultSet.idl +++ b/idl/data.rdb.resultSet.idl @@ -1,8 +1,7 @@ -package data.rdb; +package data.rdb.resultSet; import ohos.base.AsyncCallback as AsyncCallback; [Entity=Interface, Deprecated] interface ResultSet { - [Deprecated] attribute sequence columnNames; [Deprecated] @@ -49,5 +48,4 @@ interface ResultSet { boolean isColumnNull(number columnIndex); [Deprecated] void close(); - }; \ No newline at end of file diff --git a/idl/data_panel.idl b/idl/data_panel.idl index bbbf6b5..cec2daa 100644 --- a/idl/data_panel.idl +++ b/idl/data_panel.idl @@ -1,64 +1,54 @@ package data_panel; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; +import common.CommonConfiguration as CommonConfiguration; +import common.MultiShadowOptions as MultiShadowOptions; dictionary DataPanelType { - [OriginalEnumMemberName=Line] number LINE = 0; [OriginalEnumMemberName=Circle] number CIRCLE = 1; - }; [Entity=Interface] interface ColorStop { - attribute ResourceColor color; attribute Length offset; - }; [Entity=Class] interface LinearGradient { - constructor(sequence colorStops); - }; [Entity=Interface] interface DataPanelShadowOptions: MultiShadowOptions { - [Optional] attribute sequence<(ResourceColor or LinearGradient)> colors; - }; [Entity=Interface] interface DataPanelOptions { - attribute sequence values; [Optional] attribute number max; [Optional] attribute DataPanelType type; - }; [Entity=Interface] interface DataPanelInterface { - [CallSignature] DataPanelAttribute invoke(DataPanelOptions options); - }; [Entity=Interface] interface DataPanelConfiguration: [TypeArguments="DataPanelConfiguration"] CommonConfiguration { - attribute sequence values; attribute number maxValue; - }; [Entity=Class] -interface DataPanelAttribute: [TypeArguments="DataPanelAttribute"] CommonMethod { - +interface DataPanelAttribute: [Extends, TypeArguments="DataPanelAttribute"] CommonMethod { DataPanelAttribute closeEffect(boolean value); DataPanelAttribute valueColors(sequence<(ResourceColor or LinearGradient)> value); DataPanelAttribute trackBackgroundColor(ResourceColor value); DataPanelAttribute strokeWidth(Length value); DataPanelAttribute trackShadow(DataPanelShadowOptions value); DataPanelAttribute contentModifier([TypeArguments="DataPanelConfiguration"] ContentModifier modifier); - }; \ No newline at end of file diff --git a/idl/date_picker.idl b/idl/date_picker.idl index 88c3cac..cbf9853 100644 --- a/idl/date_picker.idl +++ b/idl/date_picker.idl @@ -1,79 +1,80 @@ package date_picker; +import common.CommonMethod as CommonMethod; +import common.PickerTextStyle as PickerTextStyle; +import common.PickerDialogButtonStyle as PickerDialogButtonStyle; +import common.Rectangle as Rectangle; +import common.Callback as Callback; +import common.BlurStyle as BlurStyle; +import common.ShadowOptions as ShadowOptions; +import common.ShadowStyle as ShadowStyle; +import common.HoverModeAreaType as HoverModeAreaType; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import common.Optional as Optional; +import common.DateTimeOptions as DateTimeOptions; +import units.ResourceColor as ResourceColor; +import units.Offset as Offset; +import units.VoidCallback as VoidCallback; +import DialogAlignment as DialogAlignment; +import CrownSensitivity as CrownSensitivity; [Entity=Interface] interface DatePickerResult { - [Optional] attribute number year; [Optional] attribute number month; [Optional] attribute number day; - }; dictionary DatePickerMode { - number DATE = 0; number YEAR_AND_MONTH = 1; number MONTH_AND_DAY = 2; - }; [Entity=Interface] interface DatePickerOptions { - [Optional] - attribute Date start; + attribute date start; [Optional] - attribute Date end; + attribute date end; [Optional] - attribute Date selected; + attribute date selected; [Optional] attribute DatePickerMode mode; - }; [Entity=Interface] interface DatePickerInterface { - [CallSignature] DatePickerAttribute invoke(optional DatePickerOptions options); - }; [Synthetic] callback Callback_DatePickerResult_Void = void (DatePickerResult value); [Synthetic] -callback Callback_Date_Void = void (Date parameter); +callback Callback_Date_Void = void (date parameter); [Entity=Class] -interface DatePickerAttribute: [TypeArguments="DatePickerAttribute"] CommonMethod { - - DatePickerAttribute lunar(boolean value); +interface DatePickerAttribute: [Extends, TypeArguments="DatePickerAttribute"] CommonMethod { DatePickerAttribute lunar((boolean or undefined) isLunar); - DatePickerAttribute disappearTextStyle(PickerTextStyle value); DatePickerAttribute disappearTextStyle((PickerTextStyle or undefined) style); - DatePickerAttribute textStyle(PickerTextStyle value); DatePickerAttribute textStyle((PickerTextStyle or undefined) style); - DatePickerAttribute selectedTextStyle(PickerTextStyle value); DatePickerAttribute selectedTextStyle((PickerTextStyle or undefined) style); [Deprecated] DatePickerAttribute onChange(Callback_DatePickerResult_Void callback_); - DatePickerAttribute onDateChange(Callback_Date_Void callback_); DatePickerAttribute onDateChange((Callback_Date_Void or undefined) callback_); DatePickerAttribute digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); DatePickerAttribute enableHapticFeedback((boolean or undefined) enable); - + DatePickerAttribute canLoop((boolean or undefined) isLoop); }; [Entity=Interface] interface LunarSwitchStyle { - [Optional] attribute ResourceColor selectedColor; [Optional] attribute ResourceColor unselectedColor; [Optional] attribute ResourceColor strokeColor; - }; [Entity=Interface] interface DatePickerDialogOptions: DatePickerOptions { - [Optional] attribute boolean lunar; [Optional] @@ -136,11 +137,11 @@ interface DatePickerDialogOptions: DatePickerOptions { attribute HoverModeAreaType hoverModeArea; [Optional] attribute boolean enableHapticFeedback; - + [Optional] + attribute boolean canLoop; }; [Entity=Class] interface DatePickerDialog { - - static undefined show(optional DatePickerDialogOptions options); - + [Deprecated] + static void show(optional DatePickerDialogOptions options); }; \ No newline at end of file diff --git a/idl/divider.idl b/idl/divider.idl index 27e23aa..0522aec 100644 --- a/idl/divider.idl +++ b/idl/divider.idl @@ -1,17 +1,16 @@ package divider; +import units.ResourceColor as ResourceColor; +import common.CommonMethod as CommonMethod; +import LineCapStyle as LineCapStyle; [Entity=Interface] interface DividerInterface { - [CallSignature] DividerAttribute invoke(); - }; [Entity=Class] -interface DividerAttribute: [TypeArguments="DividerAttribute"] CommonMethod { - +interface DividerAttribute: [Extends, TypeArguments="DividerAttribute"] CommonMethod { DividerAttribute vertical(boolean value); DividerAttribute color(ResourceColor value); DividerAttribute strokeWidth((number or String) value); DividerAttribute lineCap(LineCapStyle value); - }; \ No newline at end of file diff --git a/idl/effect_component.idl b/idl/effect_component.idl index 1aaa067..d740788 100644 --- a/idl/effect_component.idl +++ b/idl/effect_component.idl @@ -1,13 +1,24 @@ package effect_component; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface EffectComponentInterface { - [CallSignature] EffectComponentAttribute invoke(); - + [CallSignature] + EffectComponentAttribute invoke(optional EffectComponentOptions options); +}; +dictionary EffectLayer { + number NONE = 0; + number CHARGE_MOTION = 1; + number CHARGE_TEXT = 2; +}; +[Entity=Interface] +interface EffectComponentOptions { + [Optional] + attribute EffectLayer effectLayer; }; [Entity=Class] -interface EffectComponentAttribute: [TypeArguments="EffectComponentAttribute"] CommonMethod { - - +interface EffectComponentAttribute: [Extends, TypeArguments="EffectComponentAttribute"] CommonMethod { + [Throws] + EffectComponentAttribute alwaysSnapshot(boolean enable); }; \ No newline at end of file diff --git a/idl/ellipse.idl b/idl/ellipse.idl index 871d424..ab96b58 100644 --- a/idl/ellipse.idl +++ b/idl/ellipse.idl @@ -1,23 +1,27 @@ package ellipse; +import common.CommonShapeMethod as CommonShapeMethod; [Entity=Interface] interface EllipseOptions { - + [Optional] + attribute Length width; [Optional] attribute (String or number) width; [Optional] + attribute Length height; + [Optional] attribute (String or number) height; - }; [Entity=Interface] interface EllipseInterface { - constructor(optional EllipseOptions options); [CallSignature] EllipseAttribute invoke(optional EllipseOptions options); - }; [Entity=Class] -interface EllipseAttribute: [TypeArguments="EllipseAttribute"] CommonShapeMethod { - - +interface EllipseAttribute: [Extends, TypeArguments="EllipseAttribute"] CommonShapeMethod { +}; +[Entity=Interface] +interface EllipseInterface { + [CallSignature] + EllipseAttribute invoke(optional EllipseOptions options); }; \ No newline at end of file diff --git a/idl/embedded_component.idl b/idl/embedded_component.idl index 1050547..44878bc 100644 --- a/idl/embedded_component.idl +++ b/idl/embedded_component.idl @@ -1,25 +1,33 @@ package embedded_component; +import ohos.app.ability.Want.default as Want; +import ohos.base.Callback as Callback; +import ohos.base.ErrorCallback as ErrorCallback; +import ohos.base.BusinessError as BusinessError; +import common.CommonMethod as CommonMethod; +import common.TerminationInfo as TerminationInfo; +import EmbeddedType as EmbeddedType; +import ohos.app.ability.Want.default as _default; +import ohos.app.ability.Want.default as _default; +import ohos.base.ErrorCallback as _ErrorCallback; [Entity=Interface] interface EmbeddedComponentInterface { - [CallSignature] - EmbeddedComponentAttribute invoke([Import="import('../api/@ohos.app.ability.Want').default"] Want loader, EmbeddedType type); - + EmbeddedComponentAttribute invoke(_default loader, EmbeddedType type); + [CallSignature] + EmbeddedComponentAttribute invoke(Want loader, EmbeddedType type); }; [Entity=Interface] interface TerminationInfo { - attribute number code; [Optional] - attribute [Import="import('../api/@ohos.app.ability.Want').default"] Want want; - + attribute _default want; }; [Synthetic] callback Callback_TerminationInfo_Void = void (TerminationInfo parameter); [Entity=Class] -interface EmbeddedComponentAttribute: [TypeArguments="EmbeddedComponentAttribute"] CommonMethod { - +interface EmbeddedComponentAttribute: [Extends, TypeArguments="EmbeddedComponentAttribute"] CommonMethod { + EmbeddedComponentAttribute onTerminated(Callback_TerminationInfo_Void callback_); EmbeddedComponentAttribute onTerminated(Callback_TerminationInfo_Void callback_); - EmbeddedComponentAttribute onError([Import="import('../api/@ohos.base').ErrorCallback"] ErrorCallback callback_); - + EmbeddedComponentAttribute onError(_ErrorCallback callback_); + EmbeddedComponentAttribute onError([TypeArguments="BusinessError"] ErrorCallback callback_); }; \ No newline at end of file diff --git a/idl/enums.idl b/idl/enums.idl index 3552a56..6367655 100644 --- a/idl/enums.idl +++ b/idl/enums.idl @@ -1,12 +1,8 @@ -package enums; dictionary CheckBoxShape { - number CIRCLE = 0; number ROUNDED_SQUARE = 1; - }; dictionary Color { - [OriginalEnumMemberName=White] number WHITE = 0; [OriginalEnumMemberName=Black] @@ -31,17 +27,13 @@ dictionary Color { number YELLOW = 10; [OriginalEnumMemberName=Transparent] number TRANSPARENT = 11; - }; dictionary ColoringStrategy { - String INVERT = "invert"; String AVERAGE = "average"; String PRIMARY = "primary"; - }; dictionary ImageFit { - [OriginalEnumMemberName=Contain] number CONTAIN = 0; [OriginalEnumMemberName=Cover] @@ -64,30 +56,24 @@ dictionary ImageFit { number BOTTOM = 14; number BOTTOM_END = 15; number MATRIX = 16; - }; dictionary BorderStyle { - [OriginalEnumMemberName=Dotted] number DOTTED = 0; [OriginalEnumMemberName=Dashed] number DASHED = 1; [OriginalEnumMemberName=Solid] number SOLID = 2; - }; dictionary LineJoinStyle { - [OriginalEnumMemberName=Miter] number MITER = 0; [OriginalEnumMemberName=Round] number ROUND = 1; [OriginalEnumMemberName=Bevel] number BEVEL = 2; - }; dictionary TouchType { - [OriginalEnumMemberName=Down] number DOWN = 0; [OriginalEnumMemberName=Up] @@ -96,17 +82,17 @@ dictionary TouchType { number MOVE = 2; [OriginalEnumMemberName=Cancel] number CANCEL = 3; - + number HOVER_ENTER = 9; + number HOVER_MOVE = 10; + number HOVER_EXIT = 11; + number HOVER_CANCEL = 12; }; dictionary InteractionHand { - number NONE = 0; number LEFT = 1; number RIGHT = 2; - }; dictionary MouseButton { - [OriginalEnumMemberName=Left] number LEFT = 0; [OriginalEnumMemberName=Right] @@ -119,10 +105,8 @@ dictionary MouseButton { number FORWARD = 4; [OriginalEnumMemberName=None] number NONE = 5; - }; dictionary MouseAction { - [OriginalEnumMemberName=Press] number PRESS = 0; [OriginalEnumMemberName=Release] @@ -132,10 +116,8 @@ dictionary MouseAction { [OriginalEnumMemberName=Hover] number HOVER = 3; number CANCEL = 13; - }; dictionary AnimationStatus { - [OriginalEnumMemberName=Initial] number INITIAL = 0; [OriginalEnumMemberName=Running] @@ -144,10 +126,8 @@ dictionary AnimationStatus { number PAUSED = 2; [OriginalEnumMemberName=Stopped] number STOPPED = 3; - }; dictionary Curve { - [OriginalEnumMemberName=Linear] number LINEAR = 0; [OriginalEnumMemberName=Ease] @@ -174,10 +154,8 @@ dictionary Curve { number SMOOTH = 11; [OriginalEnumMemberName=Friction] number FRICTION = 12; - }; dictionary FillMode { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Forwards] @@ -186,10 +164,8 @@ dictionary FillMode { number BACKWARDS = 2; [OriginalEnumMemberName=Both] number BOTH = 3; - }; dictionary PlayMode { - [OriginalEnumMemberName=Normal] number NORMAL = 0; [OriginalEnumMemberName=Reverse] @@ -198,27 +174,21 @@ dictionary PlayMode { number ALTERNATE = 2; [OriginalEnumMemberName=AlternateReverse] number ALTERNATE_REVERSE = 3; - }; dictionary KeyType { - [OriginalEnumMemberName=Down] number DOWN = 0; [OriginalEnumMemberName=Up] number UP = 1; - }; dictionary KeySource { - [OriginalEnumMemberName=Unknown] number UNKNOWN = 0; [OriginalEnumMemberName=Keyboard] number KEYBOARD = 1; number JOYSTICK = 2; - }; dictionary Edge { - [OriginalEnumMemberName=Top] number TOP = 0; [Deprecated, OriginalEnumMemberName=Center] @@ -233,10 +203,8 @@ dictionary Edge { number MIDDLE = 5; [OriginalEnumMemberName=End] number END = 6; - }; dictionary Week { - [OriginalEnumMemberName=Mon] number MON = 0; [OriginalEnumMemberName=Tue] @@ -251,40 +219,32 @@ dictionary Week { number SAT = 5; [OriginalEnumMemberName=Sun] number SUN = 6; - }; dictionary Direction { - [OriginalEnumMemberName=Ltr] number LTR = 0; [OriginalEnumMemberName=Rtl] number RTL = 1; [OriginalEnumMemberName=Auto] number AUTO = 2; - }; dictionary BarState { - [OriginalEnumMemberName=Off] number OFF = 0; [OriginalEnumMemberName=Auto] number AUTO = 1; [OriginalEnumMemberName=On] number ON = 2; - }; dictionary EdgeEffect { - [OriginalEnumMemberName=Spring] number SPRING = 0; [OriginalEnumMemberName=Fade] number FADE = 1; [OriginalEnumMemberName=None] number NONE = 2; - }; dictionary Alignment { - [OriginalEnumMemberName=TopStart] number TOP_START = 0; [OriginalEnumMemberName=Top] @@ -303,64 +263,61 @@ dictionary Alignment { number BOTTOM = 7; [OriginalEnumMemberName=BottomEnd] number BOTTOM_END = 8; - +}; +dictionary LocalizedAlignment { + String TOP_START = "top_start"; + String TOP = "top"; + String TOP_END = "top_end"; + String START = "start"; + String CENTER = "center"; + String END = "end"; + String BOTTOM_START = "bottom_start"; + String BOTTOM = "bottom"; + String BOTTOM_END = "bottom_end"; }; dictionary TransitionType { - [OriginalEnumMemberName=All] number ALL = 0; [OriginalEnumMemberName=Insert] number INSERT = 1; [OriginalEnumMemberName=Delete] number DELETE = 2; - }; dictionary RelateType { - number FILL = 0; number FIT = 1; - }; dictionary Visibility { - [OriginalEnumMemberName=Visible] number VISIBLE = 0; [OriginalEnumMemberName=Hidden] number HIDDEN = 1; [OriginalEnumMemberName=None] number NONE = 2; - }; dictionary LineCapStyle { - [OriginalEnumMemberName=Butt] number BUTT = 0; [OriginalEnumMemberName=Round] number ROUND = 1; [OriginalEnumMemberName=Square] number SQUARE = 2; - }; dictionary Axis { - [OriginalEnumMemberName=Vertical] number VERTICAL = 0; [OriginalEnumMemberName=Horizontal] number HORIZONTAL = 1; - }; dictionary HorizontalAlign { - [OriginalEnumMemberName=Start] number START = 0; [OriginalEnumMemberName=Center] number CENTER = 1; [OriginalEnumMemberName=End] number END = 2; - }; dictionary FlexAlign { - [OriginalEnumMemberName=Start] number START = 0; [OriginalEnumMemberName=Center] @@ -373,10 +330,8 @@ dictionary FlexAlign { number SPACE_AROUND = 4; [OriginalEnumMemberName=SpaceEvenly] number SPACE_EVENLY = 5; - }; dictionary ItemAlign { - [OriginalEnumMemberName=Auto] number AUTO = 0; [OriginalEnumMemberName=Start] @@ -389,10 +344,8 @@ dictionary ItemAlign { number BASELINE = 4; [OriginalEnumMemberName=Stretch] number STRETCH = 5; - }; dictionary FlexDirection { - [OriginalEnumMemberName=Row] number ROW = 0; [OriginalEnumMemberName=Column] @@ -401,46 +354,40 @@ dictionary FlexDirection { number ROW_REVERSE = 2; [OriginalEnumMemberName=ColumnReverse] number COLUMN_REVERSE = 3; - }; dictionary PixelRoundCalcPolicy { - number NO_FORCE_ROUND = 0; number FORCE_CEIL = 1; number FORCE_FLOOR = 2; - +}; +dictionary PixelRoundMode { + number PIXEL_ROUND_ON_LAYOUT_FINISH = 0; + number PIXEL_ROUND_AFTER_MEASURE = 1; }; dictionary FlexWrap { - [OriginalEnumMemberName=NoWrap] number NO_WRAP = 0; [OriginalEnumMemberName=Wrap] number WRAP = 1; [OriginalEnumMemberName=WrapReverse] number WRAP_REVERSE = 2; - }; dictionary VerticalAlign { - [OriginalEnumMemberName=Top] number TOP = 0; [OriginalEnumMemberName=Center] number CENTER = 1; [OriginalEnumMemberName=Bottom] number BOTTOM = 2; - }; dictionary ImageRepeat { - [OriginalEnumMemberName=NoRepeat] number NO_REPEAT = 0; number X = 1; number Y = 2; number XY = 3; - }; dictionary ImageSize { - [OriginalEnumMemberName=Auto] number AUTO = 0; [OriginalEnumMemberName=Cover] @@ -448,10 +395,8 @@ dictionary ImageSize { [OriginalEnumMemberName=Contain] number CONTAIN = 2; number FILL = 3; - }; dictionary GradientDirection { - [OriginalEnumMemberName=Left] number LEFT = 0; [OriginalEnumMemberName=Top] @@ -470,26 +415,20 @@ dictionary GradientDirection { number RIGHT_BOTTOM = 7; [OriginalEnumMemberName=None] number NONE = 8; - }; dictionary SharedTransitionEffectType { - [OriginalEnumMemberName=Static] number STATIC = 0; [OriginalEnumMemberName=Exchange] number EXCHANGE = 1; - }; dictionary FontStyle { - [OriginalEnumMemberName=Normal] number NORMAL = 0; [OriginalEnumMemberName=Italic] number ITALIC = 1; - }; dictionary FontWeight { - [OriginalEnumMemberName=Lighter] number LIGHTER = 0; [OriginalEnumMemberName=Normal] @@ -502,10 +441,8 @@ dictionary FontWeight { number BOLD = 4; [OriginalEnumMemberName=Bolder] number BOLDER = 5; - }; dictionary TextAlign { - [OriginalEnumMemberName=Center] number CENTER = 0; [OriginalEnumMemberName=Start] @@ -513,10 +450,8 @@ dictionary TextAlign { [OriginalEnumMemberName=End] number END = 2; number JUSTIFY = 3; - }; dictionary TextOverflow { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Clip] @@ -524,10 +459,8 @@ dictionary TextOverflow { [OriginalEnumMemberName=Ellipsis] number ELLIPSIS = 2; number MARQUEE = 3; - }; dictionary TextDecorationType { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Underline] @@ -536,35 +469,27 @@ dictionary TextDecorationType { number OVERLINE = 2; [OriginalEnumMemberName=LineThrough] number LINE_THROUGH = 3; - }; dictionary TextCase { - [OriginalEnumMemberName=Normal] number NORMAL = 0; [OriginalEnumMemberName=LowerCase] number LOWER_CASE = 1; [OriginalEnumMemberName=UpperCase] number UPPER_CASE = 2; - }; dictionary TextHeightAdaptivePolicy { - number MAX_LINES_FIRST = 0; number MIN_FONT_SIZE_FIRST = 1; number LAYOUT_CONSTRAINT_FIRST = 2; - }; dictionary ResponseType { - [OriginalEnumMemberName=RightClick] number RIGHT_CLICK = 0; [OriginalEnumMemberName=LongPress] number LONG_PRESS = 1; - }; dictionary HoverEffect { - [OriginalEnumMemberName=Auto] number AUTO = 0; [OriginalEnumMemberName=Scale] @@ -573,10 +498,8 @@ dictionary HoverEffect { number HIGHLIGHT = 2; [OriginalEnumMemberName=None] number NONE = 3; - }; dictionary Placement { - [OriginalEnumMemberName=Left] number LEFT = 0; [OriginalEnumMemberName=Right] @@ -601,17 +524,13 @@ dictionary Placement { number RIGHT_TOP = 10; [OriginalEnumMemberName=RightBottom] number RIGHT_BOTTOM = 11; - }; dictionary ArrowPointPosition { - String START = "Start"; String CENTER = "Center"; String END = "End"; - }; dictionary CopyOptions { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=InApp] @@ -620,10 +539,8 @@ dictionary CopyOptions { number LOCAL_DEVICE = 2; [Deprecated] number CROSS_DEVICE = 3; - }; dictionary HitTestMode { - [OriginalEnumMemberName=Default] number DEFAULT = 0; [OriginalEnumMemberName=Block] @@ -632,25 +549,21 @@ dictionary HitTestMode { number TRANSPARENT = 2; [OriginalEnumMemberName=None] number NONE = 3; - + number BLOCK_HIERARCHY = 4; + number BLOCK_DESCENDANTS = 5; }; dictionary TitleHeight { - [OriginalEnumMemberName=MainOnly] number MAIN_ONLY = 0; [OriginalEnumMemberName=MainWithSub] number MAIN_WITH_SUB = 1; - }; dictionary ModifierKey { - number CTRL = 0; number SHIFT = 1; number ALT = 2; - }; dictionary FunctionKey { - number ESC = 0; number F1 = 1; number F2 = 2; @@ -669,53 +582,41 @@ dictionary FunctionKey { number DPAD_DOWN = 15; number DPAD_LEFT = 16; number DPAD_RIGHT = 17; - }; dictionary ImageSpanAlignment { - number BASELINE = 0; number BOTTOM = 1; number CENTER = 2; number TOP = 3; - + number FOLLOW_PARAGRAPH = 4; }; dictionary ObscuredReasons { - number PLACEHOLDER = 0; - }; dictionary TextContentStyle { - number DEFAULT = 0; number INLINE = 1; - }; dictionary ClickEffectLevel { - number LIGHT = 0; number MIDDLE = 1; number HEAVY = 2; - }; dictionary XComponentType { - number SURFACE = 0; [Deprecated] number COMPONENT = 1; number TEXTURE = 2; + [Deprecated] number NODE = 3; - }; dictionary NestedScrollMode { - number SELF_ONLY = 0; number SELF_FIRST = 1; number PARENT_FIRST = 2; number PARALLEL = 3; - }; dictionary ScrollSource { - number DRAG = 0; number FLING = 1; number EDGE_EFFECT = 2; @@ -724,10 +625,8 @@ dictionary ScrollSource { number SCROLL_BAR_FLING = 5; number SCROLLER = 6; number SCROLLER_ANIMATION = 7; - }; dictionary RenderFit { - number CENTER = 0; number TOP = 1; number BOTTOM = 2; @@ -744,123 +643,91 @@ dictionary RenderFit { number RESIZE_COVER = 13; number RESIZE_COVER_TOP_LEFT = 14; number RESIZE_COVER_BOTTOM_RIGHT = 15; - }; dictionary DialogButtonStyle { - number DEFAULT = 0; number HIGHLIGHT = 1; - }; dictionary WordBreak { - number NORMAL = 0; number BREAK_ALL = 1; number BREAK_WORD = 2; number HYPHENATION = 3; - }; dictionary LineBreakStrategy { - number GREEDY = 0; number HIGH_QUALITY = 1; number BALANCED = 2; - }; dictionary IlluminatedType { - number NONE = 0; number BORDER = 1; number CONTENT = 2; number BORDER_CONTENT = 3; number BLOOM_BORDER = 4; number BLOOM_BORDER_CONTENT = 5; - }; dictionary EllipsisMode { - number START = 0; number CENTER = 1; number END = 2; - }; [TypeParameters="T"] typedef (T or undefined) Nullable; dictionary OptionWidthMode { - String FIT_CONTENT = "fit_content"; String FIT_TRIGGER = "fit_trigger"; - }; dictionary FoldStatus { - number FOLD_STATUS_UNKNOWN = 0; number FOLD_STATUS_EXPANDED = 1; number FOLD_STATUS_FOLDED = 2; number FOLD_STATUS_HALF_FOLDED = 3; - }; dictionary AppRotation { - number ROTATION_0 = 0; number ROTATION_90 = 1; number ROTATION_180 = 2; number ROTATION_270 = 3; - }; dictionary EmbeddedType { - number EMBEDDED_UI_EXTENSION = 0; - }; dictionary MarqueeUpdateStrategy { - number DEFAULT = 0; number PRESERVE_POSITION = 1; - }; dictionary TextDecorationStyle { - number SOLID = 0; number DOUBLE = 1; number DOTTED = 2; number DASHED = 3; number WAVY = 4; - }; dictionary TextSelectableMode { - number SELECTABLE_UNFOCUSABLE = 0; number SELECTABLE_FOCUSABLE = 1; number UNSELECTABLE = 2; - }; dictionary AccessibilityHoverType { - number HOVER_ENTER = 0; number HOVER_MOVE = 1; number HOVER_EXIT = 2; number HOVER_CANCEL = 3; - }; dictionary WidthBreakpoint { - number WIDTH_XS = 0; number WIDTH_SM = 1; number WIDTH_MD = 2; number WIDTH_LG = 3; number WIDTH_XL = 4; - }; dictionary HeightBreakpoint { - number HEIGHT_SM = 0; number HEIGHT_MD = 1; number HEIGHT_LG = 2; - }; dictionary AxisModel { - number ABS_X = 0; number ABS_Y = 1; number ABS_Z = 2; @@ -869,34 +736,54 @@ dictionary AxisModel { number ABS_BRAKE = 5; number ABS_HAT0X = 6; number ABS_HAT0Y = 7; - }; dictionary PageFlipMode { - number CONTINUOUS = 0; number SINGLE = 1; - +}; +dictionary FocusWrapMode { + number DEFAULT = 0; + number WRAP_WITH_ARROW = 1; }; dictionary CrownAction { - number BEGIN = 0; number UPDATE = 1; number END = 2; - }; dictionary CrownSensitivity { - number LOW = 0; number MEDIUM = 1; number HIGH = 2; - }; dictionary AxisAction { - number NONE = 0; number BEGIN = 1; number UPDATE = 2; number END = 3; number CANCEL = 4; - +}; +dictionary FocusDrawLevel { + number SELF = 0; + number TOP = 1; +}; +dictionary DividerMode { + number FLOATING_ABOVE_MENU = 0; + number EMBEDDED_IN_MENU = 1; +}; +dictionary EventQueryType { + number ON_CLICK = 0; +}; +dictionary TipsAnchorType { + number TARGET = 0; + number CURSOR = 1; +}; +dictionary ColorSpace { + number SRGB = 0; + number DISPLAY_P3 = 1; +}; +dictionary AnimationPropertyType { + number ROTATION = 0; + number TRANSLATION = 1; + number SCALE = 2; + number OPACITY = 3; }; \ No newline at end of file diff --git a/idl/flex.idl b/idl/flex.idl index fffa07b..fceadf0 100644 --- a/idl/flex.idl +++ b/idl/flex.idl @@ -1,7 +1,13 @@ package flex; +import LengthMetrics as LengthMetrics; +import common.PointLightStyle as PointLightStyle; +import common.CommonMethod as CommonMethod; +import FlexWrap as FlexWrap; +import FlexDirection as FlexDirection; +import ItemAlign as ItemAlign; +import FlexAlign as FlexAlign; [Entity=Interface] interface FlexOptions { - [Optional] attribute FlexDirection direction; [Optional] @@ -14,27 +20,20 @@ interface FlexOptions { attribute FlexAlign alignContent; [Optional] attribute FlexSpaceOptions space; - }; [Entity=Interface] interface FlexSpaceOptions { - [Optional] attribute LengthMetrics main; [Optional] attribute LengthMetrics cross; - }; [Entity=Interface] interface FlexInterface { - [CallSignature] FlexAttribute invoke(optional FlexOptions value); - }; [Entity=Class] -interface FlexAttribute: [TypeArguments="FlexAttribute"] CommonMethod { - +interface FlexAttribute: [Extends, TypeArguments="FlexAttribute"] CommonMethod { FlexAttribute pointLight(PointLightStyle value); - }; \ No newline at end of file diff --git a/idl/flow_item.idl b/idl/flow_item.idl index c6f008f..18ec85c 100644 --- a/idl/flow_item.idl +++ b/idl/flow_item.idl @@ -1,13 +1,10 @@ package flow_item; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface FlowItemInterface { - [CallSignature] FlowItemAttribute invoke(); - }; [Entity=Class] -interface FlowItemAttribute: [TypeArguments="FlowItemAttribute"] CommonMethod { - - +interface FlowItemAttribute: [Extends, TypeArguments="FlowItemAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/focus.idl b/idl/focus.idl index bf2751b..38b5f1f 100644 --- a/idl/focus.idl +++ b/idl/focus.idl @@ -1,25 +1,21 @@ package focus; +import LengthMetrics as LengthMetrics; +import ColorMetrics as ColorMetrics; [Entity=Interface] interface FocusBoxStyle { - [Optional] attribute LengthMetrics margin; [Optional] attribute ColorMetrics strokeColor; [Optional] attribute LengthMetrics strokeWidth; - }; dictionary FocusPriority { - number AUTO = 0; number PRIOR = 2000; number PREVIOUS = 3000; - }; dictionary KeyProcessingMode { - number FOCUS_NAVIGATION = 0; number ANCESTOR_EVENT = 1; - }; \ No newline at end of file diff --git a/idl/folder_stack.idl b/idl/folder_stack.idl index 07d23d8..7ea054e 100644 --- a/idl/folder_stack.idl +++ b/idl/folder_stack.idl @@ -1,44 +1,40 @@ package folder_stack; -[Import="import('../api/@ohos.window').default.WindowStatusType"] -typedef [Import="import('../api/@ohos.window').default.WindowStatusType"] WindowStatusType WindowStatusType; +import ohos.window.default as window; +import FoldStatus as FoldStatus; +import Alignment as Alignment; +import AppRotation as AppRotation; +import common.CommonMethod as CommonMethod; +import ohos.window.default.WindowStatusType as _WindowStatusType; +typedef _WindowStatusType WindowStatusType; +typedef window.WindowStatusType WindowStatusType; [Entity=Interface] interface FolderStackOptions { - [Optional] attribute sequence upperItems; - }; [Entity=Interface] interface FolderStackInterface { - [CallSignature] FolderStackAttribute invoke(optional FolderStackOptions options); - }; [Entity=Interface] interface OnFoldStatusChangeInfo { - attribute FoldStatus foldStatus; - }; callback OnFoldStatusChangeCallback = void (OnFoldStatusChangeInfo event); callback OnHoverStatusChangeCallback = void (HoverEventParam param); [Entity=Class] -interface FolderStackAttribute: [TypeArguments="FolderStackAttribute"] CommonMethod { - +interface FolderStackAttribute: [Extends, TypeArguments="FolderStackAttribute"] CommonMethod { FolderStackAttribute alignContent(Alignment value); FolderStackAttribute onFolderStateChange(OnFoldStatusChangeCallback callback_); FolderStackAttribute onHoverStatusChange(OnHoverStatusChangeCallback handler); FolderStackAttribute enableAnimation(boolean value); FolderStackAttribute autoHalfFold(boolean value); - }; [Entity=Interface] interface HoverEventParam { - attribute FoldStatus foldStatus; attribute boolean isHoverMode; attribute AppRotation appRotation; attribute WindowStatusType windowStatusType; - }; \ No newline at end of file diff --git a/idl/for_each.idl b/idl/for_each.idl index c5b5fb5..e69de29 100644 --- a/idl/for_each.idl +++ b/idl/for_each.idl @@ -1 +0,0 @@ -package for_each; \ No newline at end of file diff --git a/idl/form_component.idl b/idl/form_component.idl index b40324d..d0a77e3 100644 --- a/idl/form_component.idl +++ b/idl/form_component.idl @@ -1,6 +1,11 @@ package form_component; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import ohos.app.ability.Want.default as Want; +import Visibility as Visibility; +import units.VoidCallback as VoidCallback; +import ohos.app.ability.Want.default as _default; dictionary FormDimension { - [OriginalEnumMemberName=Dimension_1_2] number DIMENSION_1_2 = 0; [OriginalEnumMemberName=Dimension_2_2] @@ -9,29 +14,23 @@ dictionary FormDimension { number DIMENSION_2_4 = 2; [OriginalEnumMemberName=Dimension_4_4] number DIMENSION_4_4 = 3; - [OriginalEnumMemberName=Dimension_2_1] + [Deprecated, OriginalEnumMemberName=Dimension_2_1] number DIMENSION_2_1 = 4; number DIMENSION_1_1 = 6; number DIMENSION_6_4 = 7; number DIMENSION_2_3 = 8; number DIMENSION_3_3 = 9; - }; dictionary FormRenderingMode { - number FULL_COLOR = 0; number SINGLE_COLOR = 1; - }; dictionary FormShape { - number RECT = 1; number CIRCLE = 2; - }; [Entity=Interface] interface FormInfo { - attribute (number or String) id; attribute String name; attribute String bundle; @@ -42,54 +41,53 @@ interface FormInfo { [Optional] attribute boolean temporary; [Optional] - attribute [Import="import('../api/@ohos.app.ability.Want').default"] Want want; + attribute _default want; + [Optional] + attribute Want want; [Optional] attribute FormRenderingMode renderingMode; [Optional] attribute FormShape shape; - + [Optional] + attribute boolean exemptAppLock; }; [Entity=Interface] interface FormComponentInterface { - [CallSignature] FormComponentAttribute invoke(FormInfo value); - }; [Entity=Interface] interface FormCallbackInfo { - attribute number id; attribute String idString; - }; -[Synthetic] -callback Callback_FormCallbackInfo_Void = void (FormCallbackInfo parameter); -[Entity=Literal, Synthetic] -interface Literal_Number_errcode_String_msg { - +[Entity=Interface] +interface FormSize { + attribute number width; + attribute number height; +}; +[Entity=Interface] +interface ErrorInformation { attribute number errcode; attribute String msg; - }; [Synthetic] -callback Callback_Literal_Number_errcode_String_msg_Void = void (Literal_Number_errcode_String_msg info); +callback Callback_FormCallbackInfo_Void = void (FormCallbackInfo parameter); [Synthetic] -callback Callback_Any_Void = void (any info); +callback Callback_ErrorInformation_Void = void (ErrorInformation parameter); [Synthetic] -callback Callback_Void = void (); +callback Callback_Object_Void = void (Object parameter); [Entity=Class] -interface FormComponentAttribute: [TypeArguments="FormComponentAttribute"] CommonMethod { - - FormComponentAttribute size(SizeOptions value); +interface FormComponentAttribute: [Extends, TypeArguments="FormComponentAttribute"] CommonMethod { + FormComponentAttribute size(FormSize formSize); FormComponentAttribute moduleName(String value); FormComponentAttribute dimension(FormDimension value); FormComponentAttribute allowUpdate(boolean value); FormComponentAttribute visibility(Visibility value); FormComponentAttribute onAcquired(Callback_FormCallbackInfo_Void callback_); - FormComponentAttribute onError(Callback_Literal_Number_errcode_String_msg_Void callback_); - FormComponentAttribute onRouter(Callback_Any_Void callback_); + FormComponentAttribute onError(Callback_ErrorInformation_Void callback_); + FormComponentAttribute onRouter(Callback_Object_Void callback_); FormComponentAttribute onUninstall(Callback_FormCallbackInfo_Void callback_); - FormComponentAttribute onLoad(Callback_Void callback_); - + FormComponentAttribute onLoad(VoidCallback callback_); + FormComponentAttribute onUpdate(Callback_FormCallbackInfo_Void callback_); }; \ No newline at end of file diff --git a/idl/form_link.idl b/idl/form_link.idl index 9f0c45f..8c2f0c0 100644 --- a/idl/form_link.idl +++ b/idl/form_link.idl @@ -1,7 +1,7 @@ package form_link; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface FormLinkOptions { - attribute String action; [Optional] attribute String moduleName; @@ -13,17 +13,12 @@ interface FormLinkOptions { attribute String uri; [Optional] attribute Object params; - }; [Entity=Interface] interface FormLinkInterface { - [CallSignature] FormLinkAttribute invoke(FormLinkOptions options); - }; [Entity=Class] -interface FormLinkAttribute: [TypeArguments="FormLinkAttribute"] CommonMethod { - - +interface FormLinkAttribute: [Extends, TypeArguments="FormLinkAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/gauge.idl b/idl/gauge.idl index 069c0fb..307c03b 100644 --- a/idl/gauge.idl +++ b/idl/gauge.idl @@ -1,53 +1,51 @@ package gauge; +import common.CommonMethod as CommonMethod; +import common.CommonConfiguration as CommonConfiguration; +import common.ContentModifier as ContentModifier; +import common.MultiShadowOptions as MultiShadowOptions; +import common.Optional as Optional; +import CustomBuilder as CustomBuilder; +import units.ResourceStr as ResourceStr; +import units.Dimension as Dimension; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import LinearGradient as LinearGradient; [Entity=Interface] interface GaugeOptions { - attribute number value; [Optional] attribute number min; [Optional] attribute number max; - }; [Entity=Interface] interface GaugeInterface { - [CallSignature] GaugeAttribute invoke(GaugeOptions options); - }; [Entity=Interface] interface GaugeShadowOptions: MultiShadowOptions { - - }; [Entity=Interface] interface GaugeIndicatorOptions { - [Optional] attribute ResourceStr icon; [Optional] attribute Dimension space; - }; [Entity=Interface] interface GaugeConfiguration: [TypeArguments="GaugeConfiguration"] CommonConfiguration { - attribute number value; attribute number min; attribute number max; - }; [Entity=Tuple, Synthetic] interface Tuple_Union_ResourceColor_LinearGradient_Number { - attribute (ResourceColor or LinearGradient) value0; attribute number value1; - }; [Entity=Class] -interface GaugeAttribute: [TypeArguments="GaugeAttribute"] CommonMethod { - +interface GaugeAttribute: [Extends, TypeArguments="GaugeAttribute"] CommonMethod { GaugeAttribute value(number value); GaugeAttribute startAngle(number angle); GaugeAttribute endAngle(number angle); @@ -58,5 +56,4 @@ interface GaugeAttribute: [TypeArguments="GaugeAttribute"] CommonMethod { GaugeAttribute indicator(GaugeIndicatorOptions value); GaugeAttribute privacySensitive((boolean or undefined) isPrivacySensitiveMode); GaugeAttribute contentModifier([TypeArguments="GaugeConfiguration"] ContentModifier modifier); - }; \ No newline at end of file diff --git a/idl/gesture.idl b/idl/gesture.idl index fa3ec83..fcdb048 100644 --- a/idl/gesture.idl +++ b/idl/gesture.idl @@ -1,6 +1,9 @@ package gesture; +import common.BaseEvent as BaseEvent; +import common.SourceTool as SourceTool; +import common.Callback as Callback; +import InteractionHand as InteractionHand; dictionary PanDirection { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Horizontal] @@ -17,10 +20,8 @@ dictionary PanDirection { number DOWN = 6; [OriginalEnumMemberName=All] number ALL = 7; - }; dictionary SwipeDirection { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Horizontal] @@ -29,36 +30,27 @@ dictionary SwipeDirection { number VERTICAL = 2; [OriginalEnumMemberName=All] number ALL = 3; - }; dictionary GestureMode { - [OriginalEnumMemberName=Sequence] number SEQUENCE = 0; [OriginalEnumMemberName=Parallel] number PARALLEL = 1; [OriginalEnumMemberName=Exclusive] number EXCLUSIVE = 2; - }; dictionary GestureMask { - [OriginalEnumMemberName=Normal] number NORMAL = 0; [OriginalEnumMemberName=IgnoreInternal] number IGNORE_INTERNAL = 1; - }; dictionary GestureJudgeResult { - number CONTINUE = 0; number REJECT = 1; - }; namespace GestureControl { - dictionary GestureType { - number TAP_GESTURE = 0; number LONG_PRESS_GESTURE = 1; number PAN_GESTURE = 2; @@ -67,23 +59,31 @@ namespace GestureControl { number ROTATION_GESTURE = 5; number DRAG = 6; number CLICK = 7; - }; - }; [Entity=Interface] interface GestureInfo { - [Optional] attribute String tag; attribute GestureControl.GestureType type; attribute boolean isSystemGesture; - +}; +[Entity=Interface] +interface EventLocationInfo { + attribute number x; + attribute number y; + attribute number windowX; + attribute number windowY; + attribute number displayX; + attribute number displayY; }; [Entity=Interface] interface FingerInfo { - attribute number id; + [Optional] + attribute number globalDisplayX; + [Optional] + attribute number globalDisplayY; attribute number globalX; attribute number globalY; attribute number localX; @@ -92,62 +92,53 @@ interface FingerInfo { attribute number displayY; [Optional] attribute InteractionHand hand; - }; typedef (TapGestureInterface or LongPressGestureInterface or PanGestureInterface or PinchGestureInterface or SwipeGestureInterface or RotationGestureInterface or GestureGroupInterface) GestureType; +typedef (Gesture or GestureGroup) GestureType; [Entity=Interface] interface BaseGestureEvent: BaseEvent { - attribute sequence fingerList; - + [Optional] + attribute sequence fingerInfos; }; [Entity=Interface] interface TapGestureEvent: BaseGestureEvent { - - + [Optional] + attribute EventLocationInfo tapLocation; }; [Entity=Interface] interface LongPressGestureEvent: BaseGestureEvent { - attribute boolean repeat; - }; [Entity=Interface] interface PanGestureEvent: BaseGestureEvent { - attribute number offsetX; attribute number offsetY; attribute number velocityX; attribute number velocityY; attribute number velocity; - }; [Entity=Interface] interface PinchGestureEvent: BaseGestureEvent { - attribute number scale; attribute number pinchCenterX; attribute number pinchCenterY; - }; [Entity=Interface] interface RotationGestureEvent: BaseGestureEvent { - attribute number angle; - }; [Entity=Interface] interface SwipeGestureEvent: BaseGestureEvent { - attribute number angle; attribute number speed; - }; [Entity=Interface] interface GestureEvent: BaseEvent { - attribute boolean repeat; attribute sequence fingerList; + [Optional] + attribute sequence fingerInfos; attribute number offsetX; attribute number offsetY; attribute number angle; @@ -158,59 +149,62 @@ interface GestureEvent: BaseEvent { attribute number velocityX; attribute number velocityY; attribute number velocity; - + [Optional] + attribute EventLocationInfo tapLocation; }; [Entity=Interface, TypeParameters="T"] interface GestureInterface { - T tag(String tag); T allowedTypes(sequence types); - }; [Entity=Interface] interface BaseHandlerOptions { - [Optional] attribute boolean isFingerCountLimited; - +}; +[Entity=Class] +interface Gesture { + this tag(String tag); + this allowedTypes(sequence types); }; [Entity=Interface] interface TapGestureParameters: BaseHandlerOptions { - [Optional] attribute number count; [Optional] attribute number fingers; [Optional] attribute number distanceThreshold; - }; [Synthetic] callback Callback_GestureEvent_Void = void (GestureEvent event); [Entity=Interface] interface TapGestureInterface: [TypeArguments="TapGestureInterface"] GestureInterface { - TapGestureInterface onAction(Callback_GestureEvent_Void event); [CallSignature] TapGestureInterface invoke(optional TapGestureParameters value); - +}; +[Synthetic] +callback Callback_TapGesture = TapGesture (); +[Entity=Class] +interface TapGesture: [Extends] Gesture { + [DtsName="$_instantiate"] + static TapGesture dollar__instantiate(Callback_TapGesture factory, optional TapGestureParameters value); + this onAction(Callback_GestureEvent_Void event); }; [Synthetic] callback Callback_Void = void (); [Entity=Literal, Synthetic] interface Literal_Number_duration_fingers_Boolean_repeat { - [Optional] attribute number fingers; [Optional] attribute boolean repeat; [Optional] attribute number duration; - }; [Entity=Interface] interface LongPressGestureInterface: [TypeArguments="LongPressGestureInterface"] GestureInterface { - LongPressGestureInterface onAction(Callback_GestureEvent_Void event); LongPressGestureInterface onActionEnd(Callback_GestureEvent_Void event); LongPressGestureInterface onActionCancel(Callback_Void event); @@ -219,33 +213,38 @@ interface LongPressGestureInterface: [TypeArguments="LongPressGestureInterface"] LongPressGestureInterface invoke(optional Literal_Number_duration_fingers_Boolean_repeat value); [CallSignature] LongPressGestureInterface invoke(optional LongPressGestureHandlerOptions options); - +}; +[Synthetic] +callback Callback_LongPressGesture = LongPressGesture (); +[Entity=Class] +interface LongPressGesture: [Extends] Gesture { + [DtsName="$_instantiate"] + static LongPressGesture dollar__instantiate(Callback_LongPressGesture factory, optional LongPressGestureHandlerOptions value); + this onAction(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Literal, Synthetic] interface Literal_Number_distance_fingers_PanDirection_direction { - [Optional] attribute number fingers; [Optional] attribute PanDirection direction; [Optional] attribute number distance; - }; [Entity=Class] interface PanGestureOptions { - constructor(optional Literal_Number_distance_fingers_PanDirection_direction value); - undefined setDirection(PanDirection value); - undefined setDistance(number value); - undefined setFingers(number value); + constructor(optional PanGestureHandlerOptions value); + void setDirection(PanDirection value); + void setDistance(number value); + void setFingers(number value); PanDirection getDirection(); number getDistance(); - }; [Entity=Interface] interface PanGestureInterface: [TypeArguments="PanGestureInterface"] GestureInterface { - PanGestureInterface onActionStart(Callback_GestureEvent_Void event); PanGestureInterface onActionUpdate(Callback_GestureEvent_Void event); PanGestureInterface onActionEnd(Callback_GestureEvent_Void event); @@ -255,41 +254,52 @@ interface PanGestureInterface: [TypeArguments="PanGestureInterface"] GestureInte PanGestureInterface invoke(optional (Literal_Number_distance_fingers_PanDirection_direction or PanGestureOptions) value); [CallSignature] PanGestureInterface invoke(optional PanGestureHandlerOptions options); - +}; +[Synthetic] +callback Callback_PanGesture = PanGesture (); +[Entity=Class] +interface PanGesture: [Extends] Gesture { + [DtsName="$_instantiate"] + static PanGesture dollar__instantiate(Callback_PanGesture factory, optional (PanGestureHandlerOptions or PanGestureOptions) value); + this onActionStart(Callback_GestureEvent_Void event); + this onActionUpdate(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Literal, Synthetic] interface Literal_Number_fingers_speed_SwipeDirection_direction { - [Optional] attribute number fingers; [Optional] attribute SwipeDirection direction; [Optional] attribute number speed; - }; [Entity=Interface] interface SwipeGestureInterface: [TypeArguments="SwipeGestureInterface"] GestureInterface { - SwipeGestureInterface onAction(Callback_GestureEvent_Void event); [CallSignature] SwipeGestureInterface invoke(optional Literal_Number_fingers_speed_SwipeDirection_direction value); [CallSignature] SwipeGestureInterface invoke(optional SwipeGestureHandlerOptions options); - +}; +[Synthetic] +callback Callback_SwipeGesture = SwipeGesture (); +[Entity=Class] +interface SwipeGesture: [Extends] Gesture { + [DtsName="$_instantiate"] + static SwipeGesture dollar__instantiate(Callback_SwipeGesture factory, optional SwipeGestureHandlerOptions value); + this onAction(Callback_GestureEvent_Void event); }; [Entity=Literal, Synthetic] interface Literal_Number_distance_fingers { - [Optional] attribute number fingers; [Optional] attribute number distance; - }; [Entity=Interface] interface PinchGestureInterface: [TypeArguments="PinchGestureInterface"] GestureInterface { - PinchGestureInterface onActionStart(Callback_GestureEvent_Void event); PinchGestureInterface onActionUpdate(Callback_GestureEvent_Void event); PinchGestureInterface onActionEnd(Callback_GestureEvent_Void event); @@ -299,20 +309,27 @@ interface PinchGestureInterface: [TypeArguments="PinchGestureInterface"] Gesture PinchGestureInterface invoke(optional Literal_Number_distance_fingers value); [CallSignature] PinchGestureInterface invoke(optional PinchGestureHandlerOptions options); - +}; +[Synthetic] +callback Callback_PinchGesture = PinchGesture (); +[Entity=Class] +interface PinchGesture: [Extends] Gesture { + [DtsName="$_instantiate"] + static PinchGesture dollar__instantiate(Callback_PinchGesture factory, optional PinchGestureHandlerOptions value); + this onActionStart(Callback_GestureEvent_Void event); + this onActionUpdate(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Literal, Synthetic] interface Literal_Number_angle_fingers { - [Optional] attribute number fingers; [Optional] attribute number angle; - }; [Entity=Interface] interface RotationGestureInterface: [TypeArguments="RotationGestureInterface"] GestureInterface { - RotationGestureInterface onActionStart(Callback_GestureEvent_Void event); RotationGestureInterface onActionUpdate(Callback_GestureEvent_Void event); RotationGestureInterface onActionEnd(Callback_GestureEvent_Void event); @@ -322,184 +339,219 @@ interface RotationGestureInterface: [TypeArguments="RotationGestureInterface"] G RotationGestureInterface invoke(optional Literal_Number_angle_fingers value); [CallSignature] RotationGestureInterface invoke(optional RotationGestureHandlerOptions options); - +}; +[Synthetic] +callback Callback_RotationGesture = RotationGesture (); +[Entity=Class] +interface RotationGesture: [Extends] Gesture { + [DtsName="$_instantiate"] + static RotationGesture dollar__instantiate(Callback_RotationGesture factory, optional RotationGestureHandlerOptions value); + this onActionStart(Callback_GestureEvent_Void event); + this onActionUpdate(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Interface] interface GestureGroupInterface { - GestureGroupInterface onCancel(Callback_Void event); [CallSignature] GestureGroupInterface invoke(GestureMode mode, sequence... gesture); - +}; +[Synthetic] +callback Callback_GestureGroup = GestureGroup (); +[Entity=Class] +interface GestureGroup { + [DtsName="$_instantiate"] + static GestureGroup dollar__instantiate(Callback_GestureGroup factory, GestureMode mode, sequence... gesture); + GestureGroup onCancel(Callback_Void event); }; [Entity=Class, TypeParameters="T"] -interface GestureHandler { - +interface GestureHandler: [TypeArguments="T"] GestureInterface { T tag(String tag); T allowedTypes(sequence types); - +}; +[Entity=Class] +interface GestureHandler { + this tag(String tag); + this allowedTypes(sequence types); }; [Entity=Interface] interface TapGestureHandlerOptions: BaseHandlerOptions { - [Optional] attribute number count; [Optional] attribute number fingers; - }; [Entity=Class] -interface TapGestureHandler: [TypeArguments="TapGestureHandler"] GestureHandler { - +interface TapGestureHandler: [Extends, TypeArguments="TapGestureHandler"] GestureHandler { constructor(optional TapGestureHandlerOptions options); TapGestureHandler onAction(Callback_GestureEvent_Void event); - +}; +[Entity=Class] +interface TapGestureHandler: [Extends] GestureHandler { + constructor(optional TapGestureHandlerOptions options); + this onAction(Callback_GestureEvent_Void event); }; [Entity=Interface] interface LongPressGestureHandlerOptions: BaseHandlerOptions { - [Optional] attribute number fingers; [Optional] attribute boolean repeat; [Optional] attribute number duration; - }; [Entity=Class] -interface LongPressGestureHandler: [TypeArguments="LongPressGestureHandler"] GestureHandler { - +interface LongPressGestureHandler: [Extends, TypeArguments="LongPressGestureHandler"] GestureHandler { constructor(optional LongPressGestureHandlerOptions options); LongPressGestureHandler onAction(Callback_GestureEvent_Void event); LongPressGestureHandler onActionEnd(Callback_GestureEvent_Void event); LongPressGestureHandler onActionCancel(Callback_Void event); LongPressGestureHandler onActionCancel(Callback_GestureEvent_Void event); - +}; +[Entity=Class] +interface LongPressGestureHandler: [Extends] GestureHandler { + constructor(optional LongPressGestureHandlerOptions options); + this onAction(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Interface] interface PanGestureHandlerOptions: BaseHandlerOptions { - [Optional] attribute number fingers; [Optional] attribute PanDirection direction; [Optional] attribute number distance; - + [Optional] + attribute record distanceMap; }; [Entity=Class] -interface PanGestureHandler: [TypeArguments="PanGestureHandler"] GestureHandler { - +interface PanGestureHandler: [Extends, TypeArguments="PanGestureHandler"] GestureHandler { constructor(optional PanGestureHandlerOptions options); PanGestureHandler onActionStart(Callback_GestureEvent_Void event); PanGestureHandler onActionUpdate(Callback_GestureEvent_Void event); PanGestureHandler onActionEnd(Callback_GestureEvent_Void event); PanGestureHandler onActionCancel(Callback_Void event); PanGestureHandler onActionCancel(Callback_GestureEvent_Void event); - +}; +[Entity=Class] +interface PanGestureHandler: [Extends] GestureHandler { + constructor(optional PanGestureHandlerOptions options); + this onActionStart(Callback_GestureEvent_Void event); + this onActionUpdate(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Interface] interface SwipeGestureHandlerOptions: BaseHandlerOptions { - [Optional] attribute number fingers; [Optional] attribute SwipeDirection direction; [Optional] attribute number speed; - }; [Entity=Class] -interface SwipeGestureHandler: [TypeArguments="SwipeGestureHandler"] GestureHandler { - +interface SwipeGestureHandler: [Extends, TypeArguments="SwipeGestureHandler"] GestureHandler { constructor(optional SwipeGestureHandlerOptions options); SwipeGestureHandler onAction(Callback_GestureEvent_Void event); - +}; +[Entity=Class] +interface SwipeGestureHandler: [Extends] GestureHandler { + constructor(optional SwipeGestureHandlerOptions options); + this onAction(Callback_GestureEvent_Void event); }; [Entity=Interface] interface PinchGestureHandlerOptions: BaseHandlerOptions { - [Optional] attribute number fingers; [Optional] attribute number distance; - }; [Entity=Class] -interface PinchGestureHandler: [TypeArguments="PinchGestureHandler"] GestureHandler { - +interface PinchGestureHandler: [Extends, TypeArguments="PinchGestureHandler"] GestureHandler { constructor(optional PinchGestureHandlerOptions options); PinchGestureHandler onActionStart(Callback_GestureEvent_Void event); PinchGestureHandler onActionUpdate(Callback_GestureEvent_Void event); PinchGestureHandler onActionEnd(Callback_GestureEvent_Void event); PinchGestureHandler onActionCancel(Callback_Void event); PinchGestureHandler onActionCancel(Callback_GestureEvent_Void event); - +}; +[Entity=Class] +interface PinchGestureHandler: [Extends] GestureHandler { + constructor(optional PinchGestureHandlerOptions options); + this onActionStart(Callback_GestureEvent_Void event); + this onActionUpdate(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; [Entity=Interface] interface RotationGestureHandlerOptions: BaseHandlerOptions { - [Optional] attribute number fingers; [Optional] attribute number angle; - }; [Entity=Class] -interface RotationGestureHandler: [TypeArguments="RotationGestureHandler"] GestureHandler { - +interface RotationGestureHandler: [Extends, TypeArguments="RotationGestureHandler"] GestureHandler { constructor(optional RotationGestureHandlerOptions options); RotationGestureHandler onActionStart(Callback_GestureEvent_Void event); RotationGestureHandler onActionUpdate(Callback_GestureEvent_Void event); RotationGestureHandler onActionEnd(Callback_GestureEvent_Void event); RotationGestureHandler onActionCancel(Callback_Void event); RotationGestureHandler onActionCancel(Callback_GestureEvent_Void event); - +}; +[Entity=Class] +interface RotationGestureHandler: [Extends] GestureHandler { + constructor(optional RotationGestureHandlerOptions options); + this onActionStart(Callback_GestureEvent_Void event); + this onActionUpdate(Callback_GestureEvent_Void event); + this onActionEnd(Callback_GestureEvent_Void event); + this onActionCancel(Callback_GestureEvent_Void event); }; interface GestureGroupGestureHandlerOptions { - attribute String stub; - }; [Entity=Class] -interface GestureGroupHandler: [TypeArguments="GestureGroupHandler"] GestureHandler { - +interface GestureGroupHandler: [Extends, TypeArguments="GestureGroupHandler"] GestureHandler { constructor(optional GestureGroupGestureHandlerOptions options); GestureGroupHandler onCancel(Callback_Void event); - +}; +[Entity=Class] +interface GestureGroupHandler: [Extends] GestureHandler { + constructor(optional GestureGroupGestureHandlerOptions options); + this onCancel(Callback_Void event); }; dictionary GesturePriority { - number NORMAL = 0; number PRIORITY = 1; - }; dictionary GestureRecognizerState { - number READY = 0; number DETECTING = 1; number PENDING = 2; number BLOCKED = 3; number SUCCESSFUL = 4; number FAILED = 5; - }; [Entity=Class] -interface ScrollableTargetInfo: EventTargetInfo { - +interface ScrollableTargetInfo: [Extends] EventTargetInfo { boolean isBegin(); boolean isEnd(); - }; [Entity=Class] interface EventTargetInfo { - String getId(); - +}; +[Entity=Class] +interface TouchRecognizer { + EventTargetInfo getEventTargetInfo(); + void cancelTouch(); }; [Entity=Class] interface GestureRecognizer { - String getTag(); GestureControl.GestureType getType(); boolean isBuiltIn(); @@ -510,43 +562,34 @@ interface GestureRecognizer { boolean isValid(); number getFingerCount(); boolean isFingerCountLimit(); - + void preventBegin(); }; [Entity=Class] -interface TapRecognizer: GestureRecognizer { - +interface TapRecognizer: [Extends] GestureRecognizer { number getTapCount(); - }; [Entity=Class] -interface LongPressRecognizer: GestureRecognizer { - +interface LongPressRecognizer: [Extends] GestureRecognizer { boolean isRepeat(); number getDuration(); - }; [Entity=Class] -interface SwipeRecognizer: GestureRecognizer { - +interface SwipeRecognizer: [Extends] GestureRecognizer { number getVelocityThreshold(); SwipeDirection getDirection(); - }; [Entity=Class] -interface PinchRecognizer: GestureRecognizer { - +interface PinchRecognizer: [Extends] GestureRecognizer { number getDistance(); - }; [Entity=Class] -interface RotationRecognizer: GestureRecognizer { - +interface RotationRecognizer: [Extends] GestureRecognizer { number getAngle(); - }; [Entity=Class] -interface PanRecognizer: GestureRecognizer { - +interface PanRecognizer: [Extends] GestureRecognizer { PanGestureOptions getPanGestureOptions(); - + PanDirection getDirection(); + number getDistance(); + record getDistanceMap(); }; \ No newline at end of file diff --git a/idl/Scene.idl b/idl/graphics3d.Scene.idl similarity index 63% rename from idl/Scene.idl rename to idl/graphics3d.Scene.idl index 46d3385..d3f1e50 100644 --- a/idl/Scene.idl +++ b/idl/graphics3d.Scene.idl @@ -1,4 +1,4 @@ -package graphics3d; +package graphics3d.Scene; import graphics3d.SceneResources.Shader as Shader; import graphics3d.SceneResources.MaterialType as MaterialType; import graphics3d.SceneResources.Material as Material; @@ -6,6 +6,8 @@ import graphics3d.SceneResources.Animation as Animation; import graphics3d.SceneResources.Environment as Environment; import graphics3d.SceneResources.Image as Image; import graphics3d.SceneResources.MeshResource as MeshResource; +import graphics3d.SceneResources.Sampler as Sampler; +import graphics3d.SceneResources.SceneResource as SceneResource; import graphics3d.SceneNodes.Camera as Camera; import graphics3d.SceneNodes.LightType as LightType; import graphics3d.SceneNodes.Light as Light; @@ -15,50 +17,71 @@ import graphics3d.SceneNodes.Geometry as Geometry; import graphics3d.SceneTypes.Position3 as Position3; import graphics3d.SceneTypes.Color as Color; import graphics3d.SceneTypes.GeometryDefinition as GeometryDefinition; +import graphics3d.SceneTypes.Vec2 as Vec2; +import graphics3d.SceneTypes.Vec3 as Vec3; +import graphics3d.SceneTypes.Vec4 as Vec4; [Entity=Interface] interface SceneResourceParameters { - attribute String name; [Optional] attribute ResourceStr uri; - }; [Entity=Interface] interface SceneNodeParameters { - attribute String name; [Optional] attribute String path; - }; [Entity=Interface] -interface SceneResourceFactory { - +interface RaycastResult { + attribute Node node; + attribute number centerDistance; + attribute Position3 hitPosition; +}; +[Entity=Interface] +interface RaycastParameters { + [Optional] + attribute Node rootNode; +}; +[Entity=Interface] +interface RenderResourceFactory { + async Shader createShader(SceneResourceParameters params); + async Image createImage(SceneResourceParameters params); + async MeshResource createMesh(SceneResourceParameters params, GeometryDefinition geometry); + async Sampler createSampler(SceneResourceParameters params); + async Scene createScene(optional ResourceStr uri); +}; +[Entity=Interface] +interface SceneResourceFactory: RenderResourceFactory { async Camera createCamera(SceneNodeParameters params); async Light createLight(SceneNodeParameters params, LightType lightType); async Node createNode(SceneNodeParameters params); async Material createMaterial(SceneResourceParameters params, MaterialType materialType); - async Shader createShader(SceneResourceParameters params); - async Image createImage(SceneResourceParameters params); async Environment createEnvironment(SceneResourceParameters params); async Geometry createGeometry(SceneNodeParameters params, MeshResource mesh); - async MeshResource createMesh(SceneResourceParameters params, GeometryDefinition geometry); - async Scene createScene(optional ResourceStr uri); - +}; +[Entity=Interface] +interface SceneComponent { + attribute String name; + readonly attribute record or sequence or sequence or sequence or sequence or sequence) or undefined)> property; +}; +[Entity=Interface] +interface RenderContext { + RenderResourceFactory getRenderResourceFactory(); + async boolean loadPlugin(String name); + boolean registerResourcePath(String protocol, String uri); }; [Entity=Interface] interface RenderParameters { - [Optional] attribute boolean alwaysRender; - }; [Entity=Class] interface Scene { - attribute Environment environment; readonly attribute sequence animations; readonly attribute (Node or undefined) root; + static (RenderContext or undefined) getDefaultRenderContext(); static async Scene load(optional ResourceStr uri); (Node or undefined) getNodeByPath(String path, optional NodeType type); SceneResourceFactory getResourceFactory(); @@ -66,5 +89,6 @@ interface Scene { Node importNode(String name, Node node, (Node or undefined) parent); Node importScene(String name, Scene scene, (Node or undefined) parent); boolean renderFrame(optional RenderParameters params); - + async SceneComponent createComponent(Node node, String name); + (SceneComponent or undefined) getComponent(Node node, String name); }; \ No newline at end of file diff --git a/idl/SceneNodes.idl b/idl/graphics3d.SceneNodes.idl similarity index 84% rename from idl/SceneNodes.idl rename to idl/graphics3d.SceneNodes.idl index 95437b4..dba91bb 100644 --- a/idl/SceneNodes.idl +++ b/idl/graphics3d.SceneNodes.idl @@ -1,40 +1,38 @@ package graphics3d.SceneNodes; import graphics3d.SceneResources.SceneResource as SceneResource; import graphics3d.SceneResources.Mesh as Mesh; +import graphics3d.SceneResources.Morpher as Morpher; import graphics3d.SceneTypes.Position3 as Position3; import graphics3d.SceneTypes.Quaternion as Quaternion; import graphics3d.SceneTypes.Scale3 as Scale3; import graphics3d.SceneTypes.Color as Color; +import graphics3d.SceneTypes.Vec2 as Vec2; +import graphics3d.SceneTypes.Vec3 as Vec3; import graphics3d.ScenePostProcessSettings.PostProcessSettings as PostProcessSettings; +import graphics3d.Scene.RaycastParameters as RaycastParameters; +import graphics3d.Scene.RaycastResult as RaycastResult; [Entity=Interface] interface LayerMask { - boolean getEnabled(number index); void setEnabled(number index, boolean enabled); - }; dictionary NodeType { - number NODE = 1; number GEOMETRY = 2; number CAMERA = 3; number LIGHT = 4; - }; [Entity=Interface, TypeParameters="T"] interface Container { - void append(T item); void insertAfter(T item, (T or undefined) sibling); void remove(T item); (T or undefined) get(number index); void clear(); number count(); - }; [Entity=Interface] interface Node: SceneResource { - attribute Position3 position; attribute Quaternion rotation; attribute Scale3 scale; @@ -45,48 +43,38 @@ interface Node: SceneResource { readonly attribute (Node or undefined) parent; readonly attribute [TypeArguments="Node"] Container children; (Node or undefined) getNodeByPath(String path); - }; [Entity=Interface] interface Geometry: Node { - readonly attribute Mesh mesh; - + [Optional] + readonly attribute Morpher morpher; }; dictionary LightType { - number DIRECTIONAL = 1; number SPOT = 2; - }; [Entity=Interface] interface Light: Node { - readonly attribute LightType lightType; attribute Color color; attribute number intensity; attribute boolean shadowEnabled; attribute boolean enabled; - }; [Entity=Interface] interface SpotLight: Light { - - }; [Entity=Interface] interface DirectionalLight: Light { - - }; [Entity=Interface] interface Camera: Node { - attribute number fov; attribute number nearPlane; attribute number farPlane; attribute boolean enabled; attribute (PostProcessSettings or undefined) postProcess; attribute (Color or undefined) clearColor; - + async sequence raycast(Vec2 viewPosition, RaycastParameters params); }; \ No newline at end of file diff --git a/idl/ScenePostProcessSettings.idl b/idl/graphics3d.ScenePostProcessSettings.idl similarity index 98% rename from idl/ScenePostProcessSettings.idl rename to idl/graphics3d.ScenePostProcessSettings.idl index 321bc4b..cb85eba 100644 --- a/idl/ScenePostProcessSettings.idl +++ b/idl/graphics3d.ScenePostProcessSettings.idl @@ -1,23 +1,18 @@ package graphics3d.ScenePostProcessSettings; dictionary ToneMappingType { - number ACES = 0; number ACES_2020 = 1; number FILMIC = 2; - }; [Entity=Interface] interface ToneMappingSettings { - [Optional] attribute ToneMappingType type; [Optional] attribute number exposure; - }; [Entity=Interface] interface BloomSettings { - [Optional] attribute number thresholdHard; [Optional] @@ -26,14 +21,11 @@ interface BloomSettings { attribute number scaleFactor; [Optional] attribute number scatter; - }; [Entity=Interface] interface PostProcessSettings { - [Optional] attribute ToneMappingSettings toneMapping; [Optional] attribute BloomSettings bloom; - }; \ No newline at end of file diff --git a/idl/SceneResources.idl b/idl/graphics3d.SceneResources.idl similarity index 58% rename from idl/SceneResources.idl rename to idl/graphics3d.SceneResources.idl index 79747cc..a777e57 100644 --- a/idl/SceneResources.idl +++ b/idl/graphics3d.SceneResources.idl @@ -5,7 +5,6 @@ import graphics3d.SceneTypes.Vec4 as Vec4; import graphics3d.SceneTypes.Aabb as Aabb; import ohos.base.Callback as Callback; dictionary SceneResourceType { - number UNKNOWN = 0; number NODE = 1; number ENVIRONMENT = 2; @@ -14,70 +13,128 @@ dictionary SceneResourceType { number ANIMATION = 5; number SHADER = 6; number IMAGE = 7; - + number MESH_RESOURCE = 8; }; [Entity=Interface] interface SceneResource { - attribute String name; readonly attribute SceneResourceType resourceType; [Optional] readonly attribute ResourceStr uri; void destroy(); - }; [Entity=Interface] interface Shader: SceneResource { - readonly attribute record inputs; - }; dictionary MaterialType { - number SHADER = 1; - + number METALLIC_ROUGHNESS = 2; +}; +dictionary CullMode { + number NONE = 0; + number FRONT = 1; + number BACK = 2; +}; +[Entity=Interface] +interface Blend { + attribute boolean enabled; +}; +[Entity=Interface] +interface RenderSort { + [Optional] + attribute number renderSortLayer; + [Optional] + attribute number renderSortLayerOrder; }; [Entity=Interface] interface Material: SceneResource { - readonly attribute MaterialType materialType; - + [Optional] + attribute boolean shadowReceiver; + [Optional] + attribute CullMode cullMode; + [Optional] + attribute Blend blend; + [Optional] + attribute number alphaCutoff; + [Optional] + attribute RenderSort renderSort; +}; +[Entity=Interface] +interface MaterialProperty { + attribute (Image or undefined) image; + attribute Vec4 factor; + [Optional] + attribute Sampler sampler; +}; +[Entity=Interface] +interface MetallicRoughnessMaterial: Material { + attribute MaterialProperty baseColor; + attribute MaterialProperty normal; + attribute MaterialProperty material; + attribute MaterialProperty ambientOcclusion; + attribute MaterialProperty emissive; + attribute MaterialProperty clearCoat; + attribute MaterialProperty clearCoatRoughness; + attribute MaterialProperty clearCoatNormal; + attribute MaterialProperty sheen; + attribute MaterialProperty specular; }; [Entity=Interface] interface ShaderMaterial: Material { - [Optional] attribute Shader colorShader; - +}; +dictionary SamplerFilter { + number NEAREST = 0; + number LINEAR = 1; +}; +dictionary SamplerAddressMode { + number REPEAT = 0; + number MIRRORED_REPEAT = 1; + number CLAMP_TO_EDGE = 2; +}; +[Entity=Interface] +interface Sampler { + [Optional] + attribute SamplerFilter magFilter; + [Optional] + attribute SamplerFilter minFilter; + [Optional] + attribute SamplerFilter mipMapMode; + [Optional] + attribute SamplerAddressMode addressModeU; + [Optional] + attribute SamplerAddressMode addressModeV; }; [Entity=Interface] interface SubMesh { - attribute String name; attribute Material material; readonly attribute Aabb aabb; - +}; +[Entity=Interface] +interface Morpher { + readonly attribute record targets; }; [Entity=Interface] interface Mesh: SceneResource { - readonly attribute sequence subMeshes; readonly attribute Aabb aabb; [Optional] attribute Material materialOverride; - }; [Entity=Interface] interface MeshResource: SceneResource { - - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface Animation: SceneResource { - attribute boolean enabled; + [Optional] + attribute number speed; readonly attribute number duration; readonly attribute boolean running; readonly attribute number progress; @@ -89,19 +146,15 @@ interface Animation: SceneResource { void start(); void stop(); void finish(); - }; dictionary EnvironmentBackgroundType { - number BACKGROUND_NONE = 0; number BACKGROUND_IMAGE = 1; number BACKGROUND_CUBEMAP = 2; number BACKGROUND_EQUIRECTANGULAR = 3; - }; [Entity=Interface] interface Environment: SceneResource { - attribute EnvironmentBackgroundType backgroundType; attribute Vec4 indirectDiffuseFactor; attribute Vec4 indirectSpecularFactor; @@ -112,12 +165,9 @@ interface Environment: SceneResource { attribute (Image or undefined) radianceImage; [Optional] attribute sequence irradianceCoefficients; - }; [Entity=Interface] interface Image: SceneResource { - readonly attribute number width; readonly attribute number height; - }; \ No newline at end of file diff --git a/idl/SceneTypes.idl b/idl/graphics3d.SceneTypes.idl similarity index 88% rename from idl/SceneTypes.idl rename to idl/graphics3d.SceneTypes.idl index 35e589c..98fba0a 100644 --- a/idl/SceneTypes.idl +++ b/idl/graphics3d.SceneTypes.idl @@ -1,85 +1,64 @@ package graphics3d.SceneTypes; [Entity=Interface] interface Vec2 { - attribute number x; attribute number y; - }; [Entity=Interface] interface Vec3 { - attribute number x; attribute number y; attribute number z; - }; [Entity=Interface] interface Vec4 { - attribute number x; attribute number y; attribute number z; attribute number w; - }; [Entity=Interface] interface Quaternion { - attribute number x; attribute number y; attribute number z; attribute number w; - }; [Entity=Interface] interface Aabb { - attribute Vec3 aabbMin; attribute Vec3 aabbMax; - }; [Entity=Interface] interface Color { - attribute number r; attribute number g; attribute number b; attribute number a; - }; [Entity=Interface] interface Rect { - attribute number x; attribute number y; attribute number width; attribute number height; - }; dictionary GeometryType { - number CUSTOM = 0; number CUBE = 1; number PLANE = 2; number SPHERE = 3; - }; [Entity=Class] interface GeometryDefinition { - readonly attribute GeometryType geometryType; - }; dictionary PrimitiveTopology { - number TRIANGLE_LIST = 0; number TRIANGLE_STRIP = 1; - }; [Entity=Class] -interface CustomGeometry: GeometryDefinition { - +interface CustomGeometry: [Extends] GeometryDefinition { [Optional] attribute PrimitiveTopology topology; attribute sequence vertices; @@ -91,26 +70,19 @@ interface CustomGeometry: GeometryDefinition { attribute sequence uvs; [Optional] attribute sequence colors; - }; [Entity=Class] -interface CubeGeometry: GeometryDefinition { - +interface CubeGeometry: [Extends] GeometryDefinition { attribute Vec3 size; - }; [Entity=Class] -interface PlaneGeometry: GeometryDefinition { - +interface PlaneGeometry: [Extends] GeometryDefinition { attribute Vec2 size; - }; [Entity=Class] -interface SphereGeometry: GeometryDefinition { - +interface SphereGeometry: [Extends] GeometryDefinition { attribute number radius; attribute number segmentCount; - }; typedef Vec3 Position3; typedef Vec3 Rotation3; diff --git a/idl/grid.idl b/idl/grid.idl index 4496319..ab71163 100644 --- a/idl/grid.idl +++ b/idl/grid.idl @@ -1,27 +1,39 @@ package grid; +import common.EdgeEffectOptions as EdgeEffectOptions; +import common.NestedScrollOptions as NestedScrollOptions; +import common.ItemDragInfo as ItemDragInfo; +import common.ScrollableCommonMethod as ScrollableCommonMethod; +import common.Optional as Optional; +import common.CommonMethod as CommonMethod; +import common.OnWillScrollCallback as OnWillScrollCallback; +import common.OnScrollCallback as OnScrollCallback; +import common.OnItemDragStartCallback as OnItemDragStartCallback; +import units.Length as Length; +import units.Resource as Resource; +import scroll.Scroller as Scroller; +import scroll.OnScrollFrameBeginCallback as OnScrollFrameBeginCallback; +import list.ScrollState as ScrollState; +import BarState as BarState; +import Color as Color; +import EdgeEffect as EdgeEffect; [Entity=Tuple, Synthetic] interface Tuple_Number_Number { - attribute number value0; attribute number value1; - }; [Synthetic] callback Callback_Number_Tuple_Number_Number = Tuple_Number_Number (number index); [Entity=Tuple, Synthetic] interface Tuple_Number_Number_Number_Number { - attribute number value0; attribute number value1; attribute number value2; attribute number value3; - }; [Synthetic] callback Callback_Number_Tuple_Number_Number_Number_Number = Tuple_Number_Number_Number_Number (number index); [Entity=Interface] interface GridLayoutOptions { - attribute Tuple_Number_Number regularSize; [Optional] attribute sequence irregularIndexes; @@ -29,17 +41,13 @@ interface GridLayoutOptions { attribute Callback_Number_Tuple_Number_Number onGetIrregularSizeByIndex; [Optional] attribute Callback_Number_Tuple_Number_Number_Number_Number onGetRectByIndex; - }; [Entity=Interface] interface GridInterface { - [CallSignature] GridAttribute invoke(optional Scroller scroller, optional GridLayoutOptions layoutOptions); - }; dictionary GridDirection { - [OriginalEnumMemberName=Row] number ROW = 0; [OriginalEnumMemberName=Column] @@ -48,27 +56,29 @@ dictionary GridDirection { number ROW_REVERSE = 2; [OriginalEnumMemberName=ColumnReverse] number COLUMN_REVERSE = 3; - }; dictionary GridItemAlignment { - number DEFAULT = 0; number STRETCH = 1; - }; [Entity=Interface] interface ComputedBarAttribute { - attribute number totalOffset; attribute number totalLength; - }; +[Entity=Interface] +interface UIGridEvent: UIScrollableCommonEvent { + void setOnWillScroll((OnWillScrollCallback or undefined) callback_); + void setOnDidScroll((OnScrollCallback or undefined) callback_); + void setOnScrollIndex((OnGridScrollIndexCallback or undefined) callback_); +}; +callback OnGridScrollIndexCallback = void (number first, number last); [Synthetic] callback Callback_Number_Number_ComputedBarAttribute = ComputedBarAttribute (number index, number offset); [Synthetic] callback Callback_Number_Number_Void = void (number first, number last); -[Synthetic] -callback Callback_ItemDragInfo_Number_CustomBuilder = CustomBuilder (ItemDragInfo event, number itemIndex); +[Synthetic, Synthetic] +callback GridAttribute_onItemDragStart_event_type = CustomBuilder (ItemDragInfo event, number itemIndex); [Synthetic] callback Callback_ItemDragInfo_Void = void (ItemDragInfo event); [Synthetic] @@ -79,17 +89,8 @@ callback Callback_ItemDragInfo_Number_Void = void (ItemDragInfo event, number it callback Callback_ItemDragInfo_Number_Number_Boolean_Void = void (ItemDragInfo event, number itemIndex, number insertIndex, boolean isSuccess); [Synthetic] callback Callback_Void = void (); -[Entity=Literal, Synthetic] -interface Literal_Number_offsetRemain { - - attribute number offsetRemain; - -}; -[Synthetic] -callback Callback_Number_ScrollState_Literal_Number_offsetRemain = Literal_Number_offsetRemain (number offset, ScrollState state); [Entity=Class] -interface GridAttribute: [TypeArguments="GridAttribute"] ScrollableCommonMethod { - +interface GridAttribute: [Extends, TypeArguments="GridAttribute"] ScrollableCommonMethod { GridAttribute columnsTemplate(String value); GridAttribute rowsTemplate(String value); GridAttribute columnsGap(Length value); @@ -108,7 +109,7 @@ interface GridAttribute: [TypeArguments="GridAttribute"] ScrollableCommonMethod GridAttribute cellLength(number value); GridAttribute layoutDirection(GridDirection value); GridAttribute supportAnimation(boolean value); - GridAttribute onItemDragStart(Callback_ItemDragInfo_Number_CustomBuilder event); + GridAttribute onItemDragStart(GridAttribute_onItemDragStart_event_type event); GridAttribute onItemDragEnter(Callback_ItemDragInfo_Void event); GridAttribute onItemDragMove(Callback_ItemDragInfo_Number_Number_Void event); GridAttribute onItemDragLeave(Callback_ItemDragInfo_Number_Void event); @@ -118,12 +119,15 @@ interface GridAttribute: [TypeArguments="GridAttribute"] ScrollableCommonMethod GridAttribute enableScrollInteraction(boolean value); GridAttribute friction((number or Resource) value); GridAttribute alignItems((GridItemAlignment or undefined) alignment); + GridAttribute focusWrapMode((FocusWrapMode or undefined) mode); + GridAttribute syncLoad(boolean enable); [Deprecated] - GridAttribute onScroll(Callback_Number_Number_Void event); + ([Deprecated] GridAttribute) onScroll(Callback_Number_Number_Void event); GridAttribute onReachStart(Callback_Void event); GridAttribute onReachEnd(Callback_Void event); GridAttribute onScrollStart(Callback_Void event); GridAttribute onScrollStop(Callback_Void event); - GridAttribute onScrollFrameBegin(Callback_Number_ScrollState_Literal_Number_offsetRemain event); - + GridAttribute onScrollFrameBegin(OnScrollFrameBeginCallback event); + GridAttribute onWillScroll((OnWillScrollCallback or undefined) handler); + GridAttribute onDidScroll(OnScrollCallback handler); }; \ No newline at end of file diff --git a/idl/gridItem.idl b/idl/gridItem.idl index 495efe6..f22ed54 100644 --- a/idl/gridItem.idl +++ b/idl/gridItem.idl @@ -1,29 +1,24 @@ package gridItem; +import common.CommonMethod as CommonMethod; +import common.Bindable as Bindable; dictionary GridItemStyle { - number NONE = 0; number PLAIN = 1; - }; [Entity=Interface] interface GridItemOptions { - [Optional] attribute GridItemStyle style; - }; [Entity=Interface] interface GridItemInterface { - [CallSignature] GridItemAttribute invoke(optional GridItemOptions value); - }; [Synthetic] callback Callback_Boolean_Void = void (boolean isSelected); [Entity=Class] -interface GridItemAttribute: [TypeArguments="GridItemAttribute"] CommonMethod { - +interface GridItemAttribute: [Extends, TypeArguments="GridItemAttribute"] CommonMethod { GridItemAttribute rowStart(number value); GridItemAttribute rowEnd(number value); GridItemAttribute columnStart(number value); @@ -31,7 +26,6 @@ interface GridItemAttribute: [TypeArguments="GridItemAttribute"] CommonMethod { [Deprecated] GridItemAttribute forceRebuild(boolean value); GridItemAttribute selectable(boolean value); - GridItemAttribute selected(boolean value); + GridItemAttribute selected((boolean or [TypeArguments="boolean"] Bindable) value); GridItemAttribute onSelect(Callback_Boolean_Void event); - }; \ No newline at end of file diff --git a/idl/grid_col.idl b/idl/grid_col.idl index 05ccf29..d811a9d 100644 --- a/idl/grid_col.idl +++ b/idl/grid_col.idl @@ -1,7 +1,7 @@ package grid_col; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface GridColColumnOption { - [Optional] attribute number xs; [Optional] @@ -14,31 +14,24 @@ interface GridColColumnOption { attribute number xl; [Optional] attribute number xxl; - }; [Entity=Interface] interface GridColOptions { - [Optional] attribute (number or GridColColumnOption) span; [Optional] attribute (number or GridColColumnOption) offset; [Optional] attribute (number or GridColColumnOption) order; - }; [Entity=Interface] interface GridColInterface { - [CallSignature] GridColAttribute invoke(optional GridColOptions option); - }; [Entity=Class] -interface GridColAttribute: [TypeArguments="GridColAttribute"] CommonMethod { - +interface GridColAttribute: [Extends, TypeArguments="GridColAttribute"] CommonMethod { GridColAttribute span((number or GridColColumnOption) value); GridColAttribute gridColOffset((number or GridColColumnOption) value); GridColAttribute order((number or GridColColumnOption) value); - }; \ No newline at end of file diff --git a/idl/grid_container.idl b/idl/grid_container.idl index e8c76e5..ba9df44 100644 --- a/idl/grid_container.idl +++ b/idl/grid_container.idl @@ -1,7 +1,5 @@ -package grid_container; [Deprecated] dictionary SizeType { - [Deprecated, OriginalEnumMemberName=Auto] number AUTO = 0; [Deprecated] @@ -12,11 +10,9 @@ dictionary SizeType { number MD = 3; [Deprecated] number LG = 4; - }; [Entity=Interface, Deprecated] interface GridContainerOptions { - [Optional, Deprecated] attribute (number or String) columns; [Optional, Deprecated] @@ -25,17 +21,12 @@ interface GridContainerOptions { attribute (number or String) gutter; [Optional, Deprecated] attribute (number or String) margin; - }; [Entity=Interface, Deprecated] interface GridContainerInterface { - [Deprecated, CallSignature] GridContainerAttribute invoke(optional GridContainerOptions value); - }; [Entity=Class, Deprecated] -interface GridContainerAttribute: ColumnAttribute { - - +interface GridContainerAttribute: [Extends] ColumnAttribute { }; \ No newline at end of file diff --git a/idl/grid_row.idl b/idl/grid_row.idl index 798683e..ae658d2 100644 --- a/idl/grid_row.idl +++ b/idl/grid_row.idl @@ -1,7 +1,9 @@ package grid_row; +import ItemAlign as ItemAlign; +import common.CommonMethod as CommonMethod; +import units.Length as Length; [Entity=Interface] interface GridRowSizeOption { - [Optional] attribute Length xs; [Optional] @@ -14,11 +16,9 @@ interface GridRowSizeOption { attribute Length xl; [Optional] attribute Length xxl; - }; [Entity=Interface] interface GridRowColumnOption { - [Optional] attribute number xs; [Optional] @@ -31,45 +31,35 @@ interface GridRowColumnOption { attribute number xl; [Optional] attribute number xxl; - }; [Entity=Interface] interface GutterOption { - [Optional] attribute (Length or GridRowSizeOption) x; [Optional] attribute (Length or GridRowSizeOption) y; - }; dictionary BreakpointsReference { - [OriginalEnumMemberName=WindowSize] number WINDOW_SIZE = 0; [OriginalEnumMemberName=ComponentSize] number COMPONENT_SIZE = 1; - }; dictionary GridRowDirection { - [OriginalEnumMemberName=Row] number ROW = 0; [OriginalEnumMemberName=RowReverse] number ROW_REVERSE = 1; - }; [Entity=Interface] interface BreakPoints { - [Optional] attribute sequence value; [Optional] attribute BreakpointsReference reference; - }; [Entity=Interface] interface GridRowOptions { - [Optional] attribute (Length or GutterOption) gutter; [Optional] @@ -78,21 +68,16 @@ interface GridRowOptions { attribute BreakPoints breakpoints; [Optional] attribute GridRowDirection direction; - }; [Entity=Interface] interface GridRowInterface { - [CallSignature] GridRowAttribute invoke(optional GridRowOptions option); - }; [Synthetic] callback Callback_String_Void = void (String breakpoints); [Entity=Class] -interface GridRowAttribute: [TypeArguments="GridRowAttribute"] CommonMethod { - +interface GridRowAttribute: [Extends, TypeArguments="GridRowAttribute"] CommonMethod { GridRowAttribute onBreakpointChange(Callback_String_Void callback_); GridRowAttribute alignItems(ItemAlign value); - }; \ No newline at end of file diff --git a/idl/hyperlink.idl b/idl/hyperlink.idl index 2c9227e..8ab798a 100644 --- a/idl/hyperlink.idl +++ b/idl/hyperlink.idl @@ -1,14 +1,13 @@ package hyperlink; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import Color as Color; [Entity=Interface] interface HyperlinkInterface { - [CallSignature] HyperlinkAttribute invoke((String or Resource) address, optional (String or Resource) content); - }; [Entity=Class] -interface HyperlinkAttribute: [TypeArguments="HyperlinkAttribute"] CommonMethod { - +interface HyperlinkAttribute: [Extends, TypeArguments="HyperlinkAttribute"] CommonMethod { HyperlinkAttribute color((Color or number or String or Resource) value); - }; \ No newline at end of file diff --git a/idl/image.idl b/idl/image.idl index e4ce04e..fd0bb82 100644 --- a/idl/image.idl +++ b/idl/image.idl @@ -1,36 +1,54 @@ package image; -[Import="import ('../api/@ohos.arkui.drawableDescriptor').DrawableDescriptor"] -typedef [Import="import ('../api/@ohos.arkui.drawableDescriptor').DrawableDescriptor"] DrawableDescriptor DrawableDescriptor; -[Import="import('../api/@ohos.graphics.drawing').default.ColorFilter"] -typedef [Import="import('../api/@ohos.graphics.drawing').default.ColorFilter"] DrawingColorFilter DrawingColorFilter; -[Import="import('../api/@ohos.multimedia.image').default.ResolutionQuality"] -typedef [Import="import('../api/@ohos.multimedia.image').default.ResolutionQuality"] ResolutionQuality ResolutionQuality; -[Import="import('../api/@ohos.graphics.drawing').default.Lattice"] -typedef [Import="import('../api/@ohos.graphics.drawing').default.Lattice"] DrawingLattice DrawingLattice; -[Import="import ('../api/@ohos.matrix4').default.Matrix4Transit"] -typedef [Import="import ('../api/@ohos.matrix4').default.Matrix4Transit"] ImageMatrix ImageMatrix; +import ohos.multimedia.image.default as image; +import ohos.graphics.drawing.default as drawing; +import ohos.matrix4.default as matrix4; +import ohos.base.BusinessError as BusinessError; +import ohos.arkui.drawableDescriptor.DrawableDescriptor as DrawableDescriptor; +import ImageAIOptions as ImageAIOptions; +import ImageAnalyzerConfig as ImageAnalyzerConfig; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.ColorFilter as ColorFilter; +import units.EdgeWidths as EdgeWidths; +import units.ColorMetrics as ColorMetrics; +import ImageFit as ImageFit; +import ImageRepeat as ImageRepeat; +import CopyOptions as CopyOptions; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import common.PointLightStyle as PointLightStyle; +import common.PixelMap as PixelMap; +import ohos.arkui.drawableDescriptor.DrawableDescriptor as _DrawableDescriptor; +import ohos.graphics.drawing.default.ColorFilter as _ColorFilter; +import ohos.multimedia.image.default.ResolutionQuality as _ResolutionQuality; +import ohos.graphics.drawing.default.Lattice as _Lattice; +import ohos.matrix4.default.Matrix4Transit as _Matrix4Transit; +import ohos.base.BusinessError as _BusinessError; +typedef _DrawableDescriptor DrawableDescriptor; +typedef _ColorFilter DrawingColorFilter; +typedef drawing.ColorFilter DrawingColorFilter; +typedef _ResolutionQuality ResolutionQuality; +typedef image.ResolutionQuality ResolutionQuality; +typedef _Lattice DrawingLattice; +typedef drawing.Lattice DrawingLattice; +typedef _Matrix4Transit ImageMatrix; +typedef matrix4.Matrix4Transit ImageMatrix; +typedef [TypeArguments="T"] _BusinessError BusinessError; dictionary ImageRenderMode { - [OriginalEnumMemberName=Original] number ORIGINAL = 0; [OriginalEnumMemberName=Template] number TEMPLATE = 1; - }; dictionary ImageContent { - number EMPTY = 0; - }; dictionary DynamicRangeMode { - number HIGH = 0; number CONSTRAINT = 1; number STANDARD = 2; - }; dictionary ImageInterpolation { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Low] @@ -39,44 +57,50 @@ dictionary ImageInterpolation { number MEDIUM = 2; [OriginalEnumMemberName=High] number HIGH = 3; - }; dictionary ImageRotateOrientation { - number AUTO = 0; number UP = 1; number RIGHT = 2; number DOWN = 3; number LEFT = 4; - + number UP_MIRRORED = 5; + number RIGHT_MIRRORED = 6; + number DOWN_MIRRORED = 7; + number LEFT_MIRRORED = 8; +}; +[Entity=Interface] +interface ImageCompleteEvent { + attribute number width; + attribute number height; + attribute number componentWidth; + attribute number componentHeight; + attribute number loadingStatus; + attribute number contentWidth; + attribute number contentHeight; + attribute number contentOffsetX; + attribute number contentOffsetY; }; [Entity=Interface] interface ImageInterface { - [CallSignature] ImageAttribute invoke((PixelMap or ResourceStr or DrawableDescriptor) src); [CallSignature] ImageAttribute invoke((PixelMap or ResourceStr or DrawableDescriptor or ImageContent) src); [CallSignature] ImageAttribute invoke((PixelMap or ResourceStr or DrawableDescriptor) src, ImageAIOptions imageAIOptions); - }; [Entity=Interface] interface ImageSourceSize { - attribute number width; attribute number height; - }; [Entity=Class] interface ColorContent { - static readonly attribute ColorContent ORIGIN; - }; [Entity=Literal, Synthetic] interface Type_ImageAttribute_onComplete_callback_event { - attribute number width; attribute number height; attribute number componentWidth; @@ -86,26 +110,24 @@ interface Type_ImageAttribute_onComplete_callback_event { attribute number contentHeight; attribute number contentOffsetX; attribute number contentOffsetY; - }; [Synthetic] -callback Callback_Type_ImageAttribute_onComplete_callback_event_Void = void (optional Type_ImageAttribute_onComplete_callback_event event); +callback Type_ImageAttribute_onComplete_callback = void (optional Type_ImageAttribute_onComplete_callback_event event); [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface ImageAttribute: [TypeArguments="ImageAttribute"] CommonMethod { - +interface ImageAttribute: [Extends, TypeArguments="ImageAttribute"] CommonMethod { ImageAttribute alt((String or Resource or PixelMap) value); ImageAttribute matchTextDirection(boolean value); ImageAttribute fitOriginalSize(boolean value); - ImageAttribute fillColor(ResourceColor value); - ImageAttribute fillColor((ResourceColor or ColorContent) color); + ImageAttribute fillColor((ResourceColor or ColorContent or ColorMetrics) color); ImageAttribute objectFit(ImageFit value); ImageAttribute imageMatrix(ImageMatrix matrix); ImageAttribute objectRepeat(ImageRepeat value); ImageAttribute autoResize(boolean value); ImageAttribute renderMode(ImageRenderMode value); ImageAttribute dynamicRangeMode(DynamicRangeMode value); + ImageAttribute hdrBrightness(number brightness); ImageAttribute interpolation(ImageInterpolation value); ImageAttribute sourceSize(ImageSourceSize value); ImageAttribute syncLoad(boolean value); @@ -114,32 +136,31 @@ interface ImageAttribute: [TypeArguments="ImageAttribute"] CommonMethod { ImageAttribute draggable(boolean value); ImageAttribute pointLight(PointLightStyle value); ImageAttribute edgeAntialiasing(number value); - ImageAttribute onComplete(Callback_Type_ImageAttribute_onComplete_callback_event_Void callback_); + ImageAttribute onComplete(Type_ImageAttribute_onComplete_callback callback_); + ImageAttribute onComplete(ImageOnCompleteCallback callback_); ImageAttribute onError(ImageErrorCallback callback_); ImageAttribute onFinish(Callback_Void event); ImageAttribute enableAnalyzer(boolean enable); ImageAttribute analyzerConfig(ImageAnalyzerConfig config); ImageAttribute resizable(ResizableOptions value); - ImageAttribute privacySensitive(boolean supported); ImageAttribute enhancedImageQuality(ResolutionQuality imageQuality); + ImageAttribute privacySensitive(boolean supported); ImageAttribute orientation(ImageRotateOrientation orientation); - }; callback ImageErrorCallback = void (ImageError error); +callback ImageOnCompleteCallback = void (optional ImageCompleteEvent loadEvent); [Entity=Interface] interface ImageError { - attribute number componentWidth; attribute number componentHeight; attribute String message; - + [Optional] + attribute BusinessError error; }; [Entity=Interface] interface ResizableOptions { - [Optional] attribute EdgeWidths slice; [Optional] attribute DrawingLattice lattice; - }; \ No newline at end of file diff --git a/idl/image_animator.idl b/idl/image_animator.idl index 5cf3bec..77098f4 100644 --- a/idl/image_animator.idl +++ b/idl/image_animator.idl @@ -1,14 +1,16 @@ package image_animator; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import common.PixelMap as PixelMap; +import AnimationStatus as AnimationStatus; +import FillMode as FillMode; [Entity=Interface] interface ImageAnimatorInterface { - [CallSignature] ImageAnimatorAttribute invoke(); - }; [Entity=Interface] interface ImageFrameInfo { - attribute (String or Resource or PixelMap) src; [Optional] attribute (number or String) width; @@ -20,13 +22,11 @@ interface ImageFrameInfo { attribute (number or String) left; [Optional] attribute number duration; - }; [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface ImageAnimatorAttribute: [TypeArguments="ImageAnimatorAttribute"] CommonMethod { - +interface ImageAnimatorAttribute: [Extends, TypeArguments="ImageAnimatorAttribute"] CommonMethod { ImageAnimatorAttribute images(sequence value); ImageAnimatorAttribute state(AnimationStatus value); ImageAnimatorAttribute duration(number value); @@ -42,5 +42,4 @@ interface ImageAnimatorAttribute: [TypeArguments="ImageAnimatorAttribute"] Commo ImageAnimatorAttribute onRepeat(Callback_Void event); ImageAnimatorAttribute onCancel(Callback_Void event); ImageAnimatorAttribute onFinish(Callback_Void event); - }; \ No newline at end of file diff --git a/idl/image_common.idl b/idl/image_common.idl index 7504be8..588cf24 100644 --- a/idl/image_common.idl +++ b/idl/image_common.idl @@ -1,30 +1,21 @@ -package image_common; dictionary ImageAnalyzerType { - number SUBJECT = 0; number TEXT = 1; number OBJECT_LOOKUP = 2; - }; [Entity=Class] interface ImageAnalyzerController { - constructor(); sequence getImageAnalyzerSupportTypes(); - }; [Entity=Interface] interface ImageAnalyzerConfig { - attribute sequence types; - }; [Entity=Interface] interface ImageAIOptions { - [Optional] attribute sequence types; [Optional] attribute ImageAnalyzerController aiController; - }; \ No newline at end of file diff --git a/idl/image_span.idl b/idl/image_span.idl index b8fb491..52609b8 100644 --- a/idl/image_span.idl +++ b/idl/image_span.idl @@ -1,26 +1,29 @@ package image_span; +import units.ResourceStr as ResourceStr; +import units.ColorFilter as ColorFilter; +import span.BaseSpan as BaseSpan; +import ImageSpanAlignment as ImageSpanAlignment; +import ImageFit as ImageFit; +import image.ImageErrorCallback as ImageErrorCallback; +import common.PixelMap as PixelMap; +import ohos.multimedia.image.default as image; [Entity=Interface] interface ImageSpanInterface { - [CallSignature] ImageSpanAttribute invoke((ResourceStr or PixelMap) value); - }; [Entity=Class] -interface ImageSpanAttribute: [TypeArguments="ImageSpanAttribute"] BaseSpan { - +interface ImageSpanAttribute: [Extends, TypeArguments="ImageSpanAttribute"] BaseSpan { ImageSpanAttribute verticalAlign(ImageSpanAlignment value); ImageSpanAttribute colorFilter((ColorFilter or DrawingColorFilter) filter); ImageSpanAttribute objectFit(ImageFit value); ImageSpanAttribute onComplete(ImageCompleteCallback callback_); ImageSpanAttribute onError(ImageErrorCallback callback_); ImageSpanAttribute alt(PixelMap value); - }; callback ImageCompleteCallback = void (ImageLoadResult result); [Entity=Interface] interface ImageLoadResult { - attribute number width; attribute number height; attribute number componentWidth; @@ -30,5 +33,4 @@ interface ImageLoadResult { attribute number contentHeight; attribute number contentOffsetX; attribute number contentOffsetY; - }; \ No newline at end of file diff --git a/idl/index-full.idl b/idl/index-full.idl index d5ff000..e69de29 100644 --- a/idl/index-full.idl +++ b/idl/index-full.idl @@ -1 +0,0 @@ -package index-full; \ No newline at end of file diff --git a/idl/indicatorcomponent.idl b/idl/indicatorcomponent.idl index ea1b30a..66da3d5 100644 --- a/idl/indicatorcomponent.idl +++ b/idl/indicatorcomponent.idl @@ -1,30 +1,28 @@ package indicatorcomponent; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import swiper.DotIndicator as DotIndicator; +import swiper.DigitIndicator as DigitIndicator; [Entity=Class] interface IndicatorComponentController { - constructor(); void showNext(); void showPrevious(); void changeIndex(number index, optional boolean useAnimation); - }; [Entity=Interface] interface IndicatorComponentInterface { - [CallSignature] IndicatorComponentAttribute invoke(optional IndicatorComponentController controller); - }; [Synthetic] callback Callback_Number_Void = void (number parameter); [Entity=Class] -interface IndicatorComponentAttribute: [TypeArguments="IndicatorComponentAttribute"] CommonMethod { - +interface IndicatorComponentAttribute: [Extends, TypeArguments="IndicatorComponentAttribute"] CommonMethod { IndicatorComponentAttribute initialIndex(number index); IndicatorComponentAttribute count(number totalCount); IndicatorComponentAttribute style((DotIndicator or DigitIndicator) indicatorStyle); IndicatorComponentAttribute loop(boolean isLoop); IndicatorComponentAttribute vertical(boolean isVertical); IndicatorComponentAttribute onChange(Callback_Number_Void event); - }; \ No newline at end of file diff --git a/idl/inspector.idl b/idl/inspector.idl index a44ee8f..d126581 100644 --- a/idl/inspector.idl +++ b/idl/inspector.idl @@ -1,24 +1,11 @@ -package inspector; +[Deprecated] +Object getInspectorNodes(); +[Deprecated] +Object getInspectorNodeById(number id); namespace Profiler { - [Synthetic] callback Callback_String_Void = void (String info); - [GlobalScope] - interface GlobalScope_Profiler_inspector { - - static void registerVsyncCallback(Callback_String_Void callback_); - static void unregisterVsyncCallback(); - - }; - + void registerVsyncCallback(Callback_String_Void callback_); + void unregisterVsyncCallback(); }; -[GlobalScope] -interface GlobalScope_inspector { - - [Deprecated] - static Object getInspectorNodes(); - [Deprecated] - static Object getInspectorNodeById(number id); - static void setAppBgColor(String value); - -}; \ No newline at end of file +void setAppBgColor(String value); \ No newline at end of file diff --git a/idl/isolated_component.idl b/idl/isolated_component.idl index 5429097..9144ab3 100644 --- a/idl/isolated_component.idl +++ b/idl/isolated_component.idl @@ -1,21 +1,16 @@ -package isolated_component; -[Import="import('../api/@ohos.worker').default.RestrictedWorker"] -typedef [Import="import('../api/@ohos.worker').default.RestrictedWorker"] RestrictedWorker RestrictedWorker; -[Import="import('../api/@ohos.base').ErrorCallback"] -typedef [Import="import('../api/@ohos.base').ErrorCallback"] ErrorCallback ErrorCallback; -[Import="import('../api/@ohos.app.ability.Want').default"] -typedef [Import="import('../api/@ohos.app.ability.Want').default"] Want Want; +import ohos.worker.default.RestrictedWorker as _RestrictedWorker; +import ohos.base.ErrorCallback as _ErrorCallback; +import ohos.app.ability.Want.default as _default; +typedef _RestrictedWorker RestrictedWorker; +typedef _ErrorCallback ErrorCallback; +typedef _default Want; [Entity=Interface] interface IsolatedOptions { - attribute Want want; attribute RestrictedWorker worker; - }; callback IsolatedComponentInterface = IsolatedComponentAttribute (IsolatedOptions options); [Entity=Class] -interface IsolatedComponentAttribute: [TypeArguments="IsolatedComponentAttribute"] CommonMethod { - +interface IsolatedComponentAttribute: [Extends, TypeArguments="IsolatedComponentAttribute"] CommonMethod { IsolatedComponentAttribute onError(ErrorCallback callback_); - }; \ No newline at end of file diff --git a/idl/lazy_for_each.idl b/idl/lazy_for_each.idl index e7a18f7..35abf10 100644 --- a/idl/lazy_for_each.idl +++ b/idl/lazy_for_each.idl @@ -1,70 +1,70 @@ -package lazy_for_each; dictionary DataOperationType { - String ADD = "add"; String DELETE = "delete"; String EXCHANGE = "exchange"; String MOVE = "move"; String CHANGE = "change"; String RELOAD = "reload"; - +}; +[Entity=Interface] +interface DataAddOperation { + attribute DataOperationType type; + attribute number index; + [Optional] + attribute number count; + [Optional] + attribute (String or sequence) key; }; [Entity=Interface] interface DataDeleteOperation { - attribute DataOperationType type; attribute number index; [Optional] attribute number count; - +}; +[Entity=Interface] +interface DataChangeOperation { + attribute DataOperationType type; + attribute number index; + [Optional] + attribute String key; }; [Entity=Interface] interface MoveIndex { - attribute number from; attribute number to; - }; [Entity=Interface] interface ExchangeIndex { - attribute number start; attribute number end; - }; [Entity=Interface] interface ExchangeKey { - attribute String start; attribute String end; - }; [Entity=Interface] interface DataMoveOperation { - attribute DataOperationType type; attribute MoveIndex index; [Optional] attribute String key; - }; [Entity=Interface] interface DataExchangeOperation { - attribute DataOperationType type; attribute ExchangeIndex index; [Optional] attribute ExchangeKey key; - }; -interface DataOperation { - - attribute String stub; - +[Entity=Interface] +interface DataReloadOperation { + attribute DataOperationType type; }; +typedef (DataAddOperation or DataDeleteOperation or DataChangeOperation or DataMoveOperation or DataExchangeOperation or DataReloadOperation) DataOperation; [Entity=Interface] interface DataChangeListener { - void onDataReloaded(); [Deprecated] void onDataAdded(number index); @@ -79,5 +79,4 @@ interface DataChangeListener { void onDataChanged(number index); void onDataChange(number index); void onDatasetChange(sequence dataOperations); - }; \ No newline at end of file diff --git a/idl/lazy_grid_layout.idl b/idl/lazy_grid_layout.idl new file mode 100644 index 0000000..990412c --- /dev/null +++ b/idl/lazy_grid_layout.idl @@ -0,0 +1,17 @@ +package lazy_grid_layout; +import common.CommonMethod as CommonMethod; +import LengthMetrics as LengthMetrics; +[Entity=Interface] +interface LazyVGridLayoutInterface { + [CallSignature] + LazyVGridLayoutAttribute invoke(); +}; +[Entity=Class, TypeParameters="T"] +interface LazyGridLayoutAttribute: [Extends, TypeArguments="T"] CommonMethod { + T rowsGap(LengthMetrics value); + T columnsGap(LengthMetrics value); +}; +[Entity=Class] +interface LazyVGridLayoutAttribute: [Extends, TypeArguments="LazyVGridLayoutAttribute"] LazyGridLayoutAttribute { + LazyVGridLayoutAttribute columnsTemplate(String value); +}; \ No newline at end of file diff --git a/idl/line.idl b/idl/line.idl index f786b54..cdfee06 100644 --- a/idl/line.idl +++ b/idl/line.idl @@ -1,25 +1,36 @@ package line; +import common.CommonShapeMethod as CommonShapeMethod; +import common.CommonMethod as CommonMethod; +import units.Length as Length; +[Entity=Tuple] +interface ShapePoint { + attribute Length value0; + attribute Length value1; +}; [Entity=Interface] interface LineOptions { - + [Optional] + attribute Length width; [Optional] attribute (String or number) width; [Optional] + attribute Length height; + [Optional] attribute (String or number) height; - }; [Entity=Interface] interface LineInterface { - constructor(optional LineOptions options); [CallSignature] LineAttribute invoke(optional LineOptions options); - }; [Entity=Class] -interface LineAttribute: [TypeArguments="LineAttribute"] CommonShapeMethod { - +interface LineAttribute: [Extends, TypeArguments="LineAttribute"] CommonShapeMethod { LineAttribute startPoint(sequence value); LineAttribute endPoint(sequence value); - +}; +[Entity=Interface] +interface LineInterface { + [CallSignature] + LineAttribute invoke(optional LineOptions options); }; \ No newline at end of file diff --git a/idl/linearindicator.idl b/idl/linearindicator.idl index 456009a..76f7906 100644 --- a/idl/linearindicator.idl +++ b/idl/linearindicator.idl @@ -1,26 +1,25 @@ package linearindicator; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import units.ColorMetrics as ColorMetrics; +import units.LengthMetrics as LengthMetrics; [Entity=Class] interface LinearIndicatorController { - constructor(); void setProgress(number index, number progress); void start(optional LinearIndicatorStartOptions options); void pause(); void stop(); - }; [Entity=Interface] interface LinearIndicatorStartOptions { - [Optional] attribute number interval; [Optional] attribute number duration; - }; [Entity=Interface] interface LinearIndicatorStyle { - [Optional] attribute LengthMetrics space; [Optional] @@ -31,21 +30,16 @@ interface LinearIndicatorStyle { attribute ColorMetrics trackBackgroundColor; [Optional] attribute ColorMetrics trackColor; - }; [Entity=Interface] interface LinearIndicatorInterface { - [CallSignature] LinearIndicatorAttribute invoke(optional number count, optional LinearIndicatorController controller); - }; [Entity=Class] -interface LinearIndicatorAttribute: [TypeArguments="LinearIndicatorAttribute"] CommonMethod { - +interface LinearIndicatorAttribute: [Extends, TypeArguments="LinearIndicatorAttribute"] CommonMethod { LinearIndicatorAttribute indicatorStyle((LinearIndicatorStyle or undefined) style); LinearIndicatorAttribute indicatorLoop((boolean or undefined) loop); LinearIndicatorAttribute onChange((OnLinearIndicatorChangeCallback or undefined) callback_); - }; callback OnLinearIndicatorChangeCallback = void (number index, number progress); \ No newline at end of file diff --git a/idl/list.idl b/idl/list.idl index 544c334..bde5e39 100644 --- a/idl/list.idl +++ b/idl/list.idl @@ -1,59 +1,62 @@ package list; +import common.ChildrenMainSize as ChildrenMainSize; +import common.ItemDragInfo as ItemDragInfo; +import common.RectResult as RectResult; +import common.ScrollableCommonMethod as ScrollableCommonMethod; +import common.Optional as Optional; +import common.OnWillScrollCallback as OnWillScrollCallback; +import common.OnScrollCallback as OnScrollCallback; +import common.OnItemDragStartCallback as OnItemDragStartCallback; +import Axis as Axis; +import scroll.OnScrollFrameBeginCallback as OnScrollFrameBeginCallback; +import scroll.ScrollAlign as ScrollAlign; +import scroll.Scroller as Scroller; +import units.Dimension as Dimension; +import units.Length as Length; +import units.LengthConstrain as LengthConstrain; +import units.ResourceColor as ResourceColor; dictionary ScrollState { - [OriginalEnumMemberName=Idle] number IDLE = 0; [OriginalEnumMemberName=Scroll] number SCROLL = 1; [OriginalEnumMemberName=Fling] number FLING = 2; - }; dictionary ListItemAlign { - [OriginalEnumMemberName=Start] number START = 0; [OriginalEnumMemberName=Center] number CENTER = 1; [OriginalEnumMemberName=End] number END = 2; - }; dictionary ListItemGroupArea { - number NONE = 0; number IN_LIST_ITEM_AREA = 1; number IN_HEADER_AREA = 2; number IN_FOOTER_AREA = 3; - }; dictionary StickyStyle { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Header] number HEADER = 1; [OriginalEnumMemberName=Footer] number FOOTER = 2; - }; dictionary ChainEdgeEffect { - number DEFAULT = 0; number STRETCH = 1; - }; dictionary ScrollSnapAlign { - number NONE = 0; number START = 1; number CENTER = 2; number END = 3; - }; [Entity=Interface] interface ChainAnimationOptions { - attribute Length minSpace; attribute Length maxSpace; [Optional] @@ -66,31 +69,33 @@ interface ChainAnimationOptions { attribute number stiffness; [Optional] attribute number damping; - +}; +[Entity=Interface] +interface UIListEvent: UIScrollableCommonEvent { + void setOnWillScroll((OnWillScrollCallback or undefined) callback_); + void setOnDidScroll((OnScrollCallback or undefined) callback_); + void setOnScrollIndex((OnListScrollIndexCallback or undefined) callback_); + void setOnScrollVisibleContentChange((OnScrollVisibleContentChangeCallback or undefined) callback_); }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface CloseSwipeActionOptions { - [Optional] attribute Callback_Void onFinish; - }; [Entity=Interface] interface VisibleListContentInfo { - attribute number index; [Optional] attribute ListItemGroupArea itemGroupArea; [Optional] attribute number itemIndexInGroup; - }; callback OnScrollVisibleContentChangeCallback = void (VisibleListContentInfo start, VisibleListContentInfo end); +callback OnListScrollIndexCallback = void (number start, number end, number center); [Entity=Class] -interface ListScroller: Scroller { - +interface ListScroller: [Extends] Scroller { [Throws] RectResult getItemRectInGroup(number index, number indexInGroup); [Throws] @@ -99,29 +104,23 @@ interface ListScroller: Scroller { void closeAllSwipeActions(optional CloseSwipeActionOptions options); [Throws] VisibleListContentInfo getVisibleListContentInfo(number x, number y); - }; [Entity=Interface] interface ListOptions { - [Optional] attribute number initialIndex; [Optional] attribute (number or String) space; [Optional] attribute Scroller scroller; - }; [Entity=Interface] interface ListInterface { - [CallSignature] ListAttribute invoke(optional ListOptions options); - }; [Entity=Interface] interface ListDividerOptions { - attribute Length strokeWidth; [Optional] attribute ResourceColor color; @@ -129,7 +128,6 @@ interface ListDividerOptions { attribute Length startMargin; [Optional] attribute Length endMargin; - }; [Synthetic] callback Callback_Number_Number_Number_Void = void (number start, number end, number center); @@ -137,8 +135,8 @@ callback Callback_Number_Number_Number_Void = void (number start, number end, nu callback Callback_Number_Boolean = boolean (number index); [Synthetic] callback Callback_Number_Number_Boolean = boolean (number from, number to); -[Synthetic] -callback Callback_ItemDragInfo_Number_CustomBuilder = CustomBuilder (ItemDragInfo event, number itemIndex); +[Synthetic, Synthetic] +callback ListAttribute_onItemDragStart_event_type = CustomBuilder (ItemDragInfo event, number itemIndex); [Synthetic] callback Callback_ItemDragInfo_Void = void (ItemDragInfo event); [Synthetic] @@ -147,17 +145,8 @@ callback Callback_ItemDragInfo_Number_Number_Void = void (ItemDragInfo event, nu callback Callback_ItemDragInfo_Number_Void = void (ItemDragInfo event, number itemIndex); [Synthetic] callback Callback_ItemDragInfo_Number_Number_Boolean_Void = void (ItemDragInfo event, number itemIndex, number insertIndex, boolean isSuccess); -[Entity=Literal, Synthetic] -interface Literal_Number_offsetRemain { - - attribute number offsetRemain; - -}; -[Synthetic] -callback Callback_Number_ScrollState_Literal_Number_offsetRemain = Literal_Number_offsetRemain (number offset, ScrollState state); [Entity=Class] -interface ListAttribute: [TypeArguments="ListAttribute"] ScrollableCommonMethod { - +interface ListAttribute: [Extends, TypeArguments="ListAttribute"] ScrollableCommonMethod { ListAttribute lanes((number or LengthConstrain) value, optional Dimension gutter); ListAttribute alignListItem(ListItemAlign value); ListAttribute listDirection(Axis value); @@ -181,8 +170,10 @@ interface ListAttribute: [TypeArguments="ListAttribute"] ScrollableCommonMethod ListAttribute childrenMainSize(ChildrenMainSize value); ListAttribute maintainVisibleContentPosition(boolean enabled); ListAttribute stackFromEnd(boolean enabled); + ListAttribute focusWrapMode((FocusWrapMode or undefined) mode); + ListAttribute syncLoad(boolean enable); [Deprecated] - ListAttribute onScroll(Callback_Number_Number_Void event); + ([Deprecated] ListAttribute) onScroll(Callback_Number_Number_Void event); ListAttribute onScrollIndex(Callback_Number_Number_Number_Void event); ListAttribute onScrollVisibleContentChange(OnScrollVisibleContentChangeCallback handler); ListAttribute onReachStart(Callback_Void event); @@ -192,11 +183,12 @@ interface ListAttribute: [TypeArguments="ListAttribute"] ScrollableCommonMethod [Deprecated] ListAttribute onItemDelete(Callback_Number_Boolean event); ListAttribute onItemMove(Callback_Number_Number_Boolean event); - ListAttribute onItemDragStart(Callback_ItemDragInfo_Number_CustomBuilder event); + ListAttribute onItemDragStart(ListAttribute_onItemDragStart_event_type event); ListAttribute onItemDragEnter(Callback_ItemDragInfo_Void event); ListAttribute onItemDragMove(Callback_ItemDragInfo_Number_Number_Void event); ListAttribute onItemDragLeave(Callback_ItemDragInfo_Number_Void event); ListAttribute onItemDrop(Callback_ItemDragInfo_Number_Number_Boolean_Void event); - ListAttribute onScrollFrameBegin(Callback_Number_ScrollState_Literal_Number_offsetRemain event); - + ListAttribute onScrollFrameBegin(OnScrollFrameBeginCallback event); + ListAttribute onWillScroll((OnWillScrollCallback or undefined) handler); + ListAttribute onDidScroll(OnScrollCallback handler); }; \ No newline at end of file diff --git a/idl/list_item.idl b/idl/list_item.idl index 30ea623..26cd540 100644 --- a/idl/list_item.idl +++ b/idl/list_item.idl @@ -1,40 +1,36 @@ package list_item; +import common.CommonMethod as CommonMethod; +import CustomBuilder as CustomBuilder; +import units.Length as Length; +import ComponentContent as ComponentContent; [Deprecated] dictionary Sticky { - [Deprecated, OriginalEnumMemberName=None] number NONE = 0; [Deprecated, OriginalEnumMemberName=Normal] number NORMAL = 1; [Deprecated, OriginalEnumMemberName=Opacity] number OPACITY = 2; - }; [Deprecated] dictionary EditMode { - [Deprecated, OriginalEnumMemberName=None] number NONE = 0; [Deprecated, OriginalEnumMemberName=Deletable] number DELETABLE = 1; [Deprecated, OriginalEnumMemberName=Movable] number MOVABLE = 2; - }; dictionary SwipeEdgeEffect { - [OriginalEnumMemberName=Spring] number SPRING = 0; [OriginalEnumMemberName=None] number NONE = 1; - }; dictionary SwipeActionState { - number COLLAPSED = 0; number EXPANDED = 1; number ACTIONING = 2; - }; [Synthetic] callback Callback_Void = void (); @@ -42,7 +38,6 @@ callback Callback_Void = void (); callback Callback_SwipeActionState_Void = void (SwipeActionState state); [Entity=Interface] interface SwipeActionItem { - [Optional] attribute CustomBuilder builder; [Optional] @@ -57,13 +52,11 @@ interface SwipeActionItem { attribute Callback_Void onExitActionArea; [Optional] attribute Callback_SwipeActionState_Void onStateChange; - }; [Synthetic] callback Callback_Number_Void = void (number offset); [Entity=Interface] interface SwipeActionOptions { - [Optional] attribute (CustomBuilder or SwipeActionItem) start; [Optional] @@ -72,35 +65,27 @@ interface SwipeActionOptions { attribute SwipeEdgeEffect edgeEffect; [Optional] attribute Callback_Number_Void onOffsetChange; - }; dictionary ListItemStyle { - number NONE = 0; number CARD = 1; - }; [Entity=Interface] interface ListItemOptions { - [Optional] attribute ListItemStyle style; - }; [Entity=Interface] interface ListItemInterface { - [CallSignature] ListItemAttribute invoke(optional ListItemOptions value); [Deprecated, CallSignature] ListItemAttribute invoke(optional String value); - }; [Synthetic] callback Callback_Boolean_Void = void (boolean isSelected); [Entity=Class] -interface ListItemAttribute: [TypeArguments="ListItemAttribute"] CommonMethod { - +interface ListItemAttribute: [Extends, TypeArguments="ListItemAttribute"] CommonMethod { [Deprecated] ListItemAttribute sticky(Sticky value); [Deprecated] @@ -109,5 +94,4 @@ interface ListItemAttribute: [TypeArguments="ListItemAttribute"] CommonMethod { ListItemAttribute selected(boolean value); ListItemAttribute swipeAction(SwipeActionOptions value); ListItemAttribute onSelect(Callback_Boolean_Void event); - }; \ No newline at end of file diff --git a/idl/list_item_group.idl b/idl/list_item_group.idl index f5da0d0..81ca230 100644 --- a/idl/list_item_group.idl +++ b/idl/list_item_group.idl @@ -1,13 +1,15 @@ package list_item_group; +import common.ChildrenMainSize as ChildrenMainSize; +import common.CommonMethod as CommonMethod; +import CustomBuilder as CustomBuilder; +import ComponentContent as ComponentContent; +import list.ListDividerOptions as ListDividerOptions; dictionary ListItemGroupStyle { - number NONE = 0; number CARD = 1; - }; [Entity=Interface] interface ListItemGroupOptions { - [Optional] attribute CustomBuilder header; [Optional] @@ -20,19 +22,14 @@ interface ListItemGroupOptions { attribute (number or String) space; [Optional] attribute ListItemGroupStyle style; - }; [Entity=Interface] interface ListItemGroupInterface { - [CallSignature] ListItemGroupAttribute invoke(optional ListItemGroupOptions options); - }; [Entity=Class] -interface ListItemGroupAttribute: [TypeArguments="ListItemGroupAttribute"] CommonMethod { - +interface ListItemGroupAttribute: [Extends, TypeArguments="ListItemGroupAttribute"] CommonMethod { ListItemGroupAttribute divider((ListDividerOptions or undefined) value); ListItemGroupAttribute childrenMainSize(ChildrenMainSize value); - }; \ No newline at end of file diff --git a/idl/loading_progress.idl b/idl/loading_progress.idl index f78db8a..d5f9d1e 100644 --- a/idl/loading_progress.idl +++ b/idl/loading_progress.idl @@ -1,32 +1,28 @@ package loading_progress; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; +import common.CommonConfiguration as CommonConfiguration; +import units.ResourceColor as ResourceColor; dictionary LoadingProgressStyle { - [OriginalEnumMemberName=Default] number DEFAULT = 0; [OriginalEnumMemberName=Circular] number CIRCULAR = 1; [OriginalEnumMemberName=Orbital] number ORBITAL = 2; - }; [Entity=Interface] interface LoadingProgressInterface { - [CallSignature] LoadingProgressAttribute invoke(); - }; [Entity=Class] -interface LoadingProgressAttribute: [TypeArguments="LoadingProgressAttribute"] CommonMethod { - +interface LoadingProgressAttribute: [Extends, TypeArguments="LoadingProgressAttribute"] CommonMethod { LoadingProgressAttribute color(ResourceColor value); LoadingProgressAttribute enableLoading(boolean value); LoadingProgressAttribute contentModifier([TypeArguments="LoadingProgressConfiguration"] ContentModifier modifier); - }; [Entity=Interface] interface LoadingProgressConfiguration: [TypeArguments="LoadingProgressConfiguration"] CommonConfiguration { - attribute boolean enableLoading; - }; \ No newline at end of file diff --git a/idl/location_button.idl b/idl/location_button.idl deleted file mode 100644 index ce5c866..0000000 --- a/idl/location_button.idl +++ /dev/null @@ -1,73 +0,0 @@ -package location_button; -[Deprecated] -dictionary LocationIconStyle { - - [Deprecated] - number FULL_FILLED = 0; - [Deprecated] - number LINES = 1; - -}; -[Deprecated] -dictionary LocationDescription { - - [Deprecated] - number CURRENT_LOCATION = 0; - [Deprecated] - number ADD_LOCATION = 1; - [Deprecated] - number SELECT_LOCATION = 2; - [Deprecated] - number SHARE_LOCATION = 3; - [Deprecated] - number SEND_LOCATION = 4; - [Deprecated] - number LOCATING = 5; - [Deprecated] - number LOCATION = 6; - [Deprecated] - number SEND_CURRENT_LOCATION = 7; - [Deprecated] - number RELOCATION = 8; - [Deprecated] - number PUNCH_IN = 9; - [Deprecated] - number CURRENT_POSITION = 10; - -}; -[Entity=Interface, Deprecated] -interface LocationButtonOptions { - - [Optional, Deprecated] - attribute LocationIconStyle icon; - [Optional, Deprecated] - attribute LocationDescription text; - [Optional, Deprecated] - attribute ButtonType buttonType; - -}; -[Deprecated] -dictionary LocationButtonOnClickResult { - - [Deprecated] - number SUCCESS = 0; - [Deprecated] - number TEMPORARY_AUTHORIZATION_FAILED = 1; - -}; -[Entity=Interface, Deprecated] -interface LocationButtonInterface { - - [Deprecated, CallSignature] - LocationButtonAttribute invoke(); - [Deprecated, CallSignature] - LocationButtonAttribute invoke(LocationButtonOptions options); - -}; -callback LocationButtonCallback = void (ClickEvent event, LocationButtonOnClickResult result, optional [TypeArguments="void"] BusinessError error); -[Entity=Class, Deprecated] -interface LocationButtonAttribute: [TypeArguments="LocationButtonAttribute"] SecurityComponentMethod { - - LocationButtonAttribute onClick(LocationButtonCallback event); - -}; \ No newline at end of file diff --git a/idl/marquee.idl b/idl/marquee.idl index 149182e..84d9bc7 100644 --- a/idl/marquee.idl +++ b/idl/marquee.idl @@ -1,7 +1,12 @@ package marquee; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import common.CommonMethod as CommonMethod; +import FontWeight as FontWeight; +import MarqueeUpdateStrategy as MarqueeUpdateStrategy; +import resource.Resource as Resource; [Entity=Interface] interface MarqueeOptions { - attribute boolean start; [Optional] attribute number step; @@ -10,20 +15,16 @@ interface MarqueeOptions { [Optional] attribute boolean fromStart; attribute String src; - }; [Entity=Interface] interface MarqueeInterface { - [CallSignature] MarqueeAttribute invoke(MarqueeOptions options); - }; [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface MarqueeAttribute: [TypeArguments="MarqueeAttribute"] CommonMethod { - +interface MarqueeAttribute: [Extends, TypeArguments="MarqueeAttribute"] CommonMethod { MarqueeAttribute fontColor(ResourceColor value); MarqueeAttribute fontSize(Length value); MarqueeAttribute allowScale(boolean value); @@ -33,5 +34,4 @@ interface MarqueeAttribute: [TypeArguments="MarqueeAttribute"] CommonMethod { MarqueeAttribute onStart(Callback_Void event); MarqueeAttribute onBounce(Callback_Void event); MarqueeAttribute onFinish(Callback_Void event); - }; \ No newline at end of file diff --git a/idl/matrix2d.idl b/idl/matrix2d.idl index 832b5e1..d55c7eb 100644 --- a/idl/matrix2d.idl +++ b/idl/matrix2d.idl @@ -1,7 +1,7 @@ package matrix2d; +import LengthMetricsUnit as LengthMetricsUnit; [Entity=Class] interface Matrix2D { - constructor(); constructor(LengthMetricsUnit unit); [Optional] @@ -25,5 +25,4 @@ interface Matrix2D { Matrix2D rotate(number degree, optional number rx, optional number ry); Matrix2D translate(optional number tx, optional number ty); Matrix2D scale(optional number sx, optional number sy); - }; \ No newline at end of file diff --git a/idl/media_cached_image.idl b/idl/media_cached_image.idl index 293ac1a..52a1617 100644 --- a/idl/media_cached_image.idl +++ b/idl/media_cached_image.idl @@ -1,20 +1,20 @@ package media_cached_image; +import image.ImageAttribute as ImageAttribute; +import ohos.multimedia.image.default as image; +import units.ResourceStr as ResourceStr; +import ohos.arkui.drawableDescriptor.DrawableDescriptor as DrawableDescriptor; [Entity=Interface] interface ASTCResource { - attribute sequence sources; attribute number column; - }; [Entity=Interface] interface MediaCachedImageInterface { - [CallSignature] MediaCachedImageAttribute invoke((PixelMap or ResourceStr or DrawableDescriptor or ASTCResource) src); - + [CallSignature] + MediaCachedImageAttribute invoke((image.PixelMap or ResourceStr or DrawableDescriptor or ASTCResource) src); }; [Entity=Class] -interface MediaCachedImageAttribute: ImageAttribute { - - +interface MediaCachedImageAttribute: [Extends] ImageAttribute { }; \ No newline at end of file diff --git a/idl/menu.idl b/idl/menu.idl index ffb3702..6411b01 100644 --- a/idl/menu.idl +++ b/idl/menu.idl @@ -1,21 +1,23 @@ package menu; +import common.CommonMethod as CommonMethod; +import units.Length as Length; +import units.Font as Font; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.BorderRadiuses as BorderRadiuses; +import units.DividerStyleOptions as DividerStyleOptions; [Entity=Interface] interface MenuInterface { - [CallSignature] MenuAttribute invoke(); - }; dictionary SubMenuExpandingMode { - number SIDE_EXPAND = 0; number EMBEDDED_EXPAND = 1; number STACK_EXPAND = 2; - }; [Entity=Class] -interface MenuAttribute: [TypeArguments="MenuAttribute"] CommonMethod { - +interface MenuAttribute: [Extends, TypeArguments="MenuAttribute"] CommonMethod { [Deprecated] MenuAttribute fontSize(Length value); MenuAttribute font(Font value); @@ -24,5 +26,5 @@ interface MenuAttribute: [TypeArguments="MenuAttribute"] CommonMethod { MenuAttribute menuItemDivider((DividerStyleOptions or undefined) options); MenuAttribute menuItemGroupDivider((DividerStyleOptions or undefined) options); MenuAttribute subMenuExpandingMode(SubMenuExpandingMode mode); - + MenuAttribute subMenuExpandSymbol(SymbolGlyphModifier symbol); }; \ No newline at end of file diff --git a/idl/menu_item.idl b/idl/menu_item.idl index 81f8a54..930d8bd 100644 --- a/idl/menu_item.idl +++ b/idl/menu_item.idl @@ -1,7 +1,12 @@ package menu_item; +import units.ResourceStr as ResourceStr; +import units.Font as Font; +import units.ResourceColor as ResourceColor; +import common.CommonMethod as CommonMethod; +import CustomBuilder as CustomBuilder; +import arkui.SymbolGlyphModifier.SymbolGlyphModifier as SymbolGlyphModifier; [Entity=Interface] interface MenuItemOptions { - [Optional] attribute ResourceStr startIcon; [Optional] @@ -16,20 +21,16 @@ interface MenuItemOptions { attribute ResourceStr labelInfo; [Optional] attribute CustomBuilder builder; - }; [Entity=Interface] interface MenuItemInterface { - [CallSignature] MenuItemAttribute invoke(optional (MenuItemOptions or CustomBuilder) value); - }; [Synthetic] callback Callback_Boolean_Void = void (boolean selected); [Entity=Class] -interface MenuItemAttribute: [TypeArguments="MenuItemAttribute"] CommonMethod { - +interface MenuItemAttribute: [Extends, TypeArguments="MenuItemAttribute"] CommonMethod { MenuItemAttribute selected(boolean value); MenuItemAttribute selectIcon((boolean or ResourceStr or SymbolGlyphModifier) value); MenuItemAttribute onChange(Callback_Boolean_Void callback_); @@ -37,5 +38,4 @@ interface MenuItemAttribute: [TypeArguments="MenuItemAttribute"] CommonMethod { MenuItemAttribute contentFontColor(ResourceColor value); MenuItemAttribute labelFont(Font value); MenuItemAttribute labelFontColor(ResourceColor value); - }; \ No newline at end of file diff --git a/idl/menu_item_group.idl b/idl/menu_item_group.idl index 3625483..a97485c 100644 --- a/idl/menu_item_group.idl +++ b/idl/menu_item_group.idl @@ -1,22 +1,19 @@ package menu_item_group; +import common.CommonMethod as CommonMethod; +import CustomBuilder as CustomBuilder; +import units.ResourceStr as ResourceStr; [Entity=Interface] interface MenuItemGroupOptions { - [Optional] attribute (ResourceStr or CustomBuilder) header; [Optional] attribute (ResourceStr or CustomBuilder) footer; - }; [Entity=Interface] interface MenuItemGroupInterface { - [CallSignature] MenuItemGroupAttribute invoke(optional MenuItemGroupOptions value); - }; [Entity=Class] -interface MenuItemGroupAttribute: [TypeArguments="MenuItemGroupAttribute"] CommonMethod { - - +interface MenuItemGroupAttribute: [Extends, TypeArguments="MenuItemGroupAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/ringtonePlayer.idl b/idl/multimedia.ringtonePlayer.idl similarity index 77% rename from idl/ringtonePlayer.idl rename to idl/multimedia.ringtonePlayer.idl index 05a426d..2eede78 100644 --- a/idl/ringtonePlayer.idl +++ b/idl/multimedia.ringtonePlayer.idl @@ -1,30 +1,27 @@ package multimedia.ringtonePlayer; import ohos.base.Callback as Callback; import ohos.base.AsyncCallback as AsyncCallback; -import ohos.multimedia.audio as audio; -import ohos.multimedia.media as media; +import ohos.multimedia.audio.default as audio; +import ohos.multimedia.media.default as media; [Entity=Interface] interface RingtoneOptions { - attribute number volume; attribute boolean loop; - }; [Async, Synthetic] callback AsyncCallback_String_Void = void (String result); [Async, Synthetic] -callback AsyncCallback_audio_AudioRendererInfo_Void = void (audio.AudioRendererInfo result); +callback AsyncCallback_Audio_AudioRendererInfo_Void = void (audio.AudioRendererInfo result); [Async, Synthetic] callback AsyncCallback_Void = void (); [Synthetic] -callback Callback_audio_InterruptEvent_Void = void (audio.InterruptEvent parameter); +callback Callback_Audio_InterruptEvent_Void = void (audio.InterruptEvent parameter); [Entity=Interface] interface RingtonePlayer { - readonly attribute media.AVPlayerState state; void getTitle(AsyncCallback_String_Void callback_); async String getTitle(); - void getAudioRendererInfo(AsyncCallback_audio_AudioRendererInfo_Void callback_); + void getAudioRendererInfo(AsyncCallback_Audio_AudioRendererInfo_Void callback_); async audio.AudioRendererInfo getAudioRendererInfo(); void configure(RingtoneOptions options, AsyncCallback_Void callback_); async void configure(RingtoneOptions options); @@ -35,8 +32,7 @@ interface RingtonePlayer { void release(AsyncCallback_Void callback_); async void release(); [Throws, DtsName="on", DtsTag="'audioInterrupt'"] - void onAudioInterrupt(Callback_audio_InterruptEvent_Void callback_); + void onAudioInterrupt(Callback_Audio_InterruptEvent_Void callback_); [Throws, DtsName="off", DtsTag="'audioInterrupt'"] void offAudioInterrupt(); - }; \ No newline at end of file diff --git a/idl/soundPool.idl b/idl/multimedia.soundPool.idl similarity index 79% rename from idl/soundPool.idl rename to idl/multimedia.soundPool.idl index a691187..d9031ad 100644 --- a/idl/soundPool.idl +++ b/idl/multimedia.soundPool.idl @@ -2,10 +2,26 @@ package multimedia.soundPool; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; -import ohos.multimedia.audio as audio; +import ohos.base.BusinessError as BusinessError; +import ohos.multimedia.audio.default as audio; +import ohos.multimedia.media.default as media; +import ohos.resourceManager.default as resourceManager; +dictionary ErrorType { + number LOAD_ERROR = 1; + number PLAY_ERROR = 2; +}; +[Entity=Interface, TypeParameters="T"] +interface ErrorInfo { + attribute T errorCode; + [Optional] + attribute ErrorType errorType; + [Optional] + attribute number soundId; + [Optional] + attribute number streamId; +}; [Entity=Interface] interface PlayParameters { - [Optional] attribute number loop; [Optional] @@ -18,7 +34,6 @@ interface PlayParameters { attribute number priority; [Optional] attribute boolean parallelPlayFlag; - }; [Async, Synthetic] callback AsyncCallback_Number_Void = void (number result); @@ -28,9 +43,10 @@ callback AsyncCallback_Void = void (); callback Callback_Number_Void = void (number parameter); [Synthetic] callback Callback_Void = void (); +[Synthetic] +callback Callback_ErrorInfo_Void = void (ErrorInfo parameter); [Entity=Interface] interface SoundPool { - [Throws] void load(String uri, AsyncCallback_Number_Void callback_); [Throws] @@ -75,19 +91,22 @@ interface SoundPool { async void release(); [DtsName="on", DtsTag="'loadComplete'"] void onLoadComplete(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'loadComplete'"] - void offLoadComplete(); [DtsName="on", DtsTag="'playFinishedWithStreamId'"] void onPlayFinishedWithStreamId(Callback_Number_Void callback_); - [DtsName="off", DtsTag="'playFinishedWithStreamId'"] - void offPlayFinishedWithStreamId(); [DtsName="on", DtsTag="'playFinished'"] void onPlayFinished(Callback_Void callback_); - [DtsName="off", DtsTag="'playFinished'"] - void offPlayFinished(); [DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [DtsName="on", DtsTag="'errorOccurred'"] + void onErrorOccurred(Callback_ErrorInfo_Void callback_); + [DtsName="off", DtsTag="'loadComplete'"] + void offLoadComplete(); + [DtsName="off", DtsTag="'playFinishedWithStreamId'"] + void offPlayFinishedWithStreamId(); + [DtsName="off", DtsTag="'playFinished'"] + void offPlayFinished(); [DtsName="off", DtsTag="'error'"] void offError(); - + [DtsName="off", DtsTag="'errorOccurred'"] + void offErrorOccurred(optional Callback_ErrorInfo_Void callback_); }; \ No newline at end of file diff --git a/idl/systemTonePlayer.idl b/idl/multimedia.systemTonePlayer.idl similarity index 95% rename from idl/systemTonePlayer.idl rename to idl/multimedia.systemTonePlayer.idl index 36c9182..6277c7c 100644 --- a/idl/systemTonePlayer.idl +++ b/idl/multimedia.systemTonePlayer.idl @@ -1,12 +1,11 @@ package multimedia.systemTonePlayer; -import ohos.multimedia.systemSoundManager as systemSoundManager; +import ohos.multimedia.systemSoundManager.default as systemSoundManager; import ohos.base.ErrorCallback as ErrorCallback; import ohos.base.Callback as Callback; [Synthetic] callback Callback_Number_Void = void (number parameter); [Entity=Interface] interface SystemTonePlayer { - [Throws] async String getTitle(); [Throws] @@ -29,20 +28,17 @@ interface SystemTonePlayer { async void release(); [Throws, DtsName="on", DtsTag="'playFinished'"] void onPlayFinished(number streamId, Callback_Number_Void callback_); - [Throws, DtsName="off", DtsTag="'playFinished'"] - void offPlayFinished(optional Callback_Number_Void callback_); [Throws, DtsName="on", DtsTag="'error'"] void onError(ErrorCallback callback_); + [Throws, DtsName="off", DtsTag="'playFinished'"] + void offPlayFinished(optional Callback_Number_Void callback_); [Throws, DtsName="off", DtsTag="'error'"] void offError(optional ErrorCallback callback_); - }; [Entity=Interface] interface SystemToneOptions { - [Optional] attribute boolean muteAudio; [Optional] attribute boolean muteHaptics; - }; \ No newline at end of file diff --git a/idl/nav_destination.idl b/idl/nav_destination.idl index 205c0f6..bf290df 100644 --- a/idl/nav_destination.idl +++ b/idl/nav_destination.idl @@ -1,20 +1,43 @@ package nav_destination; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.LayoutSafeAreaType as LayoutSafeAreaType; +import common.LayoutSafeAreaEdge as LayoutSafeAreaEdge; +import common.Optional as Optional; +import common.PixelMap as PixelMap; +import CustomBuilder as CustomBuilder; +import units.Length as Length; +import units.ResourceStr as ResourceStr; +import TitleHeight as TitleHeight; +import Curve as Curve; +import navigation.NavPathInfo as NavPathInfo; +import navigation.NavPathStack as NavPathStack; +import navigation.NavigationTitleOptions as NavigationTitleOptions; +import navigation.NavigationMenuItem as NavigationMenuItem; +import navigation.NavigationToolbarOptions as NavigationToolbarOptions; +import navigation.ToolbarItem as ToolbarItem; +import navigation.NavigationMenuOptions as NavigationMenuOptions; +import navigation.NavigationOperation as NavigationOperation; +import navigation.SystemBarStyle as SystemBarStyle; +import arkui.SymbolGlyphModifier.SymbolGlyphModifier as SymbolGlyphModifier; +import ohos.window.default as window; +import ohos.multimedia.image.default as image; +import scroll.Scroller as Scroller; +import ohos.window.default.Orientation as _Orientation; +typedef _Orientation Orientation; +typedef window.Orientation Orientation; [Entity=Interface] interface NavDestinationCommonTitle { - attribute (String or Resource) main; attribute (String or Resource) sub; - }; [Entity=Interface] interface NavDestinationCustomTitle { - attribute CustomBuilder builder; attribute (TitleHeight or Length) height; - }; dictionary NavigationSystemTransitionType { - number DEFAULT = 0; number NONE = 1; number TITLE = 2; @@ -23,61 +46,47 @@ dictionary NavigationSystemTransitionType { number EXPLODE = 5; number SLIDE_RIGHT = 6; number SLIDE_BOTTOM = 7; - }; dictionary NavDestinationMode { - number STANDARD = 0; number DIALOG = 1; - }; dictionary NavDestinationActiveReason { - number TRANSITION = 0; number CONTENT_COVER = 1; number SHEET = 2; number DIALOG = 3; number OVERLAY = 4; number APP_STATE = 5; - }; [Entity=Interface] interface NavDestinationInterface { - [CallSignature] NavDestinationAttribute invoke(); - }; [Entity=Interface] interface RouteMapConfig { - attribute String name; attribute String pageSourceFile; attribute Object data; - }; [Entity=Interface] interface NavDestinationContext { - attribute NavPathInfo pathInfo; attribute NavPathStack pathStack; [Optional] attribute String navDestinationId; (RouteMapConfig or undefined) getConfigInRouteMap(); - }; [Entity=Interface] interface NestedScrollInfo { - attribute Scroller parent; attribute Scroller child; - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface NavDestinationTransition { - [Optional] attribute Callback_Void onTransitionEnd; [Optional] @@ -87,7 +96,6 @@ interface NavDestinationTransition { [Optional] attribute number delay; attribute Callback_Void event; - }; [Synthetic] callback Callback_Boolean = boolean (); @@ -97,9 +105,10 @@ callback Callback_Object_Void = void (Object parameter); callback Callback_NavDestinationContext_Void = void (NavDestinationContext parameter); [Synthetic] callback Callback_NavDestinationActiveReason_Void = void (NavDestinationActiveReason parameter); +[Synthetic] +callback Callback_Opt_Object_Void = void ((Object or undefined) parameter); [Entity=Class] -interface NavDestinationAttribute: [TypeArguments="NavDestinationAttribute"] CommonMethod { - +interface NavDestinationAttribute: [Extends, TypeArguments="NavDestinationAttribute"] CommonMethod { NavDestinationAttribute title((String or CustomBuilder or NavDestinationCommonTitle or NavDestinationCustomTitle or Resource) value, optional NavigationTitleOptions options); NavDestinationAttribute hideTitleBar(boolean value); NavDestinationAttribute hideTitleBar(boolean hide, boolean animated); @@ -109,11 +118,12 @@ interface NavDestinationAttribute: [TypeArguments="NavDestinationAttribute"] Com NavDestinationAttribute onBackPressed(Callback_Boolean callback_); NavDestinationAttribute onResult((Callback_Object_Void or undefined) callback_); NavDestinationAttribute mode(NavDestinationMode value); - NavDestinationAttribute backButtonIcon((ResourceStr or PixelMap or SymbolGlyphModifier) value); - NavDestinationAttribute menus((sequence or CustomBuilder) value); + NavDestinationAttribute backButtonIcon((ResourceStr or PixelMap or SymbolGlyphModifier) icon, optional ResourceStr accessibilityText); + NavDestinationAttribute menus((sequence or CustomBuilder) items, optional NavigationMenuOptions options); NavDestinationAttribute toolbarConfiguration((sequence or CustomBuilder) toolbarParam, optional NavigationToolbarOptions options); NavDestinationAttribute hideToolBar(boolean hide, optional boolean animated); NavDestinationAttribute onReady(Callback_NavDestinationContext_Void callback_); + NavDestinationAttribute onReady(Callback_NavDestinationContext_Void callback_); NavDestinationAttribute onWillAppear(Callback_Void callback_); NavDestinationAttribute onWillDisappear(Callback_Void callback_); NavDestinationAttribute onWillShow(Callback_Void callback_); @@ -127,6 +137,10 @@ interface NavDestinationAttribute: [TypeArguments="NavDestinationAttribute"] Com NavDestinationAttribute onActive((Callback_NavDestinationActiveReason_Void or undefined) callback_); NavDestinationAttribute onInactive((Callback_NavDestinationActiveReason_Void or undefined) callback_); NavDestinationAttribute customTransition(NavDestinationTransitionDelegate delegate); - + NavDestinationAttribute onNewParam((Callback_Object_Void or undefined) callback_); + NavDestinationAttribute onNewParam((Callback_Opt_Object_Void or undefined) callback_); + NavDestinationAttribute preferredOrientation((Orientation or undefined) orientation); + NavDestinationAttribute enableStatusBar((boolean or undefined) enabled, optional boolean animated); + NavDestinationAttribute enableNavigationIndicator((boolean or undefined) enabled); }; callback NavDestinationTransitionDelegate = (sequence or undefined) (NavigationOperation operation, boolean isEnter); \ No newline at end of file diff --git a/idl/nav_router.idl b/idl/nav_router.idl index 4292df2..c3a27b1 100644 --- a/idl/nav_router.idl +++ b/idl/nav_router.idl @@ -1,41 +1,32 @@ -package nav_router; [Entity=Interface, Deprecated] interface RouteInfo { - [Deprecated] attribute String name; [Optional, Deprecated] attribute unknown param; - }; [Entity=Interface, Deprecated] interface NavRouterInterface { - [Deprecated, CallSignature] NavRouterAttribute invoke(); [Deprecated, CallSignature] NavRouterAttribute invoke(RouteInfo value); - }; [Deprecated] dictionary NavRouteMode { - [Deprecated] number PUSH_WITH_RECREATE = 0; [Deprecated] number PUSH = 1; [Deprecated] number REPLACE = 2; - }; [Synthetic] callback Callback_Boolean_Void = void (boolean isActivated); [Entity=Class, Deprecated] -interface NavRouterAttribute: [TypeArguments="NavRouterAttribute"] CommonMethod { - +interface NavRouterAttribute: [Extends, TypeArguments="NavRouterAttribute"] CommonMethod { [Deprecated] NavRouterAttribute onStateChange(Callback_Boolean_Void callback_); [Deprecated] NavRouterAttribute mode(NavRouteMode mode); - }; \ No newline at end of file diff --git a/idl/navigation.idl b/idl/navigation.idl index ac33ed7..a472ee7 100644 --- a/idl/navigation.idl +++ b/idl/navigation.idl @@ -1,53 +1,68 @@ package navigation; -[Import="import('../api/@ohos.window').default.SystemBarStyle"] -typedef [Import="import('../api/@ohos.window').default.SystemBarStyle"] SystemBarStyle SystemBarStyle; +import ohos.window.default as window; +import resource.Resource as Resource; +import arkui.TextModifier.TextModifier as TextModifier; +import arkui.Graphics.LengthMetrics as LengthMetrics; +import common.Callback as Callback; +import common.BlurStyle as BlurStyle; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import common.LayoutSafeAreaType as LayoutSafeAreaType; +import common.LayoutSafeAreaEdge as LayoutSafeAreaEdge; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.PixelMap as PixelMap; +import common.Bindable as Bindable; +import CustomBuilder as CustomBuilder; +import PageMapBuilder as PageMapBuilder; +import units.Length as Length; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.VoidCallback as VoidCallback; +import TitleHeight as TitleHeight; +import arkui.SymbolGlyphModifier.SymbolGlyphModifier as SymbolGlyphModifier; +import NavDestinationContext as NavDestinationContext; +import NavDestinationMode as NavDestinationMode; +import ohos.window.default.SystemBarStyle as _SystemBarStyle; +typedef _SystemBarStyle SystemBarStyle; +typedef window.SystemBarStyle SystemBarStyle; [Entity=Interface] interface NavigationCommonTitle { - attribute (String or Resource) main; attribute (String or Resource) sub; - }; [Entity=Interface] interface NavigationCustomTitle { - attribute CustomBuilder builder; attribute (TitleHeight or Length) height; - }; dictionary NavigationMode { - [OriginalEnumMemberName=Stack] number STACK = 0; [OriginalEnumMemberName=Split] number SPLIT = 1; [OriginalEnumMemberName=Auto] number AUTO = 2; - }; dictionary NavBarPosition { - [OriginalEnumMemberName=Start] number START = 0; [OriginalEnumMemberName=End] number END = 1; - }; dictionary NavigationTitleMode { - [OriginalEnumMemberName=Free] number FREE = 0; [OriginalEnumMemberName=Full] number FULL = 1; [OriginalEnumMemberName=Mini] number MINI = 2; - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface NavigationMenuItem { - attribute (String or Resource) value; [Optional] attribute (String or Resource) icon; @@ -57,50 +72,47 @@ interface NavigationMenuItem { attribute boolean isEnabled; [Optional] attribute Callback_Void action; - }; [Entity=Interface] interface PopInfo { - attribute NavPathInfo info; attribute Object result; - }; [Synthetic] callback Callback_PopInfo_Void = void (PopInfo parameter); [Entity=Class] interface NavPathInfo { - constructor(String name, unknown param, optional Callback_PopInfo_Void onPop, optional boolean isEntry); + constructor(String name, (Object or undefined) param, optional Callback_PopInfo_Void onPop, optional boolean isEntry); attribute String name; [Optional] attribute unknown param; [Optional] + attribute (Object or undefined) param; + [Optional] + attribute Callback_PopInfo_Void onPop; + [Optional] attribute Callback_PopInfo_Void onPop; [Optional] attribute boolean isEntry; - + [Optional] + attribute String navDestinationId; }; dictionary LaunchMode { - number STANDARD = 0; number MOVE_TO_TOP_SINGLETON = 1; number POP_TO_SINGLETON = 2; number NEW_INSTANCE = 3; - }; [Entity=Interface] interface NavigationOptions { - [Optional] attribute LaunchMode launchMode; [Optional] attribute boolean animated; - }; [Entity=Class] interface NavPathStack { - constructor(); void pushPath(NavPathInfo info, optional boolean animated); void pushPath(NavPathInfo info, optional NavigationOptions options); @@ -109,11 +121,15 @@ interface NavPathStack { [Throws] async void pushDestination(NavPathInfo info, optional NavigationOptions options); void pushPathByName(String name, unknown param, optional boolean animated); + void pushPathByName(String name, (Object or undefined) param, optional boolean animated); + void pushPathByName(String name, Object param, Callback_PopInfo_Void onPop, optional boolean animated); void pushPathByName(String name, Object param, Callback_PopInfo_Void onPop, optional boolean animated); [Throws] async void pushDestinationByName(String name, Object param, optional boolean animated); [Throws] async void pushDestinationByName(String name, Object param, Callback_PopInfo_Void onPop, optional boolean animated); + [Throws] + async void pushDestinationByName(String name, Object param, Callback_PopInfo_Void onPop, optional boolean animated); void replacePath(NavPathInfo info, optional boolean animated); void replacePath(NavPathInfo info, optional NavigationOptions options); [Throws] @@ -133,54 +149,56 @@ interface NavPathStack { void clear(optional boolean animated); sequence getAllPathName(); (unknown or undefined) getParamByIndex(number index); + (Object or undefined) getParamByIndex(number index); sequence getParamByName(String name); + sequence<(Object or undefined)> getParamByName(String name); sequence getIndexByName(String name); (NavPathStack or undefined) getParent(); number size(); void disableAnimation(boolean value); void setInterception(NavigationInterception interception); - + sequence getPathStack(); + void setPathStack(sequence pathStack, optional boolean animated); }; typedef String NavBar; callback InterceptionShowCallback = void ((NavDestinationContext or NavBar) from, (NavDestinationContext or NavBar) to, NavigationOperation operation, boolean isAnimated); callback InterceptionModeCallback = void (NavigationMode mode); [Entity=Interface] interface NavigationInterception { - [Optional] attribute InterceptionShowCallback willShow; [Optional] attribute InterceptionShowCallback didShow; [Optional] attribute InterceptionModeCallback modeChange; - +}; +[Entity=Interface] +interface HomePathInfo { + attribute String name; + [Optional] + attribute Object param; }; [Entity=Interface] interface NavigationInterface { - [CallSignature] NavigationAttribute invoke(); [CallSignature] NavigationAttribute invoke(NavPathStack pathInfos); - + [CallSignature] + NavigationAttribute invoke(NavPathStack pathInfos, HomePathInfo homeDestination); }; dictionary ToolbarItemStatus { - number NORMAL = 0; number DISABLED = 1; number ACTIVE = 2; - }; dictionary NavigationOperation { - number PUSH = 1; number POP = 2; number REPLACE = 3; - }; [Entity=Interface] interface ToolbarItem { - attribute ResourceStr value; [Optional] attribute ResourceStr icon; @@ -194,16 +212,18 @@ interface ToolbarItem { attribute ResourceStr activeIcon; [Optional] attribute SymbolGlyphModifier activeSymbolIcon; - }; [Entity=Interface] interface NavigationTitleOptions { - [Optional] attribute ResourceColor backgroundColor; [Optional] attribute BlurStyle backgroundBlurStyle; [Optional] + attribute BackgroundBlurStyleOptions backgroundBlurStyleOptions; + [Optional] + attribute BackgroundEffectOptions backgroundEffect; + [Optional] attribute BarStyle barStyle; [Optional] attribute LengthMetrics paddingStart; @@ -215,34 +235,47 @@ interface NavigationTitleOptions { attribute TextModifier subTitleModifier; [Optional] attribute boolean enableHoverMode; - }; dictionary BarStyle { - number STANDARD = 0; number STACK = 1; number SAFE_AREA_PADDING = 2; - }; [Entity=Interface] interface NavigationToolbarOptions { - [Optional] attribute ResourceColor backgroundColor; [Optional] attribute BlurStyle backgroundBlurStyle; [Optional] + attribute BackgroundBlurStyleOptions backgroundBlurStyleOptions; + [Optional] + attribute BackgroundEffectOptions backgroundEffect; + [Optional] + attribute MoreButtonOptions moreButtonOptions; + [Optional] attribute BarStyle barStyle; [Optional] attribute boolean hideItemValue; - +}; +[Entity=Interface] +interface NavigationMenuOptions { + [Optional] + attribute MoreButtonOptions moreButtonOptions; +}; +[Entity=Interface] +interface MoreButtonOptions { + [Optional] + attribute BlurStyle backgroundBlurStyle; + [Optional] + attribute BackgroundBlurStyleOptions backgroundBlurStyleOptions; + [Optional] + attribute BackgroundEffectOptions backgroundEffect; }; [Entity=Tuple, Synthetic] interface Tuple_Dimension_Dimension { - attribute Dimension value0; attribute Dimension value1; - }; [Synthetic] callback Callback_NavigationTitleMode_Void = void (NavigationTitleMode titleMode); @@ -255,14 +288,13 @@ callback Callback_String_Unknown_Void = void (String name, unknown param); [Synthetic] callback Type_NavigationAttribute_customNavContentTransition_delegate = (NavigationAnimatedTransition or undefined) (NavContentInfo from, NavContentInfo to, NavigationOperation operation); [Entity=Class] -interface NavigationAttribute: [TypeArguments="NavigationAttribute"] CommonMethod { - +interface NavigationAttribute: [Extends, TypeArguments="NavigationAttribute"] CommonMethod { NavigationAttribute navBarWidth(Length value); NavigationAttribute navBarPosition(NavBarPosition value); NavigationAttribute navBarWidthRange(Tuple_Dimension_Dimension value); NavigationAttribute minContentWidth(Dimension value); NavigationAttribute mode(NavigationMode value); - NavigationAttribute backButtonIcon((String or PixelMap or Resource or SymbolGlyphModifier) value); + NavigationAttribute backButtonIcon((String or PixelMap or Resource or SymbolGlyphModifier) icon, optional ResourceStr accessibilityText); NavigationAttribute hideNavBar(boolean value); NavigationAttribute title((ResourceStr or CustomBuilder or NavigationCommonTitle or NavigationCustomTitle) value, optional NavigationTitleOptions options); [Deprecated] @@ -271,7 +303,7 @@ interface NavigationAttribute: [TypeArguments="NavigationAttribute"] CommonMetho NavigationAttribute hideTitleBar(boolean hide, boolean animated); NavigationAttribute hideBackButton(boolean value); NavigationAttribute titleMode(NavigationTitleMode value); - NavigationAttribute menus((sequence or CustomBuilder) value); + NavigationAttribute menus((sequence or CustomBuilder) items, optional NavigationMenuOptions options); [Deprecated] NavigationAttribute toolBar((Object or CustomBuilder) value); NavigationAttribute toolbarConfiguration((sequence or CustomBuilder) value, optional NavigationToolbarOptions options); @@ -282,19 +314,19 @@ interface NavigationAttribute: [TypeArguments="NavigationAttribute"] CommonMetho NavigationAttribute onNavBarStateChange(Callback_Boolean_Void callback_); NavigationAttribute onNavigationModeChange(Callback_NavigationMode_Void callback_); NavigationAttribute navDestination(Callback_String_Unknown_Void builder); + NavigationAttribute navDestination((PageMapBuilder or undefined) builder); NavigationAttribute customNavContentTransition(Type_NavigationAttribute_customNavContentTransition_delegate delegate); NavigationAttribute ignoreLayoutSafeArea(optional sequence types, optional sequence edges); NavigationAttribute systemBarStyle((SystemBarStyle or undefined) style); NavigationAttribute recoverable((boolean or undefined) recoverable); NavigationAttribute enableDragBar((boolean or undefined) isEnabled); NavigationAttribute enableModeChangeAnimation((boolean or undefined) isEnabled); - + NavigationAttribute splitPlaceholder(ComponentContent placeholder); }; [Synthetic] callback Callback_NavigationTransitionProxy_Void = void (NavigationTransitionProxy transitionProxy); [Entity=Interface] interface NavigationAnimatedTransition { - [Optional] attribute Callback_Boolean_Void onTransitionEnd; [Optional] @@ -302,25 +334,26 @@ interface NavigationAnimatedTransition { [Optional] attribute boolean isInteractive; attribute Callback_NavigationTransitionProxy_Void transition; - }; [Entity=Interface] interface NavigationTransitionProxy { - attribute NavContentInfo from; attribute NavContentInfo to; [Optional] attribute boolean isInteractive; + [Optional] + attribute VoidCallback cancelTransition; + [Optional] + attribute UpdateTransitionCallback updateTransition; void finishTransition(); [Optional] void cancelTransition(); [Optional] void updateTransition(number progress); - }; +callback UpdateTransitionCallback = void (number progress); [Entity=Interface] interface NavContentInfo { - [Optional] attribute String name; attribute number index; @@ -330,5 +363,4 @@ interface NavContentInfo { attribute Object param; [Optional] attribute String navDestinationId; - }; \ No newline at end of file diff --git a/idl/navigator.idl b/idl/navigator.idl index dfc3ba1..153c6db 100644 --- a/idl/navigator.idl +++ b/idl/navigator.idl @@ -1,35 +1,27 @@ -package navigator; [Deprecated] dictionary NavigationType { - [Deprecated, OriginalEnumMemberName=Push] number PUSH = 0; [Deprecated, OriginalEnumMemberName=Back] number BACK = 1; [Deprecated, OriginalEnumMemberName=Replace] number REPLACE = 2; - }; [Entity=Literal, Synthetic] interface Literal_String_target_NavigationType_type { - attribute String target; [Optional] attribute NavigationType type; - }; [Entity=Interface, Deprecated] interface NavigatorInterface { - [Deprecated, CallSignature] NavigatorAttribute invoke(optional Literal_String_target_NavigationType_type value); [Deprecated, CallSignature] NavigatorAttribute invoke(); - }; [Entity=Class, Deprecated] -interface NavigatorAttribute: [TypeArguments="NavigatorAttribute"] CommonMethod { - +interface NavigatorAttribute: [Extends, TypeArguments="NavigatorAttribute"] CommonMethod { [Deprecated] NavigatorAttribute active(boolean value); [Deprecated] @@ -38,5 +30,4 @@ interface NavigatorAttribute: [TypeArguments="NavigatorAttribute"] CommonMethod NavigatorAttribute target(String value); [Deprecated] NavigatorAttribute params(Object value); - }; \ No newline at end of file diff --git a/idl/node_container.idl b/idl/node_container.idl index b73212c..25d9cc5 100644 --- a/idl/node_container.idl +++ b/idl/node_container.idl @@ -1,13 +1,14 @@ package node_container; +import arkui.NodeController.NodeController as NodeController; +import common.CommonMethod as CommonMethod; +import arkui.NodeController.NodeController as _NodeController; [Entity=Interface] interface NodeContainerInterface { - [CallSignature] - NodeContainerAttribute invoke([Import="import('../api/@ohos.arkui.node').NodeController"] NodeController controller); - + NodeContainerAttribute invoke(_NodeController controller); + [CallSignature] + NodeContainerAttribute invoke(NodeController controller); }; [Entity=Class] -interface NodeContainerAttribute: [TypeArguments="NodeContainerAttribute"] CommonMethod { - - +interface NodeContainerAttribute: [Extends, TypeArguments="NodeContainerAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/NotificationCommonDef.idl b/idl/notification.NotificationCommonDef.idl similarity index 98% rename from idl/NotificationCommonDef.idl rename to idl/notification.NotificationCommonDef.idl index 151de72..c92265e 100644 --- a/idl/NotificationCommonDef.idl +++ b/idl/notification.NotificationCommonDef.idl @@ -1,9 +1,7 @@ package notification.NotificationCommonDef; [Entity=Interface] interface BundleOption { - attribute String bundle; [Optional] attribute number uid; - }; \ No newline at end of file diff --git a/idl/notificationActionButton.idl b/idl/notification.notificationActionButton.idl similarity index 53% rename from idl/notificationActionButton.idl rename to idl/notification.notificationActionButton.idl index d0ba028..6d6aae5 100644 --- a/idl/notificationActionButton.idl +++ b/idl/notification.notificationActionButton.idl @@ -1,21 +1,20 @@ -package notification; -import notification.NotificationUserInput as NotificationUserInput; -import ohos.WantAgent as WantAgent; +package notification.notificationActionButton; +import notification.notificationUserInput.NotificationUserInput as NotificationUserInput; +import ohos.wantAgent.WantAgent as WantAgent; +import ohos.app.ability.wantAgent.WantAgent as WantAgent; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface NotificationActionButton { - attribute String title; attribute WantAgent wantAgent; [Optional] attribute Literal_Empty extras; [Optional] + attribute record extras; + [Optional] attribute NotificationUserInput userInput; - }; \ No newline at end of file diff --git a/idl/notificationContent.idl b/idl/notification.notificationContent.idl similarity index 91% rename from idl/notificationContent.idl rename to idl/notification.notificationContent.idl index 745f232..f17aee5 100644 --- a/idl/notificationContent.idl +++ b/idl/notification.notificationContent.idl @@ -1,46 +1,39 @@ package notification.notificationContent; -import ohos.notification as notification; -import ohos.multimedia.image as image; -import Resource as Resource; -import ohos.notificationManager as notificationManager; +import ohos.multimedia.image.default as image; +import resource.Resource as Resource; +import ohos.notificationManager.default as notificationManager; +import ohos.notification.default as notification; +import ohos.wantAgent.WantAgent as WantAgent; +import ohos.app.ability.wantAgent.WantAgent as WantAgent; typedef (Resource or image.PixelMap) IconType; [Entity=Interface] interface NotificationBasicContent { - attribute String title; attribute String text; [Optional] attribute String additionalText; [Optional] attribute image.PixelMap lockscreenPicture; - }; [Entity=Interface] interface NotificationLongTextContent: NotificationBasicContent { - attribute String longText; attribute String briefText; attribute String expandedTitle; - }; dictionary LiveViewStatus { - number LIVE_VIEW_CREATE = 0; number LIVE_VIEW_INCREMENTAL_UPDATE = 1; number LIVE_VIEW_END = 2; number LIVE_VIEW_FULL_UPDATE = 3; - }; dictionary LiveViewTypes { - number LIVE_VIEW_ACTIVITY = 0; number LIVE_VIEW_INSTANT = 1; number LIVE_VIEW_LONG_TERM = 2; - }; [Entity=Interface] interface NotificationLiveViewContent: NotificationBasicContent { - attribute LiveViewStatus status; [Optional] attribute number version; @@ -50,27 +43,23 @@ interface NotificationLiveViewContent: NotificationBasicContent { attribute record> pictureInfo; [Optional] attribute boolean isLocalUpdateOnly; - }; [Entity=Interface] interface NotificationMultiLineContent: NotificationBasicContent { - attribute String briefText; attribute String longTitle; attribute sequence lines; - + [Optional] + attribute sequence lineWantAgents; }; [Entity=Interface] interface NotificationPictureContent: NotificationBasicContent { - attribute String briefText; attribute String expandedTitle; attribute image.PixelMap picture; - }; [Entity=Interface] interface NotificationSystemLiveViewContent: NotificationBasicContent { - attribute number typeCode; [Optional] attribute NotificationCapsule capsule; @@ -84,11 +73,9 @@ interface NotificationSystemLiveViewContent: NotificationBasicContent { attribute NotificationProgress progress; [Optional] attribute LiveViewTypes liveViewType; - }; [Entity=Interface] interface NotificationCapsule { - [Optional] attribute String title; [Optional] @@ -101,33 +88,27 @@ interface NotificationCapsule { attribute number time; [Optional] attribute sequence capsuleButtons; - }; [Entity=Interface] interface NotificationIconButton { - attribute String name; attribute IconType iconResource; [Optional] attribute String text; [Optional] attribute boolean hidePanel; - }; [Entity=Interface] interface NotificationButton { - [Optional] attribute sequence names; [Optional] attribute sequence icons; [Optional] attribute sequence iconsResource; - }; [Entity=Interface] interface NotificationTime { - [Optional] attribute number initialTime; [Optional] @@ -136,22 +117,18 @@ interface NotificationTime { attribute boolean isPaused; [Optional] attribute boolean isInTitle; - }; [Entity=Interface] interface NotificationProgress { - [Optional] attribute number maxValue; [Optional] attribute number currentValue; [Optional] attribute boolean isPercentage; - }; [Entity=Interface] interface NotificationContent { - [Optional, Deprecated] attribute notification.ContentType contentType; [Optional] @@ -168,5 +145,4 @@ interface NotificationContent { attribute NotificationSystemLiveViewContent systemLiveView; [Optional] attribute NotificationLiveViewContent liveView; - }; \ No newline at end of file diff --git a/idl/notificationFlags.idl b/idl/notification.notificationFlags.idl similarity index 99% rename from idl/notificationFlags.idl rename to idl/notification.notificationFlags.idl index 463f305..701fc6e 100644 --- a/idl/notificationFlags.idl +++ b/idl/notification.notificationFlags.idl @@ -1,19 +1,15 @@ package notification.notificationFlags; dictionary NotificationFlagStatus { - number TYPE_NONE = 0; number TYPE_OPEN = 1; number TYPE_CLOSE = 2; - }; [Entity=Interface] interface NotificationFlags { - [Optional] readonly attribute NotificationFlagStatus soundEnabled; [Optional] readonly attribute NotificationFlagStatus vibrationEnabled; [Optional] readonly attribute number reminderFlags; - }; \ No newline at end of file diff --git a/idl/notificationRequest.idl b/idl/notification.notificationRequest.idl similarity index 84% rename from idl/notificationRequest.idl rename to idl/notification.notificationRequest.idl index e593d32..7b16b2f 100644 --- a/idl/notificationRequest.idl +++ b/idl/notification.notificationRequest.idl @@ -1,24 +1,23 @@ package notification.notificationRequest; -import ohos.notification as notification; -import ohos.multimedia.image as image; -import ohos.notificationManager as notificationManager; -import ohos.notificationSubscribe as notificationSubscribe; -import ohos.WantAgent as WantAgent; +import ohos.multimedia.image.default as image; +import ohos.notificationManager.default as notificationManager; +import ohos.notificationSubscribe.default as notificationSubscribe; import notification.notificationContent.NotificationContent as NotificationContent; -import notification.NotificationActionButton as NotificationActionButton; -import notification.NotificationTemplate as NotificationTemplate; +import notification.notificationActionButton.NotificationActionButton as NotificationActionButton; +import notification.notificationTemplate.NotificationTemplate as NotificationTemplate; import notification.notificationFlags.NotificationFlags as NotificationFlags; +import ohos.notification.default as notification; +import ohos.wantAgent.WantAgent as WantAgent; +import notification.NotificationCommonDef.BundleOption as BundleOption; +import ohos.app.ability.wantAgent.WantAgent as WantAgent; import notification.NotificationCommonDef.BundleOption as BundleOption; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface NotificationRequest { - attribute NotificationContent content; [Optional] attribute number id; @@ -45,6 +44,10 @@ interface NotificationRequest { [Optional] attribute Literal_Empty extraInfo; [Optional] + attribute record extraInfo; + [Optional] + attribute record extendInfo; + [Optional] attribute number color; [Optional] attribute boolean colorEnabled; @@ -118,11 +121,9 @@ interface NotificationRequest { attribute boolean forceDistributed; [Optional] attribute boolean notDistributed; - }; [Entity=Interface] interface DistributedOptions { - [Optional] attribute boolean isDistributed; [Optional] @@ -131,28 +132,22 @@ interface DistributedOptions { attribute sequence supportOperateDevices; [Optional] readonly attribute number remindType; - }; [Entity=Interface] interface NotificationFilter { - attribute BundleOption bundle; attribute notificationSubscribe.NotificationKey notificationKey; [Optional] attribute sequence extraInfoKeys; - }; [Entity=Interface] interface NotificationCheckRequest { - attribute notificationManager.ContentType contentType; attribute notificationManager.SlotType slotType; attribute sequence extraInfoKeys; - }; [Entity=Interface] interface UnifiedGroupInfo { - [Optional] attribute String key; [Optional] @@ -163,5 +158,6 @@ interface UnifiedGroupInfo { attribute String sceneName; [Optional] attribute Literal_Empty extraInfo; - + [Optional] + attribute record extraInfo; }; \ No newline at end of file diff --git a/idl/notificationSlot.idl b/idl/notification.notificationSlot.idl similarity index 78% rename from idl/notificationSlot.idl rename to idl/notification.notificationSlot.idl index 45b89bf..ddea7bb 100644 --- a/idl/notificationSlot.idl +++ b/idl/notification.notificationSlot.idl @@ -1,16 +1,17 @@ -package notification; -import ohos.notification as notification; -import ohos.notificationManager as notificationManager; +package notification.notificationSlot; +import ohos.notification.default as notification; +import ohos.notificationManager.default as notificationManager; [Entity=Interface] interface NotificationSlot { - [Optional, Deprecated] attribute notification.SlotType type; [Optional] attribute notificationManager.SlotType notificationType; - [Optional] + [Optional, Deprecated] attribute notification.SlotLevel level; [Optional] + attribute notificationManager.SlotLevel notificationLevel; + [Optional] attribute String desc; [Optional] attribute boolean badgeFlag; @@ -34,5 +35,4 @@ interface NotificationSlot { readonly attribute number reminderMode; [Optional] readonly attribute number authorizedStatus; - }; \ No newline at end of file diff --git a/idl/notificationSorting.idl b/idl/notification.notificationSorting.idl similarity index 60% rename from idl/notificationSorting.idl rename to idl/notification.notificationSorting.idl index ba92c67..507a472 100644 --- a/idl/notificationSorting.idl +++ b/idl/notification.notificationSorting.idl @@ -1,10 +1,8 @@ -package notification; -import notification.NotificationSlot as NotificationSlot; +package notification.notificationSorting; +import notification.notificationSlot.NotificationSlot as NotificationSlot; [Entity=Interface] interface NotificationSorting { - readonly attribute NotificationSlot slot; readonly attribute String hashCode; readonly attribute number ranking; - }; \ No newline at end of file diff --git a/idl/notificationSortingMap.idl b/idl/notification.notificationSortingMap.idl similarity index 72% rename from idl/notificationSortingMap.idl rename to idl/notification.notificationSortingMap.idl index d05390d..4caa99f 100644 --- a/idl/notificationSortingMap.idl +++ b/idl/notification.notificationSortingMap.idl @@ -1,9 +1,7 @@ package notification.notificationSortingMap; -import notification.NotificationSorting as NotificationSorting; +import notification.notificationSorting.NotificationSorting as NotificationSorting; [Entity=Interface] interface NotificationSortingMap { - readonly attribute record sortings; readonly attribute sequence sortedHashCode; - }; \ No newline at end of file diff --git a/idl/notificationSubscribeInfo.idl b/idl/notification.notificationSubscribeInfo.idl similarity index 57% rename from idl/notificationSubscribeInfo.idl rename to idl/notification.notificationSubscribeInfo.idl index 16b7f94..95a2d75 100644 --- a/idl/notificationSubscribeInfo.idl +++ b/idl/notification.notificationSubscribeInfo.idl @@ -1,7 +1,7 @@ -package notification; +package notification.notificationSubscribeInfo; +import ohos.notificationManager.default as notificationManager; [Entity=Interface] interface NotificationSubscribeInfo { - [Optional] attribute sequence bundleNames; [Optional] @@ -9,6 +9,7 @@ interface NotificationSubscribeInfo { [Optional] attribute String deviceType; [Optional] + attribute sequence slotTypes; + [Optional] attribute number filterLimit; - }; \ No newline at end of file diff --git a/idl/notificationSubscriber.idl b/idl/notification.notificationSubscriber.idl similarity index 85% rename from idl/notificationSubscriber.idl rename to idl/notification.notificationSubscriber.idl index 9aa1eaa..dfff1cf 100644 --- a/idl/notificationSubscriber.idl +++ b/idl/notification.notificationSubscriber.idl @@ -1,8 +1,8 @@ package notification.notificationSubscriber; import notification.notificationRequest.NotificationRequest as NotificationRequest; import notification.notificationSortingMap.NotificationSortingMap as NotificationSortingMap; -import ohos.notification as notification; -import ohos.notificationManager as notificationManager; +import ohos.notification.default as notification; +import ohos.notificationManager.default as notificationManager; [Synthetic] callback Callback_SubscribeCallbackData_Void = void (SubscribeCallbackData data); [Synthetic] @@ -10,9 +10,9 @@ callback Callback_NotificationSortingMap_Void = void (NotificationSortingMap dat [Synthetic] callback Callback_Void = void (); [Synthetic] -callback Callback_notification_DoNotDisturbDate_Void = void (notification.DoNotDisturbDate mode); +callback Callback_Notification_DoNotDisturbDate_Void = void (notification.DoNotDisturbDate mode); [Synthetic] -callback Callback_notificationManager_DoNotDisturbDate_Void = void (notificationManager.DoNotDisturbDate mode); +callback Callback_NotificationManager_DoNotDisturbDate_Void = void (notificationManager.DoNotDisturbDate mode); [Synthetic] callback Callback_EnabledNotificationCallbackData_Void = void (EnabledNotificationCallbackData callbackData); [Synthetic] @@ -21,7 +21,6 @@ callback Callback_BadgeNumberCallbackData_Void = void (BadgeNumberCallbackData d callback Callback_Array_SubscribeCallbackData_Void = void (sequence data); [Entity=Interface] interface NotificationSubscriber { - [Optional] attribute Callback_SubscribeCallbackData_Void onConsume; [Optional] @@ -35,9 +34,9 @@ interface NotificationSubscriber { [Optional] attribute Callback_Void onDestroy; [Optional, Deprecated] - attribute Callback_notification_DoNotDisturbDate_Void onDoNotDisturbDateChange; + attribute Callback_Notification_DoNotDisturbDate_Void onDoNotDisturbDateChange; [Optional] - attribute Callback_notificationManager_DoNotDisturbDate_Void onDoNotDisturbChanged; + attribute Callback_NotificationManager_DoNotDisturbDate_Void onDoNotDisturbChanged; [Optional] attribute Callback_EnabledNotificationCallbackData_Void onEnabledNotificationChanged; [Optional] @@ -46,11 +45,9 @@ interface NotificationSubscriber { attribute BadgeEnabledChangedCallback onBadgeEnabledChanged; [Optional] attribute Callback_Array_SubscribeCallbackData_Void onBatchCancel; - }; [Entity=Interface] interface SubscribeCallbackData { - readonly attribute NotificationRequest request; [Optional] readonly attribute NotificationSortingMap sortingMap; @@ -60,19 +57,15 @@ interface SubscribeCallbackData { readonly attribute String sound; [Optional] readonly attribute sequence vibrationValues; - }; [Entity=Interface] interface EnabledNotificationCallbackData { - readonly attribute String bundle; readonly attribute number uid; readonly attribute boolean enable; - }; [Entity=Interface] interface BadgeNumberCallbackData { - readonly attribute String bundle; readonly attribute number uid; readonly attribute number badgeNumber; @@ -80,12 +73,10 @@ interface BadgeNumberCallbackData { readonly attribute number instanceKey; [Optional] readonly attribute String appInstanceKey; - }; [Entity=Interface] interface BadgeEnabledChangedCallback { - [CallSignature] void invoke(EnabledNotificationCallbackData data); - -}; \ No newline at end of file +}; +callback BadgeEnabledChangedCallback = void (EnabledNotificationCallbackData data); \ No newline at end of file diff --git a/idl/notificationTemplate.idl b/idl/notification.notificationTemplate.idl similarity index 74% rename from idl/notificationTemplate.idl rename to idl/notification.notificationTemplate.idl index a5872a1..90f368f 100644 --- a/idl/notificationTemplate.idl +++ b/idl/notification.notificationTemplate.idl @@ -1,8 +1,6 @@ -package notification; +package notification.notificationTemplate; [Entity=Interface] interface NotificationTemplate { - attribute String name; attribute record data; - }; \ No newline at end of file diff --git a/idl/notificationUserInput.idl b/idl/notification.notificationUserInput.idl similarity index 66% rename from idl/notificationUserInput.idl rename to idl/notification.notificationUserInput.idl index a0dfe5f..ba39c27 100644 --- a/idl/notificationUserInput.idl +++ b/idl/notification.notificationUserInput.idl @@ -1,7 +1,5 @@ -package notification; +package notification.notificationUserInput; [Entity=Interface] interface NotificationUserInput { - attribute String inputKey; - }; \ No newline at end of file diff --git a/idl/page_transition.idl b/idl/page_transition.idl index 9866a7f..0a4a1aa 100644 --- a/idl/page_transition.idl +++ b/idl/page_transition.idl @@ -1,16 +1,17 @@ package page_transition; +import common.ICurve as ICurve; +import common.TranslateOptions as TranslateOptions; +import common.ScaleOptions as ScaleOptions; +import Curve as Curve; dictionary RouteType { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Push] number PUSH = 1; [OriginalEnumMemberName=Pop] number POP = 2; - }; dictionary SlideEffect { - [OriginalEnumMemberName=Left] number LEFT = 0; [OriginalEnumMemberName=Right] @@ -21,21 +22,24 @@ dictionary SlideEffect { number BOTTOM = 3; number START = 5; number END = 6; - }; [Entity=Class, TypeParameters="T"] interface CommonTransition { - constructor(); T slide(SlideEffect value); T translate(TranslateOptions value); T scale(ScaleOptions value); T opacity(number value); - +}; +[Entity=Class] +interface CommonTransition { + this slide(SlideEffect value); + this translate(TranslateOptions value); + this scale(ScaleOptions value); + this opacity(number value); }; [Entity=Interface] interface PageTransitionOptions { - [Optional] attribute RouteType type; [Optional] @@ -44,22 +48,29 @@ interface PageTransitionOptions { attribute (Curve or String or ICurve) curve; [Optional] attribute number delay; - }; callback PageTransitionCallback = void (RouteType type, number progress); [Entity=Interface] interface PageTransitionEnterInterface: [TypeArguments="PageTransitionEnterInterface"] CommonTransition { - PageTransitionEnterInterface onEnter(PageTransitionCallback event); [CallSignature] PageTransitionEnterInterface invoke(PageTransitionOptions value); - +}; +[Entity=Class] +interface PageTransitionEnter: [Extends] CommonTransition { + [DtsName="$_invoke"] + static PageTransitionEnter dollar__invoke(PageTransitionOptions value); + this onEnter(PageTransitionCallback event); }; [Entity=Interface] interface PageTransitionExitInterface: [TypeArguments="PageTransitionExitInterface"] CommonTransition { - PageTransitionExitInterface onExit(PageTransitionCallback event); [CallSignature] PageTransitionExitInterface invoke(PageTransitionOptions value); - +}; +[Entity=Class] +interface PageTransitionExit: [Extends] CommonTransition { + [DtsName="$_invoke"] + static PageTransitionExit dollar__invoke(PageTransitionOptions value); + this onExit(PageTransitionCallback event); }; \ No newline at end of file diff --git a/idl/panel.idl b/idl/panel.idl index 62f65b7..1072ed8 100644 --- a/idl/panel.idl +++ b/idl/panel.idl @@ -1,18 +1,14 @@ -package panel; [Deprecated] dictionary PanelMode { - [Deprecated, OriginalEnumMemberName=Mini] number MINI = 0; [Deprecated, OriginalEnumMemberName=Half] number HALF = 1; [Deprecated, OriginalEnumMemberName=Full] number FULL = 2; - }; [Deprecated] dictionary PanelType { - [Deprecated, OriginalEnumMemberName=Minibar] number MINIBAR = 0; [Deprecated, OriginalEnumMemberName=Foldable] @@ -21,29 +17,23 @@ dictionary PanelType { number TEMPORARY = 2; [Deprecated] number CUSTOM = 3; - }; [Deprecated] dictionary PanelHeight { - [Deprecated] String WRAP_CONTENT = "wrapContent"; - }; [Entity=Interface, Deprecated] interface PanelInterface { - [Deprecated, CallSignature] PanelAttribute invoke(boolean show); - }; [Synthetic] callback Callback_Number_Number_PanelMode_Void = void (number width, number height, PanelMode mode); [Synthetic] callback Callback_Number_Void = void (number value); [Entity=Class, Deprecated] -interface PanelAttribute: [TypeArguments="PanelAttribute"] CommonMethod { - +interface PanelAttribute: [Extends, TypeArguments="PanelAttribute"] CommonMethod { [Deprecated] PanelAttribute mode(PanelMode value); [Deprecated] @@ -68,5 +58,4 @@ interface PanelAttribute: [TypeArguments="PanelAttribute"] CommonMethod { PanelAttribute onChange(Callback_Number_Number_PanelMode_Void event); [Deprecated] PanelAttribute onHeightChange(Callback_Number_Void callback_); - }; \ No newline at end of file diff --git a/idl/particle.idl b/idl/particle.idl index bcef514..9c79e08 100644 --- a/idl/particle.idl +++ b/idl/particle.idl @@ -1,46 +1,47 @@ package particle; +import arkui.Graphics.LengthMetrics as LengthMetrics; +import arkui.Graphics.SizeT as SizeT; +import arkui.Graphics.PositionT as PositionT; +import units.VP as VP; +import units.ResourceStr as ResourceStr; +import units.Dimension as Dimension; +import units.ResourceColor as ResourceColor; +import ImageFit as ImageFit; +import Curve as Curve; +import common.ICurve as ICurve; +import common.CommonMethod as CommonMethod; +import arkui.Graphics.SizeT as _SizeT; +import arkui.Graphics.PositionT as _PositionT; [Entity=Tuple, TypeParameters="T1,T2"] interface ParticleTuple { - attribute T1 value0; attribute T2 value1; - }; [Entity=Interface] interface VelocityOptions { - attribute [TypeArguments="number,number"] ParticleTuple speed; attribute [TypeArguments="number,number"] ParticleTuple angle; - }; [Entity=Interface] interface PointParticleParameters { - attribute VP radius; - }; [Entity=Interface] interface ImageParticleParameters { - attribute ResourceStr src; attribute [TypeArguments="Dimension,Dimension"] ParticleTuple size; [Optional] attribute ImageFit objectFit; - }; [Entity=Interface] interface ParticleConfigs { - - }; +typedef (PointParticleParameters or ImageParticleParameters) ParticleConfigs; interface EmitterProperty { - attribute String stub; - }; -[Entity=Interface, TypeParameters="PARTICLE extends ParticleType"] +[Entity=Interface, TypeParameters="PARTICLE"] interface EmitterParticleOptions { - attribute PARTICLE type; attribute String config; attribute number count; @@ -48,86 +49,96 @@ interface EmitterParticleOptions { attribute number lifetime; [Optional] attribute number lifetimeRange; - +}; +[Entity=Interface] +interface EmitterParticleOptions { + attribute ParticleType type; + attribute ParticleConfigs config; + attribute number count; + [Optional] + attribute number lifetime; + [Optional] + attribute number lifetimeRange; }; [Entity=Interface, TypeParameters="T"] interface ParticlePropertyUpdaterConfigs { - - }; -[Entity=Interface, TypeParameters="TYPE,UPDATER extends ParticleUpdater"] +typedef (([TypeArguments="number,number"] ParticleTuple or sequence<[TypeArguments="number"] ParticlePropertyAnimation>) or undefined) ParticlePropertyUpdaterConfigs; +[Entity=Interface, TypeParameters="TYPE,UPDATER"] interface ParticleUpdaterOptions { - attribute UPDATER type; attribute String config; - +}; +[Entity=Interface] +interface ParticleUpdaterOptions { + attribute ParticleUpdater type; + attribute ParticlePropertyUpdaterConfigs config; }; [Entity=Interface] interface ParticleColorOptions { - attribute [TypeArguments="number,number"] ParticleTuple r; attribute [TypeArguments="number,number"] ParticleTuple g; attribute [TypeArguments="number,number"] ParticleTuple b; attribute [TypeArguments="number,number"] ParticleTuple a; - }; -[Entity=Interface, TypeParameters="UPDATER extends ParticleUpdater"] +[Entity=Interface, TypeParameters="UPDATER"] interface ParticleColorUpdaterOptions { - attribute UPDATER type; attribute String config; - +}; +[Entity=Interface] +interface ParticleColorUpdaterOptions { + attribute ParticleUpdater type; + attribute ParticleColorPropertyUpdaterConfigs config; }; [Entity=Interface] interface ParticleColorPropertyUpdaterConfigs { - - }; +typedef ((ParticleColorOptions or sequence<[TypeArguments="ResourceColor"] ParticlePropertyAnimation>) or undefined) ParticleColorPropertyUpdaterConfigs; [Entity=Interface, TypeParameters="T"] interface ParticlePropertyAnimation { - attribute T from; attribute T to; attribute number startMillis; attribute number endMillis; [Optional] attribute (Curve or ICurve) curve; - }; +ParticleAttribute Particle(Particles particles); dictionary ParticleType { - String POINT = "point"; String IMAGE = "image"; - }; dictionary ParticleEmitterShape { - String RECTANGLE = "rectangle"; String CIRCLE = "circle"; String ELLIPSE = "ellipse"; - + String ANNULUS = "annulus"; }; dictionary DistributionType { - number UNIFORM = 0; number GAUSSIAN = 1; - }; dictionary ParticleUpdater { - String NONE = "none"; String RANDOM = "random"; String CURVE = "curve"; - }; -[Import="import('../api/arkui/Graphics').SizeT"] -typedef [Import="import('../api/arkui/Graphics').SizeT"] SizeT SizeT; -[Import="import('../api/arkui/Graphics').PositionT"] -typedef [Import="import('../api/arkui/Graphics').PositionT"] PositionT PositionT; +typedef [TypeArguments="T"] _SizeT SizeT; +typedef [TypeArguments="T"] _PositionT PositionT; dictionary DisturbanceFieldShape { - number RECT = 0; number CIRCLE = 1; number ELLIPSE = 2; - +}; +[Entity=Interface] +interface ParticleAnnulusRegion { + [Optional] + attribute [TypeArguments="LengthMetrics"] PositionT center; + attribute LengthMetrics outerRadius; + attribute LengthMetrics innerRadius; + [Optional] + attribute number startAngle; + [Optional] + attribute number endAngle; }; \ No newline at end of file diff --git a/idl/paste_button.idl b/idl/paste_button.idl index 6652f1a..5af8480 100644 --- a/idl/paste_button.idl +++ b/idl/paste_button.idl @@ -1,44 +1,31 @@ -package paste_button; dictionary PasteIconStyle { - number LINES = 0; - }; dictionary PasteDescription { - number PASTE = 0; - }; [Entity=Interface] interface PasteButtonOptions { - [Optional] attribute PasteIconStyle icon; [Optional] attribute PasteDescription text; [Optional] attribute ButtonType buttonType; - }; dictionary PasteButtonOnClickResult { - number SUCCESS = 0; number TEMPORARY_AUTHORIZATION_FAILED = 1; - }; [Entity=Interface] interface PasteButtonInterface { - [CallSignature] PasteButtonAttribute invoke(); [CallSignature] PasteButtonAttribute invoke(PasteButtonOptions options); - }; -callback PasteButtonCallback = void (ClickEvent event, PasteButtonOnClickResult result, optional [TypeArguments="void"] BusinessError error); +callback PasteButtonCallback = void (ClickEvent event, PasteButtonOnClickResult result, optional BusinessError error); [Entity=Class] -interface PasteButtonAttribute: [TypeArguments="PasteButtonAttribute"] SecurityComponentMethod { - +interface PasteButtonAttribute: [Extends, TypeArguments="PasteButtonAttribute"] SecurityComponentMethod { PasteButtonAttribute onClick(PasteButtonCallback event); - }; \ No newline at end of file diff --git a/idl/path.idl b/idl/path.idl index 6328f13..d10ac8d 100644 --- a/idl/path.idl +++ b/idl/path.idl @@ -1,26 +1,33 @@ package path; +import common.CommonShapeMethod as CommonShapeMethod; [Entity=Interface] interface PathOptions { - + [Optional] + attribute Length width; [Optional] attribute (number or String) width; [Optional] + attribute Length height; + [Optional] attribute (number or String) height; [Optional] + attribute ResourceStr commands; + [Optional] attribute String commands; - }; [Entity=Interface] interface PathInterface { - constructor(optional PathOptions options); [CallSignature] PathAttribute invoke(optional PathOptions options); - }; [Entity=Class] -interface PathAttribute: [TypeArguments="PathAttribute"] CommonShapeMethod { - +interface PathAttribute: [Extends, TypeArguments="PathAttribute"] CommonShapeMethod { + PathAttribute commands(ResourceStr value); PathAttribute commands(String value); - +}; +[Entity=Interface] +interface PathInterface { + [CallSignature] + PathAttribute invoke(optional PathOptions options); }; \ No newline at end of file diff --git a/idl/pattern_lock.idl b/idl/pattern_lock.idl index 04bc85b..54c0de1 100644 --- a/idl/pattern_lock.idl +++ b/idl/pattern_lock.idl @@ -1,13 +1,16 @@ package pattern_lock; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import LengthMetrics as LengthMetrics; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.Optional as Optional; dictionary PatternLockChallengeResult { - number CORRECT = 1; number WRONG = 2; - }; [Entity=Interface] interface CircleStyleOptions { - [Optional] attribute ResourceColor color; [Optional] @@ -16,30 +19,24 @@ interface CircleStyleOptions { attribute boolean enableWaveEffect; [Optional] attribute boolean enableForeground; - }; [Entity=Class] interface PatternLockController { - constructor(); - undefined reset(); + void reset(); void setChallengeResult(PatternLockChallengeResult result); - }; [Entity=Interface] interface PatternLockInterface { - [CallSignature] PatternLockAttribute invoke(optional PatternLockController controller); - }; [Synthetic] callback Callback_Array_Number_Void = void (sequence input); [Synthetic] callback Callback_Number_Void = void (number parameter); [Entity=Class] -interface PatternLockAttribute: [TypeArguments="PatternLockAttribute"] CommonMethod { - +interface PatternLockAttribute: [Extends, TypeArguments="PatternLockAttribute"] CommonMethod { PatternLockAttribute sideLength(Length value); PatternLockAttribute circleRadius(Length value); PatternLockAttribute backgroundColor(ResourceColor value); @@ -51,7 +48,7 @@ interface PatternLockAttribute: [TypeArguments="PatternLockAttribute"] CommonMet PatternLockAttribute onPatternComplete(Callback_Array_Number_Void callback_); PatternLockAttribute autoReset(boolean value); PatternLockAttribute onDotConnect(Callback_Number_Void callback_); + PatternLockAttribute onDotConnect(Callback_Number_Void callback_); PatternLockAttribute activateCircleStyle((CircleStyleOptions or undefined) options); PatternLockAttribute skipUnselectedPoint(boolean skipped); - }; \ No newline at end of file diff --git a/idl/permissions.idl b/idl/permissions.idl index 332e5a3..42f1267 100644 --- a/idl/permissions.idl +++ b/idl/permissions.idl @@ -1 +1,2 @@ +package permissions; typedef String Permissions; \ No newline at end of file diff --git a/idl/plugin_component.idl b/idl/plugin_component.idl index c063e68..f12e350 100644 --- a/idl/plugin_component.idl +++ b/idl/plugin_component.idl @@ -1,37 +1,29 @@ package plugin_component; +import common.CommonMethod as CommonMethod; +import units.VoidCallback as VoidCallback; [Entity=Interface] interface PluginComponentTemplate { - attribute String source; attribute String bundleName; - }; [Entity=Interface] interface PluginComponentOptions { - attribute PluginComponentTemplate template; attribute String data; - }; [Entity=Interface] interface PluginErrorData { - attribute number errcode; attribute String msg; - }; callback PluginErrorCallback = void (PluginErrorData info); [Entity=Interface] interface PluginComponentInterface { - [CallSignature] PluginComponentAttribute invoke(PluginComponentOptions options); - }; [Entity=Class] -interface PluginComponentAttribute: [TypeArguments="PluginComponentAttribute"] CommonMethod { - +interface PluginComponentAttribute: [Extends, TypeArguments="PluginComponentAttribute"] CommonMethod { PluginComponentAttribute onComplete(VoidCallback callback_); PluginComponentAttribute onError(PluginErrorCallback callback_); - }; \ No newline at end of file diff --git a/idl/polygon.idl b/idl/polygon.idl index dcb1a7a..654386f 100644 --- a/idl/polygon.idl +++ b/idl/polygon.idl @@ -1,24 +1,29 @@ package polygon; +import common.CommonShapeMethod as CommonShapeMethod; +import line.ShapePoint as ShapePoint; [Entity=Interface] interface PolygonOptions { - + [Optional] + attribute Length width; [Optional] attribute (String or number) width; [Optional] + attribute Length height; + [Optional] attribute (String or number) height; - }; [Entity=Interface] interface PolygonInterface { - constructor(optional PolygonOptions options); [CallSignature] PolygonAttribute invoke(optional PolygonOptions options); - }; [Entity=Class] -interface PolygonAttribute: [TypeArguments="PolygonAttribute"] CommonShapeMethod { - +interface PolygonAttribute: [Extends, TypeArguments="PolygonAttribute"] CommonShapeMethod { PolygonAttribute points(sequence value); - +}; +[Entity=Interface] +interface PolygonInterface { + [CallSignature] + PolygonAttribute invoke(optional PolygonOptions options); }; \ No newline at end of file diff --git a/idl/polyline.idl b/idl/polyline.idl index d13891d..f5c21e9 100644 --- a/idl/polyline.idl +++ b/idl/polyline.idl @@ -1,24 +1,29 @@ package polyline; +import common.CommonShapeMethod as CommonShapeMethod; +import line.ShapePoint as ShapePoint; [Entity=Interface] interface PolylineOptions { - + [Optional] + attribute Length width; [Optional] attribute (String or number) width; [Optional] + attribute Length height; + [Optional] attribute (String or number) height; - }; [Entity=Interface] interface PolylineInterface { - constructor(optional PolylineOptions options); [CallSignature] PolylineAttribute invoke(optional PolylineOptions options); - }; [Entity=Class] -interface PolylineAttribute: [TypeArguments="PolylineAttribute"] CommonShapeMethod { - +interface PolylineAttribute: [Extends, TypeArguments="PolylineAttribute"] CommonShapeMethod { PolylineAttribute points(sequence value); - +}; +[Entity=Interface] +interface PolylineInterface { + [CallSignature] + PolylineAttribute invoke(optional PolylineOptions options); }; \ No newline at end of file diff --git a/idl/progress.idl b/idl/progress.idl index 7cbf47f..032616f 100644 --- a/idl/progress.idl +++ b/idl/progress.idl @@ -1,7 +1,20 @@ package progress; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.PX as PX; +import units.VP as VP; +import units.LPX as LPX; +import units.Font as Font; +import units.ResourceStr as ResourceStr; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import common.ContentModifier as ContentModifier; +import common.CommonConfiguration as CommonConfiguration; +import LinearGradient as LinearGradient; +import LengthMetrics as LengthMetrics; [Entity=Interface] interface ProgressOptions { - attribute number value; [Optional] attribute number total; @@ -9,10 +22,16 @@ interface ProgressOptions { attribute ProgressStyle style; [Optional] attribute ProgressType type; - +}; +[Entity=Interface] +interface ProgressOptions { + attribute number value; + [Optional] + attribute number total; + [Optional] + attribute ProgressType type; }; dictionary ProgressType { - [OriginalEnumMemberName=Linear] number LINEAR = 0; [OriginalEnumMemberName=Ring] @@ -23,83 +42,67 @@ dictionary ProgressType { number SCALE_RING = 3; [OriginalEnumMemberName=Capsule] number CAPSULE = 4; - }; dictionary ProgressStatus { - number LOADING = 0; number PROGRESSING = 1; - }; [Entity=Interface] interface ProgressStyleOptions: CommonProgressStyleOptions { - [Optional] attribute Length strokeWidth; [Optional] attribute number scaleCount; [Optional] attribute Length scaleWidth; - }; [Entity=Interface] interface CommonProgressStyleOptions { - [Optional] attribute boolean enableSmoothEffect; - }; [Entity=Interface] interface ScanEffectOptions { - [Optional] attribute boolean enableScanEffect; - }; [Entity=Interface] interface EclipseStyleOptions: CommonProgressStyleOptions { - - }; [Entity=Interface] interface ScaleRingStyleOptions: CommonProgressStyleOptions { - [Optional] attribute Length strokeWidth; [Optional] attribute Length scaleWidth; [Optional] attribute number scaleCount; - }; [Entity=Interface] -interface RingStyleOptions: ScanEffectOptions { - +interface RingStyleOptions: ScanEffectOptions, CommonProgressStyleOptions { [Optional] attribute Length strokeWidth; [Optional] attribute boolean shadow; [Optional] attribute ProgressStatus status; - }; [Entity=Interface] -interface LinearStyleOptions: ScanEffectOptions { - +interface LinearStyleOptions: ScanEffectOptions, CommonProgressStyleOptions { [Optional] attribute Length strokeWidth; [Optional] attribute (PX or VP or LPX or Resource) strokeRadius; - }; [Entity=Interface] -interface CapsuleStyleOptions: ScanEffectOptions { - +interface CapsuleStyleOptions: ScanEffectOptions, CommonProgressStyleOptions { [Optional] attribute ResourceColor borderColor; [Optional] attribute Length borderWidth; [Optional] + attribute ResourceStr content; + [Optional] attribute String content; [Optional] attribute Font font; @@ -109,10 +112,8 @@ interface CapsuleStyleOptions: ScanEffectOptions { attribute boolean showDefaultPercentage; [Optional] attribute LengthMetrics borderRadius; - }; dictionary ProgressStyle { - [OriginalEnumMemberName=Linear] number LINEAR = 0; [OriginalEnumMemberName=Ring] @@ -123,34 +124,35 @@ dictionary ProgressStyle { number SCALE_RING = 3; [OriginalEnumMemberName=Capsule] number CAPSULE = 4; - }; [Entity=Interface] interface ProgressStyleMap { - - }; [Entity=Interface] interface ProgressInterface { - [CallSignature] ProgressAttribute invoke(ProgressOptions options); - + [CallSignature] + ProgressAttribute invoke(ProgressOptions options); +}; +[Entity=Class] +interface ProgressAttribute: [Extends, TypeArguments="ProgressAttribute"] CommonMethod { + ProgressAttribute value(number value); + ProgressAttribute color((ResourceColor or LinearGradient) value); + ProgressAttribute style((LinearStyleOptions or RingStyleOptions or CapsuleStyleOptions or ProgressStyleOptions) value); + ProgressAttribute privacySensitive((boolean or undefined) isPrivacySensitiveMode); + ProgressAttribute contentModifier([TypeArguments="ProgressConfiguration"] ContentModifier modifier); }; [Entity=Class] -interface ProgressAttribute: [TypeArguments="ProgressAttribute"] CommonMethod { - +interface ProgressAttribute: [Extends, TypeArguments="ProgressAttribute"] CommonMethod { ProgressAttribute value(number value); ProgressAttribute color((ResourceColor or LinearGradient) value); ProgressAttribute style((LinearStyleOptions or RingStyleOptions or CapsuleStyleOptions or ProgressStyleOptions) value); ProgressAttribute privacySensitive((boolean or undefined) isPrivacySensitiveMode); ProgressAttribute contentModifier([TypeArguments="ProgressConfiguration"] ContentModifier modifier); - }; [Entity=Interface] interface ProgressConfiguration: [TypeArguments="ProgressConfiguration"] CommonConfiguration { - attribute number value; attribute number total; - }; \ No newline at end of file diff --git a/idl/qrcode.idl b/idl/qrcode.idl index b97216e..9bf5922 100644 --- a/idl/qrcode.idl +++ b/idl/qrcode.idl @@ -1,16 +1,18 @@ package qrcode; +import common.CommonMethod as CommonMethod; +import units.ResourceColor as ResourceColor; +import units.ResourceStr as ResourceStr; +import resource.Resource as Resource; [Entity=Interface] interface QRCodeInterface { - + [CallSignature] + QRCodeAttribute invoke(ResourceStr value); [CallSignature] QRCodeAttribute invoke(String value); - }; [Entity=Class] -interface QRCodeAttribute: [TypeArguments="QRCodeAttribute"] CommonMethod { - +interface QRCodeAttribute: [Extends, TypeArguments="QRCodeAttribute"] CommonMethod { QRCodeAttribute color(ResourceColor value); QRCodeAttribute backgroundColor(ResourceColor value); QRCodeAttribute contentOpacity((number or Resource) value); - }; \ No newline at end of file diff --git a/idl/radio.idl b/idl/radio.idl index 8a51a80..44d398f 100644 --- a/idl/radio.idl +++ b/idl/radio.idl @@ -1,60 +1,52 @@ package radio; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; +import common.CommonConfiguration as CommonConfiguration; +import common.Callback as Callback; +import CustomBuilder as CustomBuilder; +import units.ResourceColor as ResourceColor; dictionary RadioIndicatorType { - number TICK = 0; number DOT = 1; number CUSTOM = 2; - }; [Entity=Interface] interface RadioOptions { - attribute String group; attribute String value; [Optional] attribute RadioIndicatorType indicatorType; [Optional] attribute CustomBuilder indicatorBuilder; - }; [Entity=Interface] interface RadioStyle { - [Optional] attribute ResourceColor checkedBackgroundColor; [Optional] attribute ResourceColor uncheckedBorderColor; [Optional] attribute ResourceColor indicatorColor; - }; [Entity=Interface] interface RadioInterface { - [CallSignature] RadioAttribute invoke(RadioOptions options); - }; callback OnRadioChangeCallback = void (boolean isChecked); [Synthetic] callback Callback_Boolean_Void = void (boolean isChecked); [Entity=Class] -interface RadioAttribute: [TypeArguments="RadioAttribute"] CommonMethod { - - RadioAttribute checked(boolean value); +interface RadioAttribute: [Extends, TypeArguments="RadioAttribute"] CommonMethod { RadioAttribute checked((boolean or undefined) isChecked); RadioAttribute onChange(Callback_Boolean_Void callback_); RadioAttribute onChange((OnRadioChangeCallback or undefined) callback_); RadioAttribute radioStyle(optional RadioStyle value); - RadioAttribute contentModifier([TypeArguments="RadioConfiguration"] ContentModifier modifier); RadioAttribute contentModifier(([TypeArguments="RadioConfiguration"] ContentModifier or undefined) modifier); - }; [Entity=Interface] interface RadioConfiguration: [TypeArguments="RadioConfiguration"] CommonConfiguration { - attribute String value; attribute boolean checked; attribute Callback_Boolean_Void triggerChange; - }; \ No newline at end of file diff --git a/idl/rating.idl b/idl/rating.idl index f919d4a..f69f56b 100644 --- a/idl/rating.idl +++ b/idl/rating.idl @@ -1,53 +1,46 @@ package rating; +import common.CommonConfiguration as CommonConfiguration; +import common.Callback as Callback; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import common.ContentModifier as ContentModifier; +import common.Bindable as Bindable; +import units.ResourceStr as ResourceStr; [Entity=Interface] interface RatingOptions { - attribute number rating; [Optional] attribute boolean indicator; - }; [Entity=Interface] interface StarStyleOptions { - - attribute String backgroundUri; - attribute String foregroundUri; + attribute ResourceStr backgroundUri; + attribute ResourceStr foregroundUri; [Optional] - attribute String secondaryUri; - + attribute ResourceStr secondaryUri; }; [Entity=Interface] interface RatingInterface { - [CallSignature] RatingAttribute invoke(optional RatingOptions options); - }; [Synthetic] callback Callback_Number_Void = void (number parameter); [Entity=Interface] interface RatingConfiguration: [TypeArguments="RatingConfiguration"] CommonConfiguration { - attribute number rating; attribute boolean indicator; attribute number stars; attribute number stepSize; attribute Callback_Number_Void triggerChange; - }; callback OnRatingChangeCallback = void (number rating); [Entity=Class] -interface RatingAttribute: [TypeArguments="RatingAttribute"] CommonMethod { - - RatingAttribute stars(number value); +interface RatingAttribute: [Extends, TypeArguments="RatingAttribute"] CommonMethod { RatingAttribute stars((number or undefined) starCount); - RatingAttribute stepSize(number value); RatingAttribute stepSize((number or undefined) size); - RatingAttribute starStyle(StarStyleOptions options); RatingAttribute starStyle((StarStyleOptions or undefined) options); RatingAttribute onChange(Callback_Number_Void callback_); RatingAttribute onChange((OnRatingChangeCallback or undefined) callback_); - RatingAttribute contentModifier([TypeArguments="RatingConfiguration"] ContentModifier modifier); RatingAttribute contentModifier(([TypeArguments="RatingConfiguration"] ContentModifier or undefined) modifier); - }; \ No newline at end of file diff --git a/idl/rawFileDescriptor.idl b/idl/rawFileDescriptor.idl index efcbe99..addab10 100644 --- a/idl/rawFileDescriptor.idl +++ b/idl/rawFileDescriptor.idl @@ -1,8 +1,7 @@ +package rawFileDescriptor; [Entity=Interface] interface RawFileDescriptor { - attribute number fd; attribute number offset; attribute number length; - }; \ No newline at end of file diff --git a/idl/rect.idl b/idl/rect.idl index 6fafd1c..56e9e22 100644 --- a/idl/rect.idl +++ b/idl/rect.idl @@ -1,41 +1,45 @@ package rect; +import common.CommonShapeMethod as CommonShapeMethod; +import units.Length as Length; +[Entity=Tuple] +interface RadiusItem { + attribute Length value0; + attribute Length value1; +}; [Entity=Interface] interface RectOptions { - [Optional] - attribute (number or String) width; + attribute Length width; [Optional] - attribute (number or String) height; + attribute Length height; [Optional] attribute (number or String or sequence<(number or String)>) radius; - }; [Entity=Interface] interface RoundedRectOptions { - [Optional] - attribute (number or String) width; + attribute Length width; [Optional] - attribute (number or String) height; + attribute Length height; [Optional] - attribute (number or String) radiusWidth; + attribute Length radiusWidth; [Optional] - attribute (number or String) radiusHeight; - + attribute Length radiusHeight; }; [Entity=Interface] interface RectInterface { - constructor(optional (RectOptions or RoundedRectOptions) options); [CallSignature] RectAttribute invoke(optional (RectOptions or RoundedRectOptions) options); - }; [Entity=Class] -interface RectAttribute: [TypeArguments="RectAttribute"] CommonShapeMethod { - - RectAttribute radiusWidth((number or String) value); - RectAttribute radiusHeight((number or String) value); +interface RectAttribute: [Extends, TypeArguments="RectAttribute"] CommonShapeMethod { + RectAttribute radiusWidth(Length value); + RectAttribute radiusHeight(Length value); RectAttribute radius((number or String or sequence<(number or String)>) value); - +}; +[Entity=Interface] +interface RectInterface { + [CallSignature] + RectAttribute invoke(optional (RectOptions or RoundedRectOptions) options); }; \ No newline at end of file diff --git a/idl/refresh.idl b/idl/refresh.idl index f14d525..e025189 100644 --- a/idl/refresh.idl +++ b/idl/refresh.idl @@ -1,6 +1,11 @@ package refresh; +import common.Callback as Callback; +import common.Optional as Optional; +import common.CommonMethod as CommonMethod; +import CustomBuilder as CustomBuilder; +import units.ResourceStr as ResourceStr; +import ComponentContent as ComponentContent; dictionary RefreshStatus { - [OriginalEnumMemberName=Inactive] number INACTIVE = 0; [OriginalEnumMemberName=Drag] @@ -11,11 +16,9 @@ dictionary RefreshStatus { number REFRESH = 3; [OriginalEnumMemberName=Done] number DONE = 4; - }; [Entity=Interface] interface RefreshOptions { - attribute boolean refreshing; [Optional, Deprecated] attribute (number or String) offset; @@ -27,14 +30,11 @@ interface RefreshOptions { attribute CustomBuilder builder; [Optional] attribute ComponentContent refreshingContent; - }; [Entity=Interface] interface RefreshInterface { - [CallSignature] RefreshAttribute invoke(RefreshOptions value); - }; [Synthetic] callback Callback_RefreshStatus_Void = void (RefreshStatus state); @@ -43,13 +43,12 @@ callback Callback_Void = void (); [Synthetic] callback Callback_Number_Void = void (number parameter); [Entity=Class] -interface RefreshAttribute: [TypeArguments="RefreshAttribute"] CommonMethod { - +interface RefreshAttribute: [Extends, TypeArguments="RefreshAttribute"] CommonMethod { RefreshAttribute onStateChange(Callback_RefreshStatus_Void callback_); RefreshAttribute onRefreshing(Callback_Void callback_); RefreshAttribute refreshOffset(number value); RefreshAttribute pullToRefresh(boolean value); RefreshAttribute onOffsetChange(Callback_Number_Void callback_); RefreshAttribute pullDownRatio((number or undefined) ratio); - + RefreshAttribute maxPullDownDistance((number or undefined) distance); }; \ No newline at end of file diff --git a/idl/relative_container.idl b/idl/relative_container.idl index 4430e24..df468c3 100644 --- a/idl/relative_container.idl +++ b/idl/relative_container.idl @@ -1,65 +1,52 @@ package relative_container; +import units.Dimension as Dimension; +import Axis as Axis; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface RelativeContainerInterface { - [CallSignature] RelativeContainerAttribute invoke(); - }; [Entity=Interface] interface GuideLinePosition { - [Optional] attribute Dimension start; [Optional] attribute Dimension end; - }; [Entity=Interface] interface GuideLineStyle { - attribute String id; attribute Axis direction; attribute GuideLinePosition position; - }; dictionary BarrierDirection { - number LEFT = 0; number RIGHT = 1; number TOP = 2; number BOTTOM = 3; - }; dictionary LocalizedBarrierDirection { - number START = 0; number END = 1; number TOP = 2; number BOTTOM = 3; - }; [Entity=Interface] interface BarrierStyle { - attribute String id; attribute BarrierDirection direction; attribute sequence referencedId; - }; [Entity=Interface] interface LocalizedBarrierStyle { - attribute String id; attribute LocalizedBarrierDirection localizedDirection; attribute sequence referencedId; - }; [Entity=Class] -interface RelativeContainerAttribute: [TypeArguments="RelativeContainerAttribute"] CommonMethod { - +interface RelativeContainerAttribute: [Extends, TypeArguments="RelativeContainerAttribute"] CommonMethod { RelativeContainerAttribute guideLine(sequence value); RelativeContainerAttribute barrier(sequence value); RelativeContainerAttribute barrier(sequence barrierStyle); - }; \ No newline at end of file diff --git a/idl/remote_window.idl b/idl/remote_window.idl index ad5542a..7c5632a 100644 --- a/idl/remote_window.idl +++ b/idl/remote_window.idl @@ -1,32 +1,25 @@ package remote_window; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface RRect { - attribute number left; attribute number top; attribute number width; attribute number height; attribute number radius; - }; [Entity=Interface] interface WindowAnimationTarget { - readonly attribute String bundleName; readonly attribute String abilityName; readonly attribute RRect windowBounds; readonly attribute number missionId; - }; [Entity=Interface] interface RemoteWindowInterface { - [CallSignature] RemoteWindowAttribute invoke(WindowAnimationTarget target); - }; [Entity=Class] -interface RemoteWindowAttribute: [TypeArguments="RemoteWindowAttribute"] CommonMethod { - - +interface RemoteWindowAttribute: [Extends, TypeArguments="RemoteWindowAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/repeat.idl b/idl/repeat.idl index c1ac41d..233fef1 100644 --- a/idl/repeat.idl +++ b/idl/repeat.idl @@ -1,7 +1,5 @@ -package repeat; [Entity=Interface] interface VirtualScrollOptions { - [Optional] attribute number totalCount; [Optional] @@ -10,16 +8,11 @@ interface VirtualScrollOptions { void onLazyLoading(number index); [Optional] number onTotalCount(); - }; [Entity=Interface] interface TemplateOptions { - [Optional] attribute number cachedCount; - }; [TypeParameters="T"] -typedef (sequence or [TypeArguments="T"] ReadonlyArray or [TypeArguments="sequence"] Readonly) RepeatArray; -[TypeParameters="T"] -callback RepeatInterface = ([TypeArguments="T"] RepeatAttribute) ([TypeArguments="T"] RepeatArray arr); \ No newline at end of file +typedef (sequence or [TypeArguments="T"] ReadonlyArray or [TypeArguments="sequence"] Readonly) RepeatArray; \ No newline at end of file diff --git a/idl/resource.idl b/idl/resource.idl index 7aeae6b..f7135df 100644 --- a/idl/resource.idl +++ b/idl/resource.idl @@ -1,6 +1,6 @@ +package resource; [Entity=Interface] interface Resource { - attribute String bundleName; attribute String moduleName; attribute number id; @@ -8,5 +8,4 @@ interface Resource { attribute sequence params; [Optional] attribute number type; - }; \ No newline at end of file diff --git a/idl/rich_editor.idl b/idl/rich_editor.idl index 679b6e7..c5c616d 100644 --- a/idl/rich_editor.idl +++ b/idl/rich_editor.idl @@ -1,44 +1,88 @@ package rich_editor; +import common.ShadowOptions as ShadowOptions; +import common.ClickEvent as ClickEvent; +import common.SelectionOptions as SelectionOptions; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.HapticFeedbackMode as HapticFeedbackMode; +import common.RectResult as RectResult; +import common.HoverEvent as HoverEvent; +import common.PixelMap as PixelMap; +import CustomBuilder as CustomBuilder; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.ResourceStr as ResourceStr; +import units.Dimension as Dimension; +import units.Margin as Margin; +import units.BorderRadiuses as BorderRadiuses; +import units.Font as Font; +import FontStyle as FontStyle; +import FontWeight as FontWeight; +import TextAlign as TextAlign; +import WordBreak as WordBreak; +import LineBreakStrategy as LineBreakStrategy; +import ImageSpanAlignment as ImageSpanAlignment; +import ImageFit as ImageFit; +import ResponseType as ResponseType; +import CopyOptions as CopyOptions; +import BarState as BarState; +import DecorationStyleInterface as DecorationStyleInterface; +import StyledString as StyledString; +import MutableStyledString as MutableStyledString; +import resource.Resource as Resource; +import symbolglyph.SymbolEffectStrategy as SymbolEffectStrategy; +import symbolglyph.SymbolRenderingStrategy as SymbolRenderingStrategy; +import DecorationStyleResult as DecorationStyleResult; +import TextRange as TextRange; +import MenuType as MenuType; +import TextEditControllerEx as TextEditControllerEx; +import LayoutManager as LayoutManager; +import PreviewText as PreviewText; +import StyledStringController as StyledStringController; +import StyledStringChangedListener as StyledStringChangedListener; +import TextDataDetectorConfig as TextDataDetectorConfig; +import OnDidChangeCallback as OnDidChangeCallback; +import EditMenuOptions as EditMenuOptions; +import KeyboardAppearance as KeyboardAppearance; +import gesture.GestureEvent as GestureEvent; +import EnterKeyType as EnterKeyType; +import SubmitEvent as SubmitEvent; +import LengthMetrics as LengthMetrics; +import ColorMetrics as ColorMetrics; +import span.TextBackgroundStyle as TextBackgroundStyle; dictionary RichEditorDeleteDirection { - number BACKWARD = 0; number FORWARD = 1; - }; dictionary RichEditorSpanType { - number TEXT = 0; number IMAGE = 1; number MIXED = 2; number BUILDER = 3; number DEFAULT = 4; - +}; +dictionary UndoStyle { + number CLEAR_STYLE = 0; + number KEEP_STYLE = 1; }; dictionary RichEditorResponseType { - number RIGHT_CLICK = 0; number LONG_PRESS = 1; number SELECT = 2; number DEFAULT = 3; - }; [Entity=Tuple, Synthetic] interface Tuple_Number_Number { - attribute number value0; attribute number value1; - }; [Entity=Interface] interface RichEditorSpanPosition { - attribute number spanIndex; attribute Tuple_Number_Number spanRange; - }; [Entity=Interface] interface RichEditorTextStyle { - [Optional] attribute ResourceColor fontColor; [Optional] @@ -63,65 +107,55 @@ interface RichEditorTextStyle { attribute String fontFeature; [Optional] attribute TextBackgroundStyle textBackgroundStyle; - }; [Entity=Tuple, Synthetic] interface Tuple_Dimension_Dimension { - attribute Dimension value0; attribute Dimension value1; - }; [Entity=Interface] interface LeadingMarginPlaceholder { - attribute PixelMap pixelMap; attribute Tuple_Dimension_Dimension size; - }; [Entity=Interface] interface RichEditorParagraphStyle { - [Optional] attribute TextAlign textAlign; [Optional] + attribute TextVerticalAlign textVerticalAlign; + [Optional] attribute (Dimension or LeadingMarginPlaceholder) leadingMargin; [Optional] attribute WordBreak wordBreak; [Optional] attribute LineBreakStrategy lineBreakStrategy; - + [Optional] + attribute number paragraphSpacing; }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface PasteEvent { - [Optional] attribute Callback_Void preventDefault; - }; [Entity=Interface] interface RichEditorTextSpan { - attribute RichEditorSpanPosition spanPosition; attribute String value; [Optional] attribute RichEditorTextStyle textStyle; - }; [Entity=Interface] interface RichEditorLayoutStyle { - [Optional] attribute (Dimension or Margin) margin; [Optional] attribute (Dimension or BorderRadiuses) borderRadius; - }; [Entity=Interface] interface RichEditorImageSpanStyle { - [Optional] attribute Tuple_Dimension_Dimension size; [Optional] @@ -130,11 +164,9 @@ interface RichEditorImageSpanStyle { attribute ImageFit objectFit; [Optional] attribute RichEditorLayoutStyle layoutStyle; - }; [Entity=Interface] interface RichEditorSymbolSpanStyle { - [Optional] attribute (number or String or Resource) fontSize; [Optional] @@ -145,11 +177,9 @@ interface RichEditorSymbolSpanStyle { attribute SymbolEffectStrategy effectStrategy; [Optional] attribute SymbolRenderingStrategy renderingStrategy; - }; [Entity=Interface] interface RichEditorTextStyleResult { - attribute ResourceColor fontColor; attribute number fontSize; attribute FontStyle fontStyle; @@ -168,28 +198,22 @@ interface RichEditorTextStyleResult { attribute String fontFeature; [Optional] attribute TextBackgroundStyle textBackgroundStyle; - }; [Entity=Interface] interface RichEditorParagraphResult { - attribute RichEditorParagraphStyle style; attribute Tuple_Number_Number range; - }; [Entity=Interface] interface RichEditorSymbolSpanStyleResult { - attribute (number or String or Resource) fontSize; attribute sequence fontColor; attribute (number or FontWeight or String) fontWeight; attribute SymbolEffectStrategy effectStrategy; attribute SymbolRenderingStrategy renderingStrategy; - }; [Entity=Interface] interface RichEditorTextSpanResult { - attribute RichEditorSpanPosition spanPosition; attribute String value; attribute RichEditorTextStyleResult textStyle; @@ -202,21 +226,19 @@ interface RichEditorTextSpanResult { attribute RichEditorParagraphStyle paragraphStyle; [Optional] attribute String previewText; - + [Optional] + attribute RichEditorUrlStyle urlStyle; }; [Entity=Interface] interface RichEditorImageSpanStyleResult { - attribute Tuple_Number_Number size; attribute ImageSpanAlignment verticalAlign; attribute ImageFit objectFit; [Optional] attribute RichEditorLayoutStyle layoutStyle; - }; [Entity=Interface] interface RichEditorImageSpanResult { - attribute RichEditorSpanPosition spanPosition; [Optional] attribute PixelMap valuePixelMap; @@ -224,25 +246,20 @@ interface RichEditorImageSpanResult { attribute ResourceStr valueResourceStr; attribute RichEditorImageSpanStyleResult imageStyle; attribute Tuple_Number_Number offsetInSpan; - }; [Entity=Interface] interface RichEditorImageSpan { - attribute RichEditorSpanPosition spanPosition; attribute (PixelMap or ResourceStr) value; [Optional] attribute RichEditorImageSpanStyle imageStyle; - }; [Entity=Interface] interface RichEditorRange { - [Optional] attribute number start; [Optional] attribute number end; - }; [Synthetic] callback Callback_ClickEvent_Void = void (ClickEvent parameter); @@ -250,18 +267,15 @@ callback Callback_ClickEvent_Void = void (ClickEvent parameter); callback Callback_GestureEvent_Void = void (GestureEvent parameter); [Entity=Interface] interface RichEditorGesture { - [Optional] attribute Callback_ClickEvent_Void onClick; [Optional] attribute Callback_GestureEvent_Void onLongPress; [Optional] attribute Callback_GestureEvent_Void onDoubleClick; - }; [Entity=Interface] interface RichEditorTextSpanOptions { - [Optional] attribute number offset; [Optional] @@ -270,18 +284,16 @@ interface RichEditorTextSpanOptions { attribute RichEditorParagraphStyle paragraphStyle; [Optional] attribute RichEditorGesture gesture; - + [Optional] + attribute RichEditorUrlStyle urlStyle; }; [Entity=Interface] interface KeyboardOptions { - [Optional] attribute boolean supportAvoidance; - }; [Entity=Interface] interface RichEditorImageSpanOptions { - [Optional] attribute number offset; [Optional] @@ -290,115 +302,89 @@ interface RichEditorImageSpanOptions { attribute RichEditorGesture gesture; [Optional] attribute OnHoverCallback onHover; - }; [Entity=Interface] interface RichEditorBuilderSpanOptions { - [Optional] attribute number offset; [Optional] attribute ColorMetrics dragBackgroundColor; [Optional] attribute boolean isDragShadowNeeded; - }; [Entity=Interface] interface PlaceholderStyle { - [Optional] attribute Font font; [Optional] attribute ResourceColor fontColor; - }; [Entity=Interface] interface RichEditorSpanStyleOptions: RichEditorRange { - - }; [Entity=Interface] interface RichEditorParagraphStyleOptions: RichEditorRange { - attribute RichEditorParagraphStyle style; - }; [Entity=Interface] interface RichEditorUpdateTextSpanStyleOptions: RichEditorSpanStyleOptions { - attribute RichEditorTextStyle textStyle; - + [Optional] + attribute RichEditorUrlStyle urlStyle; }; [Entity=Interface] interface RichEditorUpdateImageSpanStyleOptions: RichEditorSpanStyleOptions { - attribute RichEditorImageSpanStyle imageStyle; - }; [Entity=Interface] interface RichEditorUpdateSymbolSpanStyleOptions: RichEditorSpanStyleOptions { - attribute RichEditorSymbolSpanStyle symbolStyle; - }; [Entity=Interface] interface RichEditorSymbolSpanOptions { - [Optional] attribute number offset; [Optional] attribute RichEditorSymbolSpanStyle style; - }; [Entity=Interface] interface RichEditorSelection { - attribute Tuple_Number_Number selection; attribute sequence<(RichEditorTextSpanResult or RichEditorImageSpanResult)> spans; - }; [Entity=Interface] interface RichEditorInsertValue { - attribute number insertOffset; attribute String insertValue; [Optional] attribute String previewText; - }; [Entity=Interface] interface RichEditorDeleteValue { - attribute number offset; attribute RichEditorDeleteDirection direction; attribute number length; attribute sequence<(RichEditorTextSpanResult or RichEditorImageSpanResult)> richEditorDeleteSpans; - }; [Entity=Interface] interface RichEditorChangeValue { - attribute TextRange rangeBefore; attribute sequence replacedSpans; attribute sequence replacedImageSpans; attribute sequence replacedSymbolSpans; - + [Optional] + attribute TextChangeReason changeReason; }; [Entity=Interface] interface RichEditorOptions { - attribute RichEditorController controller; - }; [Entity=Interface] interface RichEditorStyledStringOptions { - attribute RichEditorStyledStringController controller; - }; [Entity=Interface] interface SelectionMenuOptions { - [Optional] attribute MenuOnAppearCallback onAppear; [Optional] @@ -409,28 +395,32 @@ interface SelectionMenuOptions { attribute MenuCallback onMenuShow; [Optional] attribute MenuCallback onMenuHide; - + [Optional] + attribute PreviewMenuOptions previewMenuOptions; +}; +[Entity=Interface] +interface PreviewMenuOptions { + [Optional] + attribute HapticFeedbackMode hapticFeedbackMode; }; [Entity=Class] -interface RichEditorBaseController { - +interface RichEditorBaseController: TextEditControllerEx { number getCaretOffset(); boolean setCaretOffset(number offset); void closeSelectionMenu(); RichEditorTextStyle getTypingStyle(); void setTypingStyle(RichEditorTextStyle value); + void setTypingParagraphStyle(RichEditorParagraphStyle style); void setSelection(number selectionStart, number selectionEnd, optional SelectionOptions options); boolean isEditing(); void stopEditing(); LayoutManager getLayoutManager(); PreviewText getPreviewText(); (RectResult or undefined) getCaretRect(); - }; [Entity=Class] -interface RichEditorController: RichEditorBaseController { - - number addTextSpan(String value, optional RichEditorTextSpanOptions options); +interface RichEditorController: [Extends] RichEditorBaseController { + number addTextSpan(ResourceStr content, optional RichEditorTextSpanOptions options); number addImageSpan((PixelMap or ResourceStr) value, optional RichEditorImageSpanOptions options); number addBuilderSpan(CustomBuilder value, optional RichEditorBuilderSpanOptions options); number addSymbolSpan(Resource value, optional RichEditorSymbolSpanOptions options); @@ -444,17 +434,14 @@ interface RichEditorController: RichEditorBaseController { sequence fromStyledString(StyledString value); [Throws] StyledString toStyledString(RichEditorRange value); - }; typedef (RichEditorImageSpanResult or RichEditorTextSpanResult) RichEditorSpan; [Entity=Class] -interface RichEditorStyledStringController: RichEditorBaseController { - +interface RichEditorStyledStringController: [Extends] RichEditorBaseController, StyledStringController { void setStyledString(StyledString styledString); MutableStyledString getStyledString(); RichEditorRange getSelection(); void onContentChanged(StyledStringChangedListener listener); - }; [Synthetic] callback Callback_RichEditorSelection_Void = void (RichEditorSelection parameter); @@ -477,8 +464,7 @@ callback Callback_CutEvent_Void = void (CutEvent parameter); [Synthetic] callback Callback_CopyEvent_Void = void (CopyEvent parameter); [Entity=Class] -interface RichEditorAttribute: [TypeArguments="RichEditorAttribute"] CommonMethod { - +interface RichEditorAttribute: [Extends, TypeArguments="RichEditorAttribute"] CommonMethod { RichEditorAttribute onReady(Callback_Void callback_); RichEditorAttribute onSelect(Callback_RichEditorSelection_Void callback_); RichEditorAttribute onSelectionChange(Callback_RichEditorRange_Void callback_); @@ -510,23 +496,25 @@ interface RichEditorAttribute: [TypeArguments="RichEditorAttribute"] CommonMetho RichEditorAttribute barState(BarState state); RichEditorAttribute maxLength((number or undefined) maxLength); RichEditorAttribute maxLines((number or undefined) maxLines); + RichEditorAttribute enableAutoSpacing((boolean or undefined) enable); RichEditorAttribute keyboardAppearance((KeyboardAppearance or undefined) appearance); RichEditorAttribute stopBackPress((boolean or undefined) isStopped); - + RichEditorAttribute undoStyle((UndoStyle or undefined) style); }; [Entity=Interface] interface CutEvent { - [Optional] attribute Callback_Void preventDefault; - }; [Entity=Interface] interface CopyEvent { - [Optional] attribute Callback_Void preventDefault; - +}; +[Entity=Interface] +interface RichEditorUrlStyle { + [Optional] + attribute ResourceStr url; }; callback SubmitCallback = void (EnterKeyType enterKey, SubmitEvent event); callback MenuOnAppearCallback = void (number start, number end); @@ -535,10 +523,8 @@ callback PasteEventCallback = void (optional PasteEvent event); callback OnHoverCallback = void (boolean status, HoverEvent event); [Entity=Interface] interface RichEditorInterface { - [CallSignature] RichEditorAttribute invoke(RichEditorOptions value); [CallSignature] RichEditorAttribute invoke(RichEditorStyledStringOptions options); - }; \ No newline at end of file diff --git a/idl/rich_text.idl b/idl/rich_text.idl index 822d8a7..b83bbf3 100644 --- a/idl/rich_text.idl +++ b/idl/rich_text.idl @@ -1,17 +1,16 @@ package rich_text; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface RichTextInterface { - + [CallSignature] + RichTextAttribute invoke((String or Resource) content); [CallSignature] RichTextAttribute invoke(String content); - }; [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface RichTextAttribute: [TypeArguments="RichTextAttribute"] CommonMethod { - +interface RichTextAttribute: [Extends, TypeArguments="RichTextAttribute"] CommonMethod { RichTextAttribute onStart(Callback_Void callback_); RichTextAttribute onComplete(Callback_Void callback_); - }; \ No newline at end of file diff --git a/idl/root_scene.idl b/idl/root_scene.idl index 18ca840..78035ca 100644 --- a/idl/root_scene.idl +++ b/idl/root_scene.idl @@ -1,18 +1,13 @@ package root_scene; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface RootSceneSession { - - }; [Entity=Interface] interface RootSceneInterface { - [CallSignature] RootSceneAttribute invoke(RootSceneSession session); - }; [Entity=Class] -interface RootSceneAttribute: [TypeArguments="RootSceneAttribute"] CommonMethod { - - +interface RootSceneAttribute: [Extends, TypeArguments="RootSceneAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/row.idl b/idl/row.idl index 0d33f1d..aa332fb 100644 --- a/idl/row.idl +++ b/idl/row.idl @@ -1,31 +1,29 @@ package row; +import common.PointLightStyle as PointLightStyle; +import common.Optional as Optional; +import common.CommonMethod as CommonMethod; +import VerticalAlign as VerticalAlign; +import FlexAlign as FlexAlign; +import column.SpaceType as SpaceType; [Entity=Interface] interface RowOptions { - [Optional] attribute (String or number) space; - }; interface RowOptionsV2 { - attribute String stub; - }; [Entity=Interface] interface RowInterface { - [CallSignature] RowAttribute invoke(optional RowOptions options); [CallSignature] RowAttribute invoke(optional (RowOptions or RowOptionsV2) options); - }; [Entity=Class] -interface RowAttribute: [TypeArguments="RowAttribute"] CommonMethod { - +interface RowAttribute: [Extends, TypeArguments="RowAttribute"] CommonMethod { RowAttribute alignItems(VerticalAlign value); RowAttribute justifyContent(FlexAlign value); RowAttribute pointLight(PointLightStyle value); RowAttribute reverse((boolean or undefined) isReversed); - }; \ No newline at end of file diff --git a/idl/row_split.idl b/idl/row_split.idl index eec6471..1688854 100644 --- a/idl/row_split.idl +++ b/idl/row_split.idl @@ -1,14 +1,11 @@ package row_split; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface RowSplitInterface { - [CallSignature] RowSplitAttribute invoke(); - }; [Entity=Class] -interface RowSplitAttribute: [TypeArguments="RowSplitAttribute"] CommonMethod { - +interface RowSplitAttribute: [Extends, TypeArguments="RowSplitAttribute"] CommonMethod { RowSplitAttribute resizeable(boolean value); - }; \ No newline at end of file diff --git a/idl/save_button.idl b/idl/save_button.idl index dc85957..9dbb37f 100644 --- a/idl/save_button.idl +++ b/idl/save_button.idl @@ -1,13 +1,9 @@ -package save_button; dictionary SaveIconStyle { - number FULL_FILLED = 0; number LINES = 1; number PICTURE = 2; - }; dictionary SaveDescription { - number DOWNLOAD = 0; number DOWNLOAD_FILE = 1; number SAVE = 2; @@ -21,38 +17,34 @@ dictionary SaveDescription { number QUICK_SAVE_TO_GALLERY = 10; number RESAVE_TO_GALLERY = 11; number SAVE_ALL = 12; - }; [Entity=Interface] interface SaveButtonOptions { - [Optional] attribute SaveIconStyle icon; [Optional] attribute SaveDescription text; [Optional] attribute ButtonType buttonType; - }; dictionary SaveButtonOnClickResult { - number SUCCESS = 0; number TEMPORARY_AUTHORIZATION_FAILED = 1; - }; [Entity=Interface] interface SaveButtonInterface { - [CallSignature] SaveButtonAttribute invoke(); [CallSignature] SaveButtonAttribute invoke(SaveButtonOptions options); - }; -callback SaveButtonCallback = void (ClickEvent event, SaveButtonOnClickResult result, optional [TypeArguments="void"] BusinessError error); +callback SaveButtonCallback = void (ClickEvent event, SaveButtonOnClickResult result, optional BusinessError error); [Entity=Class] -interface SaveButtonAttribute: [TypeArguments="SaveButtonAttribute"] SecurityComponentMethod { - +interface SaveButtonAttribute: [Extends, TypeArguments="SaveButtonAttribute"] SecurityComponentMethod { SaveButtonAttribute onClick(SaveButtonCallback event); - + SaveButtonAttribute setIcon(Resource icon); + SaveButtonAttribute setText((String or Resource) text); + SaveButtonAttribute iconSize((Dimension or SizeOptions) size); + SaveButtonAttribute iconBorderRadius((Dimension or BorderRadiuses) radius); + SaveButtonAttribute stateEffect(boolean enabled); }; \ No newline at end of file diff --git a/idl/screen.idl b/idl/screen.idl index 4620cca..1c4989f 100644 --- a/idl/screen.idl +++ b/idl/screen.idl @@ -1,13 +1,10 @@ package screen; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface ScreenInterface { - [CallSignature] ScreenAttribute invoke(number screenId); - }; [Entity=Class] -interface ScreenAttribute: [TypeArguments="ScreenAttribute"] CommonMethod { - - +interface ScreenAttribute: [Extends, TypeArguments="ScreenAttribute"] CommonMethod { }; \ No newline at end of file diff --git a/idl/scroll.idl b/idl/scroll.idl index 7249770..0d0fec7 100644 --- a/idl/scroll.idl +++ b/idl/scroll.idl @@ -1,114 +1,118 @@ package scroll; +import BarState as BarState; +import Edge as Edge; +import Color as Color; +import EdgeEffect as EdgeEffect; +import ScrollSource as ScrollSource; +import Curve as Curve; +import common.ICurve as ICurve; +import common.RectResult as RectResult; +import common.ScrollableCommonMethod as ScrollableCommonMethod; +import common.EdgeEffectOptions as EdgeEffectOptions; +import common.NestedScrollOptions as NestedScrollOptions; +import common.CommonMethod as CommonMethod; +import units.Dimension as Dimension; +import units.Length as Length; +import units.VoidCallback as VoidCallback; +import units.Resource as Resource; +import units.LengthMetrics as LengthMetrics; +import list.ScrollSnapAlign as ScrollSnapAlign; +import list.ScrollState as ScrollState; dictionary ScrollDirection { - [OriginalEnumMemberName=Vertical] number VERTICAL = 0; [OriginalEnumMemberName=Horizontal] number HORIZONTAL = 1; [Deprecated, OriginalEnumMemberName=Free] - number FREE = 2; + number LEGACY_FREE = 2; [OriginalEnumMemberName=None] number NONE = 3; - + number FREE = 4; }; dictionary ScrollAlign { - number START = 0; number CENTER = 1; number END = 2; number AUTO = 3; - }; [Entity=Interface] interface OffsetResult { - attribute number xOffset; attribute number yOffset; - }; [Entity=Interface] interface ScrollEdgeOptions { - [Optional] attribute number velocity; - }; [Entity=Interface] interface ScrollToIndexOptions { - [Optional] attribute LengthMetrics extraOffset; - }; [Entity=Interface] interface ScrollAnimationOptions { - [Optional] attribute number duration; [Optional] attribute (Curve or ICurve) curve; [Optional] attribute boolean canOverScroll; - }; [Entity=Interface] interface OffsetOptions { - [Optional] attribute Dimension xOffset; [Optional] attribute Dimension yOffset; - +}; +[Entity=Interface] +interface UIScrollEvent: UIScrollableCommonEvent { + void setOnWillScroll((ScrollOnWillScrollCallback or undefined) callback_); + void setOnDidScroll((ScrollOnScrollCallback or undefined) callback_); }; [Entity=Literal, Synthetic] interface Literal_Boolean_next_Axis_direction { - attribute boolean next; [Optional] attribute Axis direction; - }; [Entity=Class] interface Scroller { - constructor(); - undefined scrollTo(ScrollOptions options); - undefined scrollEdge(Edge value, optional ScrollEdgeOptions options); + void scrollTo(ScrollOptions options); + void scrollEdge(Edge value, optional ScrollEdgeOptions options); [Throws] void fling(number velocity); - undefined scrollPage(ScrollPageOptions value); + void scrollPage(ScrollPageOptions value); [Deprecated] - undefined scrollPage(Literal_Boolean_next_Axis_direction value); + void scrollPage(Literal_Boolean_next_Axis_direction value); OffsetResult currentOffset(); - undefined scrollToIndex(number value, optional boolean smooth, optional ScrollAlign align, optional ScrollToIndexOptions options); - undefined scrollBy(Length dx, Length dy); + void scrollToIndex(number value, optional boolean smooth, optional ScrollAlign align, optional ScrollToIndexOptions options); + void scrollBy(Length dx, Length dy); boolean isAtEnd(); [Throws] RectResult getItemRect(number index); [Throws] number getItemIndex(number x, number y); - }; [Entity=Interface] interface ScrollOptions { - attribute (number or String) xOffset; attribute (number or String) yOffset; [Optional] attribute (ScrollAnimationOptions or boolean) animation; - + [Optional] + attribute boolean canOverScroll; }; [Entity=Interface] interface ScrollPageOptions { - attribute boolean next; [Optional] attribute boolean animation; - }; [Entity=Interface] interface ScrollSnapOptions { - attribute ScrollSnapAlign snapAlign; [Optional] attribute (Dimension or sequence) snapPagination; @@ -116,21 +120,16 @@ interface ScrollSnapOptions { attribute boolean enableSnapToStart; [Optional] attribute boolean enableSnapToEnd; - }; [Entity=Interface] interface ScrollInterface { - [CallSignature] ScrollAttribute invoke(optional Scroller scroller); - }; callback OnScrollEdgeCallback = void (Edge side); [Entity=Interface] interface OnScrollFrameBeginHandlerResult { - attribute number offsetRemain; - }; callback OnScrollFrameBeginCallback = OnScrollFrameBeginHandlerResult (number offset, ScrollState state); [Synthetic] @@ -138,18 +137,24 @@ callback Callback_Number_Number_Void = void (number xOffset, number yOffset); [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface ScrollAttribute: [TypeArguments="ScrollAttribute"] ScrollableCommonMethod { - +interface ScrollAttribute: [Extends, TypeArguments="ScrollAttribute"] ScrollableCommonMethod { ScrollAttribute scrollable(ScrollDirection value); + ScrollAttribute maxZoomScale(number scale); + ScrollAttribute minZoomScale(number scale); + ScrollAttribute zoomScale(number scale); + ScrollAttribute enableBouncesZoom(boolean enable); [Deprecated] ScrollAttribute onScroll(Callback_Number_Number_Void event); - ScrollAttribute onWillScroll((ScrollOnWillScrollCallback or undefined) handler); + ScrollAttribute onWillScroll(optional ScrollOnWillScrollCallback handler); ScrollAttribute onDidScroll(ScrollOnScrollCallback handler); ScrollAttribute onScrollEdge(OnScrollEdgeCallback event); ScrollAttribute onScrollStart(VoidCallback event); [Deprecated] ScrollAttribute onScrollEnd(Callback_Void event); ScrollAttribute onScrollStop(VoidCallback event); + ScrollAttribute onDidZoom(ScrollOnDidZoomCallback event); + ScrollAttribute onZoomStart(VoidCallback event); + ScrollAttribute onZoomStop(VoidCallback event); ScrollAttribute scrollBar(BarState barState); ScrollAttribute scrollBarColor((Color or number or String) color); ScrollAttribute scrollBarWidth((number or String) value); @@ -161,7 +166,8 @@ interface ScrollAttribute: [TypeArguments="ScrollAttribute"] ScrollableCommonMet ScrollAttribute scrollSnap(ScrollSnapOptions value); ScrollAttribute enablePaging(boolean value); ScrollAttribute initialOffset(OffsetOptions value); - }; callback ScrollOnScrollCallback = void (number xOffset, number yOffset, ScrollState scrollState); -callback ScrollOnWillScrollCallback = OffsetResult (number xOffset, number yOffset, ScrollState scrollState, ScrollSource scrollSource); \ No newline at end of file +callback ScrollOnWillScrollCallback = OffsetResult (number xOffset, number yOffset, ScrollState scrollState, ScrollSource scrollSource); +callback ScrollOnWillScrollCallback = (OffsetResult or undefined) (number xOffset, number yOffset, ScrollState scrollState, ScrollSource scrollSource); +callback ScrollOnDidZoomCallback = void (number scale); \ No newline at end of file diff --git a/idl/scroll_bar.idl b/idl/scroll_bar.idl index 0654e69..6b65ce2 100644 --- a/idl/scroll_bar.idl +++ b/idl/scroll_bar.idl @@ -1,32 +1,29 @@ package scroll_bar; +import scroll.Scroller as Scroller; +import BarState as BarState; +import common.Optional as Optional; +import common.CommonMethod as CommonMethod; dictionary ScrollBarDirection { - [OriginalEnumMemberName=Vertical] number VERTICAL = 0; [OriginalEnumMemberName=Horizontal] number HORIZONTAL = 1; - }; [Entity=Interface] interface ScrollBarOptions { - attribute Scroller scroller; [Optional] attribute ScrollBarDirection direction; [Optional] attribute BarState state; - }; [Entity=Interface] interface ScrollBarInterface { - [CallSignature] ScrollBarAttribute invoke(ScrollBarOptions value); - }; [Entity=Class] -interface ScrollBarAttribute: [TypeArguments="ScrollBarAttribute"] CommonMethod { - +interface ScrollBarAttribute: [Extends, TypeArguments="ScrollBarAttribute"] CommonMethod { ScrollBarAttribute enableNestedScroll((boolean or undefined) enabled); - + ScrollBarAttribute scrollBarColor((ColorMetrics or undefined) color); }; \ No newline at end of file diff --git a/idl/search.idl b/idl/search.idl index 217b56e..e8e93e3 100644 --- a/idl/search.idl +++ b/idl/search.idl @@ -1,33 +1,60 @@ package search; +import common.TextContentControllerBase as TextContentControllerBase; +import common.SelectionOptions as SelectionOptions; +import common.Callback as Callback; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import common.TextDecorationOptions as TextDecorationOptions; +import common.Bindable as Bindable; +import CustomBuilder as CustomBuilder; +import units.ResourceStr as ResourceStr; +import units.Length as Length; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.Font as Font; +import CaretStyle as CaretStyle; +import EditableTextOnChangeCallback as EditableTextOnChangeCallback; +import InsertValue as InsertValue; +import DeleteValue as DeleteValue; +import EditMenuOptions as EditMenuOptions; +import KeyboardAppearance as KeyboardAppearance; +import EditableTextChangeValue as EditableTextChangeValue; +import AutoCapitalizationMode as AutoCapitalizationMode; +import EnterKeyType as EnterKeyType; +import OnTextSelectionChangeCallback as OnTextSelectionChangeCallback; +import OnContentScrollCallback as OnContentScrollCallback; +import OnPasteCallback as OnPasteCallback; +import SubmitEvent as SubmitEvent; +import CopyOptions as CopyOptions; +import TextAlign as TextAlign; +import KeyboardOptions as KeyboardOptions; +import resource.Resource as Resource; +import SymbolGlyphModifier as SymbolGlyphModifier; [Entity=Class] -interface SearchController: TextContentControllerBase { - +interface SearchController: [Extends] TextContentControllerBase { constructor(); void caretPosition(number value); void stopEditing(); void setTextSelection(number selectionStart, number selectionEnd, optional SelectionOptions options); - }; dictionary CancelButtonStyle { - number CONSTANT = 0; number INVISIBLE = 1; number INPUT = 2; - }; dictionary SearchType { - number NORMAL = 0; number NUMBER = 2; number PHONE_NUMBER = 3; number EMAIL = 5; number NUMBER_DECIMAL = 12; number URL = 13; - + number ONE_TIME_CODE = 14; }; [Entity=Interface] interface SearchOptions { - + [Optional] + attribute ResourceStr value; [Optional] attribute String value; [Optional] @@ -36,54 +63,43 @@ interface SearchOptions { attribute String icon; [Optional] attribute SearchController controller; - }; [Entity=Interface] interface SearchInterface { - [CallSignature] SearchAttribute invoke(optional SearchOptions options); - }; [Entity=Interface] interface IconOptions { - [Optional] attribute Length size; [Optional] attribute ResourceColor color; [Optional] attribute ResourceStr src; - }; [Entity=Interface] interface SearchButtonOptions { - [Optional] attribute Length fontSize; [Optional] attribute ResourceColor fontColor; [Optional] attribute boolean autoDisable; - }; [Entity=Interface] interface CancelButtonOptions { - [Optional] attribute CancelButtonStyle style; [Optional] attribute IconOptions icon; - }; [Entity=Interface] interface CancelButtonSymbolOptions { - [Optional] attribute CancelButtonStyle style; [Optional] attribute SymbolGlyphModifier icon; - }; callback SearchSubmitCallback = void (String searchContent, optional SubmitEvent event); [Synthetic] @@ -99,10 +115,12 @@ callback Callback_DeleteValue_Boolean = boolean (DeleteValue parameter); [Synthetic] callback Callback_DeleteValue_Void = void (DeleteValue parameter); [Synthetic] +callback Callback_IMEClient_Void = void (IMEClient parameter); +[Synthetic] callback Callback_EditableTextChangeValue_Boolean = boolean (EditableTextChangeValue parameter); [Entity=Class] -interface SearchAttribute: [TypeArguments="SearchAttribute"] CommonMethod { - +interface SearchAttribute: [Extends, TypeArguments="SearchAttribute"] CommonMethod { + SearchAttribute searchButton(ResourceStr value, optional SearchButtonOptions option); SearchAttribute searchButton(String value, optional SearchButtonOptions option); SearchAttribute fontColor(ResourceColor value); SearchAttribute searchIcon((IconOptions or SymbolGlyphModifier) value); @@ -116,8 +134,7 @@ interface SearchAttribute: [TypeArguments="SearchAttribute"] CommonMethod { SearchAttribute placeholderFont(optional Font value); SearchAttribute textFont(optional Font value); SearchAttribute enterKeyType(EnterKeyType value); - SearchAttribute onSubmit(Callback_String_Void callback_); - SearchAttribute onSubmit(SearchSubmitCallback callback_); + SearchAttribute onSubmit((Callback_String_Void or SearchSubmitCallback) callback_); SearchAttribute onChange(EditableTextOnChangeCallback callback_); SearchAttribute onTextSelectionChange(OnTextSelectionChangeCallback callback_); SearchAttribute onContentScroll(OnContentScrollCallback callback_); @@ -143,12 +160,16 @@ interface SearchAttribute: [TypeArguments="SearchAttribute"] CommonMethod { SearchAttribute onDidInsert(Callback_InsertValue_Void callback_); SearchAttribute onWillDelete(Callback_DeleteValue_Boolean callback_); SearchAttribute onDidDelete(Callback_DeleteValue_Void callback_); + SearchAttribute onWillAttachIME(Callback_IMEClient_Void callback_); SearchAttribute editMenuOptions(EditMenuOptions editMenu); SearchAttribute enablePreviewText(boolean enable); SearchAttribute enableHapticFeedback(boolean isEnabled); + SearchAttribute autoCapitalizationMode(AutoCapitalizationMode mode); SearchAttribute halfLeading((boolean or undefined) halfLeading); SearchAttribute stopBackPress((boolean or undefined) isStopped); SearchAttribute onWillChange(Callback_EditableTextChangeValue_Boolean callback_); SearchAttribute keyboardAppearance((KeyboardAppearance or undefined) appearance); - + SearchAttribute strokeWidth((LengthMetrics or undefined) width); + SearchAttribute strokeColor((ResourceColor or undefined) color); + SearchAttribute enableAutoSpacing((boolean or undefined) enabled); }; \ No newline at end of file diff --git a/idl/PermissionRequestResult.idl b/idl/security.PermissionRequestResult.idl similarity index 51% rename from idl/PermissionRequestResult.idl rename to idl/security.PermissionRequestResult.idl index b930f0d..19bdade 100644 --- a/idl/PermissionRequestResult.idl +++ b/idl/security.PermissionRequestResult.idl @@ -1,12 +1,10 @@ -package security; -[Entity=Class] +package security.PermissionRequestResult; +[Entity=Class, DefaultExport] interface PermissionRequestResult { - attribute sequence permissions; - attribute sequence authResults; + attribute sequence authResults; [Optional] attribute sequence dialogShownResults; [Optional] - attribute sequence errorReasons; - + attribute sequence errorReasons; }; \ No newline at end of file diff --git a/idl/security_component.idl b/idl/security_component.idl index 7d40f12..cc1521f 100644 --- a/idl/security_component.idl +++ b/idl/security_component.idl @@ -1,13 +1,9 @@ -package security_component; dictionary SecurityComponentLayoutDirection { - number HORIZONTAL = 0; number VERTICAL = 1; - }; [Entity=Class, TypeParameters="T"] interface SecurityComponentMethod { - T iconSize(Dimension value); T layoutDirection(SecurityComponentLayoutDirection value); T position(Position value); @@ -15,7 +11,7 @@ interface SecurityComponentMethod { T offset((Position or Edges or LocalizedEdges) value); T fontSize(Dimension value); T fontStyle(FontStyle value); - T fontWeight((number or FontWeight or String) value); + T fontWeight((number or FontWeight or String or Resource) value); T fontFamily((String or Resource) value); T fontColor(ResourceColor value); T iconColor(ResourceColor value); @@ -23,7 +19,6 @@ interface SecurityComponentMethod { T borderStyle(BorderStyle value); T borderWidth(Dimension value); T borderColor(ResourceColor value); - T borderRadius(Dimension value); T borderRadius((Dimension or BorderRadiuses) radius); T padding((Padding or Dimension) value); T textIconSpace(Dimension value); @@ -39,10 +34,9 @@ interface SecurityComponentMethod { T chainMode(Axis direction, ChainStyle style); T minFontScale((number or Resource) scale); T maxFontScale((number or Resource) scale); - T maxLines(number line); + T maxLines((number or Resource) line); T minFontSize((number or String or Resource) minSize); T maxFontSize((number or String or Resource) maxSize); T heightAdaptivePolicy(TextHeightAdaptivePolicy policy); T enabled(boolean respond); - }; \ No newline at end of file diff --git a/idl/select.idl b/idl/select.idl index b244c2b..40e0a15 100644 --- a/idl/select.idl +++ b/idl/select.idl @@ -1,90 +1,97 @@ package select; +import common.CommonConfiguration as CommonConfiguration; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; +import common.Optional as Optional; +import common.BlurStyle as BlurStyle; +import common.Bindable as Bindable; +import button.ControlSize as ControlSize; +import DividerOptions as DividerOptions; +import units.ResourceStr as ResourceStr; +import units.Dimension as Dimension; +import units.EdgeOutlineWidths as EdgeOutlineWidths; +import units.ResourceColor as ResourceColor; +import units.EdgeColors as EdgeColors; +import units.Resource as Resource; +import units.Font as Font; +import units.Length as Length; +import units.Offset as Offset; +import units.DividerStyleOptions as DividerStyleOptions; +import SymbolGlyphModifier as SymbolGlyphModifier; +import TextModifier as TextModifier; +import OptionWidthMode as OptionWidthMode; [Entity=Interface] interface SelectOption { - attribute ResourceStr value; [Optional] attribute ResourceStr icon; [Optional] attribute SymbolGlyphModifier symbolIcon; - }; [Entity=Interface] interface SelectInterface { - [CallSignature] SelectAttribute invoke(sequence options); - }; dictionary ArrowPosition { - number END = 0; number START = 1; - }; dictionary MenuAlignType { - number START = 0; number CENTER = 1; number END = 2; - +}; +dictionary AvoidanceMode { + number COVER_TARGET = 0; + number AVOID_AROUND_TARGET = 1; }; callback OnSelectCallback = void (number index, String selectStr); +[Entity=Interface] +interface MenuOutlineOptions { + [Optional] + attribute (Dimension or EdgeOutlineWidths) width; + [Optional] + attribute (ResourceColor or EdgeColors) color; +}; [Synthetic] callback Callback_Number_String_Void = void (number index, String value); [Entity=Class] -interface SelectAttribute: [TypeArguments="SelectAttribute"] CommonMethod { - - SelectAttribute selected((number or Resource) value); +interface SelectAttribute: [Extends, TypeArguments="SelectAttribute"] CommonMethod { SelectAttribute selected(((number or Resource) or undefined) numCount); - SelectAttribute value(ResourceStr value); SelectAttribute value((ResourceStr or undefined) resStr); - SelectAttribute font(Font value); SelectAttribute font((Font or undefined) selectFont); - SelectAttribute fontColor(ResourceColor value); SelectAttribute fontColor((ResourceColor or undefined) resColor); - SelectAttribute selectedOptionBgColor(ResourceColor value); SelectAttribute selectedOptionBgColor((ResourceColor or undefined) resColor); - SelectAttribute selectedOptionFont(Font value); SelectAttribute selectedOptionFont((Font or undefined) selectFont); - SelectAttribute selectedOptionFontColor(ResourceColor value); SelectAttribute selectedOptionFontColor((ResourceColor or undefined) resColor); - SelectAttribute optionBgColor(ResourceColor value); SelectAttribute optionBgColor((ResourceColor or undefined) resColor); - SelectAttribute optionFont(Font value); SelectAttribute optionFont((Font or undefined) selectFont); - SelectAttribute optionFontColor(ResourceColor value); SelectAttribute optionFontColor((ResourceColor or undefined) resColor); SelectAttribute onSelect(Callback_Number_String_Void callback_); SelectAttribute onSelect((OnSelectCallback or undefined) callback_); - SelectAttribute space(Length value); SelectAttribute space((Length or undefined) spaceLength); - SelectAttribute arrowPosition(ArrowPosition value); SelectAttribute arrowPosition((ArrowPosition or undefined) position); - SelectAttribute menuAlign(MenuAlignType alignType, optional Offset offset); SelectAttribute menuAlign((MenuAlignType or undefined) alignType, optional Offset offset); - SelectAttribute optionWidth((Dimension or OptionWidthMode) value); SelectAttribute optionWidth(((Dimension or OptionWidthMode) or undefined) width); - SelectAttribute optionHeight(Dimension value); SelectAttribute optionHeight((Dimension or undefined) height); - SelectAttribute menuBackgroundColor(ResourceColor value); SelectAttribute menuBackgroundColor((ResourceColor or undefined) resColor); - SelectAttribute menuBackgroundBlurStyle(BlurStyle value); SelectAttribute menuBackgroundBlurStyle((BlurStyle or undefined) style); - SelectAttribute controlSize(ControlSize value); SelectAttribute controlSize((ControlSize or undefined) size); - SelectAttribute menuItemContentModifier([TypeArguments="MenuItemConfiguration"] ContentModifier modifier); SelectAttribute menuItemContentModifier(([TypeArguments="MenuItemConfiguration"] ContentModifier or undefined) modifier); SelectAttribute divider((DividerOptions or undefined) options); SelectAttribute textModifier((TextModifier or undefined) modifier); SelectAttribute arrowModifier((SymbolGlyphModifier or undefined) modifier); SelectAttribute optionTextModifier((TextModifier or undefined) modifier); SelectAttribute selectedOptionTextModifier((TextModifier or undefined) modifier); - + SelectAttribute dividerStyle((DividerStyleOptions or undefined) style); + SelectAttribute avoidance(AvoidanceMode mode); + SelectAttribute menuOutline(MenuOutlineOptions outline); + SelectAttribute showInSubWindow((boolean or undefined) showInSubWindow); + SelectAttribute showDefaultSelectedIcon(boolean show); }; [Entity=Interface] interface MenuItemConfiguration: [TypeArguments="MenuItemConfiguration"] CommonConfiguration { - attribute ResourceStr value; [Optional] attribute ResourceStr icon; @@ -93,5 +100,4 @@ interface MenuItemConfiguration: [TypeArguments="MenuItemConfiguration"] CommonC attribute boolean selected; attribute number index; void triggerSelect(number index, String value); - }; \ No newline at end of file diff --git a/idl/shape.idl b/idl/shape.idl index ea46eee..1bfe0d5 100644 --- a/idl/shape.idl +++ b/idl/shape.idl @@ -1,42 +1,59 @@ package shape; +import common.CommonMethod as CommonMethod; +import common.PixelMap as PixelMap; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import resource.Resource as Resource; +import LineCapStyle as LineCapStyle; +import LineJoinStyle as LineJoinStyle; [Entity=Interface] interface ViewportRect { - + [Optional] + attribute Length x; [Optional] attribute (number or String) x; [Optional] + attribute Length y; + [Optional] attribute (number or String) y; [Optional] + attribute Length width; + [Optional] attribute (number or String) width; [Optional] + attribute Length height; + [Optional] attribute (number or String) height; - }; [Entity=Interface] interface ShapeInterface { - constructor(optional PixelMap value); [CallSignature] ShapeAttribute invoke(PixelMap value); [CallSignature] ShapeAttribute invoke(); - }; [Entity=Class] -interface ShapeAttribute: [TypeArguments="ShapeAttribute"] CommonMethod { - +interface ShapeAttribute: [Extends, TypeArguments="ShapeAttribute"] CommonMethod { ShapeAttribute viewPort(ViewportRect value); ShapeAttribute stroke(ResourceColor value); ShapeAttribute fill(ResourceColor value); + ShapeAttribute strokeDashOffset(Length value); ShapeAttribute strokeDashOffset((number or String) value); ShapeAttribute strokeDashArray(sequence value); ShapeAttribute strokeLineCap(LineCapStyle value); ShapeAttribute strokeLineJoin(LineJoinStyle value); + ShapeAttribute strokeMiterLimit(Length value); ShapeAttribute strokeMiterLimit((number or String) value); ShapeAttribute strokeOpacity((number or String or Resource) value); ShapeAttribute fillOpacity((number or String or Resource) value); + ShapeAttribute strokeWidth(Length value); ShapeAttribute strokeWidth((number or String) value); ShapeAttribute antiAlias(boolean value); ShapeAttribute mesh(sequence value, number column, number row); - +}; +[Entity=Interface] +interface ShapeInterface { + [CallSignature] + ShapeAttribute invoke(optional PixelMap value); }; \ No newline at end of file diff --git a/idl/sidebar.idl b/idl/sidebar.idl index 58141ca..48d1214 100644 --- a/idl/sidebar.idl +++ b/idl/sidebar.idl @@ -1,33 +1,32 @@ package sidebar; +import resource.Resource as Resource; +import units.Length as Length; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import common.CommonMethod as CommonMethod; +import common.PixelMap as PixelMap; dictionary SideBarContainerType { - [OriginalEnumMemberName=Embed] number EMBED = 0; [OriginalEnumMemberName=Overlay] number OVERLAY = 1; number AUTO = 2; - }; dictionary SideBarPosition { - [OriginalEnumMemberName=Start] number START = 0; [OriginalEnumMemberName=End] number END = 1; - }; [Entity=Interface] interface ButtonIconOptions { - attribute (String or PixelMap or Resource) shown; attribute (String or PixelMap or Resource) hidden; [Optional] attribute (String or PixelMap or Resource) switching; - }; [Entity=Interface] interface ButtonStyle { - [Optional] attribute number left; [Optional] @@ -38,18 +37,14 @@ interface ButtonStyle { attribute number height; [Optional] attribute ButtonIconOptions icons; - }; [Entity=Interface] interface SideBarContainerInterface { - [CallSignature] SideBarContainerAttribute invoke(optional SideBarContainerType type); - }; [Entity=Interface] interface DividerStyle { - attribute Length strokeWidth; [Optional] attribute ResourceColor color; @@ -57,26 +52,23 @@ interface DividerStyle { attribute Length startMargin; [Optional] attribute Length endMargin; - }; [Synthetic] callback Callback_Boolean_Void = void (boolean value); [Entity=Class] -interface SideBarContainerAttribute: [TypeArguments="SideBarContainerAttribute"] CommonMethod { - +interface SideBarContainerAttribute: [Extends, TypeArguments="SideBarContainerAttribute"] CommonMethod { SideBarContainerAttribute showSideBar(boolean value); SideBarContainerAttribute controlButton(ButtonStyle value); SideBarContainerAttribute showControlButton(boolean value); SideBarContainerAttribute onChange(Callback_Boolean_Void callback_); SideBarContainerAttribute sideBarWidth(number value); - SideBarContainerAttribute minSideBarWidth(number value); - SideBarContainerAttribute maxSideBarWidth(number value); SideBarContainerAttribute sideBarWidth(Length value); + SideBarContainerAttribute minSideBarWidth(number value); SideBarContainerAttribute minSideBarWidth(Length value); + SideBarContainerAttribute maxSideBarWidth(number value); SideBarContainerAttribute maxSideBarWidth(Length value); SideBarContainerAttribute autoHide(boolean value); SideBarContainerAttribute sideBarPosition(SideBarPosition value); SideBarContainerAttribute divider((DividerStyle or undefined) value); SideBarContainerAttribute minContentWidth(Dimension value); - }; \ No newline at end of file diff --git a/idl/slider.idl b/idl/slider.idl index 4f98e67..f82cc83 100644 --- a/idl/slider.idl +++ b/idl/slider.idl @@ -1,15 +1,28 @@ package slider; +import common.CommonMethod as CommonMethod; +import common.CommonConfiguration as CommonConfiguration; +import common.ContentModifier as ContentModifier; +import common.Optional as Optional; +import Axis as Axis; +import CrownSensitivity as CrownSensitivity; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.Dimension as Dimension; +import units.SizeOptions as SizeOptions; +import circle.CircleAttribute as CircleAttribute; +import rect.RectAttribute as RectAttribute; +import path.PathAttribute as PathAttribute; +import ellipse.EllipseAttribute as EllipseAttribute; +import LinearGradient as LinearGradient; dictionary SliderStyle { - [OriginalEnumMemberName=OutSet] number OUT_SET = 0; [OriginalEnumMemberName=InSet] number IN_SET = 1; number NONE = 2; - }; dictionary SliderChangeMode { - [OriginalEnumMemberName=Begin] number BEGIN = 0; [OriginalEnumMemberName=Moving] @@ -18,27 +31,21 @@ dictionary SliderChangeMode { number END = 2; [OriginalEnumMemberName=Click] number CLICK = 3; - }; dictionary SliderInteraction { - number SLIDE_AND_CLICK = 0; number SLIDE_ONLY = 1; number SLIDE_AND_CLICK_UP = 2; - }; [Entity=Interface] interface SlideRange { - [Optional] attribute number from; [Optional] attribute number to; - }; [Entity=Interface] interface SliderOptions { - [Optional] attribute number value; [Optional] @@ -53,57 +60,73 @@ interface SliderOptions { attribute Axis direction; [Optional] attribute boolean reverse; - }; dictionary SliderBlockType { - number DEFAULT = 0; number IMAGE = 1; number SHAPE = 2; - }; [Entity=Interface] interface SliderBlockStyle { - attribute SliderBlockType type; [Optional] attribute ResourceStr image; [Optional] attribute String shape; - }; callback SliderTriggerChangeCallback = void (number value, SliderChangeMode mode); [Entity=Interface] interface SliderConfiguration: [TypeArguments="SliderConfiguration"] CommonConfiguration { - attribute number value; attribute number min; attribute number max; attribute number step; attribute SliderTriggerChangeCallback triggerChange; - }; [Entity=Interface] interface SliderInterface { - [CallSignature] SliderAttribute invoke(optional SliderOptions options); - +}; +[Entity=Interface] +interface SliderStepItemAccessibility { + [Optional] + attribute ResourceStr text; +}; +[Entity=Interface] +interface SliderShowStepOptions { + [Optional] + attribute record stepsAccessibility; +}; +[Entity=Interface] +interface SliderCustomContentOptions { + [Optional] + attribute ResourceStr accessibilityText; + [Optional] + attribute ResourceStr accessibilityDescription; + [Optional] + attribute String accessibilityLevel; + [Optional] + attribute boolean accessibilityGroup; +}; +[Entity=Interface] +interface SliderPrefixOptions: SliderCustomContentOptions { +}; +[Entity=Interface] +interface SliderSuffixOptions: SliderCustomContentOptions { }; [Synthetic] callback Callback_Number_SliderChangeMode_Void = void (number value, SliderChangeMode mode); [Entity=Class] -interface SliderAttribute: [TypeArguments="SliderAttribute"] CommonMethod { - +interface SliderAttribute: [Extends, TypeArguments="SliderAttribute"] CommonMethod { SliderAttribute blockColor(ResourceColor value); SliderAttribute trackColor((ResourceColor or LinearGradient) value); - SliderAttribute selectedColor(ResourceColor value); SliderAttribute selectedColor((ResourceColor or LinearGradient) selectedColor); [Deprecated] SliderAttribute minLabel(String value); [Deprecated] SliderAttribute maxLabel(String value); - SliderAttribute showSteps(boolean value); + SliderAttribute showSteps(boolean value, optional SliderShowStepOptions options); SliderAttribute showTips(boolean value, optional ResourceStr content); SliderAttribute trackThickness(Length value); SliderAttribute onChange(Callback_Number_SliderChangeMode_Void callback_); @@ -121,5 +144,6 @@ interface SliderAttribute: [TypeArguments="SliderAttribute"] CommonMethod { SliderAttribute slideRange(SlideRange value); SliderAttribute digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); SliderAttribute enableHapticFeedback(boolean enabled); - + SliderAttribute prefix(ComponentContent content, optional SliderPrefixOptions options); + SliderAttribute suffix(ComponentContent content, optional SliderSuffixOptions options); }; \ No newline at end of file diff --git a/idl/span.idl b/idl/span.idl index 6d90959..e2084fc 100644 --- a/idl/span.idl +++ b/idl/span.idl @@ -1,40 +1,512 @@ package span; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.BorderRadiuses as BorderRadiuses; +import units.Length as Length; +import units.Font as Font; +import common.CommonMethod as CommonMethod; +import common.ShadowOptions as ShadowOptions; +import LengthMetrics as LengthMetrics; +import resource.Resource as Resource; +import FontStyle as FontStyle; +import FontWeight as FontWeight; +import TextCase as TextCase; +import DecorationStyleInterface as DecorationStyleInterface; [Entity=Interface] interface TextBackgroundStyle { - [Optional] attribute ResourceColor color; [Optional] attribute (Dimension or BorderRadiuses) radius; - }; [Entity=Class, TypeParameters="T"] -interface BaseSpan: [TypeArguments="T"] CommonMethod { - +interface BaseSpan: [Extends, TypeArguments="T"] CommonMethod { T textBackgroundStyle(TextBackgroundStyle style); T baselineOffset(LengthMetrics value); - }; [Entity=Interface] interface SpanInterface { - [CallSignature] SpanAttribute invoke((String or Resource) value); - }; +[Synthetic] +callback Callback_ClickEvent_Void = void (ClickEvent event); +[Synthetic] +callback Callback_Boolean_HoverEvent_Void = void (boolean isHover, HoverEvent event); +[Entity=Literal, Synthetic] +interface Literal_Alignment_align { + [Optional] + attribute Alignment align; +}; +[Synthetic] +callback Callback_Void = void (); +[Synthetic] +callback Callback_Array_TouchTestInfo_TouchResult = TouchResult (sequence value); +[Synthetic] +callback Callback_HoverEvent_Void = void (HoverEvent parameter); +[Synthetic] +callback Callback_MouseEvent_Void = void (MouseEvent event); +[Synthetic] +callback Callback_TouchEvent_Void = void (TouchEvent event); +[Synthetic] +callback Callback_KeyEvent_Void = void (KeyEvent event); +[Synthetic] +callback Callback_KeyEvent_Boolean = boolean (KeyEvent parameter); +[Synthetic] +callback Callback_CrownEvent_Void = void (CrownEvent parameter); +[Synthetic] +callback Callback_FocusAxisEvent_Void = void (FocusAxisEvent parameter); +[Synthetic] +callback Callback_AxisEvent_Void = void (AxisEvent parameter); +[Synthetic] +callback Callback_Area_Area_Void = void (Area oldValue, Area newValue); +[Synthetic] +callback Type_SpanAttribute_onDragStart_event = (CustomBuilder or DragItemInfo) (DragEvent event, optional String extraParams); +[Synthetic] +callback Callback_DragEvent_Opt_String_Void = void (DragEvent event, optional String extraParams); +[Synthetic] +callback Callback_PreDragStatus_Void = void (PreDragStatus parameter); +[Synthetic] +callback Callback_TouchEvent_HitTestMode = HitTestMode (TouchEvent parameter); +[Entity=Literal, Synthetic] +interface Literal_Number_offset_span { + attribute number span; + attribute number offset; +}; +[Entity=Literal, Synthetic] +interface Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs { + [Optional] + attribute (number or Literal_Number_offset_span) xs; + [Optional] + attribute (number or Literal_Number_offset_span) sm; + [Optional] + attribute (number or Literal_Number_offset_span) md; + [Optional] + attribute (number or Literal_Number_offset_span) lg; +}; +[Synthetic] +callback Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult = GestureJudgeResult (GestureInfo gestureInfo, BaseGestureEvent event); [Entity=Class] -interface SpanAttribute: [TypeArguments="SpanAttribute"] BaseSpan { - +interface SpanAttribute { SpanAttribute font(Font value); SpanAttribute fontColor(ResourceColor value); SpanAttribute fontSize((number or String or Resource) value); SpanAttribute fontStyle(FontStyle value); + SpanAttribute fontWeight((number or FontWeight or ResourceStr) value); SpanAttribute fontWeight((number or FontWeight or String) value); SpanAttribute fontFamily((String or Resource) value); SpanAttribute decoration(DecorationStyleInterface value); + SpanAttribute letterSpacing((number or ResourceStr) value); SpanAttribute letterSpacing((number or String) value); SpanAttribute textCase(TextCase value); SpanAttribute lineHeight(Length value); SpanAttribute textShadow((ShadowOptions or sequence) value); - + SpanAttribute textBackgroundStyle(TextBackgroundStyle style); + SpanAttribute baselineOffset(LengthMetrics value); + SpanAttribute attributeModifier([TypeArguments="SpanAttribute"] AttributeModifier modifier); + SpanAttribute id(String value); + SpanAttribute key(String value); + SpanAttribute onClick(Callback_ClickEvent_Void event); + SpanAttribute onClick(Callback_ClickEvent_Void event, number distanceThreshold); + SpanAttribute onHover(Callback_Boolean_HoverEvent_Void event); + [Deprecated] + TransitionEffect animation(AnimateParam value); + [Deprecated] + SpanAttribute alignSelf(ItemAlign value); + [Deprecated] + SpanAttribute align(Alignment value); + [Deprecated] + SpanAttribute alignRules(AlignRuleOption value); + [Deprecated] + SpanAttribute alignRules(LocalizedAlignRuleOptions alignRule); + [Deprecated] + SpanAttribute aspectRatio(number value); + [Deprecated] + SpanAttribute allowDrop((sequence or undefined) value); + [Deprecated] + SpanAttribute accessibilityGroup(boolean value); + [Deprecated] + SpanAttribute accessibilityGroup(boolean isGroup, AccessibilityOptions accessibilityOptions); + [Deprecated] + SpanAttribute accessibilityText(String value); + [Deprecated] + SpanAttribute accessibilityText(Resource text); + [Deprecated] + SpanAttribute accessibilityNextFocusId(String nextId); + [Deprecated] + SpanAttribute accessibilityDefaultFocus(boolean focus); + [Deprecated] + SpanAttribute accessibilityUseSamePage(AccessibilitySamePageMode pageMode); + [Deprecated] + SpanAttribute accessibilityScrollTriggerable(boolean isTriggerable); + [Deprecated] + SpanAttribute accessibilityRole(AccessibilityRoleType role); + [Deprecated] + SpanAttribute accessibilityTextHint(String value); + [Deprecated] + SpanAttribute accessibilityDescription(String value); + [Deprecated] + SpanAttribute accessibilityDescription(Resource description); + [Deprecated] + SpanAttribute accessibilityLevel(String value); + [Deprecated] + SpanAttribute accessibilityVirtualNode(CustomBuilder builder); + [Deprecated] + SpanAttribute accessibilityChecked(boolean isCheck); + [Deprecated] + SpanAttribute accessibilitySelected(boolean isSelect); + [Deprecated] + SpanAttribute background(CustomBuilder builder, optional Literal_Alignment_align options); + [Deprecated] + SpanAttribute backgroundColor((ResourceColor or undefined) color); + [Deprecated] + SpanAttribute backgroundImage((ResourceStr or PixelMap) src, optional ImageRepeat repeat); + [Deprecated] + SpanAttribute backgroundImage((ResourceStr or PixelMap) src, optional BackgroundImageOptions options); + [Deprecated] + SpanAttribute backgroundImageSize((SizeOptions or ImageSize) value); + [Deprecated] + SpanAttribute backgroundImagePosition((Position or Alignment) value); + [Deprecated] + SpanAttribute backgroundEffect((BackgroundEffectOptions or undefined) options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SpanAttribute backgroundImageResizable(ResizableOptions value); + [Deprecated] + SpanAttribute backgroundBlurStyle((BlurStyle or undefined) style, optional BackgroundBlurStyleOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SpanAttribute backgroundFilter(Filter filter); + [Deprecated] + SpanAttribute border(BorderOptions value); + [Deprecated] + SpanAttribute borderStyle((BorderStyle or EdgeStyles) value); + [Deprecated] + SpanAttribute borderWidth((Length or EdgeWidths or LocalizedEdgeWidths) value); + [Deprecated] + SpanAttribute borderColor((ResourceColor or EdgeColors or LocalizedEdgeColors) value); + [Deprecated] + SpanAttribute borderRadius((Length or BorderRadiuses or LocalizedBorderRadiuses) value); + [Deprecated] + SpanAttribute borderImage(BorderImageOption value); + [Deprecated] + SpanAttribute blur((number or undefined) blurRadius, optional BlurOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SpanAttribute brightness((number or undefined) brightness); + [Deprecated] + SpanAttribute backdropBlur((number or undefined) radius, optional BlurOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SpanAttribute blendMode((BlendMode or undefined) mode, optional BlendApplyType type); + [Deprecated] + SpanAttribute bindTips(TipsMessageType message, optional TipsOptions options); + [Deprecated] + SpanAttribute bindPopup(boolean show, (PopupOptions or CustomPopupOptions) popup); + [Deprecated] + SpanAttribute bindMenu((sequence or CustomBuilder) content, optional MenuOptions options); + [Deprecated] + SpanAttribute bindMenu(boolean isShow, (sequence or CustomBuilder) content, optional MenuOptions options); + [Deprecated] + SpanAttribute bindContextMenu(CustomBuilder content, ResponseType responseType, optional ContextMenuOptions options); + [Deprecated] + SpanAttribute bindContextMenu(boolean isShown, CustomBuilder content, optional ContextMenuOptions options); + [Deprecated] + SpanAttribute bindContentCover(boolean isShow, CustomBuilder builder, optional ModalTransition type); + [Deprecated] + SpanAttribute bindContentCover(boolean isShow, CustomBuilder builder, optional ContentCoverOptions options); + [Deprecated] + SpanAttribute bindSheet(boolean isShow, CustomBuilder builder, optional SheetOptions options); + [Deprecated] + SpanAttribute backgroundBrightness((BackgroundBrightnessOptions or undefined) options); + [Deprecated] + SpanAttribute customProperty(String name, (Object or undefined) value); + [Deprecated] + SpanAttribute constraintSize(ConstraintSizeOptions value); + [Deprecated] + SpanAttribute chainWeight(ChainWeightOptions chainWeight); + [Deprecated] + SpanAttribute compositingFilter(Filter filter); + [Deprecated] + SpanAttribute contrast((number or undefined) contrast); + [Deprecated] + SpanAttribute colorBlend(((Color or String or Resource) or undefined) color); + [Deprecated] + SpanAttribute chainMode(Axis direction, ChainStyle style); + [Deprecated] + SpanAttribute clickEffect((ClickEffect or undefined) effect); + [Deprecated] + SpanAttribute clip((boolean or undefined) clip); + [Deprecated] + SpanAttribute clip((boolean or CircleAttribute or EllipseAttribute or PathAttribute or RectAttribute) value); + [Deprecated] + SpanAttribute clipShape(((CircleShape or EllipseShape or PathShape or RectShape) or undefined) shape); + [Deprecated] + SpanAttribute drawModifier((DrawModifier or undefined) modifier); + [Deprecated] + SpanAttribute defaultFocus(boolean value); + [Deprecated] + SpanAttribute displayPriority(number value); + [Deprecated] + SpanAttribute direction(Direction value); + [Deprecated] + SpanAttribute draggable(boolean value); + [Deprecated] + SpanAttribute dragPreview((CustomBuilder or DragItemInfo or String) preview, optional PreviewConfiguration config); + [Deprecated] + SpanAttribute dragPreviewOptions(DragPreviewOptions value, optional DragInteractionOptions options); + [Deprecated] + SpanAttribute expandSafeArea(optional sequence types, optional sequence edges); + [Deprecated] + SpanAttribute enabled(boolean value); + [Deprecated] + SpanAttribute foregroundEffect(ForegroundEffectOptions options); + [Deprecated] + SpanAttribute foregroundFilter(Filter filter); + [Deprecated] + SpanAttribute foregroundBlurStyle((BlurStyle or undefined) style, optional ForegroundBlurStyleOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SpanAttribute foregroundColor(((ResourceColor or ColoringStrategy) or undefined) color); + [Deprecated] + SpanAttribute focusable(boolean value); + [Deprecated] + SpanAttribute focusOnTouch(boolean value); + [Deprecated] + SpanAttribute focusBox(FocusBoxStyle style); + [Deprecated] + SpanAttribute focusScopeId(String id, optional boolean isGroup, optional boolean arrowStepOut); + [Deprecated] + SpanAttribute focusScopePriority(String scopeId, optional FocusPriority priority); + [Deprecated] + SpanAttribute freeze((boolean or undefined) freeze); + [Deprecated] + SpanAttribute flexGrow(number value); + [Deprecated] + SpanAttribute flexShrink(number value); + [Deprecated] + SpanAttribute flexBasis((number or String) value); + [Deprecated] + SpanAttribute groupDefaultFocus(boolean value); + [Deprecated] + SpanAttribute gesture(GestureType gesture, optional GestureMask mask); + [Deprecated] + SpanAttribute gridSpan(number value); + [Deprecated] + SpanAttribute gridOffset(number value); + [Deprecated] + SpanAttribute grayscale((number or undefined) grayscale); + [Deprecated] + SpanAttribute geometryTransition(String id, optional GeometryTransitionOptions options); + [Deprecated] + SpanAttribute gestureModifier(GestureModifier modifier); + [Deprecated] + SpanAttribute height((Length or LayoutPolicy) heightValue); + [Deprecated] + SpanAttribute hitTestBehavior(HitTestMode value); + [Deprecated] + SpanAttribute hoverEffect(HoverEffect value); + [Deprecated] + SpanAttribute hueRotate(((number or String) or undefined) rotation); + [Deprecated] + SpanAttribute invert(((number or InvertOptions) or undefined) options); + [Deprecated] + SpanAttribute keyboardShortcut((String or FunctionKey) value, sequence keys, optional Callback_Void action); + [Deprecated] + SpanAttribute layoutWeight((number or String) value); + [Deprecated] + SpanAttribute linearGradient((LinearGradientOptions or undefined) options); + [Deprecated] + SpanAttribute linearGradientBlur((number or undefined) blurRadius, (LinearGradientBlurOptions or undefined) options); + [Deprecated] + SpanAttribute lightUpEffect((number or undefined) degree); + [Deprecated] + SpanAttribute mouseResponseRegion((sequence or Rectangle) value); + [Deprecated] + SpanAttribute margin((Margin or Length or LocalizedMargin) value); + [Deprecated] + SpanAttribute mask((ProgressMask or undefined) mask); + [Deprecated] + SpanAttribute mask((CircleAttribute or EllipseAttribute or PathAttribute or RectAttribute or ProgressMask) value); + [Deprecated] + SpanAttribute maskShape(((CircleShape or EllipseShape or PathShape or RectShape) or undefined) shape); + [Deprecated] + SpanAttribute markAnchor((Position or LocalizedPosition) value); + [Deprecated] + SpanAttribute motionBlur((MotionBlurOptions or undefined) motionBlur); + [Deprecated] + SpanAttribute motionPath(MotionPathOptions value); + [Deprecated] + SpanAttribute monopolizeEvents(boolean monopolize); + [Deprecated] + SpanAttribute nextFocus((FocusMovement or undefined) nextStep); + [Deprecated] + SpanAttribute onChildTouchTest(Callback_Array_TouchTestInfo_TouchResult event); + [Deprecated] + SpanAttribute opacity(((number or Resource) or undefined) opacity); + [Deprecated] + SpanAttribute outline((OutlineOptions or undefined) options); + [Deprecated] + SpanAttribute outlineStyle(((OutlineStyle or EdgeOutlineStyles) or undefined) style); + [Deprecated] + SpanAttribute outlineWidth(((Dimension or EdgeOutlineWidths) or undefined) width); + [Deprecated] + SpanAttribute outlineColor(((ResourceColor or EdgeColors or LocalizedEdgeColors) or undefined) color); + [Deprecated] + SpanAttribute outlineRadius(((Dimension or OutlineRadiuses) or undefined) radius); + [Deprecated] + SpanAttribute onHoverMove(Callback_HoverEvent_Void event); + [Deprecated] + SpanAttribute onAccessibilityHover(AccessibilityCallback callback_); + [Deprecated] + SpanAttribute onAccessibilityHoverTransparent(AccessibilityTransparentCallback callback_); + [Deprecated] + SpanAttribute onMouse(Callback_MouseEvent_Void event); + [Deprecated] + SpanAttribute onTouch(Callback_TouchEvent_Void event); + [Deprecated] + SpanAttribute onKeyEvent(Callback_KeyEvent_Void event); + [Deprecated] + SpanAttribute onKeyEvent(Callback_KeyEvent_Boolean event); + [Deprecated] + SpanAttribute onDigitalCrown((Callback_CrownEvent_Void or undefined) handler); + [Deprecated] + SpanAttribute onKeyPreIme(Callback_KeyEvent_Boolean event); + [Deprecated] + SpanAttribute onKeyEventDispatch(Callback_KeyEvent_Boolean event); + [Deprecated] + SpanAttribute onFocusAxisEvent(Callback_FocusAxisEvent_Void event); + [Deprecated] + SpanAttribute onAxisEvent(Callback_AxisEvent_Void event); + [Deprecated] + SpanAttribute onFocus(Callback_Void event); + [Deprecated] + SpanAttribute onBlur(Callback_Void event); + [Deprecated] + SpanAttribute onAppear(Callback_Void event); + [Deprecated] + SpanAttribute onAttach(Callback_Void callback_); + [Deprecated] + SpanAttribute onDetach(Callback_Void callback_); + [Deprecated] + SpanAttribute onAreaChange(Callback_Area_Area_Void event); + [Deprecated] + SpanAttribute onDisAppear(Callback_Void event); + [Deprecated] + SpanAttribute offset((Position or Edges or LocalizedEdges) value); + [Deprecated] + SpanAttribute onDragStart(Type_SpanAttribute_onDragStart_event event); + [Deprecated] + SpanAttribute onDragEnter(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SpanAttribute onDragMove(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SpanAttribute onDragLeave(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SpanAttribute onDrop(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SpanAttribute onDrop(OnDragEventCallback eventCallback, optional DropOptions dropOptions); + [Deprecated] + SpanAttribute onDragEnd(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SpanAttribute onPreDrag(Callback_PreDragStatus_Void callback_); + [Deprecated] + SpanAttribute overlay((String or CustomBuilder or ComponentContent) value, optional OverlayOptions options); + [Deprecated] + SpanAttribute onVisibleAreaChange(sequence ratios, VisibleAreaChangeCallback event); + [Deprecated] + void onVisibleAreaApproximateChange(VisibleAreaEventOptions options, (VisibleAreaChangeCallback or undefined) event); + [Deprecated] + SpanAttribute obscured(sequence reasons); + [Deprecated] + SpanAttribute onGestureRecognizerJudgeBegin(GestureRecognizerJudgeBeginCallback callback_); + [Deprecated] + SpanAttribute onGestureRecognizerJudgeBegin(GestureRecognizerJudgeBeginCallback callback_, boolean exposeInnerGesture); + [Deprecated] + SpanAttribute onTouchIntercept(Callback_TouchEvent_HitTestMode callback_); + [Deprecated] + SpanAttribute onSizeChange(SizeChangeCallback event); + [Deprecated] + SpanAttribute padding((Padding or Length or LocalizedPadding) value); + [Deprecated] + SpanAttribute pixelRound(PixelRoundPolicy value); + [Deprecated] + SpanAttribute priorityGesture(GestureType gesture, optional GestureMask mask); + [Deprecated] + SpanAttribute parallelGesture(GestureType gesture, optional GestureMask mask); + [Deprecated] + SpanAttribute position((Position or Edges or LocalizedEdges) value); + [Deprecated] + SpanAttribute pixelStretchEffect((PixelStretchEffectOptions or undefined) options); + [Deprecated] + SpanAttribute responseRegion((sequence or Rectangle) value); + [Deprecated] + SpanAttribute renderGroup((boolean or undefined) isGroup); + [Deprecated] + SpanAttribute rotate((RotateOptions or undefined) options); + [Deprecated] + SpanAttribute radialGradient((RadialGradientOptions or undefined) options); + [Deprecated] + SpanAttribute restoreId(number value); + [Deprecated] + SpanAttribute reuseId(String id); + [Deprecated] + SpanAttribute reuse(ReuseOptions options); + [Deprecated] + SpanAttribute renderFit((RenderFit or undefined) fitMode); + [Deprecated] + SpanAttribute size(SizeOptions value); + [Deprecated] + SpanAttribute safeAreaPadding((Padding or LengthMetrics or LocalizedPadding) paddingValue); + [Deprecated] + SpanAttribute saturate((number or undefined) saturate); + [Deprecated] + SpanAttribute sepia((number or undefined) sepia); + [Deprecated] + SpanAttribute systemBarEffect(); + [Deprecated] + SpanAttribute scale((ScaleOptions or undefined) options); + [Deprecated] + SpanAttribute sharedTransition(String id, optional sharedTransitionOptions options); + [Deprecated] + SpanAttribute sweepGradient((SweepGradientOptions or undefined) options); + [Deprecated] + SpanAttribute shadow(((ShadowOptions or ShadowStyle) or undefined) options); + [Deprecated] + SpanAttribute stateStyles(StateStyles value); + [Deprecated] + SpanAttribute sphericalEffect((number or undefined) effect); + [Deprecated] + SpanAttribute shouldBuiltInRecognizerParallelWith(ShouldBuiltInRecognizerParallelWithCallback callback_); + [Deprecated] + SpanAttribute touchable(boolean value); + [Deprecated] + SpanAttribute tabStop(boolean isTabStop); + [Deprecated] + SpanAttribute tabIndex(number index); + [Deprecated] + SpanAttribute transition((TransitionOptions or TransitionEffect) value); + [Deprecated] + SpanAttribute transition(TransitionEffect effect, (TransitionFinishCallback or undefined) onFinish); + [Deprecated] + SpanAttribute translate((TranslateOptions or undefined) translate); + [Deprecated] + SpanAttribute transform((Object or undefined) transform); + [Deprecated] + SpanAttribute useShadowBatching((boolean or undefined) use); + [Deprecated] + SpanAttribute useEffect((boolean or undefined) useEffect, optional EffectType effectType); + [Deprecated] + SpanAttribute useSizeType(Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs value); + [Deprecated] + SpanAttribute visualEffect(VisualEffect effect); + [Deprecated] + SpanAttribute visibility(Visibility value); + [Deprecated] + SpanAttribute width((Length or LayoutPolicy) widthValue); + [Deprecated] + SpanAttribute zIndex(number value); + [Deprecated] + SpanAttribute accessibilityFocusDrawLevel(FocusDrawLevel drawLevel); + [Deprecated] + SpanAttribute onAccessibilityFocus(AccessibilityFocusCallback callback_); + [Deprecated] + SpanAttribute onGestureJudgeBegin(Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult callback_); + [Deprecated] + SpanAttribute advancedBlendMode((BlendMode or Blender) effect, optional BlendApplyType type); }; \ No newline at end of file diff --git a/idl/stack.idl b/idl/stack.idl index baaa3bf..e6dd9e9 100644 --- a/idl/stack.idl +++ b/idl/stack.idl @@ -1,22 +1,19 @@ package stack; +import common.PointLightStyle as PointLightStyle; +import common.CommonMethod as CommonMethod; +import Alignment as Alignment; [Entity=Interface] interface StackOptions { - [Optional] attribute Alignment alignContent; - }; [Entity=Interface] interface StackInterface { - [CallSignature] StackAttribute invoke(optional StackOptions options); - }; [Entity=Class] -interface StackAttribute: [TypeArguments="StackAttribute"] CommonMethod { - +interface StackAttribute: [Extends, TypeArguments="StackAttribute"] CommonMethod { StackAttribute alignContent(Alignment value); StackAttribute pointLight(PointLightStyle value); - }; \ No newline at end of file diff --git a/idl/state_management.idl b/idl/state_management.idl index 3186f32..41af8b9 100644 --- a/idl/state_management.idl +++ b/idl/state_management.idl @@ -1,25 +1,19 @@ -package state_management; dictionary ColorMode { - number LIGHT = 0; number DARK = 1; - }; dictionary LayoutDirection { - number LTR = 0; number RTL = 1; [OriginalEnumMemberName=Auto] number AUTO = 2; - }; [Entity=Class] interface Storage { - constructor(optional boolean needCrossThread, optional String file); (String or undefined) get(String key); void set(String key, any val); + void set(String key, (Object or undefined) val); void clear(); void delete(String key); - }; \ No newline at end of file diff --git a/idl/stepper.idl b/idl/stepper.idl index 365bb7d..e4ec06a 100644 --- a/idl/stepper.idl +++ b/idl/stepper.idl @@ -1,29 +1,32 @@ package stepper; +import common.Bindable as Bindable; +import common.CommonMethod as CommonMethod; +[Entity=Interface] +interface StepperOptions { + [Optional] + attribute (number or [TypeArguments="number"] Bindable) index; +}; [Entity=Literal, Synthetic] interface Literal_Number_index { - [Optional] attribute number index; - }; [Entity=Interface] interface StepperInterface { - [CallSignature] StepperAttribute invoke(optional Literal_Number_index value); - + [CallSignature] + StepperAttribute invoke(optional StepperOptions value); }; [Synthetic] callback Callback_Void = void (); [Synthetic] callback Callback_Number_Number_Void = void (number prevIndex, number index); [Entity=Class] -interface StepperAttribute: [TypeArguments="StepperAttribute"] CommonMethod { - +interface StepperAttribute: [Extends, TypeArguments="StepperAttribute"] CommonMethod { StepperAttribute onFinish(Callback_Void callback_); StepperAttribute onSkip(Callback_Void callback_); StepperAttribute onChange(Callback_Number_Number_Void callback_); StepperAttribute onNext(Callback_Number_Number_Void callback_); StepperAttribute onPrevious(Callback_Number_Number_Void callback_); - }; \ No newline at end of file diff --git a/idl/stepper_item.idl b/idl/stepper_item.idl index fd5d949..33acb8d 100644 --- a/idl/stepper_item.idl +++ b/idl/stepper_item.idl @@ -1,6 +1,6 @@ package stepper_item; +import common.CommonMethod as CommonMethod; dictionary ItemState { - [OriginalEnumMemberName=Normal] number NORMAL = 0; [OriginalEnumMemberName=Disabled] @@ -9,20 +9,15 @@ dictionary ItemState { number WAITING = 2; [OriginalEnumMemberName=Skip] number SKIP = 3; - }; [Entity=Interface] interface StepperItemInterface { - [CallSignature] StepperItemAttribute invoke(); - }; [Entity=Class] -interface StepperItemAttribute: [TypeArguments="StepperItemAttribute"] CommonMethod { - +interface StepperItemAttribute: [Extends, TypeArguments="StepperItemAttribute"] CommonMethod { StepperItemAttribute prevLabel(String value); StepperItemAttribute nextLabel(String value); StepperItemAttribute status(optional ItemState value); - }; \ No newline at end of file diff --git a/idl/styled_string.idl b/idl/styled_string.idl index e6ca205..9888087 100644 --- a/idl/styled_string.idl +++ b/idl/styled_string.idl @@ -1,10 +1,37 @@ package styled_string; +import common.Callback as Callback; +import common.ShadowOptions as ShadowOptions; +import common.ClickEvent as ClickEvent; +import common.Optional as Optional; +import common.PixelMap as PixelMap; +import TextAlign as TextAlign; +import FontStyle as FontStyle; +import FontWeight as FontWeight; +import TextDecorationType as TextDecorationType; +import TextDecorationStyle as TextDecorationStyle; +import WordBreak as WordBreak; +import TextOverflow as TextOverflow; +import ImageFit as ImageFit; +import ImageSpanAlignment as ImageSpanAlignment; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.LengthMetrics as LengthMetrics; +import units.SizeOptions as SizeOptions; +import units.Margin as Margin; +import units.Padding as Padding; +import units.BorderRadiuses as BorderRadiuses; +import units.ColorFilter as ColorFilter; +import span.TextBackgroundStyle as TextBackgroundStyle; +import gesture.GestureEvent as GestureEvent; +import image.DrawingColorFilter as DrawingColorFilter; +import LeadingMarginPlaceholder as LeadingMarginPlaceholder; +import ohos.multimedia.image.default as image; +import arkui.Graphics.DrawContext as DrawContext; typedef UserDataSpan StyledStringMarshallingValue; callback StyledStringMarshallCallback = buffer (StyledStringMarshallingValue marshallableVal); callback StyledStringUnmarshallCallback = StyledStringMarshallingValue (buffer buf); [Entity=Class] interface StyledString { - constructor((String or ImageAttachment or CustomSpan) value, optional sequence styles); readonly attribute number length; String getString(); @@ -18,36 +45,30 @@ interface StyledString { [Throws] static String toHtml(StyledString styledString); static buffer marshalling(StyledString styledString, StyledStringMarshallCallback callback_); + static buffer marshalling(StyledString styledString); [Throws] static async StyledString unmarshalling(buffer buffer, StyledStringUnmarshallCallback callback_); - static buffer marshalling(StyledString styledString); [Throws] static async StyledString unmarshalling(buffer buffer); - }; [Entity=Interface] interface StyleOptions { - [Optional] attribute number start; [Optional] attribute number length; attribute StyledStringKey styledKey; attribute StyledStringValue styledValue; - }; [Entity=Interface] interface SpanStyle { - attribute number start; attribute number length; attribute StyledStringKey styledKey; attribute StyledStringValue styledValue; - }; [Entity=Class] interface TextStyle_styled_string { - constructor(optional TextStyleInterface value); [Optional] readonly attribute ResourceColor fontColor; @@ -59,11 +80,15 @@ interface TextStyle_styled_string { readonly attribute number fontWeight; [Optional] readonly attribute FontStyle fontStyle; - + [Optional] + readonly attribute number strokeWidth; + [Optional] + readonly attribute ResourceColor strokeColor; + [Optional] + readonly attribute SuperscriptStyle superscript; }; [Entity=Interface] interface TextStyleInterface { - [Optional] attribute ResourceColor fontColor; [Optional] @@ -74,83 +99,89 @@ interface TextStyleInterface { attribute (number or FontWeight or String) fontWeight; [Optional] attribute FontStyle fontStyle; - + [Optional] + attribute LengthMetrics strokeWidth; + [Optional] + attribute ResourceColor strokeColor; + [Optional] + attribute SuperscriptStyle superscript; +}; +[Entity=Interface] +interface DecorationOptions { + [Optional] + attribute boolean enableMultiType; }; [Entity=Class] interface DecorationStyle { - constructor(DecorationStyleInterface value); + constructor(DecorationStyleInterface value, optional DecorationOptions options); readonly attribute TextDecorationType type; [Optional] readonly attribute ResourceColor color; [Optional] readonly attribute TextDecorationStyle style; - + [Optional] + readonly attribute number thicknessScale; + [Optional] + readonly attribute DecorationOptions options; }; [Entity=Interface] interface DecorationStyleInterface { - attribute TextDecorationType type; [Optional] attribute ResourceColor color; [Optional] attribute TextDecorationStyle style; - + [Optional] + attribute number thicknessScale; }; [Entity=Class] interface BaselineOffsetStyle { - constructor(LengthMetrics value); readonly attribute number baselineOffset; - }; [Entity=Class] interface LetterSpacingStyle { - constructor(LengthMetrics value); readonly attribute number letterSpacing; - }; [Entity=Class] interface TextShadowStyle { - constructor((ShadowOptions or sequence) value); readonly attribute sequence textShadow; - }; [Entity=Class] interface BackgroundColorStyle { - constructor(TextBackgroundStyle textBackgroundStyle); readonly attribute TextBackgroundStyle textBackgroundStyle; - }; [Entity=Class] interface GestureStyle { - constructor(optional GestureStyleInterface value); - }; [Synthetic] callback Callback_ClickEvent_Void = void (ClickEvent parameter); [Synthetic] callback Callback_GestureEvent_Void = void (GestureEvent parameter); +[Synthetic] +callback Callback_TouchEvent_Void = void (TouchEvent parameter); [Entity=Interface] interface GestureStyleInterface { - [Optional] attribute Callback_ClickEvent_Void onClick; [Optional] attribute Callback_GestureEvent_Void onLongPress; - + [Optional] + attribute Callback_TouchEvent_Void onTouch; }; [Entity=Class] interface ParagraphStyle { - constructor(optional ParagraphStyleInterface value); [Optional] readonly attribute TextAlign textAlign; [Optional] + readonly attribute TextVerticalAlign textVerticalAlign; + [Optional] readonly attribute number textIndent; [Optional] readonly attribute number maxLines; @@ -160,14 +191,16 @@ interface ParagraphStyle { readonly attribute WordBreak wordBreak; [Optional] readonly attribute (number or LeadingMarginPlaceholder) leadingMargin; - + [Optional] + readonly attribute number paragraphSpacing; }; [Entity=Interface] interface ParagraphStyleInterface { - [Optional] attribute TextAlign textAlign; [Optional] + attribute TextVerticalAlign textVerticalAlign; + [Optional] attribute LengthMetrics textIndent; [Optional] attribute number maxLines; @@ -177,30 +210,23 @@ interface ParagraphStyleInterface { attribute WordBreak wordBreak; [Optional] attribute (LengthMetrics or LeadingMarginPlaceholder) leadingMargin; - + [Optional] + attribute LengthMetrics paragraphSpacing; }; [Entity=Class] interface LineHeightStyle { - constructor(LengthMetrics lineHeight); readonly attribute number lineHeight; - }; [Entity=Class] interface UrlStyle { - constructor(String url); readonly attribute String url; - -}; -interface StyledStringValue { - - attribute String stub; - }; +typedef (TextStyle_styled_string or DecorationStyle or BaselineOffsetStyle or LetterSpacingStyle or TextShadowStyle or GestureStyle or ImageAttachment or ParagraphStyle or LineHeightStyle or UrlStyle or CustomSpan or UserDataSpan or BackgroundColorStyle) StyledStringValue; [Entity=Class] -interface MutableStyledString: StyledString { - +interface MutableStyledString: [Extends] StyledString { + constructor((String or ImageAttachment or CustomSpan) value, optional sequence styles); [Throws] void replaceString(number start, number length, String other); [Throws] @@ -221,10 +247,8 @@ interface MutableStyledString: StyledString { [Throws] void insertStyledString(number start, StyledString other); void appendStyledString(StyledString other); - }; dictionary StyledStringKey { - number FONT = 0; number DECORATION = 1; number BASELINE_OFFSET = 2; @@ -238,13 +262,12 @@ dictionary StyledStringKey { number IMAGE = 300; number CUSTOM_SPAN = 400; number USER_DATA = 500; - }; [Entity=Class] interface ImageAttachment { - constructor(ImageAttachmentInterface value); constructor((AttachmentType or undefined) attachment); + constructor((ImageAttachmentInterface or (AttachmentType or undefined)) value); readonly attribute PixelMap value; [Optional] readonly attribute SizeOptions size; @@ -256,11 +279,9 @@ interface ImageAttachment { readonly attribute ImageAttachmentLayoutStyle layoutStyle; [Optional] readonly attribute ColorFilterType colorFilter; - }; [Entity=Interface] interface ResourceImageAttachmentOptions { - attribute (ResourceStr or undefined) resourceValue; [Optional] attribute SizeOptions size; @@ -274,11 +295,9 @@ interface ResourceImageAttachmentOptions { attribute ColorFilterType colorFilter; [Optional] attribute boolean syncLoad; - }; [Entity=Interface] interface ImageAttachmentInterface { - attribute PixelMap value; [Optional] attribute SizeOptions size; @@ -290,54 +309,45 @@ interface ImageAttachmentInterface { attribute ImageAttachmentLayoutStyle layoutStyle; [Optional] attribute ColorFilterType colorFilter; - }; typedef (ImageAttachmentInterface or ResourceImageAttachmentOptions) AttachmentType; typedef (ColorFilter or DrawingColorFilter) ColorFilterType; [Entity=Interface] interface ImageAttachmentLayoutStyle { - [Optional] attribute (LengthMetrics or Margin) margin; [Optional] attribute (LengthMetrics or Padding) padding; [Optional] attribute (LengthMetrics or BorderRadiuses) borderRadius; - }; [Entity=Interface] interface CustomSpanMetrics { - attribute number width; [Optional] attribute number height; - }; [Entity=Interface] interface CustomSpanDrawInfo { - attribute number x; attribute number lineTop; attribute number lineBottom; attribute number baseline; - }; [Entity=Interface] interface CustomSpanMeasureInfo { - attribute number fontSize; - }; +[Synthetic] +callback AsyncCallback_CustomSpanMeasureInfo_CustomSpanMetrics = CustomSpanMetrics (CustomSpanMeasureInfo measureInfo); +[Synthetic] +callback Callback_DrawContext_CustomSpanDrawInfo_Void = void (DrawContext context, CustomSpanDrawInfo drawInfo); [Entity=Class] interface CustomSpan { - - CustomSpanMetrics onMeasure(CustomSpanMeasureInfo measureInfo); - void onDraw(DrawContext context, CustomSpanDrawInfo drawInfo); + attribute AsyncCallback_CustomSpanMeasureInfo_CustomSpanMetrics onMeasure; + attribute Callback_DrawContext_CustomSpanDrawInfo_Void onDraw; void invalidate(); - }; [Entity=Class] interface UserDataSpan { - - }; \ No newline at end of file diff --git a/idl/swiper.idl b/idl/swiper.idl index 3ce19cd..03c213a 100644 --- a/idl/swiper.idl +++ b/idl/swiper.idl @@ -1,33 +1,42 @@ package swiper; +import indicatorcomponent.IndicatorComponentController as IndicatorComponentController; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.ICurve as ICurve; +import common.Optional as Optional; +import EdgeEffect as EdgeEffect; +import Curve as Curve; +import PageFlipMode as PageFlipMode; +import units.Length as Length; +import units.LengthMetrics as LengthMetrics; +import units.VoidCallback as VoidCallback; +import units.ResourceColor as ResourceColor; +import units.VP as VP; +import units.Font as Font; [Entity=Class] interface SwiperController { - constructor(); - undefined showNext(); - undefined showPrevious(); - undefined changeIndex(number index, optional boolean useAnimation); - undefined changeIndex(number index, (SwiperAnimationMode or boolean) animationMode); - undefined finishAnimation(optional VoidCallback callback_); + void showNext(); + void showPrevious(); + void changeIndex(number index, optional (SwiperAnimationMode or boolean) animationMode); + void finishAnimation(optional VoidCallback callback_); [Throws] async void preloadItems((sequence or undefined) indices); - }; [Entity=Class, TypeParameters="T"] interface Indicator { - T left(Length value); T top(Length value); T right(Length value); T bottom(Length value); + T bottom((LengthMetrics or Length) bottom, boolean ignoreSize); T start(LengthMetrics value); T end(LengthMetrics value); static DotIndicator dot(); static DigitIndicator digit(); - }; [Entity=Class] -interface DotIndicator: [TypeArguments="DotIndicator"] Indicator { - +interface DotIndicator: [Extends, TypeArguments="DotIndicator"] Indicator { constructor(); DotIndicator itemWidth(Length value); DotIndicator itemHeight(Length value); @@ -37,27 +46,22 @@ interface DotIndicator: [TypeArguments="DotIndicator"] Indicator { DotIndicator color(ResourceColor value); DotIndicator selectedColor(ResourceColor value); DotIndicator maxDisplayCount(number maxDisplayCount); - + DotIndicator space(LengthMetrics space); }; [Entity=Interface] interface SwiperAutoFill { - attribute VP minSize; - }; [Entity=Class] -interface DigitIndicator: [TypeArguments="DigitIndicator"] Indicator { - +interface DigitIndicator: [Extends, TypeArguments="DigitIndicator"] Indicator { constructor(); DigitIndicator fontColor(ResourceColor value); DigitIndicator selectedFontColor(ResourceColor value); DigitIndicator digitFont(Font value); DigitIndicator selectedDigitFont(Font value); - }; [Entity=Interface] interface ArrowStyle { - [Optional] attribute boolean showBackground; [Optional] @@ -70,10 +74,8 @@ interface ArrowStyle { attribute Length arrowSize; [Optional] attribute ResourceColor arrowColor; - }; dictionary SwiperDisplayMode { - [Deprecated, OriginalEnumMemberName=Stretch] number LEGACY_STRETCH = 0; [Deprecated, OriginalEnumMemberName=AutoLinear] @@ -81,18 +83,14 @@ dictionary SwiperDisplayMode { number STRETCH = 2; [Deprecated] number AUTO_LINEAR = 3; - }; [Entity=Interface] interface SwiperInterface { - [CallSignature] SwiperAttribute invoke(optional SwiperController controller); - }; [Entity=Interface, Deprecated] interface IndicatorStyle { - [Optional, Deprecated] attribute Length left; [Optional, Deprecated] @@ -109,48 +107,39 @@ interface IndicatorStyle { attribute ResourceColor color; [Optional, Deprecated] attribute ResourceColor selectedColor; - }; [Entity=Interface] interface SwiperAnimationEvent { - attribute number currentOffset; attribute number targetOffset; attribute number velocity; - }; [Entity=Interface] interface AutoPlayOptions { - attribute boolean stopWhenTouched; - }; dictionary SwiperNestedScrollMode { - number SELF_ONLY = 0; number SELF_FIRST = 1; - }; dictionary SwiperAnimationMode { - number NO_ANIMATION = 0; number DEFAULT_ANIMATION = 1; number FAST_ANIMATION = 2; - }; callback OnSwiperAnimationStartCallback = void (number index, number targetIndex, SwiperAnimationEvent extraInfo); callback OnSwiperAnimationEndCallback = void (number index, SwiperAnimationEvent extraInfo); callback OnSwiperGestureSwipeCallback = void (number index, SwiperAnimationEvent extraInfo); [Synthetic] callback Callback_Number_Void = void (number parameter); +[Synthetic] +callback Callback_ScrollState_Void = void (ScrollState parameter); [Entity=Class] -interface SwiperAttribute: [TypeArguments="SwiperAttribute"] CommonMethod { - +interface SwiperAttribute: [Extends, TypeArguments="SwiperAttribute"] CommonMethod { SwiperAttribute index(number value); SwiperAttribute autoPlay(boolean value); SwiperAttribute autoPlay(boolean autoPlay, AutoPlayOptions options); SwiperAttribute interval(number value); - SwiperAttribute indicator((DotIndicator or DigitIndicator or boolean) value); SwiperAttribute indicator((IndicatorComponentController or DotIndicator or DigitIndicator or boolean) indicator); SwiperAttribute displayArrow((ArrowStyle or boolean) value, optional boolean isHoverShow); SwiperAttribute loop(boolean value); @@ -171,6 +160,7 @@ interface SwiperAttribute: [TypeArguments="SwiperAttribute"] CommonMethod { SwiperAttribute prevMargin(Length value, optional boolean ignoreBlank); SwiperAttribute nextMargin(Length value, optional boolean ignoreBlank); SwiperAttribute onUnselected(Callback_Number_Void event); + SwiperAttribute onScrollStateChanged(Callback_ScrollState_Void event); SwiperAttribute onAnimationStart(OnSwiperAnimationStartCallback event); SwiperAttribute onAnimationEnd(OnSwiperAnimationEndCallback event); SwiperAttribute onGestureSwipe(OnSwiperGestureSwipeCallback event); @@ -180,35 +170,29 @@ interface SwiperAttribute: [TypeArguments="SwiperAttribute"] CommonMethod { SwiperAttribute indicatorInteractive(boolean value); SwiperAttribute pageFlipMode((PageFlipMode or undefined) mode); SwiperAttribute onContentWillScroll(ContentWillScrollCallback handler); - + SwiperAttribute maintainVisibleContentPosition(boolean enabled); }; [Synthetic] callback Callback_SwiperContentTransitionProxy_Void = void (SwiperContentTransitionProxy parameter); [Entity=Interface] interface SwiperContentAnimatedTransition { - [Optional] attribute number timeout; attribute Callback_SwiperContentTransitionProxy_Void transition; - }; [Entity=Interface] interface SwiperContentTransitionProxy { - attribute number selectedIndex; attribute number index; attribute number position; attribute number mainAxisLength; void finishTransition(); - }; [Entity=Interface] interface SwiperContentWillScrollResult { - attribute number currentIndex; attribute number comingIndex; attribute number offset; - }; callback ContentDidScrollCallback = void (number selectedIndex, number index, number position, number mainAxisLength); callback ContentWillScrollCallback = boolean (SwiperContentWillScrollResult result); \ No newline at end of file diff --git a/idl/symbol_span.idl b/idl/symbol_span.idl index f376245..e744939 100644 --- a/idl/symbol_span.idl +++ b/idl/symbol_span.idl @@ -1,19 +1,487 @@ package symbol_span; +import resource.Resource as Resource; +import common.CommonMethod as CommonMethod; +import common.AttributeModifier as AttributeModifier; +import units.ResourceColor as ResourceColor; +import FontWeight as FontWeight; +import symbolglyph.SymbolEffectStrategy as SymbolEffectStrategy; +import symbolglyph.SymbolRenderingStrategy as SymbolRenderingStrategy; [Entity=Interface] interface SymbolSpanInterface { - [CallSignature] SymbolSpanAttribute invoke(Resource value); - }; +[Synthetic] +callback Callback_ClickEvent_Void = void (ClickEvent event); +[Synthetic] +callback Callback_Boolean_HoverEvent_Void = void (boolean isHover, HoverEvent event); +[Entity=Literal, Synthetic] +interface Literal_Alignment_align { + [Optional] + attribute Alignment align; +}; +[Synthetic] +callback Callback_Void = void (); +[Synthetic] +callback Callback_Array_TouchTestInfo_TouchResult = TouchResult (sequence value); +[Synthetic] +callback Callback_HoverEvent_Void = void (HoverEvent parameter); +[Synthetic] +callback Callback_MouseEvent_Void = void (MouseEvent event); +[Synthetic] +callback Callback_TouchEvent_Void = void (TouchEvent event); +[Synthetic] +callback Callback_KeyEvent_Void = void (KeyEvent event); +[Synthetic] +callback Callback_KeyEvent_Boolean = boolean (KeyEvent parameter); +[Synthetic] +callback Callback_CrownEvent_Void = void (CrownEvent parameter); +[Synthetic] +callback Callback_FocusAxisEvent_Void = void (FocusAxisEvent parameter); +[Synthetic] +callback Callback_AxisEvent_Void = void (AxisEvent parameter); +[Synthetic] +callback Callback_Area_Area_Void = void (Area oldValue, Area newValue); +[Synthetic] +callback Type_SymbolSpanAttribute_onDragStart_event = (CustomBuilder or DragItemInfo) (DragEvent event, optional String extraParams); +[Synthetic] +callback Callback_DragEvent_Opt_String_Void = void (DragEvent event, optional String extraParams); +[Synthetic] +callback Callback_PreDragStatus_Void = void (PreDragStatus parameter); +[Synthetic] +callback Callback_TouchEvent_HitTestMode = HitTestMode (TouchEvent parameter); +[Entity=Literal, Synthetic] +interface Literal_Number_offset_span { + attribute number span; + attribute number offset; +}; +[Entity=Literal, Synthetic] +interface Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs { + [Optional] + attribute (number or Literal_Number_offset_span) xs; + [Optional] + attribute (number or Literal_Number_offset_span) sm; + [Optional] + attribute (number or Literal_Number_offset_span) md; + [Optional] + attribute (number or Literal_Number_offset_span) lg; +}; +[Synthetic] +callback Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult = GestureJudgeResult (GestureInfo gestureInfo, BaseGestureEvent event); [Entity=Class] -interface SymbolSpanAttribute: [TypeArguments="SymbolSpanAttribute"] CommonMethod { - +interface SymbolSpanAttribute { SymbolSpanAttribute fontSize((number or String or Resource) value); SymbolSpanAttribute fontColor(sequence value); SymbolSpanAttribute fontWeight((number or FontWeight or String) value); SymbolSpanAttribute effectStrategy(SymbolEffectStrategy value); SymbolSpanAttribute renderingStrategy(SymbolRenderingStrategy value); SymbolSpanAttribute attributeModifier([TypeArguments="SymbolSpanAttribute"] AttributeModifier modifier); - + SymbolSpanAttribute id(String value); + SymbolSpanAttribute key(String value); + [Deprecated] + SymbolSpanAttribute onClick(Callback_ClickEvent_Void event); + [Deprecated] + SymbolSpanAttribute onClick(Callback_ClickEvent_Void event, number distanceThreshold); + [Deprecated] + SymbolSpanAttribute onHover(Callback_Boolean_HoverEvent_Void event); + [Deprecated] + TransitionEffect animation(AnimateParam value); + [Deprecated] + SymbolSpanAttribute alignSelf(ItemAlign value); + [Deprecated] + SymbolSpanAttribute align(Alignment value); + [Deprecated] + SymbolSpanAttribute alignRules(AlignRuleOption value); + [Deprecated] + SymbolSpanAttribute alignRules(LocalizedAlignRuleOptions alignRule); + [Deprecated] + SymbolSpanAttribute aspectRatio(number value); + [Deprecated] + SymbolSpanAttribute allowDrop((sequence or undefined) value); + [Deprecated] + SymbolSpanAttribute accessibilityGroup(boolean value); + [Deprecated] + SymbolSpanAttribute accessibilityGroup(boolean isGroup, AccessibilityOptions accessibilityOptions); + [Deprecated] + SymbolSpanAttribute accessibilityText(String value); + [Deprecated] + SymbolSpanAttribute accessibilityText(Resource text); + [Deprecated] + SymbolSpanAttribute accessibilityNextFocusId(String nextId); + [Deprecated] + SymbolSpanAttribute accessibilityDefaultFocus(boolean focus); + [Deprecated] + SymbolSpanAttribute accessibilityUseSamePage(AccessibilitySamePageMode pageMode); + [Deprecated] + SymbolSpanAttribute accessibilityScrollTriggerable(boolean isTriggerable); + [Deprecated] + SymbolSpanAttribute accessibilityRole(AccessibilityRoleType role); + [Deprecated] + SymbolSpanAttribute accessibilityTextHint(String value); + [Deprecated] + SymbolSpanAttribute accessibilityDescription(String value); + [Deprecated] + SymbolSpanAttribute accessibilityDescription(Resource description); + [Deprecated] + SymbolSpanAttribute accessibilityLevel(String value); + [Deprecated] + SymbolSpanAttribute accessibilityVirtualNode(CustomBuilder builder); + [Deprecated] + SymbolSpanAttribute accessibilityChecked(boolean isCheck); + [Deprecated] + SymbolSpanAttribute accessibilitySelected(boolean isSelect); + [Deprecated] + SymbolSpanAttribute background(CustomBuilder builder, optional Literal_Alignment_align options); + [Deprecated] + SymbolSpanAttribute backgroundColor((ResourceColor or undefined) color); + [Deprecated] + SymbolSpanAttribute backgroundImage((ResourceStr or PixelMap) src, optional ImageRepeat repeat); + [Deprecated] + SymbolSpanAttribute backgroundImage((ResourceStr or PixelMap) src, optional BackgroundImageOptions options); + [Deprecated] + SymbolSpanAttribute backgroundImageSize((SizeOptions or ImageSize) value); + [Deprecated] + SymbolSpanAttribute backgroundImagePosition((Position or Alignment) value); + [Deprecated] + SymbolSpanAttribute backgroundEffect((BackgroundEffectOptions or undefined) options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SymbolSpanAttribute backgroundImageResizable(ResizableOptions value); + [Deprecated] + SymbolSpanAttribute backgroundBlurStyle((BlurStyle or undefined) style, optional BackgroundBlurStyleOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SymbolSpanAttribute backgroundFilter(Filter filter); + [Deprecated] + SymbolSpanAttribute border(BorderOptions value); + [Deprecated] + SymbolSpanAttribute borderStyle((BorderStyle or EdgeStyles) value); + [Deprecated] + SymbolSpanAttribute borderWidth((Length or EdgeWidths or LocalizedEdgeWidths) value); + [Deprecated] + SymbolSpanAttribute borderColor((ResourceColor or EdgeColors or LocalizedEdgeColors) value); + [Deprecated] + SymbolSpanAttribute borderRadius((Length or BorderRadiuses or LocalizedBorderRadiuses) value); + [Deprecated] + SymbolSpanAttribute borderImage(BorderImageOption value); + [Deprecated] + SymbolSpanAttribute blur((number or undefined) blurRadius, optional BlurOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SymbolSpanAttribute brightness((number or undefined) brightness); + [Deprecated] + SymbolSpanAttribute backdropBlur((number or undefined) radius, optional BlurOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SymbolSpanAttribute blendMode((BlendMode or undefined) mode, optional BlendApplyType type); + [Deprecated] + SymbolSpanAttribute bindTips(TipsMessageType message, optional TipsOptions options); + [Deprecated] + SymbolSpanAttribute bindPopup(boolean show, (PopupOptions or CustomPopupOptions) popup); + [Deprecated] + SymbolSpanAttribute bindMenu((sequence or CustomBuilder) content, optional MenuOptions options); + [Deprecated] + SymbolSpanAttribute bindMenu(boolean isShow, (sequence or CustomBuilder) content, optional MenuOptions options); + [Deprecated] + SymbolSpanAttribute bindContextMenu(CustomBuilder content, ResponseType responseType, optional ContextMenuOptions options); + [Deprecated] + SymbolSpanAttribute bindContextMenu(boolean isShown, CustomBuilder content, optional ContextMenuOptions options); + [Deprecated] + SymbolSpanAttribute bindContentCover(boolean isShow, CustomBuilder builder, optional ModalTransition type); + [Deprecated] + SymbolSpanAttribute bindContentCover(boolean isShow, CustomBuilder builder, optional ContentCoverOptions options); + [Deprecated] + SymbolSpanAttribute bindSheet(boolean isShow, CustomBuilder builder, optional SheetOptions options); + [Deprecated] + SymbolSpanAttribute backgroundBrightness((BackgroundBrightnessOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute customProperty(String name, (Object or undefined) value); + [Deprecated] + SymbolSpanAttribute constraintSize(ConstraintSizeOptions value); + [Deprecated] + SymbolSpanAttribute chainWeight(ChainWeightOptions chainWeight); + [Deprecated] + SymbolSpanAttribute compositingFilter(Filter filter); + [Deprecated] + SymbolSpanAttribute contrast((number or undefined) contrast); + [Deprecated] + SymbolSpanAttribute colorBlend(((Color or String or Resource) or undefined) color); + [Deprecated] + SymbolSpanAttribute chainMode(Axis direction, ChainStyle style); + [Deprecated] + SymbolSpanAttribute clickEffect((ClickEffect or undefined) effect); + [Deprecated] + SymbolSpanAttribute clip((boolean or undefined) clip); + [Deprecated] + SymbolSpanAttribute clip((boolean or CircleAttribute or EllipseAttribute or PathAttribute or RectAttribute) value); + [Deprecated] + SymbolSpanAttribute clipShape(((CircleShape or EllipseShape or PathShape or RectShape) or undefined) shape); + [Deprecated] + SymbolSpanAttribute drawModifier((DrawModifier or undefined) modifier); + [Deprecated] + SymbolSpanAttribute defaultFocus(boolean value); + [Deprecated] + SymbolSpanAttribute displayPriority(number value); + [Deprecated] + SymbolSpanAttribute direction(Direction value); + [Deprecated] + SymbolSpanAttribute draggable(boolean value); + [Deprecated] + SymbolSpanAttribute dragPreview((CustomBuilder or DragItemInfo or String) preview, optional PreviewConfiguration config); + [Deprecated] + SymbolSpanAttribute dragPreviewOptions(DragPreviewOptions value, optional DragInteractionOptions options); + [Deprecated] + SymbolSpanAttribute expandSafeArea(optional sequence types, optional sequence edges); + [Deprecated] + SymbolSpanAttribute enabled(boolean value); + [Deprecated] + SymbolSpanAttribute foregroundEffect(ForegroundEffectOptions options); + [Deprecated] + SymbolSpanAttribute foregroundFilter(Filter filter); + [Deprecated] + SymbolSpanAttribute foregroundBlurStyle((BlurStyle or undefined) style, optional ForegroundBlurStyleOptions options, optional SystemAdaptiveOptions sysOptions); + [Deprecated] + SymbolSpanAttribute foregroundColor(((ResourceColor or ColoringStrategy) or undefined) color); + [Deprecated] + SymbolSpanAttribute focusable(boolean value); + [Deprecated] + SymbolSpanAttribute focusOnTouch(boolean value); + [Deprecated] + SymbolSpanAttribute focusBox(FocusBoxStyle style); + [Deprecated] + SymbolSpanAttribute focusScopeId(String id, optional boolean isGroup, optional boolean arrowStepOut); + [Deprecated] + SymbolSpanAttribute focusScopePriority(String scopeId, optional FocusPriority priority); + [Deprecated] + SymbolSpanAttribute freeze((boolean or undefined) freeze); + [Deprecated] + SymbolSpanAttribute flexGrow(number value); + [Deprecated] + SymbolSpanAttribute flexShrink(number value); + [Deprecated] + SymbolSpanAttribute flexBasis((number or String) value); + [Deprecated] + SymbolSpanAttribute groupDefaultFocus(boolean value); + [Deprecated] + SymbolSpanAttribute gesture(GestureType gesture, optional GestureMask mask); + [Deprecated] + SymbolSpanAttribute gridSpan(number value); + [Deprecated] + SymbolSpanAttribute gridOffset(number value); + [Deprecated] + SymbolSpanAttribute grayscale((number or undefined) grayscale); + [Deprecated] + SymbolSpanAttribute geometryTransition(String id, optional GeometryTransitionOptions options); + [Deprecated] + SymbolSpanAttribute gestureModifier(GestureModifier modifier); + [Deprecated] + SymbolSpanAttribute height((Length or LayoutPolicy) heightValue); + [Deprecated] + SymbolSpanAttribute hitTestBehavior(HitTestMode value); + [Deprecated] + SymbolSpanAttribute hoverEffect(HoverEffect value); + [Deprecated] + SymbolSpanAttribute hueRotate(((number or String) or undefined) rotation); + [Deprecated] + SymbolSpanAttribute invert(((number or InvertOptions) or undefined) options); + [Deprecated] + SymbolSpanAttribute keyboardShortcut((String or FunctionKey) value, sequence keys, optional Callback_Void action); + [Deprecated] + SymbolSpanAttribute layoutWeight((number or String) value); + [Deprecated] + SymbolSpanAttribute linearGradient((LinearGradientOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute linearGradientBlur((number or undefined) blurRadius, (LinearGradientBlurOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute lightUpEffect((number or undefined) degree); + [Deprecated] + SymbolSpanAttribute mouseResponseRegion((sequence or Rectangle) value); + [Deprecated] + SymbolSpanAttribute margin((Margin or Length or LocalizedMargin) value); + [Deprecated] + SymbolSpanAttribute mask((ProgressMask or undefined) mask); + [Deprecated] + SymbolSpanAttribute mask((CircleAttribute or EllipseAttribute or PathAttribute or RectAttribute or ProgressMask) value); + [Deprecated] + SymbolSpanAttribute maskShape(((CircleShape or EllipseShape or PathShape or RectShape) or undefined) shape); + [Deprecated] + SymbolSpanAttribute markAnchor((Position or LocalizedPosition) value); + [Deprecated] + SymbolSpanAttribute motionBlur((MotionBlurOptions or undefined) motionBlur); + [Deprecated] + SymbolSpanAttribute motionPath(MotionPathOptions value); + [Deprecated] + SymbolSpanAttribute monopolizeEvents(boolean monopolize); + [Deprecated] + SymbolSpanAttribute nextFocus((FocusMovement or undefined) nextStep); + [Deprecated] + SymbolSpanAttribute onChildTouchTest(Callback_Array_TouchTestInfo_TouchResult event); + [Deprecated] + SymbolSpanAttribute opacity(((number or Resource) or undefined) opacity); + [Deprecated] + SymbolSpanAttribute outline((OutlineOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute outlineStyle(((OutlineStyle or EdgeOutlineStyles) or undefined) style); + [Deprecated] + SymbolSpanAttribute outlineWidth(((Dimension or EdgeOutlineWidths) or undefined) width); + [Deprecated] + SymbolSpanAttribute outlineColor(((ResourceColor or EdgeColors or LocalizedEdgeColors) or undefined) color); + [Deprecated] + SymbolSpanAttribute outlineRadius(((Dimension or OutlineRadiuses) or undefined) radius); + [Deprecated] + SymbolSpanAttribute onHoverMove(Callback_HoverEvent_Void event); + [Deprecated] + SymbolSpanAttribute onAccessibilityHover(AccessibilityCallback callback_); + [Deprecated] + SymbolSpanAttribute onAccessibilityHoverTransparent(AccessibilityTransparentCallback callback_); + [Deprecated] + SymbolSpanAttribute onMouse(Callback_MouseEvent_Void event); + [Deprecated] + SymbolSpanAttribute onTouch(Callback_TouchEvent_Void event); + [Deprecated] + SymbolSpanAttribute onKeyEvent(Callback_KeyEvent_Void event); + [Deprecated] + SymbolSpanAttribute onKeyEvent(Callback_KeyEvent_Boolean event); + [Deprecated] + SymbolSpanAttribute onDigitalCrown((Callback_CrownEvent_Void or undefined) handler); + [Deprecated] + SymbolSpanAttribute onKeyPreIme(Callback_KeyEvent_Boolean event); + [Deprecated] + SymbolSpanAttribute onKeyEventDispatch(Callback_KeyEvent_Boolean event); + [Deprecated] + SymbolSpanAttribute onFocusAxisEvent(Callback_FocusAxisEvent_Void event); + [Deprecated] + SymbolSpanAttribute onAxisEvent(Callback_AxisEvent_Void event); + [Deprecated] + SymbolSpanAttribute onFocus(Callback_Void event); + [Deprecated] + SymbolSpanAttribute onBlur(Callback_Void event); + [Deprecated] + SymbolSpanAttribute onAppear(Callback_Void event); + [Deprecated] + SymbolSpanAttribute onAttach(Callback_Void callback_); + [Deprecated] + SymbolSpanAttribute onDetach(Callback_Void callback_); + [Deprecated] + SymbolSpanAttribute onAreaChange(Callback_Area_Area_Void event); + [Deprecated] + SymbolSpanAttribute onDisAppear(Callback_Void event); + [Deprecated] + SymbolSpanAttribute offset((Position or Edges or LocalizedEdges) value); + [Deprecated] + SymbolSpanAttribute onDragStart(Type_SymbolSpanAttribute_onDragStart_event event); + [Deprecated] + SymbolSpanAttribute onDragEnter(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SymbolSpanAttribute onDragMove(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SymbolSpanAttribute onDragLeave(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SymbolSpanAttribute onDrop(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SymbolSpanAttribute onDrop(OnDragEventCallback eventCallback, optional DropOptions dropOptions); + [Deprecated] + SymbolSpanAttribute onDragEnd(Callback_DragEvent_Opt_String_Void event); + [Deprecated] + SymbolSpanAttribute onPreDrag(Callback_PreDragStatus_Void callback_); + [Deprecated] + SymbolSpanAttribute overlay((String or CustomBuilder or ComponentContent) value, optional OverlayOptions options); + [Deprecated] + SymbolSpanAttribute onVisibleAreaChange(sequence ratios, VisibleAreaChangeCallback event); + [Deprecated] + void onVisibleAreaApproximateChange(VisibleAreaEventOptions options, (VisibleAreaChangeCallback or undefined) event); + [Deprecated] + SymbolSpanAttribute obscured(sequence reasons); + [Deprecated] + SymbolSpanAttribute onGestureRecognizerJudgeBegin(GestureRecognizerJudgeBeginCallback callback_); + [Deprecated] + SymbolSpanAttribute onGestureRecognizerJudgeBegin(GestureRecognizerJudgeBeginCallback callback_, boolean exposeInnerGesture); + [Deprecated] + SymbolSpanAttribute onTouchIntercept(Callback_TouchEvent_HitTestMode callback_); + [Deprecated] + SymbolSpanAttribute onSizeChange(SizeChangeCallback event); + [Deprecated] + SymbolSpanAttribute padding((Padding or Length or LocalizedPadding) value); + [Deprecated] + SymbolSpanAttribute pixelRound(PixelRoundPolicy value); + [Deprecated] + SymbolSpanAttribute priorityGesture(GestureType gesture, optional GestureMask mask); + [Deprecated] + SymbolSpanAttribute parallelGesture(GestureType gesture, optional GestureMask mask); + [Deprecated] + SymbolSpanAttribute position((Position or Edges or LocalizedEdges) value); + [Deprecated] + SymbolSpanAttribute pixelStretchEffect((PixelStretchEffectOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute responseRegion((sequence or Rectangle) value); + [Deprecated] + SymbolSpanAttribute renderGroup((boolean or undefined) isGroup); + [Deprecated] + SymbolSpanAttribute rotate((RotateOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute radialGradient((RadialGradientOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute restoreId(number value); + [Deprecated] + SymbolSpanAttribute reuseId(String id); + [Deprecated] + SymbolSpanAttribute reuse(ReuseOptions options); + [Deprecated] + SymbolSpanAttribute renderFit((RenderFit or undefined) fitMode); + [Deprecated] + SymbolSpanAttribute size(SizeOptions value); + [Deprecated] + SymbolSpanAttribute safeAreaPadding((Padding or LengthMetrics or LocalizedPadding) paddingValue); + [Deprecated] + SymbolSpanAttribute saturate((number or undefined) saturate); + [Deprecated] + SymbolSpanAttribute sepia((number or undefined) sepia); + [Deprecated] + SymbolSpanAttribute systemBarEffect(); + [Deprecated] + SymbolSpanAttribute scale((ScaleOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute sharedTransition(String id, optional sharedTransitionOptions options); + [Deprecated] + SymbolSpanAttribute sweepGradient((SweepGradientOptions or undefined) options); + [Deprecated] + SymbolSpanAttribute shadow(((ShadowOptions or ShadowStyle) or undefined) options); + [Deprecated] + SymbolSpanAttribute stateStyles(StateStyles value); + [Deprecated] + SymbolSpanAttribute sphericalEffect((number or undefined) effect); + [Deprecated] + SymbolSpanAttribute shouldBuiltInRecognizerParallelWith(ShouldBuiltInRecognizerParallelWithCallback callback_); + [Deprecated] + SymbolSpanAttribute touchable(boolean value); + [Deprecated] + SymbolSpanAttribute tabStop(boolean isTabStop); + [Deprecated] + SymbolSpanAttribute tabIndex(number index); + [Deprecated] + SymbolSpanAttribute transition((TransitionOptions or TransitionEffect) value); + [Deprecated] + SymbolSpanAttribute transition(TransitionEffect effect, (TransitionFinishCallback or undefined) onFinish); + [Deprecated] + SymbolSpanAttribute translate((TranslateOptions or undefined) translate); + [Deprecated] + SymbolSpanAttribute transform((Object or undefined) transform); + [Deprecated] + SymbolSpanAttribute useShadowBatching((boolean or undefined) use); + [Deprecated] + SymbolSpanAttribute useEffect((boolean or undefined) useEffect, optional EffectType effectType); + [Deprecated] + SymbolSpanAttribute useSizeType(Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs value); + [Deprecated] + SymbolSpanAttribute visualEffect(VisualEffect effect); + [Deprecated] + SymbolSpanAttribute visibility(Visibility value); + [Deprecated] + SymbolSpanAttribute width((Length or LayoutPolicy) widthValue); + [Deprecated] + SymbolSpanAttribute zIndex(number value); + [Deprecated] + SymbolSpanAttribute accessibilityFocusDrawLevel(FocusDrawLevel drawLevel); + [Deprecated] + SymbolSpanAttribute onAccessibilityFocus(AccessibilityFocusCallback callback_); + [Deprecated] + SymbolSpanAttribute onGestureJudgeBegin(Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult callback_); + [Deprecated] + SymbolSpanAttribute advancedBlendMode((BlendMode or Blender) effect, optional BlendApplyType type); }; \ No newline at end of file diff --git a/idl/symbolglyph.idl b/idl/symbolglyph.idl index d0ad086..2e91208 100644 --- a/idl/symbolglyph.idl +++ b/idl/symbolglyph.idl @@ -1,116 +1,104 @@ package symbolglyph; +import resource.Resource as Resource; +import units.ResourceColor as ResourceColor; +import FontWeight as FontWeight; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; [Entity=Interface] interface SymbolGlyphInterface { - [CallSignature] SymbolGlyphAttribute invoke(optional Resource value); - }; dictionary SymbolRenderingStrategy { - number SINGLE = 0; number MULTIPLE_COLOR = 1; number MULTIPLE_OPACITY = 2; - }; dictionary SymbolEffectStrategy { - number NONE = 0; number SCALE = 1; number HIERARCHICAL = 2; - }; dictionary EffectDirection { - number DOWN = 0; number UP = 1; - }; dictionary EffectScope { - number LAYER = 0; number WHOLE = 1; - }; dictionary EffectFillStyle { - number CUMULATIVE = 0; number ITERATIVE = 1; - }; [Entity=Class] interface SymbolEffect { - - }; [Entity=Class] -interface ScaleSymbolEffect: SymbolEffect { - +interface ScaleSymbolEffect: [Extends] SymbolEffect { constructor(optional EffectScope scope, optional EffectDirection direction); [Optional] attribute EffectScope scope; [Optional] attribute EffectDirection direction; - }; [Entity=Class] -interface HierarchicalSymbolEffect: SymbolEffect { - +interface HierarchicalSymbolEffect: [Extends] SymbolEffect { constructor(optional EffectFillStyle fillStyle); [Optional] attribute EffectFillStyle fillStyle; - }; [Entity=Class] -interface AppearSymbolEffect: SymbolEffect { - +interface AppearSymbolEffect: [Extends] SymbolEffect { constructor(optional EffectScope scope); [Optional] attribute EffectScope scope; - }; [Entity=Class] -interface DisappearSymbolEffect: SymbolEffect { - +interface DisappearSymbolEffect: [Extends] SymbolEffect { constructor(optional EffectScope scope); [Optional] attribute EffectScope scope; - }; [Entity=Class] -interface BounceSymbolEffect: SymbolEffect { - +interface BounceSymbolEffect: [Extends] SymbolEffect { constructor(optional EffectScope scope, optional EffectDirection direction); [Optional] attribute EffectScope scope; [Optional] attribute EffectDirection direction; - }; [Entity=Class] -interface ReplaceSymbolEffect: SymbolEffect { - +interface ReplaceSymbolEffect: [Extends] SymbolEffect { constructor(optional EffectScope scope); [Optional] attribute EffectScope scope; - }; [Entity=Class] -interface PulseSymbolEffect: SymbolEffect { - - +interface PulseSymbolEffect: [Extends] SymbolEffect { }; [Entity=Class] -interface SymbolGlyphAttribute: [TypeArguments="SymbolGlyphAttribute"] CommonMethod { - +interface DisableSymbolEffect: [Extends] SymbolEffect { + constructor(optional EffectScope scope); + [Optional] + attribute EffectScope scope; +}; +[Entity=Class] +interface QuickReplaceSymbolEffect: [Extends] SymbolEffect { + constructor(optional EffectScope scope); + [Optional] + attribute EffectScope scope; +}; +[Entity=Class] +interface SymbolGlyphAttribute: [Extends, TypeArguments="SymbolGlyphAttribute"] CommonMethod { SymbolGlyphAttribute fontSize((number or String or Resource) value); SymbolGlyphAttribute fontColor(sequence value); + SymbolGlyphAttribute shaderStyle(sequence shaders); SymbolGlyphAttribute fontWeight((number or FontWeight or String) value); SymbolGlyphAttribute effectStrategy(SymbolEffectStrategy value); SymbolGlyphAttribute renderingStrategy(SymbolRenderingStrategy value); - SymbolGlyphAttribute symbolEffect(SymbolEffect symbolEffect, optional boolean isActive); - SymbolGlyphAttribute symbolEffect(SymbolEffect symbolEffect, optional number triggerValue); + SymbolGlyphAttribute symbolEffect(SymbolEffect symbolEffect, optional (boolean or number) triggerValue); SymbolGlyphAttribute minFontScale(((number or Resource) or undefined) scale); SymbolGlyphAttribute maxFontScale(((number or Resource) or undefined) scale); - + SymbolGlyphAttribute symbolShadow((ShadowOptions or undefined) shadow); }; \ No newline at end of file diff --git a/idl/tab_content.idl b/idl/tab_content.idl index 5e904c7..a6447df 100644 --- a/idl/tab_content.idl +++ b/idl/tab_content.idl @@ -1,20 +1,31 @@ package tab_content; +import common.CommonMethod as CommonMethod; +import CustomBuilder as CustomBuilder; +import TextHeightAdaptivePolicy as TextHeightAdaptivePolicy; +import TextOverflow as TextOverflow; +import VerticalAlign as VerticalAlign; +import units.Dimension as Dimension; +import units.Font as Font; +import units.Length as Length; +import units.LocalizedPadding as LocalizedPadding; +import units.Padding as Padding; +import units.Resource as Resource; +import units.ResourceColor as ResourceColor; +import units.ResourceStr as ResourceStr; +import units.VoidCallback as VoidCallback; +import ComponentContent as ComponentContent; +import SymbolGlyphModifier as SymbolGlyphModifier; dictionary SelectedMode { - number INDICATOR = 0; number BOARD = 1; - }; dictionary LayoutMode { - number AUTO = 0; number VERTICAL = 1; number HORIZONTAL = 2; - }; [Entity=Interface] interface IndicatorStyle { - [Optional] attribute ResourceColor color; [Optional] @@ -25,18 +36,27 @@ interface IndicatorStyle { attribute Length borderRadius; [Optional] attribute Length marginTop; - +}; +[Entity=Interface] +interface SubTabBarIndicatorStyle { + [Optional] + attribute ResourceColor color; + [Optional] + attribute Length height; + [Optional] + attribute Length width; + [Optional] + attribute Length borderRadius; + [Optional] + attribute Length marginTop; }; [Entity=Interface] interface BoardStyle { - [Optional] attribute Length borderRadius; - }; [Entity=Interface] interface LabelStyle { - [Optional] attribute TextOverflow overflow; [Optional] @@ -53,78 +73,82 @@ interface LabelStyle { attribute ResourceColor selectedColor; [Optional] attribute ResourceColor unselectedColor; - +}; +[Entity=Interface] +interface TabBarLabelStyle { + [Optional] + attribute TextOverflow overflow; + [Optional] + attribute number maxLines; + [Optional] + attribute (number or ResourceStr) minFontSize; + [Optional] + attribute (number or ResourceStr) maxFontSize; + [Optional] + attribute TextHeightAdaptivePolicy heightAdaptivePolicy; + [Optional] + attribute Font font; + [Optional] + attribute ResourceColor selectedColor; + [Optional] + attribute ResourceColor unselectedColor; }; [Entity=Interface] interface TabBarIconStyle { - [Optional] attribute ResourceColor selectedColor; [Optional] attribute ResourceColor unselectedColor; - }; [Entity=Class] interface TabBarSymbol { - attribute SymbolGlyphModifier normal; [Optional] attribute SymbolGlyphModifier selected; - }; [Entity=Interface] interface TabBarOptions { - [Optional] attribute (String or Resource) icon; [Optional] attribute (String or Resource) text; - }; [Entity=Class] interface SubTabBarStyle { - constructor(ResourceStr content); constructor((ResourceStr or ComponentContent) content); - static SubTabBarStyle of(ResourceStr content); static SubTabBarStyle of((ResourceStr or ComponentContent) content); SubTabBarStyle indicator(IndicatorStyle value); + SubTabBarStyle indicator(SubTabBarIndicatorStyle style); SubTabBarStyle selectedMode(SelectedMode value); SubTabBarStyle board(BoardStyle value); SubTabBarStyle labelStyle(LabelStyle value); + SubTabBarStyle labelStyle(TabBarLabelStyle style); SubTabBarStyle padding((Padding or Dimension) value); SubTabBarStyle padding(LocalizedPadding padding); SubTabBarStyle id(String value); - }; [Entity=Class] interface BottomTabBarStyle { - constructor((ResourceStr or TabBarSymbol) icon, ResourceStr text); static BottomTabBarStyle of((ResourceStr or TabBarSymbol) icon, ResourceStr text); BottomTabBarStyle labelStyle(LabelStyle value); + BottomTabBarStyle labelStyle(TabBarLabelStyle style); BottomTabBarStyle padding((Padding or Dimension or LocalizedPadding) value); BottomTabBarStyle layoutMode(LayoutMode value); BottomTabBarStyle verticalAlign(VerticalAlign value); BottomTabBarStyle symmetricExtensible(boolean value); BottomTabBarStyle id(String value); BottomTabBarStyle iconStyle(TabBarIconStyle style); - }; [Entity=Interface] interface TabContentInterface { - [CallSignature] TabContentAttribute invoke(); - }; [Entity=Class] -interface TabContentAttribute: [TypeArguments="TabContentAttribute"] CommonMethod { - - TabContentAttribute tabBar((String or Resource or CustomBuilder or TabBarOptions) options); - TabContentAttribute tabBar((SubTabBarStyle or BottomTabBarStyle) value); +interface TabContentAttribute: [Extends, TypeArguments="TabContentAttribute"] CommonMethod { TabContentAttribute tabBar((ComponentContent or SubTabBarStyle or BottomTabBarStyle or String or Resource or CustomBuilder or TabBarOptions) content); TabContentAttribute onWillShow(VoidCallback event); TabContentAttribute onWillHide(VoidCallback event); - }; \ No newline at end of file diff --git a/idl/tabs.idl b/idl/tabs.idl index 08e007e..0143afd 100644 --- a/idl/tabs.idl +++ b/idl/tabs.idl @@ -1,58 +1,59 @@ package tabs; -[Import="import('../api/arkui/CommonModifier').CommonModifier"] -typedef [Import="import('../api/arkui/CommonModifier').CommonModifier"] CommonModifier CommonModifier; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import common.BlurStyle as BlurStyle; +import common.Callback as Callback; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import common.TranslateOptions as TranslateOptions; +import common.DividerStyle as DividerStyle; +import EdgeEffect as EdgeEffect; +import PageFlipMode as PageFlipMode; +import units.Dimension as Dimension; +import units.Length as Length; +import units.ResourceColor as ResourceColor; +import CommonModifier as CommonModifier; +import arkui.CommonModifier.CommonModifier as _CommonModifier; +typedef _CommonModifier CommonModifier; dictionary BarMode { - [OriginalEnumMemberName=Scrollable] number SCROLLABLE = 0; [OriginalEnumMemberName=Fixed] number FIXED = 1; - }; dictionary AnimationMode { - number CONTENT_FIRST = 0; number ACTION_FIRST = 1; number NO_ANIMATION = 2; number CONTENT_FIRST_WITH_JUMP = 3; number ACTION_FIRST_WITH_JUMP = 4; - }; dictionary BarPosition { - [OriginalEnumMemberName=Start] number START = 0; [OriginalEnumMemberName=End] number END = 1; - }; dictionary LayoutStyle { - number ALWAYS_CENTER = 0; number ALWAYS_AVERAGE_SPLIT = 1; number SPACE_BETWEEN_OR_CENTER = 2; - }; dictionary TabsCacheMode { - number CACHE_BOTH_SIDE = 0; number CACHE_LATEST_SWITCHED = 1; - }; [Entity=Class] interface TabsController { - constructor(); void changeIndex(number value); [Throws] async void preloadItems((sequence or undefined) indices); void setTabBarTranslate(TranslateOptions translate); void setTabBarOpacity(number opacity); - }; [Entity=Interface] interface TabsOptions { - [Optional] attribute BarPosition barPosition; [Optional] @@ -61,18 +62,14 @@ interface TabsOptions { attribute TabsController controller; [Optional] attribute CommonModifier barModifier; - }; [Entity=Interface] interface TabsInterface { - [CallSignature] TabsAttribute invoke(optional TabsOptions options); - }; [Entity=Interface] interface DividerStyle { - attribute Length strokeWidth; [Optional] attribute ResourceColor color; @@ -80,19 +77,15 @@ interface DividerStyle { attribute Length startMargin; [Optional] attribute Length endMargin; - }; [Entity=Interface] interface TabsAnimationEvent { - attribute number currentOffset; attribute number targetOffset; attribute number velocity; - }; [Entity=Interface] interface BarGridColumnOptions { - [Optional] attribute number sm; [Optional] @@ -103,16 +96,13 @@ interface BarGridColumnOptions { attribute Dimension margin; [Optional] attribute Dimension gutter; - }; [Entity=Interface] interface ScrollableBarModeOptions { - [Optional] attribute Dimension margin; [Optional] attribute LayoutStyle nonScrollableLayoutStyle; - }; callback OnTabsAnimationStartCallback = void (number index, number targetIndex, TabsAnimationEvent extraInfo); callback OnTabsAnimationEndCallback = void (number index, TabsAnimationEvent extraInfo); @@ -122,8 +112,7 @@ callback OnTabsContentWillChangeCallback = boolean (number currentIndex, number [Synthetic] callback Callback_Number_Void = void (number parameter); [Entity=Class] -interface TabsAttribute: [TypeArguments="TabsAttribute"] CommonMethod { - +interface TabsAttribute: [Extends, TypeArguments="TabsAttribute"] CommonMethod { TabsAttribute vertical(boolean value); TabsAttribute barPosition(BarPosition value); TabsAttribute scrollable(boolean value); @@ -134,6 +123,8 @@ interface TabsAttribute: [TypeArguments="TabsAttribute"] CommonMethod { TabsAttribute barMode(BarMode value, optional ScrollableBarModeOptions options); TabsAttribute barWidth(Length value); TabsAttribute barHeight(Length value); + TabsAttribute barHeight(Length height, boolean noMinHeightLimit); + TabsAttribute animationCurve((Curve or ICurve) curve); TabsAttribute animationDuration(number value); TabsAttribute animationMode((AnimationMode or undefined) mode); TabsAttribute edgeEffect((EdgeEffect or undefined) edgeEffect); @@ -152,27 +143,22 @@ interface TabsAttribute: [TypeArguments="TabsAttribute"] CommonMethod { TabsAttribute customContentTransition(TabsCustomContentTransitionCallback delegate); TabsAttribute barBackgroundBlurStyle(BlurStyle value); TabsAttribute barBackgroundBlurStyle(BlurStyle style, BackgroundBlurStyleOptions options); - TabsAttribute barBackgroundEffect(BackgroundEffectOptions options); TabsAttribute pageFlipMode((PageFlipMode or undefined) mode); + TabsAttribute barBackgroundEffect(BackgroundEffectOptions options); TabsAttribute onContentWillChange(OnTabsContentWillChangeCallback handler); TabsAttribute cachedMaxCount(number count, TabsCacheMode mode); - }; [Synthetic] callback Callback_TabContentTransitionProxy_Void = void (TabContentTransitionProxy parameter); [Entity=Interface] interface TabContentAnimatedTransition { - [Optional] attribute number timeout; attribute Callback_TabContentTransitionProxy_Void transition; - }; [Entity=Interface] interface TabContentTransitionProxy { - attribute number from; attribute number to; void finishTransition(); - }; \ No newline at end of file diff --git a/idl/nfctech.idl b/idl/tag.nfctech.idl similarity index 98% rename from idl/nfctech.idl rename to idl/tag.nfctech.idl index 19b6259..b1412af 100644 --- a/idl/nfctech.idl +++ b/idl/tag.nfctech.idl @@ -1,54 +1,42 @@ package tag.nfctech; -import ohos.nfc.tag as tag; -import tag.TagSession as TagSession; +import ohos.nfc.tag.default as tag; +import tag.tagSession.TagSession as TagSession; import ohos.base.AsyncCallback as AsyncCallback; import ohos.base.Callback as Callback; [Entity=Interface] interface NfcATag: TagSession { - number getSak(); sequence getAtqa(); - }; [Entity=Interface] interface NfcBTag: TagSession { - sequence getRespAppData(); sequence getRespProtocol(); - }; [Entity=Interface] interface NfcFTag: TagSession { - sequence getSystemCode(); sequence getPmm(); - }; [Entity=Interface] interface NfcVTag: TagSession { - number getResponseFlags(); number getDsfId(); - }; [Async, Synthetic] callback AsyncCallback_Boolean_Void = void (boolean result); [Entity=Interface] interface IsoDepTag: TagSession { - sequence getHistoricalBytes(); sequence getHiLayerResponse(); [Throws] async boolean isExtendedApduSupported(); [Throws] void isExtendedApduSupported(AsyncCallback_Boolean_Void callback_); - }; [Entity=Interface] interface NdefMessage { - sequence getNdefRecords(); - }; [Async, Synthetic] callback AsyncCallback_NdefMessage_Void = void (NdefMessage result); @@ -56,7 +44,6 @@ callback AsyncCallback_NdefMessage_Void = void (NdefMessage result); callback AsyncCallback_Void = void (); [Entity=Interface] interface NdefTag: TagSession { - tag.NfcForumType getNdefTagType(); NdefMessage getNdefMessage(); boolean isNdefWritable(); @@ -76,13 +63,11 @@ interface NdefTag: TagSession { void setReadOnly(AsyncCallback_Void callback_); [Throws] String getNdefTagTypeString(tag.NfcForumType type); - }; [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); [Entity=Interface] interface MifareClassicTag: TagSession { - [Throws] async void authenticateSector(number sectorIndex, sequence key, boolean isKeyA); [Throws] @@ -121,11 +106,9 @@ interface MifareClassicTag: TagSession { number getBlockIndex(number sectorIndex); [Throws] number getSectorIndex(number blockIndex); - }; [Entity=Interface] interface MifareUltralightTag: TagSession { - [Throws] async sequence readMultiplePages(number pageIndex); [Throws] @@ -135,11 +118,9 @@ interface MifareUltralightTag: TagSession { [Throws] void writeSinglePage(number pageIndex, sequence data, AsyncCallback_Void callback_); tag.MifareUltralightType getType(); - }; [Entity=Interface] interface NdefFormatableTag: TagSession { - [Throws] async void format(NdefMessage message); [Throws] @@ -148,12 +129,9 @@ interface NdefFormatableTag: TagSession { async void formatReadOnly(NdefMessage message); [Throws] void formatReadOnly(NdefMessage message, AsyncCallback_Void callback_); - }; [Entity=Interface] interface BarcodeTag: TagSession { - [Throws] async buffer getBarcode(); - }; \ No newline at end of file diff --git a/idl/tagSession.idl b/idl/tag.tagSession.idl similarity index 94% rename from idl/tagSession.idl rename to idl/tag.tagSession.idl index 470eed7..54b28d8 100644 --- a/idl/tagSession.idl +++ b/idl/tag.tagSession.idl @@ -1,11 +1,10 @@ -package tag; -import ohos.nfc.tag as tag; +package tag.tagSession; +import ohos.nfc.tag.default as tag; import ohos.base.AsyncCallback as AsyncCallback; [Async, Synthetic] callback AsyncCallback_Array_Number_Void = void (sequence result); [Entity=Interface] interface TagSession { - [Deprecated] tag.TagInfo getTagInfo(); [Deprecated] @@ -40,5 +39,4 @@ interface TagSession { number getMaxSendLength(); [Throws] number getMaxTransmitSize(); - }; \ No newline at end of file diff --git a/idl/text.idl b/idl/text.idl index a38fe7b..cb5d812 100644 --- a/idl/text.idl +++ b/idl/text.idl @@ -1,16 +1,40 @@ package text; +import common.CommonMethod as CommonMethod; +import common.ShadowOptions as ShadowOptions; +import common.Optional as Optional; +import common.Callback as Callback; +import CustomBuilder as CustomBuilder; +import EllipsisMode as EllipsisMode; +import TextCase as TextCase; +import LineBreakStrategy as LineBreakStrategy; +import TextAlign as TextAlign; +import FontStyle as FontStyle; +import FontWeight as FontWeight; +import WordBreak as WordBreak; +import TextOverflow as TextOverflow; +import CopyOptions as CopyOptions; +import TextHeightAdaptivePolicy as TextHeightAdaptivePolicy; +import TextSelectableMode as TextSelectableMode; +import units.Resource as Resource; +import units.ResourceColor as ResourceColor; +import units.Font as Font; +import units.Length as Length; +import units.LengthMetrics as LengthMetrics; +import TextDataDetectorConfig as TextDataDetectorConfig; +import LayoutManager as LayoutManager; +import FontSettingOptions as FontSettingOptions; +import EditMenuOptions as EditMenuOptions; +import DecorationStyleInterface as DecorationStyleInterface; +import StyledString as StyledString; +import SelectionMenuOptions as SelectionMenuOptions; [Entity=Interface] interface TextOverflowOptions { - attribute TextOverflow overflow; - }; [Entity=Interface] interface TextInterface { - [CallSignature] TextAttribute invoke(optional (String or Resource) content, optional TextOptions value); - }; [Synthetic] callback Callback_String_Void = void (String value); @@ -19,9 +43,7 @@ callback Callback_Number_Number_Void = void (number selectionStart, number selec [Synthetic] callback Callback_MarqueeState_Void = void (MarqueeState parameter); [Entity=Class] -interface TextAttribute: [TypeArguments="TextAttribute"] CommonMethod { - - TextAttribute font(Font value); +interface TextAttribute: [Extends, TypeArguments="TextAttribute"] CommonMethod { TextAttribute font(Font fontValue, optional FontSettingOptions options); TextAttribute fontColor(ResourceColor value); TextAttribute fontSize((number or String or Resource) value); @@ -30,17 +52,20 @@ interface TextAttribute: [TypeArguments="TextAttribute"] CommonMethod { TextAttribute minFontScale((number or Resource) scale); TextAttribute maxFontScale((number or Resource) scale); TextAttribute fontStyle(FontStyle value); - TextAttribute fontWeight((number or FontWeight or String) value); TextAttribute fontWeight((number or FontWeight or String) weight, optional FontSettingOptions options); - TextAttribute lineSpacing(LengthMetrics value); + TextAttribute fontWeight((number or FontWeight or ResourceStr) weight, optional FontSettingOptions options); + TextAttribute lineSpacing(LengthMetrics value, optional LineSpacingOptions options); TextAttribute textAlign(TextAlign value); + TextAttribute textVerticalAlign((TextVerticalAlign or undefined) textVerticalAlign); TextAttribute lineHeight((number or String or Resource) value); TextAttribute textOverflow(TextOverflowOptions options); TextAttribute fontFamily((String or Resource) value); TextAttribute maxLines(number value); TextAttribute decoration(DecorationStyleInterface value); + TextAttribute letterSpacing((number or ResourceStr) value); TextAttribute letterSpacing((number or String) value); TextAttribute textCase(TextCase value); + TextAttribute baselineOffset((number or ResourceStr) value); TextAttribute baselineOffset((number or String) value); TextAttribute copyOption(CopyOptions value); TextAttribute draggable(boolean value); @@ -53,6 +78,7 @@ interface TextAttribute: [TypeArguments="TextAttribute"] CommonMethod { TextAttribute selection(number selectionStart, number selectionEnd); TextAttribute caretColor(ResourceColor color); TextAttribute selectedBackgroundColor(ResourceColor color); + TextAttribute shaderStyle(ShaderStyle shader); TextAttribute ellipsisMode(EllipsisMode value); TextAttribute enableDataDetector(boolean enable); TextAttribute dataDetectorConfig(TextDataDetectorConfig config); @@ -66,46 +92,37 @@ interface TextAttribute: [TypeArguments="TextAttribute"] CommonMethod { TextAttribute editMenuOptions(EditMenuOptions editMenu); TextAttribute halfLeading(boolean halfLeading); TextAttribute enableHapticFeedback(boolean isEnabled); - + TextAttribute optimizeTrailingSpace((boolean or undefined) optimize); + TextAttribute enableAutoSpacing((boolean or undefined) enabled); + TextAttribute contentTransition((ContentTransition or undefined) transition); }; dictionary TextSpanType { - number TEXT = 0; number IMAGE = 1; number MIXED = 2; number DEFAULT = 3; - }; dictionary TextResponseType { - number RIGHT_CLICK = 0; number LONG_PRESS = 1; number SELECT = 2; number DEFAULT = 3; - }; dictionary MarqueeState { - number START = 0; number BOUNCE = 1; number FINISH = 2; - }; dictionary MarqueeStartPolicy { - number DEFAULT = 0; number ON_FOCUS = 1; - }; [Entity=Interface] interface TextOptions { - attribute TextController controller; - }; [Entity=Interface] interface TextMarqueeOptions { - attribute boolean start; [Optional] attribute number step; @@ -119,13 +136,10 @@ interface TextMarqueeOptions { attribute boolean fadeout; [Optional] attribute MarqueeStartPolicy marqueeStartPolicy; - }; [Entity=Class] interface TextController { - void closeSelectionMenu(); void setStyledString(StyledString value); LayoutManager getLayoutManager(); - }; \ No newline at end of file diff --git a/idl/text_area.idl b/idl/text_area.idl index e9483a8..d85b201 100644 --- a/idl/text_area.idl +++ b/idl/text_area.idl @@ -1,40 +1,73 @@ package text_area; +import KeyboardOptions as KeyboardOptions; +import PasteEvent as PasteEvent; +import CaretStyle as CaretStyle; +import DeleteValue as DeleteValue; +import EditMenuOptions as EditMenuOptions; +import EditableTextOnChangeCallback as EditableTextOnChangeCallback; +import InsertValue as InsertValue; +import AutoCapitalizationMode as AutoCapitalizationMode; +import EditableTextChangeValue as EditableTextChangeValue; +import KeyboardAppearance as KeyboardAppearance; +import BarState as BarState; +import CopyOptions as CopyOptions; +import FontStyle as FontStyle; +import FontWeight as FontWeight; +import LineBreakStrategy as LineBreakStrategy; +import TextContentStyle as TextContentStyle; +import TextAlign as TextAlign; +import TextOverflow as TextOverflow; +import TextHeightAdaptivePolicy as TextHeightAdaptivePolicy; +import WordBreak as WordBreak; +import EllipsisMode as EllipsisMode; +import EnterKeyType as EnterKeyType; +import SubmitEvent as SubmitEvent; +import ContentType as ContentType; +import units.Dimension as Dimension; +import units.Font as Font; +import units.Length as Length; +import units.LengthMetrics as LengthMetrics; +import units.ResourceColor as ResourceColor; +import units.ResourceStr as ResourceStr; +import common.InputCounterOptions as InputCounterOptions; +import common.TextContentControllerBase as TextContentControllerBase; +import common.SelectionOptions as SelectionOptions; +import common.TextDecorationOptions as TextDecorationOptions; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.Optional as Optional; +import common.Bindable as Bindable; +import CustomBuilder as CustomBuilder; +import resource.Resource as Resource; [Entity=Class] -interface TextAreaController: TextContentControllerBase { - +interface TextAreaController: [Extends] TextContentControllerBase { constructor(); void caretPosition(number value); void setTextSelection(number selectionStart, number selectionEnd, optional SelectionOptions options); void stopEditing(); - }; [Entity=Interface] interface TextAreaOptions { - [Optional] attribute ResourceStr placeholder; [Optional] - attribute ResourceStr text; + attribute (ResourceStr or [TypeArguments="ResourceStr"] Bindable or [TypeArguments="Resource"] Bindable or [TypeArguments="String"] Bindable) text; [Optional] attribute TextAreaController controller; - }; [Entity=Interface] interface TextAreaInterface { - [CallSignature] TextAreaAttribute invoke(optional TextAreaOptions value); - }; dictionary TextAreaType { - number NORMAL = 0; number NUMBER = 2; number PHONE_NUMBER = 3; number EMAIL = 5; number NUMBER_DECIMAL = 12; number URL = 13; - + number ONE_TIME_CODE = 14; }; callback TextAreaSubmitCallback = void (EnterKeyType enterKeyType, optional SubmitEvent event); [Synthetic] @@ -58,8 +91,7 @@ callback Callback_DeleteValue_Void = void (DeleteValue parameter); [Synthetic] callback Callback_EditableTextChangeValue_Boolean = boolean (EditableTextChangeValue parameter); [Entity=Class] -interface TextAreaAttribute: [TypeArguments="TextAreaAttribute"] CommonMethod { - +interface TextAreaAttribute: [Extends, TypeArguments="TextAreaAttribute"] CommonMethod { TextAreaAttribute placeholderColor(ResourceColor value); TextAreaAttribute placeholderFont(Font value); TextAreaAttribute enterKeyType(EnterKeyType value); @@ -68,15 +100,14 @@ interface TextAreaAttribute: [TypeArguments="TextAreaAttribute"] CommonMethod { TextAreaAttribute fontColor(ResourceColor value); TextAreaAttribute fontSize(Length value); TextAreaAttribute fontStyle(FontStyle value); - TextAreaAttribute fontWeight((number or FontWeight or String) value); + TextAreaAttribute fontWeight((number or FontWeight or ResourceStr) value); TextAreaAttribute fontFamily(ResourceStr value); TextAreaAttribute textOverflow(TextOverflow value); TextAreaAttribute textIndent(Dimension value); TextAreaAttribute inputFilter(ResourceStr value, optional Callback_String_Void error); TextAreaAttribute caretStyle(CaretStyle value); TextAreaAttribute selectedBackgroundColor(ResourceColor value); - TextAreaAttribute onSubmit(Callback_EnterKeyType_Void callback_); - TextAreaAttribute onSubmit(TextAreaSubmitCallback callback_); + TextAreaAttribute onSubmit((Callback_EnterKeyType_Void or TextAreaSubmitCallback) callback_); TextAreaAttribute onChange(EditableTextOnChangeCallback callback_); TextAreaAttribute onTextSelectionChange(Callback_Number_Number_Void callback_); TextAreaAttribute onContentScroll(Callback_Number_Number_Void callback_); @@ -97,12 +128,14 @@ interface TextAreaAttribute: [TypeArguments="TextAreaAttribute"] CommonMethod { TextAreaAttribute maxFontScale(((number or Resource) or undefined) scale); TextAreaAttribute heightAdaptivePolicy(TextHeightAdaptivePolicy value); TextAreaAttribute maxLines(number value); + TextAreaAttribute maxLines(number lines, MaxLinesOptions options); + TextAreaAttribute minLines((number or undefined) lines); TextAreaAttribute wordBreak(WordBreak value); TextAreaAttribute lineBreakStrategy(LineBreakStrategy strategy); TextAreaAttribute customKeyboard(CustomBuilder value, optional KeyboardOptions options); TextAreaAttribute decoration(TextDecorationOptions value); TextAreaAttribute letterSpacing((number or String or Resource) value); - TextAreaAttribute lineSpacing(LengthMetrics value); + TextAreaAttribute lineSpacing(LengthMetrics value, optional LineSpacingOptions options); TextAreaAttribute lineHeight((number or String or Resource) value); TextAreaAttribute type(TextAreaType value); TextAreaAttribute enableAutoFill(boolean value); @@ -115,10 +148,13 @@ interface TextAreaAttribute: [TypeArguments="TextAreaAttribute"] CommonMethod { TextAreaAttribute editMenuOptions(EditMenuOptions editMenu); TextAreaAttribute enablePreviewText(boolean enable); TextAreaAttribute enableHapticFeedback(boolean isEnabled); + TextAreaAttribute autoCapitalizationMode(AutoCapitalizationMode mode); TextAreaAttribute halfLeading((boolean or undefined) halfLeading); TextAreaAttribute ellipsisMode((EllipsisMode or undefined) mode); TextAreaAttribute stopBackPress((boolean or undefined) isStopped); TextAreaAttribute onWillChange(Callback_EditableTextChangeValue_Boolean callback_); TextAreaAttribute keyboardAppearance((KeyboardAppearance or undefined) appearance); - + TextAreaAttribute strokeWidth((LengthMetrics or undefined) width); + TextAreaAttribute strokeColor((ResourceColor or undefined) color); + TextAreaAttribute enableAutoSpacing((boolean or undefined) enabled); }; \ No newline at end of file diff --git a/idl/text_clock.idl b/idl/text_clock.idl index 8d31f60..50f1cac 100644 --- a/idl/text_clock.idl +++ b/idl/text_clock.idl @@ -1,41 +1,44 @@ package text_clock; +import common.CommonConfiguration as CommonConfiguration; +import common.CommonMethod as CommonMethod; +import common.ShadowOptions as ShadowOptions; +import common.ContentModifier as ContentModifier; +import common.Optional as Optional; +import common.DateTimeOptions as DateTimeOptions; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.ResourceStr as ResourceStr; +import FontStyle as FontStyle; +import FontWeight as FontWeight; [Entity=Class] interface TextClockController { - constructor(); - undefined start(); - undefined stop(); - + void start(); + void stop(); }; [Entity=Interface] interface TextClockConfiguration: [TypeArguments="TextClockConfiguration"] CommonConfiguration { - attribute number timeZoneOffset; attribute boolean started; attribute number timeValue; - }; [Entity=Interface] interface TextClockOptions { - [Optional] attribute number timeZoneOffset; [Optional] attribute TextClockController controller; - }; [Entity=Interface] interface TextClockInterface { - [CallSignature] TextClockAttribute invoke(optional TextClockOptions options); - }; [Synthetic] callback Callback_Number_Void = void (number value); [Entity=Class] -interface TextClockAttribute: [TypeArguments="TextClockAttribute"] CommonMethod { - +interface TextClockAttribute: [Extends, TypeArguments="TextClockAttribute"] CommonMethod { + TextClockAttribute format(ResourceStr value); TextClockAttribute format(String value); TextClockAttribute onDateChange(Callback_Number_Void event); TextClockAttribute fontColor(ResourceColor value); @@ -47,5 +50,4 @@ interface TextClockAttribute: [TypeArguments="TextClockAttribute"] CommonMethod TextClockAttribute fontFeature(String value); TextClockAttribute contentModifier([TypeArguments="TextClockConfiguration"] ContentModifier modifier); TextClockAttribute dateTimeOptions((DateTimeOptions or undefined) dateTimeOptions); - }; \ No newline at end of file diff --git a/idl/text_common.idl b/idl/text_common.idl index a22a23a..51b2fb2 100644 --- a/idl/text_common.idl +++ b/idl/text_common.idl @@ -1,18 +1,30 @@ package text_common; +import units.ResourceColor as ResourceColor; +import units.ResourceStr as ResourceStr; +import units.Length as Length; +import styled_string.DecorationStyleInterface as DecorationStyleInterface; +import styled_string.MutableStyledString as MutableStyledString; +import styled_string.StyledString as StyledString; +import common.SelectionOptions as SelectionOptions; +import common.Callback as Callback; +import TextDecorationType as TextDecorationType; +import TextDecorationStyle as TextDecorationStyle; +import ohos.graphics.text.default.Affinity as _Affinity; +import ohos.graphics.text.default.LineMetrics as _LineMetrics; +import ohos.graphics.text.default.RectWidthStyle as _RectWidthStyle; +import ohos.graphics.text.default.RectHeightStyle as _RectHeightStyle; +import ohos.graphics.text.default.TextBox as _TextBox; dictionary TextDataDetectorType { - number PHONE_NUMBER = 0; number URL = 1; number EMAIL = 2; number ADDRESS = 3; number DATE_TIME = 4; - }; [Synthetic] callback Callback_String_Void = void (String result); [Entity=Interface] interface TextDataDetectorConfig { - attribute sequence types; [Optional] attribute Callback_String_Void onDetectResultUpdate; @@ -20,137 +32,114 @@ interface TextDataDetectorConfig { attribute ResourceColor color; [Optional] attribute DecorationStyleInterface decoration; - + [Optional] + attribute boolean enablePreviewMenu; }; [Entity=Interface] interface TextRange { - [Optional] attribute number start; [Optional] attribute number end; - }; [Entity=Interface] interface InsertValue { - attribute number insertOffset; attribute String insertValue; - }; dictionary TextDeleteDirection { - number BACKWARD = 0; number FORWARD = 1; - +}; +dictionary SuperscriptStyle { + number NORMAL = 0; + number SUPERSCRIPT = 1; + number SUBSCRIPT = 2; }; dictionary MenuType { - number SELECTION_MENU = 0; number PREVIEW_MENU = 1; - +}; +dictionary AutoCapitalizationMode { + number NONE = 0; + number WORDS = 1; + number SENTENCES = 2; + number ALL_CHARACTERS = 3; }; [Entity=Interface] interface DeleteValue { - attribute number deleteOffset; attribute TextDeleteDirection direction; attribute String deleteValue; - }; callback OnDidChangeCallback = void (TextRange rangeBefore, TextRange rangeAfter); callback EditableTextOnChangeCallback = void (String value, optional PreviewText previewText, optional TextChangeOptions options); [Entity=Interface] interface TextBaseController { - void setSelection(number selectionStart, number selectionEnd, optional SelectionOptions options); void closeSelectionMenu(); LayoutManager getLayoutManager(); - }; [Entity=Interface] interface TextEditControllerEx: TextBaseController { - boolean isEditing(); void stopEditing(); boolean setCaretOffset(number offset); number getCaretOffset(); - [Optional] PreviewText getPreviewText(); - }; [Entity=Interface] interface PreviewText { - attribute number offset; attribute String value; - }; [Entity=Interface] interface StyledStringController { - void setStyledString(StyledString styledString); MutableStyledString getStyledString(); - }; [Synthetic] callback Callback_StyledStringChangeValue_Boolean = boolean (StyledStringChangeValue parameter); [Entity=Interface] interface StyledStringChangedListener { - [Optional] attribute Callback_StyledStringChangeValue_Boolean onWillChange; [Optional] attribute OnDidChangeCallback onDidChange; - }; [Entity=Interface] interface StyledStringChangeValue { - attribute TextRange range; attribute StyledString replacementString; [Optional] attribute StyledString previewText; - }; [Entity=Interface] interface LayoutManager { - number getLineCount(); PositionWithAffinity getGlyphPositionAtCoordinate(number x, number y); LineMetrics getLineMetrics(number lineNumber); sequence getRectsForRange(TextRange range, RectWidthStyle widthStyle, RectHeightStyle heightStyle); - }; [Entity=Interface] interface PositionWithAffinity { - attribute number position; attribute Affinity affinity; - -}; -[Import="import('../api/@ohos.graphics.text').default.Affinity"] -typedef [Import="import('../api/@ohos.graphics.text').default.Affinity"] Affinity Affinity; -[Import="import('../api/@ohos.graphics.text').default.LineMetrics"] -typedef [Import="import('../api/@ohos.graphics.text').default.LineMetrics"] LineMetrics LineMetrics; -[Import="import('../api/@ohos.graphics.text').default.RectWidthStyle"] -typedef [Import="import('../api/@ohos.graphics.text').default.RectWidthStyle"] RectWidthStyle RectWidthStyle; -[Import="import('../api/@ohos.graphics.text').default.RectHeightStyle"] -typedef [Import="import('../api/@ohos.graphics.text').default.RectHeightStyle"] RectHeightStyle RectHeightStyle; -[Import="import('../api/@ohos.graphics.text').default.TextBox"] -typedef [Import="import('../api/@ohos.graphics.text').default.TextBox"] TextBox TextBox; +}; +typedef _Affinity Affinity; +typedef _LineMetrics LineMetrics; +typedef _RectWidthStyle RectWidthStyle; +typedef _RectHeightStyle RectHeightStyle; +typedef _TextBox TextBox; [Entity=Interface] interface CaretStyle { - [Optional] attribute Length width; [Optional] attribute ResourceColor color; - }; [Entity=Class] interface TextMenuItemId { - static readonly attribute TextMenuItemId CUT; static readonly attribute TextMenuItemId COPY; static readonly attribute TextMenuItemId PASTE; @@ -161,81 +150,180 @@ interface TextMenuItemId { static readonly attribute TextMenuItemId TRANSLATE; static readonly attribute TextMenuItemId SEARCH; static readonly attribute TextMenuItemId SHARE; + static readonly attribute TextMenuItemId url; + static readonly attribute TextMenuItemId email; + static readonly attribute TextMenuItemId phoneNumber; + static readonly attribute TextMenuItemId address; + static readonly attribute TextMenuItemId dateTime; + static readonly attribute TextMenuItemId askAI; static TextMenuItemId of(ResourceStr id); boolean equals(TextMenuItemId id); - }; [Entity=Interface] interface TextMenuItem { - attribute ResourceStr content; [Optional] attribute ResourceStr icon; attribute TextMenuItemId id; [Optional] attribute ResourceStr labelInfo; - }; +callback OnPrepareMenuCallback = sequence (sequence menuItems); +callback OnCreateMenuCallback = sequence (sequence menuItems); +callback OnMenuItemClickCallback = boolean (TextMenuItem menuItem, TextRange range); +[Synthetic] +callback AsyncCallback_Array_TextMenuItem_Array_TextMenuItem = sequence (sequence menuItems); +[Synthetic] +callback AsyncCallback_TextMenuItem_TextRange_Boolean = boolean (TextMenuItem menuItem, TextRange range); [Entity=Interface] interface EditMenuOptions { - - sequence onCreateMenu(sequence menuItems); - boolean onMenuItemClick(TextMenuItem menuItem, TextRange range); - + attribute AsyncCallback_Array_TextMenuItem_Array_TextMenuItem onCreateMenu; + attribute AsyncCallback_TextMenuItem_TextRange_Boolean onMenuItemClick; + [Optional] + attribute OnPrepareMenuCallback onPrepareMenu; + attribute OnCreateMenuCallback onCreateMenu; + attribute OnMenuItemClickCallback onMenuItemClick; }; [Entity=Interface] interface DecorationStyleResult { - attribute TextDecorationType type; attribute ResourceColor color; [Optional] attribute TextDecorationStyle style; - + [Optional] + attribute number thicknessScale; }; [Entity=Interface] interface FontSettingOptions { - [Optional] attribute boolean enableVariableFontWeight; - }; [Entity=Interface] interface TextChangeOptions { - attribute TextRange rangeBefore; attribute TextRange rangeAfter; attribute String oldContent; attribute PreviewText oldPreviewText; - }; [Entity=Interface] interface EditableTextChangeValue { - attribute String content; [Optional] attribute PreviewText previewText; [Optional] attribute TextChangeOptions options; - }; dictionary TextMenuShowMode { - number DEFAULT = 0; number PREFER_WINDOW = 1; - }; [Entity=Interface] interface TextMenuOptions { - [Optional] attribute TextMenuShowMode showMode; - }; dictionary KeyboardAppearance { - number NONE_IMMERSIVE = 0; number IMMERSIVE = 1; number LIGHT_IMMERSIVE = 2; number DARK_IMMERSIVE = 3; - +}; +[Entity=Class] +interface ShaderStyle { +}; +[Entity=Class] +interface LinearGradientStyle: [Extends] ShaderStyle { + constructor(LinearGradientOptions options); + attribute LinearGradientOptions options; +}; +[Entity=Class] +interface RadialGradientStyle: [Extends] ShaderStyle { + constructor(RadialGradientOptions options); + attribute RadialGradientOptions options; +}; +[Entity=Class] +interface ColorShaderStyle: [Extends] ShaderStyle { + constructor(ResourceColor color); + attribute ResourceColor color; +}; +[Entity=Class] +interface ContentTransition { +}; +[Entity=Class] +interface NumericTextTransition: [Extends] ContentTransition { + constructor(optional NumericTextTransitionOptions options); + [Optional] + attribute FlipDirection flipDirection; + [Optional] + attribute boolean enableBlur; +}; +[Entity=Interface] +interface NumericTextTransitionOptions { + [Optional] + attribute FlipDirection flipDirection; + [Optional] + attribute boolean enableBlur; +}; +dictionary FlipDirection { + number DOWN = 0; + number UP = 1; +}; +[Entity=Interface] +interface LineSpacingOptions { + [Optional] + attribute boolean onlyBetweenLines; +}; +[Entity=Interface] +interface MaxLinesOptions { + [Optional] + attribute MaxLinesMode overflowMode; +}; +dictionary MaxLinesMode { + number CLIP = 0; + number SCROLL = 1; +}; +dictionary TextChangeReason { + number UNKNOWN = 0; + number INPUT = 1; + number PASTE = 2; + number CUT = 3; + number DRAG = 4; + number AUTO_FILL = 5; + number AI_WRITE = 6; + number REDO = 7; + number UNDO = 8; + number CONTROLLER = 9; + number ACCESSIBILITY = 10; + number COLLABORATION = 11; + number STYLUS = 12; +}; +dictionary KeyboardGradientMode { + number NONE = 0; + number LINEAR_GRADIENT = 1; +}; +dictionary KeyboardFluidLightMode { + number NONE = 0; + number BACKGROUND_FLUID_LIGHT = 1; +}; +[Entity=Interface] +interface KeyboardAppearanceConfig { + [Optional] + attribute KeyboardGradientMode gradientMode; + [Optional] + attribute KeyboardFluidLightMode fluidLightMode; +}; +dictionary TextVerticalAlign { + number BASELINE = 0; + number BOTTOM = 1; + number CENTER = 2; + number TOP = 3; +}; +[Entity=Interface] +interface IMEClient { + attribute number nodeId; +}; +[Entity=Interface] +interface TextLayoutOptions { + [Optional] + attribute LengthMetrics constraintWidth; }; \ No newline at end of file diff --git a/idl/text_input.idl b/idl/text_input.idl index 14673ac..b831339 100644 --- a/idl/text_input.idl +++ b/idl/text_input.idl @@ -1,6 +1,42 @@ package text_input; +import search.CancelButtonSymbolOptions as CancelButtonSymbolOptions; +import search.CancelButtonOptions as CancelButtonOptions; +import common.Callback as Callback; +import common.CommonMethod as CommonMethod; +import common.TextContentControllerBase as TextContentControllerBase; +import common.SelectionOptions as SelectionOptions; +import common.InputCounterOptions as InputCounterOptions; +import common.TextDecorationOptions as TextDecorationOptions; +import common.Optional as Optional; +import CustomBuilder as CustomBuilder; +import BarState as BarState; +import LineBreakStrategy as LineBreakStrategy; +import TextAlign as TextAlign; +import FontStyle as FontStyle; +import FontWeight as FontWeight; +import WordBreak as WordBreak; +import TextOverflow as TextOverflow; +import CopyOptions as CopyOptions; +import TextHeightAdaptivePolicy as TextHeightAdaptivePolicy; +import TextContentStyle as TextContentStyle; +import EllipsisMode as EllipsisMode; +import units.Resource as Resource; +import units.ResourceStr as ResourceStr; +import units.ResourceColor as ResourceColor; +import units.Dimension as Dimension; +import units.Font as Font; +import units.Length as Length; +import InsertValue as InsertValue; +import DeleteValue as DeleteValue; +import CaretStyle as CaretStyle; +import EditableTextOnChangeCallback as EditableTextOnChangeCallback; +import EditMenuOptions as EditMenuOptions; +import AutoCapitalizationMode as AutoCapitalizationMode; +import EditableTextChangeValue as EditableTextChangeValue; +import KeyboardAppearance as KeyboardAppearance; +import KeyboardOptions as KeyboardOptions; +import PasteEvent as PasteEvent; dictionary InputType { - [OriginalEnumMemberName=Normal] number NORMAL = 0; [OriginalEnumMemberName=Number] @@ -17,10 +53,9 @@ dictionary InputType { number NEW_PASSWORD = 11; number NUMBER_DECIMAL = 12; number URL = 13; - + number ONE_TIME_CODE = 14; }; dictionary ContentType { - number USER_NAME = 0; number PASSWORD = 1; number NEW_PASSWORD = 2; @@ -54,10 +89,8 @@ dictionary ContentType { number LICENSE_PLATE = 35; number ENGINE_NUMBER = 36; number LICENSE_CHASSIS_NUMBER = 37; - }; dictionary EnterKeyType { - [OriginalEnumMemberName=Go] number GO = 2; [OriginalEnumMemberName=Search] @@ -70,11 +103,9 @@ dictionary EnterKeyType { number DONE = 6; number PREVIOUS = 7; number NEW_LINE = 8; - }; [Entity=Interface] interface UnderlineColor { - [Optional] attribute (ResourceColor or undefined) typing; [Optional] @@ -83,58 +114,45 @@ interface UnderlineColor { attribute (ResourceColor or undefined) error; [Optional] attribute (ResourceColor or undefined) disable; - }; [Entity=Interface] interface SubmitEvent { - attribute String text; void keepEditableState(); - }; [Entity=Class] -interface TextInputController: TextContentControllerBase { - +interface TextInputController: [Extends] TextContentControllerBase { constructor(); void caretPosition(number value); void setTextSelection(number selectionStart, number selectionEnd, optional SelectionOptions options); void stopEditing(); - }; [Entity=Interface] interface TextInputOptions { - [Optional] attribute ResourceStr placeholder; [Optional] attribute ResourceStr text; [Optional] attribute TextInputController controller; - }; dictionary TextInputStyle { - [OriginalEnumMemberName=Default] number DEFAULT = 0; [OriginalEnumMemberName=Inline] number INLINE = 1; - }; [Entity=Interface] interface TextInputInterface { - [CallSignature] TextInputAttribute invoke(optional TextInputOptions value); - }; [Entity=Interface] interface PasswordIcon { - [Optional] attribute (String or Resource) onIconSrc; [Optional] attribute (String or Resource) offIconSrc; - }; callback OnSubmitCallback = void (EnterKeyType enterKey, SubmitEvent event); callback OnTextSelectionChangeCallback = void (number selectionStart, number selectionEnd); @@ -153,10 +171,11 @@ callback Callback_DeleteValue_Boolean = boolean (DeleteValue parameter); [Synthetic] callback Callback_DeleteValue_Void = void (DeleteValue parameter); [Synthetic] +callback Callback_IMEClient_Void = void (IMEClient parameter); +[Synthetic] callback Callback_EditableTextChangeValue_Boolean = boolean (EditableTextChangeValue parameter); [Entity=Class] -interface TextInputAttribute: [TypeArguments="TextInputAttribute"] CommonMethod { - +interface TextInputAttribute: [Extends, TypeArguments="TextInputAttribute"] CommonMethod { TextInputAttribute type(InputType value); TextInputAttribute contentType(ContentType value); TextInputAttribute placeholderColor(ResourceColor value); @@ -176,7 +195,7 @@ interface TextInputAttribute: [TypeArguments="TextInputAttribute"] CommonMethod TextInputAttribute fontColor(ResourceColor value); TextInputAttribute fontSize(Length value); TextInputAttribute fontStyle(FontStyle value); - TextInputAttribute fontWeight((number or FontWeight or String) value); + TextInputAttribute fontWeight((number or FontWeight or ResourceStr) value); TextInputAttribute fontFamily(ResourceStr value); TextInputAttribute inputFilter(ResourceStr value, optional Callback_String_Void error); TextInputAttribute onCopy(Callback_String_Void callback_); @@ -202,8 +221,7 @@ interface TextInputAttribute: [TypeArguments="TextInputAttribute"] CommonMethod TextInputAttribute lineBreakStrategy(LineBreakStrategy strategy); TextInputAttribute customKeyboard(CustomBuilder value, optional KeyboardOptions options); TextInputAttribute showCounter(boolean value, optional InputCounterOptions options); - TextInputAttribute cancelButton(CancelButtonOptions options); - TextInputAttribute cancelButton(CancelButtonSymbolOptions symbolOptions); + TextInputAttribute cancelButton((CancelButtonOptions or CancelButtonSymbolOptions) symbolOptions); TextInputAttribute selectAll(boolean value); TextInputAttribute minFontSize((number or String or Resource) value); TextInputAttribute maxFontSize((number or String or Resource) value); @@ -222,13 +240,18 @@ interface TextInputAttribute: [TypeArguments="TextInputAttribute"] CommonMethod TextInputAttribute onDidInsert(Callback_InsertValue_Void callback_); TextInputAttribute onWillDelete(Callback_DeleteValue_Boolean callback_); TextInputAttribute onDidDelete(Callback_DeleteValue_Void callback_); + TextInputAttribute onWillAttachIME(Callback_IMEClient_Void callback_); TextInputAttribute editMenuOptions(EditMenuOptions editMenu); TextInputAttribute enablePreviewText(boolean enable); TextInputAttribute enableHapticFeedback(boolean isEnabled); + TextInputAttribute autoCapitalizationMode(AutoCapitalizationMode mode); TextInputAttribute halfLeading((boolean or undefined) halfLeading); TextInputAttribute ellipsisMode((EllipsisMode or undefined) mode); TextInputAttribute stopBackPress((boolean or undefined) isStopped); TextInputAttribute onWillChange(Callback_EditableTextChangeValue_Boolean callback_); TextInputAttribute keyboardAppearance((KeyboardAppearance or undefined) appearance); - + TextInputAttribute strokeWidth((LengthMetrics or undefined) width); + TextInputAttribute strokeColor((ResourceColor or undefined) color); + TextInputAttribute enableAutoFillAnimation((boolean or undefined) enabled); + TextInputAttribute enableAutoSpacing((boolean or undefined) enabled); }; \ No newline at end of file diff --git a/idl/text_picker.idl b/idl/text_picker.idl index a2d5927..e298576 100644 --- a/idl/text_picker.idl +++ b/idl/text_picker.idl @@ -1,42 +1,55 @@ package text_picker; +import units.Resource as Resource; +import units.ResourceColor as ResourceColor; +import units.Offset as Offset; +import units.Dimension as Dimension; +import units.ResourceStr as ResourceStr; +import common.CommonMethod as CommonMethod; +import common.PickerTextStyle as PickerTextStyle; +import common.PickerDialogButtonStyle as PickerDialogButtonStyle; +import common.Rectangle as Rectangle; +import common.BlurStyle as BlurStyle; +import common.ShadowOptions as ShadowOptions; +import common.ShadowStyle as ShadowStyle; +import common.HoverModeAreaType as HoverModeAreaType; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import common.Optional as Optional; +import common.Callback as Callback; +import common.Bindable as Bindable; +import DialogAlignment as DialogAlignment; +import CrownSensitivity as CrownSensitivity; +import TextOverflow as TextOverflow; +import LengthMetrics as LengthMetrics; [Entity=Interface] interface TextPickerRangeContent { - attribute (String or Resource) icon; [Optional] attribute (String or Resource) text; - }; [Entity=Interface] interface TextCascadePickerRangeContent { - attribute (String or Resource) text; [Optional] attribute sequence children; - }; [Entity=Interface] interface TextPickerOptions { - attribute (sequence or sequence> or Resource or sequence or sequence) range; [Optional] - attribute (String or sequence) value; + attribute (ResourceStr or sequence or [TypeArguments="ResourceStr"] Bindable or [TypeArguments="sequence"] Bindable) value; [Optional] - attribute (number or sequence) selected; + attribute (number or sequence or [TypeArguments="number"] Bindable or [TypeArguments="sequence"] Bindable) selected; [Optional] attribute sequence columnWidths; - }; [Entity=Interface] interface TextPickerInterface { - [CallSignature] TextPickerAttribute invoke(optional TextPickerOptions options); - }; [Entity=Interface] interface DividerOptions { - [Optional] attribute Dimension strokeWidth; [Optional] @@ -45,18 +58,22 @@ interface DividerOptions { attribute Dimension startMargin; [Optional] attribute Dimension endMargin; - }; [Entity=Interface] interface TextPickerTextStyle: PickerTextStyle { - [Optional] attribute (number or String or Resource) minFontSize; [Optional] attribute (number or String or Resource) maxFontSize; [Optional] attribute TextOverflow overflow; - +}; +[Entity=Interface] +interface PickerBackgroundStyle { + [Optional] + attribute ResourceColor color; + [Optional] + attribute (LengthMetrics or BorderRadiuses or LocalizedBorderRadiuses) borderRadius; }; callback TextPickerScrollStopCallback = void ((String or sequence) value, (number or sequence) index); callback OnTextPickerChangeCallback = void ((String or sequence) selectItem, (number or sequence) index); @@ -68,18 +85,12 @@ callback Callback_Void = void (); [Synthetic] callback Type_TextPickerAttribute_onChange_callback = void ((String or sequence) value, (number or sequence) index); [Entity=Class] -interface TextPickerAttribute: [TypeArguments="TextPickerAttribute"] CommonMethod { - - TextPickerAttribute defaultPickerItemHeight((number or String) value); +interface TextPickerAttribute: [Extends, TypeArguments="TextPickerAttribute"] CommonMethod { TextPickerAttribute defaultPickerItemHeight(((number or String) or undefined) height); - TextPickerAttribute canLoop(boolean value); TextPickerAttribute canLoop((boolean or undefined) isLoop); - TextPickerAttribute disappearTextStyle(PickerTextStyle value); - TextPickerAttribute disappearTextStyle((PickerTextStyle or undefined) style); - TextPickerAttribute textStyle(PickerTextStyle value); - TextPickerAttribute textStyle((PickerTextStyle or undefined) style); - TextPickerAttribute selectedTextStyle(PickerTextStyle value); - TextPickerAttribute selectedTextStyle((PickerTextStyle or undefined) style); + TextPickerAttribute disappearTextStyle(((PickerTextStyle or TextPickerTextStyle) or undefined) style); + TextPickerAttribute textStyle(((PickerTextStyle or TextPickerTextStyle) or undefined) style); + TextPickerAttribute selectedTextStyle(((PickerTextStyle or TextPickerTextStyle) or undefined) style); TextPickerAttribute disableTextStyleAnimation(boolean disabled); TextPickerAttribute defaultTextStyle(TextPickerTextStyle style); [Deprecated] @@ -88,31 +99,24 @@ interface TextPickerAttribute: [TypeArguments="TextPickerAttribute"] CommonMetho TextPickerAttribute onCancel(Callback_Void callback_); TextPickerAttribute onChange(Type_TextPickerAttribute_onChange_callback callback_); TextPickerAttribute onChange((OnTextPickerChangeCallback or undefined) callback_); - TextPickerAttribute onScrollStop(TextPickerScrollStopCallback callback_); TextPickerAttribute onScrollStop((TextPickerScrollStopCallback or undefined) callback_); TextPickerAttribute onEnterSelectedArea(TextPickerEnterSelectedAreaCallback callback_); - TextPickerAttribute selectedIndex((number or sequence) value); TextPickerAttribute selectedIndex(((number or sequence) or undefined) index); - TextPickerAttribute divider((DividerOptions or undefined) value); TextPickerAttribute divider((DividerOptions or undefined) textDivider); - TextPickerAttribute gradientHeight(Dimension value); - TextPickerAttribute enableHapticFeedback((boolean or undefined) enable); TextPickerAttribute gradientHeight((Dimension or undefined) height); + TextPickerAttribute enableHapticFeedback((boolean or undefined) enable); TextPickerAttribute digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); - + TextPickerAttribute selectedBackgroundStyle((PickerBackgroundStyle or undefined) style); }; [Entity=Interface] interface TextPickerResult { - attribute (String or sequence) value; attribute (number or sequence) index; - }; [Synthetic] callback Callback_TextPickerResult_Void = void (TextPickerResult value); [Entity=Interface] interface TextPickerDialogOptions: TextPickerOptions { - [Optional] attribute (number or String) defaultPickerItemHeight; [Optional] @@ -171,11 +175,74 @@ interface TextPickerDialogOptions: TextPickerOptions { attribute HoverModeAreaType hoverModeArea; [Optional] attribute boolean enableHapticFeedback; - + [Optional] + attribute PickerBackgroundStyle selectedBackgroundStyle; +}; +[Entity=Interface] +interface TextPickerDialogOptionsExt: TextPickerOptions { + [Optional] + attribute (number or String) defaultPickerItemHeight; + [Optional] + attribute boolean canLoop; + [Optional] + attribute TextPickerTextStyle disappearTextStyle; + [Optional] + attribute TextPickerTextStyle textStyle; + [Optional] + attribute PickerDialogButtonStyle acceptButtonStyle; + [Optional] + attribute PickerDialogButtonStyle cancelButtonStyle; + [Optional] + attribute TextPickerTextStyle selectedTextStyle; + [Optional] + attribute boolean disableTextStyleAnimation; + [Optional] + attribute TextPickerTextStyle defaultTextStyle; + [Optional] + attribute Callback_TextPickerResult_Void onAccept; + [Optional] + attribute VoidCallback onCancel; + [Optional] + attribute Callback_TextPickerResult_Void onChange; + [Optional] + attribute Callback_TextPickerResult_Void onScrollStop; + [Optional] + attribute Callback_TextPickerResult_Void onEnterSelectedArea; + [Optional] + attribute Rectangle maskRect; + [Optional] + attribute DialogAlignment alignment; + [Optional] + attribute Offset offset; + [Optional] + attribute ResourceColor backgroundColor; + [Optional] + attribute BlurStyle backgroundBlurStyle; + [Optional] + attribute BackgroundBlurStyleOptions backgroundBlurStyleOptions; + [Optional] + attribute BackgroundEffectOptions backgroundEffect; + [Optional] + attribute VoidCallback onDidAppear; + [Optional] + attribute VoidCallback onDidDisappear; + [Optional] + attribute VoidCallback onWillAppear; + [Optional] + attribute VoidCallback onWillDisappear; + [Optional] + attribute (ShadowOptions or ShadowStyle) shadow; + [Optional] + attribute boolean enableHoverMode; + [Optional] + attribute HoverModeAreaType hoverModeArea; + [Optional] + attribute boolean enableHapticFeedback; + [Optional] + attribute PickerBackgroundStyle selectedBackgroundStyle; }; [Entity=Class] interface TextPickerDialog { - - static undefined show(optional TextPickerDialogOptions options); - + [Deprecated] + static void show(optional TextPickerDialogOptions options); }; \ No newline at end of file diff --git a/idl/text_timer.idl b/idl/text_timer.idl index e721553..100c436 100644 --- a/idl/text_timer.idl +++ b/idl/text_timer.idl @@ -1,53 +1,52 @@ package text_timer; +import common.CommonConfiguration as CommonConfiguration; +import common.CommonMethod as CommonMethod; +import common.ShadowOptions as ShadowOptions; +import common.ContentModifier as ContentModifier; +import units.ResourceColor as ResourceColor; +import units.Length as Length; +import units.ResourceStr as ResourceStr; +import FontStyle as FontStyle; +import FontWeight as FontWeight; [Entity=Class] interface TextTimerController { - constructor(); - undefined start(); - undefined pause(); - undefined reset(); - + void start(); + void pause(); + void reset(); }; [Entity=Interface] interface TextTimerConfiguration: [TypeArguments="TextTimerConfiguration"] CommonConfiguration { - attribute number count; attribute boolean isCountDown; attribute boolean started; attribute number elapsedTime; - }; [Entity=Interface] interface TextTimerOptions { - [Optional] attribute boolean isCountDown; [Optional] attribute number count; [Optional] attribute TextTimerController controller; - }; [Entity=Interface] interface TextTimerInterface { - [CallSignature] TextTimerAttribute invoke(optional TextTimerOptions options); - }; [Synthetic] callback Callback_Number_Number_Void = void (number utc, number elapsedTime); [Entity=Class] -interface TextTimerAttribute: [TypeArguments="TextTimerAttribute"] CommonMethod { - +interface TextTimerAttribute: [Extends, TypeArguments="TextTimerAttribute"] CommonMethod { TextTimerAttribute format(String value); TextTimerAttribute fontColor(ResourceColor value); TextTimerAttribute fontSize(Length value); TextTimerAttribute fontStyle(FontStyle value); - TextTimerAttribute fontWeight((number or FontWeight or String) value); + TextTimerAttribute fontWeight((number or FontWeight or ResourceStr) value); TextTimerAttribute fontFamily(ResourceStr value); TextTimerAttribute onTimer(Callback_Number_Number_Void event); TextTimerAttribute textShadow((ShadowOptions or sequence) value); TextTimerAttribute contentModifier([TypeArguments="TextTimerConfiguration"] ContentModifier modifier); - }; \ No newline at end of file diff --git a/idl/time_picker.idl b/idl/time_picker.idl index db9e8bd..e67c0ff 100644 --- a/idl/time_picker.idl +++ b/idl/time_picker.idl @@ -1,72 +1,72 @@ package time_picker; +import units.ResourceColor as ResourceColor; +import units.Offset as Offset; +import common.CommonMethod as CommonMethod; +import common.PickerTextStyle as PickerTextStyle; +import common.PickerDialogButtonStyle as PickerDialogButtonStyle; +import common.Rectangle as Rectangle; +import common.BlurStyle as BlurStyle; +import common.ShadowOptions as ShadowOptions; +import common.ShadowStyle as ShadowStyle; +import common.HoverModeAreaType as HoverModeAreaType; +import common.BackgroundBlurStyleOptions as BackgroundBlurStyleOptions; +import common.BackgroundEffectOptions as BackgroundEffectOptions; +import common.Optional as Optional; +import common.Callback as Callback; +import common.DateTimeOptions as DateTimeOptions; +import common.Bindable as Bindable; +import DialogAlignment as DialogAlignment; +import CrownSensitivity as CrownSensitivity; +import ohos.intl.default.DateTimeOptions as _DateTimeOptions; [Entity=Interface] interface TimePickerResult { - attribute number hour; attribute number minute; attribute number second; - }; dictionary TimePickerFormat { - number HOUR_MINUTE = 0; number HOUR_MINUTE_SECOND = 1; - }; [Entity=Interface] interface TimePickerOptions { - [Optional] - attribute Date selected; + attribute date selected; [Optional] attribute TimePickerFormat format; [Optional] - attribute Date start; + attribute date start; [Optional] - attribute Date end; - + attribute date end; }; [Entity=Interface] interface TimePickerInterface { - [CallSignature] TimePickerAttribute invoke(optional TimePickerOptions options); - }; -[Import="import('../api/@ohos.intl').default.DateTimeOptions"] -typedef [Import="import('../api/@ohos.intl').default.DateTimeOptions"] DateTimeOptions DateTimeOptions; +typedef _DateTimeOptions DateTimeOptions; callback OnTimePickerChangeCallback = void (TimePickerResult result); [Synthetic] callback Callback_TimePickerResult_Void = void (TimePickerResult value); [Entity=Class] -interface TimePickerAttribute: [TypeArguments="TimePickerAttribute"] CommonMethod { - - TimePickerAttribute useMilitaryTime(boolean value); +interface TimePickerAttribute: [Extends, TypeArguments="TimePickerAttribute"] CommonMethod { TimePickerAttribute useMilitaryTime((boolean or undefined) isMilitaryTime); - TimePickerAttribute loop(boolean value); TimePickerAttribute loop((boolean or undefined) isLoop); - TimePickerAttribute disappearTextStyle(PickerTextStyle value); TimePickerAttribute disappearTextStyle((PickerTextStyle or undefined) style); - TimePickerAttribute textStyle(PickerTextStyle value); TimePickerAttribute textStyle((PickerTextStyle or undefined) style); - TimePickerAttribute selectedTextStyle(PickerTextStyle value); TimePickerAttribute selectedTextStyle((PickerTextStyle or undefined) style); - TimePickerAttribute dateTimeOptions(DateTimeOptions value); TimePickerAttribute dateTimeOptions((DateTimeOptions or undefined) timeFormat); TimePickerAttribute onChange(Callback_TimePickerResult_Void callback_); TimePickerAttribute onChange((OnTimePickerChangeCallback or undefined) callback_); TimePickerAttribute onEnterSelectedArea(Callback_TimePickerResult_Void callback_); - TimePickerAttribute enableHapticFeedback(boolean enable); TimePickerAttribute enableHapticFeedback((boolean or undefined) enable); TimePickerAttribute digitalCrownSensitivity((CrownSensitivity or undefined) sensitivity); TimePickerAttribute enableCascade(boolean enabled); - }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface TimePickerDialogOptions: TimePickerOptions { - [Optional] attribute boolean useMilitaryTime; [Optional] @@ -121,11 +121,9 @@ interface TimePickerDialogOptions: TimePickerOptions { attribute HoverModeAreaType hoverModeArea; [Optional] attribute boolean enableHapticFeedback; - }; [Entity=Class] interface TimePickerDialog { - - static undefined show(optional TimePickerDialogOptions options); - + [Deprecated] + static void show(optional TimePickerDialogOptions options); }; \ No newline at end of file diff --git a/idl/toggle.idl b/idl/toggle.idl index df26d28..da86152 100644 --- a/idl/toggle.idl +++ b/idl/toggle.idl @@ -1,17 +1,21 @@ package toggle; +import resource.Resource as Resource; +import units.ResourceColor as ResourceColor; +import common.CommonConfiguration as CommonConfiguration; +import common.Callback as Callback; +import common.CommonMethod as CommonMethod; +import common.ContentModifier as ContentModifier; +import common.Bindable as Bindable; dictionary ToggleType { - [OriginalEnumMemberName=Checkbox] number CHECKBOX = 0; [OriginalEnumMemberName=Switch] number SWITCH = 1; [OriginalEnumMemberName=Button] number BUTTON = 2; - }; [Entity=Interface] interface SwitchStyle { - [Optional] attribute (number or Resource) pointRadius; [Optional] @@ -20,40 +24,31 @@ interface SwitchStyle { attribute ResourceColor pointColor; [Optional] attribute (number or Resource) trackBorderRadius; - }; [Synthetic] callback Callback_Boolean_Void = void (boolean parameter); [Entity=Interface] interface ToggleConfiguration: [TypeArguments="ToggleConfiguration"] CommonConfiguration { - attribute boolean isOn; attribute boolean enabled; attribute Callback_Boolean_Void triggerChange; - }; [Entity=Interface] interface ToggleOptions { - attribute ToggleType type; [Optional] attribute boolean isOn; - }; [Entity=Interface] interface ToggleInterface { - [CallSignature] ToggleAttribute invoke(ToggleOptions options); - }; [Entity=Class] -interface ToggleAttribute: [TypeArguments="ToggleAttribute"] CommonMethod { - +interface ToggleAttribute: [Extends, TypeArguments="ToggleAttribute"] CommonMethod { ToggleAttribute onChange(Callback_Boolean_Void callback_); ToggleAttribute contentModifier([TypeArguments="ToggleConfiguration"] ContentModifier modifier); ToggleAttribute selectedColor(ResourceColor value); ToggleAttribute switchPointColor(ResourceColor color); ToggleAttribute switchStyle(SwitchStyle value); - }; \ No newline at end of file diff --git a/idl/toolbar.idl b/idl/toolbar.idl new file mode 100644 index 0000000..ca54215 --- /dev/null +++ b/idl/toolbar.idl @@ -0,0 +1,17 @@ +dictionary ToolBarItemPlacement { + number TOP_BAR_LEADING = 0; + number TOP_BAR_TRAILING = 1; +}; +[Entity=Interface] +interface ToolBarItemOptions { + [Optional] + attribute ToolBarItemPlacement placement; +}; +[Entity=Interface] +interface ToolBarItemInterface { + [CallSignature] + ToolBarItemAttribute invoke(optional ToolBarItemOptions options); +}; +[Entity=Class] +interface ToolBarItemAttribute { +}; \ No newline at end of file diff --git a/idl/ui_extension_component.idl b/idl/ui_extension_component.idl index 5322be3..80b49af 100644 --- a/idl/ui_extension_component.idl +++ b/idl/ui_extension_component.idl @@ -1,19 +1,25 @@ package ui_extension_component; +import ohos.app.ability.Want.default as Want; +import ohos.base.Callback as Callback; +import ohos.base.ErrorCallback as ErrorCallback; +import ohos.base.BusinessError as BusinessError; +import common.CommonMethod as CommonMethod; +import common.TerminationInfo as TerminationInfo; +import ComponentContent as ComponentContent; +import ohos.app.ability.Want.default as _default; +import ohos.app.ability.Want.default as _default; +import ohos.base.ErrorCallback as _ErrorCallback; +import ohos.app.ability.Want.default as _default; dictionary DpiFollowStrategy { - number FOLLOW_HOST_DPI = 0; number FOLLOW_UI_EXTENSION_ABILITY_DPI = 1; - }; dictionary WindowModeFollowStrategy { - number FOLLOW_HOST_WINDOW_MODE = 0; number FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1; - }; [Entity=Interface] interface UIExtensionOptions { - [Optional] attribute boolean isTransferringCaller; [Optional] @@ -24,23 +30,21 @@ interface UIExtensionOptions { attribute DpiFollowStrategy dpiFollowStrategy; [Optional] attribute WindowModeFollowStrategy windowModeFollowStrategy; - }; [Entity=Interface] interface TerminationInfo { - attribute number code; [Optional] - attribute [Import="import('../api/@ohos.app.ability.Want').default"] Want want; - + attribute _default want; }; -[Import="import('../api/@ohos.base').Callback>"] -typedef [Import="import('../api/@ohos.base').Callback>"] ReceiveCallback ReceiveCallback; +typedef Callback_Map_String_Object_Void ReceiveCallback; +[Synthetic] +callback Callback_Map_String_Object_Void = void (record parameter); +typedef Callback_Map_String_Object_Void ReceiveCallback; [Synthetic] callback Callback_UIExtensionProxy_Void = void (UIExtensionProxy parameter); [Entity=Interface] interface UIExtensionProxy { - void send(record data); [Throws] record sendSync(record data); @@ -52,42 +56,41 @@ interface UIExtensionProxy { void offAsyncReceiverRegister(optional Callback_UIExtensionProxy_Void callback_); [DtsName="off", DtsTag="'syncReceiverRegister'"] void offSyncReceiverRegister(optional Callback_UIExtensionProxy_Void callback_); - }; [Entity=Interface] interface UIExtensionComponentInterface { - [CallSignature] - UIExtensionComponentAttribute invoke([Import="import('../api/@ohos.app.ability.Want').default"] Want want, optional UIExtensionOptions options); - -}; -[Entity=Literal, Synthetic] -interface Literal_Number_code_Want_want { - - attribute number code; - [Optional] - attribute [Import="import('../api/@ohos.app.ability.Want').default"] Want want; - + UIExtensionComponentAttribute invoke(_default want, optional UIExtensionOptions options); + [CallSignature] + UIExtensionComponentAttribute invoke(Want want, optional UIExtensionOptions options); }; [Synthetic] -callback Callback_Literal_Number_code_Want_want_Void = void (Literal_Number_code_Want_want parameter); -[Synthetic] -callback Callback_Number_Void = void (number parameter); -[Synthetic] callback Callback_TerminationInfo_Void = void (TerminationInfo parameter); [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface UIExtensionComponentAttribute: [TypeArguments="UIExtensionComponentAttribute"] CommonMethod { - +interface UIExtensionComponentAttribute: [Extends, TypeArguments="UIExtensionComponentAttribute"] CommonMethod { + UIExtensionComponentAttribute onRemoteReady(Callback_UIExtensionProxy_Void callback_); + [Throws] UIExtensionComponentAttribute onRemoteReady(Callback_UIExtensionProxy_Void callback_); UIExtensionComponentAttribute onReceive(ReceiveCallback callback_); [Deprecated] - UIExtensionComponentAttribute onResult(Callback_Literal_Number_code_Want_want_Void callback_); + UIExtensionComponentAttribute onResult(Callback_Literal_Number_code__want_Void callback_); [Deprecated] UIExtensionComponentAttribute onRelease(Callback_Number_Void callback_); - UIExtensionComponentAttribute onError([Import="import('../api/@ohos.base').ErrorCallback"] ErrorCallback callback_); + UIExtensionComponentAttribute onError(_ErrorCallback callback_); + [Throws] + UIExtensionComponentAttribute onError([TypeArguments="BusinessError"] ErrorCallback callback_); UIExtensionComponentAttribute onTerminated(Callback_TerminationInfo_Void callback_); UIExtensionComponentAttribute onDrawReady(Callback_Void callback_); - -}; \ No newline at end of file +}; +[Entity=Literal, Synthetic] +interface Literal_Number_code__want { + attribute number code; + [Optional] + attribute _default want; +}; +[Synthetic] +callback Callback_Literal_Number_code__want_Void = void (Literal_Number_code__want parameter); +[Synthetic] +callback Callback_Number_Void = void (number parameter); \ No newline at end of file diff --git a/idl/units.idl b/idl/units.idl index 584308b..1387c53 100644 --- a/idl/units.idl +++ b/idl/units.idl @@ -1,18 +1,37 @@ package units; -[Import="import('../api/global/resource').Resource"] -typedef [Import="import('../api/global/resource').Resource"] Resource Resource; +import resource.Resource as _Resource; +import Color as Color; +import BorderStyle as BorderStyle; +import FontWeight as FontWeight; +import FontStyle as FontStyle; +import DividerMode as DividerMode; +import common.OutlineStyle as OutlineStyle; +import LengthMetricsUnit as _LengthMetricsUnit; +import LengthMetrics as _LengthMetrics; +import ColorMetrics as _ColorMetrics; +import resource.Resource as _Resource; +import arkui.Graphics.LengthMetricsUnit as _LengthMetricsUnit; +import arkui.Graphics.LengthMetrics as _LengthMetrics; +import arkui.Graphics.ColorMetrics as _ColorMetrics; +typedef _Resource Resource; +typedef _Resource Resource; typedef (String or number or Resource) Length; typedef String PX; +typedef String PX; +typedef (String or number) VP; typedef (String or number) VP; typedef String FP; +typedef String FP; +typedef String LPX; typedef String LPX; typedef String Percentage; +typedef String Percentage; +typedef String Degree; typedef String Degree; -typedef (PX or VP or FP or LPX or Percentage or Resource) Dimension; +typedef (String or number or Resource) Dimension; typedef (String or Resource) ResourceStr; -[Entity=Literal] +[Entity=Interface] interface Padding { - [Optional] attribute Length top; [Optional] @@ -21,18 +40,22 @@ interface Padding { attribute Length bottom; [Optional] attribute Length left; - }; +[Entity=Interface] interface LocalizedPadding { - - attribute String stub; - + [Optional] + attribute LengthMetrics top; + [Optional] + attribute LengthMetrics end; + [Optional] + attribute LengthMetrics bottom; + [Optional] + attribute LengthMetrics start; }; typedef Padding Margin; typedef EdgeWidths EdgeWidth; -[Entity=Literal] +[Entity=Interface] interface EdgeWidths { - [Optional] attribute Length top; [Optional] @@ -41,11 +64,9 @@ interface EdgeWidths { attribute Length bottom; [Optional] attribute Length left; - }; [Entity=Interface] interface LocalizedEdgeWidths { - [Optional] attribute LengthMetrics top; [Optional] @@ -54,11 +75,9 @@ interface LocalizedEdgeWidths { attribute LengthMetrics bottom; [Optional] attribute LengthMetrics start; - }; -[Entity=Literal] +[Entity=Interface] interface EdgeOutlineWidths { - [Optional] attribute Dimension top; [Optional] @@ -67,11 +86,9 @@ interface EdgeOutlineWidths { attribute Dimension bottom; [Optional] attribute Dimension left; - }; -[Entity=Literal] +[Entity=Interface] interface BorderRadiuses { - [Optional] attribute Length topLeft; [Optional] @@ -80,11 +97,9 @@ interface BorderRadiuses { attribute Length bottomLeft; [Optional] attribute Length bottomRight; - }; [Entity=Interface] interface LocalizedBorderRadiuses { - [Optional] attribute LengthMetrics topStart; [Optional] @@ -93,11 +108,9 @@ interface LocalizedBorderRadiuses { attribute LengthMetrics bottomStart; [Optional] attribute LengthMetrics bottomEnd; - }; -[Entity=Literal] +[Entity=Interface] interface OutlineRadiuses { - [Optional] attribute Dimension topLeft; [Optional] @@ -106,11 +119,9 @@ interface OutlineRadiuses { attribute Dimension bottomLeft; [Optional] attribute Dimension bottomRight; - }; -[Entity=Literal] +[Entity=Interface] interface EdgeColors { - [Optional] attribute ResourceColor top; [Optional] @@ -119,11 +130,9 @@ interface EdgeColors { attribute ResourceColor bottom; [Optional] attribute ResourceColor left; - }; [Entity=Interface] interface LocalizedEdgeColors { - [Optional] attribute ResourceColor top; [Optional] @@ -132,12 +141,10 @@ interface LocalizedEdgeColors { attribute ResourceColor bottom; [Optional] attribute ResourceColor start; - }; typedef LocalizedPadding LocalizedMargin; -[Entity=Literal] +[Entity=Interface] interface EdgeStyles { - [Optional] attribute BorderStyle top; [Optional] @@ -146,11 +153,9 @@ interface EdgeStyles { attribute BorderStyle bottom; [Optional] attribute BorderStyle left; - }; -[Entity=Literal] +[Entity=Interface] interface EdgeOutlineStyles { - [Optional] attribute OutlineStyle top; [Optional] @@ -159,33 +164,27 @@ interface EdgeOutlineStyles { attribute OutlineStyle bottom; [Optional] attribute OutlineStyle left; - }; -[Entity=Literal] +[Entity=Interface] interface Offset { - attribute Length dx; attribute Length dy; - }; typedef (Color or number or String or Resource) ResourceColor; -[Entity=Literal] +[Entity=Interface] interface LengthConstrain { - attribute Length minLength; attribute Length maxLength; - }; callback VoidCallback = void (); -[Import="import('../api/arkui/Graphics').LengthMetricsUnit"] -typedef [Import="import('../api/arkui/Graphics').LengthMetricsUnit"] LengthMetricsUnit LengthMetricsUnit; -[Import="import('../api/arkui/Graphics').LengthMetrics"] -typedef [Import="import('../api/arkui/Graphics').LengthMetrics"] LengthMetrics LengthMetrics; -[Import="import('../api/arkui/Graphics').ColorMetrics"] -typedef [Import="import('../api/arkui/Graphics').ColorMetrics"] ColorMetrics ColorMetrics; +typedef _LengthMetricsUnit LengthMetricsUnit; +typedef _LengthMetricsUnit LengthMetricsUnit; +typedef _LengthMetrics LengthMetrics; +typedef _LengthMetrics LengthMetrics; +typedef _ColorMetrics ColorMetrics; +typedef _ColorMetrics ColorMetrics; [Entity=Interface] interface Font { - [Optional] attribute Length size; [Optional] @@ -194,38 +193,30 @@ interface Font { attribute (String or Resource) family; [Optional] attribute FontStyle style; - }; [Entity=Interface] interface Area { - attribute Length width; attribute Length height; attribute Position position; attribute Position globalPosition; - }; [Entity=Interface] interface Position { - [Optional] attribute Length x; [Optional] attribute Length y; - }; [Entity=Interface] interface LocalizedPosition { - [Optional] attribute LengthMetrics start; [Optional] attribute LengthMetrics top; - }; [Entity=Interface] interface Edges { - [Optional] attribute Dimension top; [Optional] @@ -234,11 +225,9 @@ interface Edges { attribute Dimension bottom; [Optional] attribute Dimension right; - }; [Entity=Interface] interface LocalizedEdges { - [Optional] attribute LengthMetrics top; [Optional] @@ -247,20 +236,16 @@ interface LocalizedEdges { attribute LengthMetrics bottom; [Optional] attribute LengthMetrics end; - }; [Entity=Interface] interface Bias { - [Optional] attribute number horizontal; [Optional] attribute number vertical; - }; [Entity=Interface] interface ConstraintSizeOptions { - [Optional] attribute Length minWidth; [Optional] @@ -269,20 +254,16 @@ interface ConstraintSizeOptions { attribute Length minHeight; [Optional] attribute Length maxHeight; - }; [Entity=Interface] interface SizeOptions { - [Optional] attribute Length width; [Optional] attribute Length height; - }; [Entity=Interface] interface BorderOptions { - [Optional] attribute (EdgeWidths or Length or LocalizedEdgeWidths) width; [Optional] @@ -295,11 +276,9 @@ interface BorderOptions { attribute (EdgeWidths or LengthMetrics or LocalizedEdgeWidths) dashGap; [Optional] attribute (EdgeWidths or LengthMetrics or LocalizedEdgeWidths) dashWidth; - }; [Entity=Interface] interface OutlineOptions { - [Optional] attribute (EdgeOutlineWidths or Dimension) width; [Optional] @@ -308,44 +287,34 @@ interface OutlineOptions { attribute (OutlineRadiuses or Dimension) radius; [Optional] attribute (EdgeOutlineStyles or OutlineStyle) style; - }; [Entity=Interface] interface MarkStyle { - [Optional] attribute ResourceColor strokeColor; [Optional] attribute Length size; [Optional] attribute Length strokeWidth; - }; [Entity=Class] interface ColorFilter { - constructor(sequence value); - }; [Entity=Interface] interface TouchPoint { - attribute Dimension x; attribute Dimension y; - }; [Entity=Interface] interface DirectionalEdgesT { - attribute number start; attribute number end; attribute number top; attribute number bottom; - }; [Entity=Interface] interface DividerStyleOptions { - [Optional] attribute LengthMetrics strokeWidth; [Optional] @@ -354,21 +323,25 @@ interface DividerStyleOptions { attribute LengthMetrics startMargin; [Optional] attribute LengthMetrics endMargin; - + [Optional] + attribute DividerMode mode; }; [Entity=Interface] interface ChainWeightOptions { - [Optional] attribute number horizontal; [Optional] attribute number vertical; - }; [Entity=Interface] interface AccessibilityOptions { - [Optional] attribute boolean accessibilityPreferred; - +}; +[Entity=Interface] +interface ScrollBarMargin { + [Optional] + attribute LengthMetrics start; + [Optional] + attribute LengthMetrics end; }; \ No newline at end of file diff --git a/idl/video.idl b/idl/video.idl index 95713a9..dbc4b06 100644 --- a/idl/video.idl +++ b/idl/video.idl @@ -1,6 +1,15 @@ package video; +import resource.Resource as Resource; +import ImageAIOptions as ImageAIOptions; +import ImageAnalyzerConfig as ImageAnalyzerConfig; +import ImageFit as ImageFit; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import common.PixelMap as PixelMap; +import units.VoidCallback as VoidCallback; +import units.ColorMetrics as ColorMetrics; +import ohos.base.ErrorCallback as _ErrorCallback; dictionary SeekMode { - [OriginalEnumMemberName=PreviousKeyframe] number PREVIOUS_KEYFRAME = 0; [OriginalEnumMemberName=NextKeyframe] @@ -9,10 +18,8 @@ dictionary SeekMode { number CLOSEST_KEYFRAME = 2; [OriginalEnumMemberName=Accurate] number ACCURATE = 3; - }; dictionary PlaybackSpeed { - [OriginalEnumMemberName=Speed_Forward_0_75_X] number SPEED_FORWARD_0_75_X = 0; [OriginalEnumMemberName=Speed_Forward_1_00_X] @@ -23,36 +30,26 @@ dictionary PlaybackSpeed { number SPEED_FORWARD_1_75_X = 3; [OriginalEnumMemberName=Speed_Forward_2_00_X] number SPEED_FORWARD_2_00_X = 4; - }; [Entity=Interface] interface FullscreenInfo { - attribute boolean fullscreen; - }; [Entity=Interface] interface PreparedInfo { - attribute number duration; - }; [Entity=Interface] interface PlaybackInfo { - attribute number time; - }; [Entity=Interface] interface PosterOptions { - [Optional] attribute boolean showFirstFrame; - }; [Entity=Interface] interface VideoOptions { - [Optional] attribute (String or Resource) src; [Optional] @@ -65,28 +62,23 @@ interface VideoOptions { attribute ImageAIOptions imageAIOptions; [Optional] attribute PosterOptions posterOptions; - }; [Entity=Class] interface VideoController { - constructor(); - undefined start(); - undefined pause(); - undefined stop(); - undefined setCurrentTime(number value); - undefined requestFullscreen(boolean value); - undefined exitFullscreen(); - undefined setCurrentTime(number value, SeekMode seekMode); + void start(); + void pause(); + void stop(); + void setCurrentTime(number value); + void setCurrentTime(number value, SeekMode seekMode); + void requestFullscreen(boolean value); + void exitFullscreen(); void reset(); - }; [Entity=Interface] interface VideoInterface { - [CallSignature] VideoAttribute invoke(VideoOptions value); - }; [Synthetic] callback Callback_FullscreenInfo_Void = void (FullscreenInfo parameter); @@ -97,8 +89,7 @@ callback Callback_PlaybackInfo_Void = void (PlaybackInfo parameter); [Synthetic] callback Callback_Void = void (); [Entity=Class] -interface VideoAttribute: [TypeArguments="VideoAttribute"] CommonMethod { - +interface VideoAttribute: [Extends, TypeArguments="VideoAttribute"] CommonMethod { VideoAttribute muted(boolean value); VideoAttribute autoPlay(boolean value); VideoAttribute controls(boolean value); @@ -112,11 +103,11 @@ interface VideoAttribute: [TypeArguments="VideoAttribute"] CommonMethod { VideoAttribute onSeeking(Callback_PlaybackInfo_Void callback_); VideoAttribute onSeeked(Callback_PlaybackInfo_Void callback_); VideoAttribute onUpdate(Callback_PlaybackInfo_Void callback_); + VideoAttribute onError((VoidCallback or _ErrorCallback) event); VideoAttribute onError(Callback_Void event); VideoAttribute onStop(Callback_Void event); VideoAttribute enableAnalyzer(boolean enable); VideoAttribute analyzerConfig(ImageAnalyzerConfig config); VideoAttribute surfaceBackgroundColor(ColorMetrics color); VideoAttribute enableShortcutKey(boolean enabled); - }; \ No newline at end of file diff --git a/idl/triggerInfo.idl b/idl/wantAgent.triggerInfo.idl similarity index 68% rename from idl/triggerInfo.idl rename to idl/wantAgent.triggerInfo.idl index 82e0dd1..e8c29b9 100644 --- a/idl/triggerInfo.idl +++ b/idl/wantAgent.triggerInfo.idl @@ -1,16 +1,13 @@ -package wantAgent; -import ohos.app.ability.Want as Want; -import ohos.app.ability.StartOptions as StartOptions; +package wantAgent.triggerInfo; +import ohos.app.ability.Want.default as Want; +import ohos.app.ability.StartOptions.default as StartOptions; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface TriggerInfo { - attribute number code; [Optional] attribute Want want; @@ -19,8 +16,9 @@ interface TriggerInfo { [Optional] attribute Literal_Empty extraInfo; [Optional] + attribute record extraInfo; + [Optional] attribute record extraInfos; [Optional] attribute StartOptions startOptions; - }; \ No newline at end of file diff --git a/idl/wantAgentInfo.idl b/idl/wantAgent.wantAgentInfo.idl similarity index 60% rename from idl/wantAgentInfo.idl rename to idl/wantAgent.wantAgentInfo.idl index 7873cdc..3464d3a 100644 --- a/idl/wantAgentInfo.idl +++ b/idl/wantAgent.wantAgentInfo.idl @@ -1,17 +1,14 @@ -package wantAgent; -import ohos.app.ability.Want as Want; -import ohos.wantAgent as wantAgent; -import ohos.app.ability.abilityWantAgent as abilityWantAgent; +package wantAgent.wantAgentInfo; +import ohos.app.ability.Want.default as Want; +import ohos.wantAgent.default as wantAgent; +import ohos.app.ability.wantAgent.default as abilityWantAgent; [Entity=Literal, Synthetic] interface Literal_Empty { - [IndexSignature] any indexSignature(String key); - }; [Entity=Interface] interface WantAgentInfo { - attribute sequence wants; [Optional, Deprecated] attribute wantAgent.OperationType operationType; @@ -25,6 +22,14 @@ interface WantAgentInfo { [Optional] attribute Literal_Empty extraInfo; [Optional] + attribute record extraInfo; + [Optional] attribute record extraInfos; - +}; +[Entity=Interface] +interface LocalWantAgentInfo { + attribute sequence wants; + [Optional] + attribute abilityWantAgent.OperationType operationType; + attribute number requestCode; }; \ No newline at end of file diff --git a/idl/water_flow.idl b/idl/water_flow.idl index 73e547e..8c59097 100644 --- a/idl/water_flow.idl +++ b/idl/water_flow.idl @@ -1,8 +1,24 @@ package water_flow; +import common.ScrollableCommonMethod as ScrollableCommonMethod; +import common.NestedScrollOptions as NestedScrollOptions; +import common.CommonMethod as CommonMethod; +import common.Optional as Optional; +import common.OnWillScrollCallback as OnWillScrollCallback; +import common.OnScrollCallback as OnScrollCallback; +import CustomBuilder as CustomBuilder; +import units.Length as Length; +import units.Dimension as Dimension; +import units.Margin as Margin; +import units.ConstraintSizeOptions as ConstraintSizeOptions; +import units.Resource as Resource; +import scroll.Scroller as Scroller; +import scroll.OnScrollFrameBeginCallback as OnScrollFrameBeginCallback; +import list.ScrollState as ScrollState; +import FlexDirection as FlexDirection; +import arkui.ComponentContent.ComponentContent as ComponentContent; callback GetItemMainSizeByIndex = number (number index); [Entity=Class] interface SectionOptions { - attribute number itemsCount; [Optional] attribute number crossCount; @@ -14,28 +30,22 @@ interface SectionOptions { attribute Dimension rowsGap; [Optional] attribute (Margin or Dimension) margin; - }; [Entity=Class] interface WaterFlowSections { - constructor(); boolean splice(number start, optional number deleteCount, optional sequence sections); boolean push(SectionOptions section); boolean update(number sectionIndex, SectionOptions section); sequence values(); number length(); - }; dictionary WaterFlowLayoutMode { - number ALWAYS_TOP_DOWN = 0; number SLIDING_WINDOW = 1; - }; [Entity=Interface] interface WaterFlowOptions { - [Optional] attribute CustomBuilder footer; [Optional] @@ -46,30 +56,25 @@ interface WaterFlowOptions { attribute WaterFlowSections sections; [Optional] attribute WaterFlowLayoutMode layoutMode; - }; [Entity=Interface] +interface UIWaterFlowEvent: UIScrollableCommonEvent { + void setOnWillScroll((OnWillScrollCallback or undefined) callback_); + void setOnDidScroll((OnScrollCallback or undefined) callback_); + void setOnScrollIndex((OnWaterFlowScrollIndexCallback or undefined) callback_); +}; +callback OnWaterFlowScrollIndexCallback = void (number first, number last); +[Entity=Interface] interface WaterFlowInterface { - [CallSignature] WaterFlowAttribute invoke(optional WaterFlowOptions options); - }; [Synthetic] callback Callback_Void = void (); -[Entity=Literal, Synthetic] -interface Literal_Number_offsetRemain { - - attribute number offsetRemain; - -}; -[Synthetic] -callback Callback_Number_ScrollState_Literal_Number_offsetRemain = Literal_Number_offsetRemain (number offset, ScrollState state); [Synthetic] callback Callback_Number_Number_Void = void (number first, number last); [Entity=Class] -interface WaterFlowAttribute: [TypeArguments="WaterFlowAttribute"] ScrollableCommonMethod { - +interface WaterFlowAttribute: [Extends, TypeArguments="WaterFlowAttribute"] ScrollableCommonMethod { WaterFlowAttribute columnsTemplate(String value); WaterFlowAttribute itemConstraintSize(ConstraintSizeOptions value); WaterFlowAttribute rowsTemplate(String value); @@ -81,9 +86,11 @@ interface WaterFlowAttribute: [TypeArguments="WaterFlowAttribute"] ScrollableCom WaterFlowAttribute friction((number or Resource) value); WaterFlowAttribute cachedCount(number value); WaterFlowAttribute cachedCount(number count, boolean show); + WaterFlowAttribute syncLoad(boolean enable); WaterFlowAttribute onReachStart(Callback_Void event); WaterFlowAttribute onReachEnd(Callback_Void event); - WaterFlowAttribute onScrollFrameBegin(Callback_Number_ScrollState_Literal_Number_offsetRemain event); + WaterFlowAttribute onScrollFrameBegin(OnScrollFrameBeginCallback event); WaterFlowAttribute onScrollIndex(Callback_Number_Number_Void event); - + WaterFlowAttribute onWillScroll((OnWillScrollCallback or undefined) handler); + WaterFlowAttribute onDidScroll(OnScrollCallback handler); }; \ No newline at end of file diff --git a/idl/web.idl b/idl/web.idl index 4a981df..d7d53b4 100644 --- a/idl/web.idl +++ b/idl/web.idl @@ -1,8 +1,15 @@ package web; -[Import="import('../api/@ohos.web.webview').default.WebviewController"] -typedef [Import="import('../api/@ohos.web.webview').default.WebviewController"] WebviewController WebviewController; +import ohos.web.webview.default as webview; +import common.CommonMethod as CommonMethod; +import common.Callback as Callback; +import CustomBuilder as CustomBuilder; +import resource.Resource as Resource; +import ohos.web.webview.default.WebviewController as _WebviewController; +typedef webview.WebviewController WebviewController; +typedef _WebviewController WebviewController; callback OnNavigationEntryCommittedCallback = void (LoadCommittedDetails loadCommittedDetails); callback OnSslErrorEventCallback = void (SslErrorEvent sslErrorEvent); +callback OnOverrideErrorPageCallback = String (OnErrorReceiveEvent errorPageEvent); callback OnLargestContentfulPaintCallback = void (LargestContentfulPaint largestContentfulPaint); callback OnFirstMeaningfulPaintCallback = void (FirstMeaningfulPaint firstMeaningfulPaint); callback OnOverrideUrlLoadingCallback = boolean (WebResourceRequest webResourceRequest); @@ -10,10 +17,8 @@ callback OnIntelligentTrackingPreventionCallback = void (IntelligentTrackingPrev callback OnNativeEmbedVisibilityChangeCallback = void (NativeEmbedVisibilityInfo nativeEmbedVisibilityInfo); [Entity=Interface] interface NativeMediaPlayerConfig { - attribute boolean enable; attribute boolean shouldOverlay; - }; callback OnRenderProcessNotRespondingCallback = void (RenderProcessNotRespondingData data); callback OnRenderProcessRespondingCallback = void (); @@ -21,42 +26,33 @@ callback OnViewportFitChangedCallback = void (ViewportFit viewportFit); callback OnAdsBlockedCallback = void (AdsBlockedDetails details); [Entity=Interface] interface AdsBlockedDetails { - attribute String url; attribute sequence adsBlocked; - }; [Entity=Interface] interface WebKeyboardOptions { - attribute boolean useSystemKeyboard; [Optional] attribute number enterKeyType; [Optional] attribute CustomBuilder customKeyboard; - }; [Entity=Class] interface WebKeyboardController { - constructor(); void insertText(String text); void deleteForward(number length); void deleteBackward(number length); void sendFunctionKey(number key); void close(); - }; [Entity=Interface] interface WebKeyboardCallbackInfo { - attribute WebKeyboardController controller; attribute record attributes; - }; callback WebKeyboardCallback = WebKeyboardOptions (WebKeyboardCallbackInfo keyboardCallbackInfo); dictionary MessageLevel { - [OriginalEnumMemberName=Debug] number DEBUG = 0; [OriginalEnumMemberName=Error] @@ -67,21 +63,17 @@ dictionary MessageLevel { number LOG = 3; [OriginalEnumMemberName=Warn] number WARN = 4; - }; dictionary MixedMode { - [OriginalEnumMemberName=All] number ALL = 0; [OriginalEnumMemberName=Compatible] number COMPATIBLE = 1; [OriginalEnumMemberName=None] number NONE = 2; - }; callback OnSafeBrowsingCheckResultCallback = void (ThreatType threatType); dictionary HitTestType { - [OriginalEnumMemberName=EditText] number EDIT_TEXT = 0; [OriginalEnumMemberName=Email] @@ -98,94 +90,71 @@ dictionary HitTestType { number PHONE = 6; [OriginalEnumMemberName=Unknown] number UNKNOWN = 7; - }; dictionary CacheMode { - [OriginalEnumMemberName=Default] - number LEGACY_DEFAULT = 0; number DEFAULT = 0; [OriginalEnumMemberName=None] number NONE = 1; - number CACHE_ELSE_NETWORK = 1; [OriginalEnumMemberName=Online] number ONLINE = 2; - number NO_CACHE = 2; [OriginalEnumMemberName=Only] number ONLY = 3; - number CACHE_ONLY = 3; - }; dictionary OverScrollMode { - number NEVER = 0; number ALWAYS = 1; - }; dictionary BlurOnKeyboardHideMode { - number SILENT = 0; number BLUR = 1; - }; dictionary WebDarkMode { - [OriginalEnumMemberName=Off] number OFF = 0; [OriginalEnumMemberName=On] number ON = 1; [OriginalEnumMemberName=Auto] number AUTO = 2; - }; dictionary WebCaptureMode { - number HOME_SCREEN = 0; - }; dictionary ThreatType { - number THREAT_ILLEGAL = 0; number THREAT_FRAUD = 1; number THREAT_RISK = 2; number THREAT_WARNING = 3; - }; [Entity=Interface] interface WebMediaOptions { - [Optional] attribute number resumeInterval; [Optional] attribute boolean audioExclusive; - + [Optional] + attribute AudioSessionType audioSessionType; }; [Entity=Interface] interface ScreenCaptureConfig { - attribute WebCaptureMode captureMode; - }; [Entity=Class] interface FullScreenExitHandler { - constructor(); void exitFullScreen(); - }; [Entity=Interface] interface FullScreenEnterEvent { - attribute FullScreenExitHandler handler; [Optional] attribute number videoWidth; [Optional] attribute number videoHeight; - }; callback OnFullScreenEnterCallback = void (FullScreenEnterEvent event); +callback MouseInfoCallback = void (NativeEmbedMouseInfo event); dictionary RenderExitReason { - [OriginalEnumMemberName=ProcessAbnormalTermination] number PROCESS_ABNORMAL_TERMINATION = 0; [OriginalEnumMemberName=ProcessWasKilled] @@ -196,11 +165,9 @@ dictionary RenderExitReason { number PROCESS_OOM = 3; [OriginalEnumMemberName=ProcessExitUnknown] number PROCESS_EXIT_UNKNOWN = 4; - }; callback OnContextMenuHideCallback = void (); dictionary SslError { - [OriginalEnumMemberName=Invalid] number INVALID = 0; [OriginalEnumMemberName=HostMismatch] @@ -209,10 +176,8 @@ dictionary SslError { number DATE_INVALID = 2; [OriginalEnumMemberName=Untrusted] number UNTRUSTED = 3; - }; dictionary FileSelectorMode { - [OriginalEnumMemberName=FileOpenMode] number FILE_OPEN_MODE = 0; [OriginalEnumMemberName=FileOpenMultipleMode] @@ -221,137 +186,106 @@ dictionary FileSelectorMode { number FILE_OPEN_FOLDER_MODE = 2; [OriginalEnumMemberName=FileSaveMode] number FILE_SAVE_MODE = 3; - }; dictionary WebLayoutMode { - number NONE = 0; number FIT_CONTENT = 1; - }; dictionary RenderProcessNotRespondingReason { - number INPUT_TIMEOUT = 0; number NAVIGATION_COMMIT_TIMEOUT = 1; - }; [Entity=Class] interface FileSelectorParam { - constructor(); String getTitle(); FileSelectorMode getMode(); sequence getAcceptType(); boolean isCapture(); sequence getMimeTypes(); - }; [Entity=Class] interface JsResult { - constructor(); void handleCancel(); void handleConfirm(); void handlePromptConfirm(String result); - }; [Entity=Class] interface FileSelectorResult { - constructor(); void handleFileList(sequence fileList); - }; [Entity=Class] interface HttpAuthHandler { - constructor(); boolean confirm(String userName, String password); void cancel(); boolean isHttpAuthInfoSaved(); - }; [Entity=Class] interface SslErrorHandler { - constructor(); void handleConfirm(); void handleCancel(); - + void handleCancel(boolean abortLoading); }; [Entity=Class] interface ClientAuthenticationHandler { - constructor(); void confirm(String priKeyFile, String certChainFile); void confirm(String authUri); void cancel(); void ignore(); - }; dictionary ProtectedResourceType { - [OriginalEnumMemberName=MidiSysex] String MIDI_SYSEX = "TYPE_MIDI_SYSEX"; String VIDEO_CAPTURE = "TYPE_VIDEO_CAPTURE"; String AUDIO_CAPTURE = "TYPE_AUDIO_CAPTURE"; String SENSOR = "TYPE_SENSOR"; - }; [Entity=Class] interface PermissionRequest { - constructor(); void deny(); String getOrigin(); sequence getAccessibleResource(); void grant(sequence resources); - }; [Entity=Class] interface ScreenCaptureHandler { - constructor(); String getOrigin(); void grant(ScreenCaptureConfig config); void deny(); - }; [Entity=Class] interface DataResubmissionHandler { - constructor(); void resend(); void cancel(); - }; [Entity=Class] interface ControllerHandler { - constructor(); void setWebController(WebviewController controller); - }; dictionary ContextMenuSourceType { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Mouse] number MOUSE = 1; [OriginalEnumMemberName=LongPress] number LONG_PRESS = 2; - }; dictionary ContextMenuMediaType { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=Image] number IMAGE = 1; - }; dictionary ContextMenuInputFieldType { - [OriginalEnumMemberName=None] number NONE = 0; [OriginalEnumMemberName=PlainText] @@ -364,51 +298,39 @@ dictionary ContextMenuInputFieldType { number TELEPHONE = 4; [OriginalEnumMemberName=Other] number OTHER = 5; - }; dictionary NativeEmbedStatus { - number CREATE = 0; number UPDATE = 1; number DESTROY = 2; number ENTER_BFCACHE = 3; number LEAVE_BFCACHE = 4; - }; dictionary ContextMenuEditStateFlags { - number NONE = 0; number CAN_CUT = 1; number CAN_COPY = 2; number CAN_PASTE = 4; number CAN_SELECT_ALL = 8; - }; dictionary WebNavigationType { - number UNKNOWN = 0; number MAIN_FRAME_NEW_ENTRY = 1; number MAIN_FRAME_EXISTING_ENTRY = 2; number NAVIGATION_TYPE_NEW_SUBFRAME = 4; number NAVIGATION_TYPE_AUTO_SUBFRAME = 5; - }; dictionary RenderMode { - number ASYNC_RENDER = 0; number SYNC_RENDER = 1; - }; dictionary ViewportFit { - number AUTO = 0; number CONTAINS = 1; number COVER = 2; - }; [Entity=Class] interface WebContextMenuParam { - constructor(); number x(); number y(); @@ -424,11 +346,9 @@ interface WebContextMenuParam { number getEditStateFlags(); number getPreviewWidth(); number getPreviewHeight(); - }; [Entity=Class] interface WebContextMenuResult { - constructor(); void closeContextMenu(); void copyImage(); @@ -436,22 +356,22 @@ interface WebContextMenuResult { void paste(); void cut(); void selectAll(); - + void redo(); + void undo(); + void pasteAndMatchStyle(); }; [Entity=Class] interface ConsoleMessage { - + [Deprecated] constructor(String message, String sourceId, number lineNumber, MessageLevel messageLevel); constructor(); String getMessage(); String getSourceId(); number getLineNumber(); MessageLevel getMessageLevel(); - }; [Entity=Class] interface WebResourceRequest { - constructor(); sequence
getRequestHeader(); String getRequestUrl(); @@ -459,11 +379,9 @@ interface WebResourceRequest { boolean isMainFrame(); boolean isRedirect(); String getRequestMethod(); - }; [Entity=Class] interface WebResourceResponse { - constructor(); String getResponseData(); ((String or number or buffer or Resource) or undefined) getResponseDataEx(); @@ -480,61 +398,48 @@ interface WebResourceResponse { void setResponseCode(number code); void setResponseIsReady(boolean IsReady); boolean getResponseIsReady(); - }; [Entity=Interface] interface Header { - attribute String headerKey; attribute String headerValue; - }; [Entity=Class] interface WebResourceError { - constructor(); String getErrorInfo(); number getErrorCode(); - }; [Entity=Class] interface JsGeolocation { - constructor(); void invoke(String origin, boolean allow, boolean retain); - }; [Entity=Class] interface WebCookie { - constructor(); [Deprecated] - undefined setCookie(); + void setCookie(); [Deprecated] - undefined saveCookie(); - + void saveCookie(); }; [Entity=Class] interface EventResult { - constructor(); void setGestureEventResult(boolean result); void setGestureEventResult(boolean result, boolean stopPropagation); - + void setMouseEventResult(boolean result, optional boolean stopPropagation); }; [Synthetic] callback Callback_String_Void = void (String result); [Entity=Literal, Synthetic] interface Literal_String_script_Callback_String_Void_callback_ { - attribute String script; [DtsName="callback", Optional] attribute Callback_String_Void callback_; - }; [Entity=Literal, Synthetic] interface Literal_String_baseUrl_data_encoding_historyUrl_mimeType { - attribute String data; attribute String mimeType; attribute String encoding; @@ -542,28 +447,23 @@ interface Literal_String_baseUrl_data_encoding_historyUrl_mimeType { attribute String baseUrl; [Optional] attribute String historyUrl; - }; [Entity=Literal, Synthetic] interface Literal_Union_String_Resource_url_Array_Header_headers { - attribute (String or Resource) url; [Optional] attribute sequence
headers; - }; [Entity=Literal, Synthetic] interface Literal_Object_object__String_name_Array_String_methodList { - [DtsName="object"] attribute Object object_; attribute String name; attribute sequence methodList; - }; [Entity=Class, Deprecated] interface WebController { - + [Deprecated] constructor(); [Deprecated] void onInactive(); @@ -574,23 +474,23 @@ interface WebController { [Deprecated] void clearHistory(); [Deprecated] - undefined runJavaScript(Literal_String_script_Callback_String_Void_callback_ options); + void runJavaScript(Literal_String_script_Callback_String_Void_callback_ options); [Deprecated] - undefined loadData(Literal_String_baseUrl_data_encoding_historyUrl_mimeType options); + void loadData(Literal_String_baseUrl_data_encoding_historyUrl_mimeType options); [Deprecated] - undefined loadUrl(Literal_Union_String_Resource_url_Array_Header_headers options); + void loadUrl(Literal_Union_String_Resource_url_Array_Header_headers options); [Deprecated] - undefined refresh(); + void refresh(); [Deprecated] - undefined stop(); + void stop(); [Deprecated] - undefined registerJavaScriptProxy(Literal_Object_object__String_name_Array_String_methodList options); + void registerJavaScriptProxy(Literal_Object_object__String_name_Array_String_methodList options); [Deprecated] - undefined deleteJavaScriptRegister(String name); + void deleteJavaScriptRegister(String name); [Deprecated] HitTestType getHitTest(); [Deprecated] - undefined requestFocus(); + void requestFocus(); [Deprecated] boolean accessBackward(); [Deprecated] @@ -598,16 +498,14 @@ interface WebController { [Deprecated] boolean accessStep(number step); [Deprecated] - undefined backward(); + void backward(); [Deprecated] - undefined forward(); + void forward(); [Deprecated] WebCookie getCookieManager(); - }; [Entity=Interface] interface WebOptions { - attribute (String or Resource) src; attribute (WebController or WebviewController) controller; [Optional] @@ -616,42 +514,32 @@ interface WebOptions { attribute boolean incognitoMode; [Optional] attribute String sharedRenderProcessToken; - }; [Entity=Interface] interface ScriptItem { - attribute String script; attribute sequence scriptRules; - }; [Entity=Interface] interface LoadCommittedDetails { - attribute boolean isMainFrame; attribute boolean isSameDocument; attribute boolean didReplaceEntry; attribute WebNavigationType navigationType; attribute String url; - }; [Entity=Interface] interface IntelligentTrackingPreventionDetails { - attribute String host; attribute String trackerHost; - }; [Entity=Interface] interface WebInterface { - [CallSignature] WebAttribute invoke(WebOptions value); - }; [Entity=Interface] interface NativeEmbedInfo { - [Optional] attribute String id; [Optional] @@ -670,11 +558,9 @@ interface NativeEmbedInfo { attribute String tag; [Optional] attribute record params; - }; [Entity=Interface] interface NativeEmbedDataInfo { - [Optional] attribute NativeEmbedStatus status; [Optional] @@ -683,38 +569,39 @@ interface NativeEmbedDataInfo { attribute String embedId; [Optional] attribute NativeEmbedInfo info; - }; [Entity=Interface] interface NativeEmbedVisibilityInfo { - attribute boolean visibility; attribute String embedId; - }; [Entity=Interface] interface NativeEmbedTouchInfo { - [Optional] attribute String embedId; [Optional] attribute TouchEvent touchEvent; [Optional] attribute EventResult result; - +}; +[Entity=Interface] +interface NativeEmbedMouseInfo { + [Optional] + attribute String embedId; + [Optional] + attribute MouseEvent mouseEvent; + [Optional] + attribute EventResult result; }; [Entity=Interface] interface FirstMeaningfulPaint { - [Optional] attribute number navigationStartTime; [Optional] attribute number firstMeaningfulPaintTime; - }; [Entity=Interface] interface LargestContentfulPaint { - [Optional] attribute number navigationStartTime; [Optional] @@ -727,273 +614,218 @@ interface LargestContentfulPaint { attribute number largestImageLoadStartTime; [Optional] attribute number largestImageLoadEndTime; - }; [Entity=Interface] interface RenderProcessNotRespondingData { - attribute String jsStack; attribute number pid; attribute RenderProcessNotRespondingReason reason; - }; [Entity=Interface] interface OnPageEndEvent { - attribute String url; - }; [Entity=Interface] interface OnPageBeginEvent { - attribute String url; - +}; +[Entity=Interface] +interface OnLoadStartedEvent { + attribute String url; +}; +[Entity=Interface] +interface OnLoadFinishedEvent { + attribute String url; }; [Entity=Interface] interface OnProgressChangeEvent { - attribute number newProgress; - }; [Entity=Interface] interface OnTitleReceiveEvent { - attribute String title; - + [Optional] + attribute boolean isRealTitle; }; [Entity=Interface] interface OnGeolocationShowEvent { - attribute String origin; attribute JsGeolocation geolocation; - }; [Entity=Interface] interface OnAlertEvent { - attribute String url; attribute String message; attribute JsResult result; - }; [Entity=Interface] interface OnBeforeUnloadEvent { - attribute String url; attribute String message; attribute JsResult result; - + [Optional] + attribute boolean isReload; }; [Entity=Interface] interface OnConfirmEvent { - attribute String url; attribute String message; attribute JsResult result; - }; [Entity=Interface] interface OnPromptEvent { - attribute String url; attribute String message; attribute String value; attribute JsResult result; - }; [Entity=Interface] interface OnConsoleEvent { - attribute ConsoleMessage message; - }; [Entity=Interface] interface OnErrorReceiveEvent { - attribute WebResourceRequest request; attribute WebResourceError error; - }; [Entity=Interface] interface OnHttpErrorReceiveEvent { - attribute WebResourceRequest request; attribute WebResourceResponse response; - }; [Entity=Interface] interface OnDownloadStartEvent { - attribute String url; attribute String userAgent; attribute String contentDisposition; attribute String mimetype; attribute number contentLength; - }; [Entity=Interface] interface OnRefreshAccessedHistoryEvent { - attribute String url; attribute boolean isRefreshed; - }; [Entity=Interface] interface OnRenderExitedEvent { - attribute RenderExitReason renderExitReason; - }; [Entity=Interface] interface OnShowFileSelectorEvent { - attribute FileSelectorResult result; attribute FileSelectorParam fileSelector; - }; [Entity=Interface] interface OnResourceLoadEvent { - attribute String url; - }; [Entity=Interface] interface OnScaleChangeEvent { - attribute number oldScale; attribute number newScale; - }; [Entity=Interface] interface OnHttpAuthRequestEvent { - attribute HttpAuthHandler handler; attribute String host; attribute String realm; - }; [Entity=Interface] interface OnInterceptRequestEvent { - attribute WebResourceRequest request; - }; [Entity=Interface] interface OnPermissionRequestEvent { - attribute PermissionRequest request; - }; [Entity=Interface] interface OnScreenCaptureRequestEvent { - attribute ScreenCaptureHandler handler; - }; [Entity=Interface] interface OnContextMenuShowEvent { - attribute WebContextMenuParam param; attribute WebContextMenuResult result; - }; [Entity=Interface] interface OnSearchResultReceiveEvent { - attribute number activeMatchOrdinal; attribute number numberOfMatches; attribute boolean isDoneCounting; - }; [Entity=Interface] interface OnScrollEvent { - attribute number xOffset; attribute number yOffset; - }; [Entity=Interface] interface OnSslErrorEventReceiveEvent { - attribute SslErrorHandler handler; attribute SslError error; [Optional] attribute sequence certChainData; - }; [Entity=Interface] interface OnClientAuthenticationEvent { - attribute ClientAuthenticationHandler handler; attribute String host; attribute number port; attribute sequence keyTypes; attribute sequence issuers; - }; [Entity=Interface] interface OnWindowNewEvent { - attribute boolean isAlert; attribute boolean isUserTrigger; attribute String targetUrl; attribute ControllerHandler handler; - }; [Entity=Interface] interface OnTouchIconUrlReceivedEvent { - attribute String url; attribute boolean precomposed; - }; [Entity=Interface] interface OnFaviconReceivedEvent { - attribute PixelMap favicon; - }; [Entity=Interface] interface OnPageVisibleEvent { - attribute String url; - }; [Entity=Interface] interface OnDataResubmittedEvent { - attribute DataResubmissionHandler handler; - }; [Entity=Interface] interface OnAudioStateChangedEvent { - attribute boolean playing; - }; [Entity=Interface] interface OnFirstContentfulPaintEvent { - attribute number navigationStartTick; attribute number firstContentfulPaintMs; - }; [Entity=Interface] interface OnLoadInterceptEvent { - attribute WebResourceRequest data; - }; [Entity=Interface] interface OnOverScrollEvent { - attribute number xOffset; attribute number yOffset; - +}; +[Entity=Interface] +interface OnPdfScrollEvent { + attribute String url; +}; +[Entity=Interface] +interface OnPdfLoadEvent { + attribute PdfLoadResult result; + attribute String url; }; [Entity=Interface] interface JavaScriptProxy { - [DtsName="object"] attribute Object object_; attribute String name; @@ -1003,30 +835,42 @@ interface JavaScriptProxy { attribute sequence asyncMethodList; [Optional] attribute String permission; - }; dictionary WebKeyboardAvoidMode { - number RESIZE_VISUAL = 0; number RESIZE_CONTENT = 1; number OVERLAYS_CONTENT = 2; - }; dictionary WebElementType { - number IMAGE = 1; - + number LINK = 2; }; dictionary WebResponseType { - number LONG_PRESS = 1; - +}; +dictionary WebBypassVsyncCondition { + number NONE = 0; + number SCROLLBY_FROM_ZERO_OFFSET = 1; +}; +dictionary AudioSessionType { + number AMBIENT = 3; +}; +dictionary PdfLoadResult { + number LOAD_SUCCESS = 0; + number PARSE_ERROR_FILE = 1; + number PARSE_ERROR_FORMAT = 2; + number PARSE_ERROR_PASSWORD = 3; + number PARSE_ERROR_HANDLER = 4; +}; +[Entity=Interface] +interface PreviewMenuOptions { + [Optional] + attribute HapticFeedbackMode hapticFeedbackMode; }; [Synthetic] callback Callback_Void = void (); [Entity=Interface] interface SelectionMenuOptionsExt { - [Optional] attribute Callback_Void onAppear; [Optional] @@ -1035,13 +879,18 @@ interface SelectionMenuOptionsExt { attribute CustomBuilder preview; [Optional] attribute MenuType menuType; - + [Optional] + attribute PreviewMenuOptions previewMenuOptions; }; [Synthetic] callback Callback_OnPageEndEvent_Void = void (OnPageEndEvent parameter); [Synthetic] callback Callback_OnPageBeginEvent_Void = void (OnPageBeginEvent parameter); [Synthetic] +callback Callback_OnLoadStartedEvent_Void = void (OnLoadStartedEvent parameter); +[Synthetic] +callback Callback_OnLoadFinishedEvent_Void = void (OnLoadFinishedEvent parameter); +[Synthetic] callback Callback_OnProgressChangeEvent_Void = void (OnProgressChangeEvent parameter); [Synthetic] callback Callback_OnTitleReceiveEvent_Void = void (OnTitleReceiveEvent parameter); @@ -1067,40 +916,32 @@ callback Callback_OnDownloadStartEvent_Void = void (OnDownloadStartEvent paramet callback Callback_OnRefreshAccessedHistoryEvent_Void = void (OnRefreshAccessedHistoryEvent parameter); [Entity=Literal, Synthetic] interface Literal_Union_String_WebResourceRequest_data { - attribute (String or WebResourceRequest) data; - }; [Synthetic] callback Type_WebAttribute_onUrlLoadIntercept_callback = boolean (optional Literal_Union_String_WebResourceRequest_data event); [Entity=Literal, Synthetic] interface Literal_Function_handler_Object_error { - attribute Function handler; attribute Object error; - }; [Synthetic] -callback Callback_Literal_Function_handler_Object_error_Void = void (optional Literal_Function_handler_Object_error event); +callback Callback_Opt_Literal_Function_handler_Object_error_Void = void (optional Literal_Function_handler_Object_error event); [Synthetic] callback Callback_OnRenderExitedEvent_Void = void (OnRenderExitedEvent parameter); -[Synthetic] -callback Callback_OnShowFileSelectorEvent_Boolean = boolean (OnShowFileSelectorEvent parameter); [Entity=Literal, Synthetic] interface Literal_Object_detail { - attribute Object detail; - }; [Synthetic] -callback Callback_Literal_Object_detail_Boolean = boolean (optional Literal_Object_detail event); +callback Callback_Opt_Literal_Object_detail_Boolean = boolean (optional Literal_Object_detail event); +[Synthetic] +callback Callback_OnShowFileSelectorEvent_Boolean = boolean (OnShowFileSelectorEvent parameter); [Entity=Literal, Synthetic] interface Literal_Function_callback__Object_fileSelector { - [DtsName="callback"] attribute Function callback_; attribute Object fileSelector; - }; [Synthetic] callback Type_WebAttribute_onFileSelectorShow_callback = void (optional Literal_Function_callback__Object_fileSelector event); @@ -1147,12 +988,15 @@ callback Callback_OnLoadInterceptEvent_Boolean = boolean (OnLoadInterceptEvent p [Synthetic] callback Callback_OnOverScrollEvent_Void = void (OnOverScrollEvent parameter); [Synthetic] +callback Callback_OnPdfScrollEvent_Void = void (OnPdfScrollEvent parameter); +[Synthetic] +callback Callback_OnPdfLoadEvent_Void = void (OnPdfLoadEvent parameter); +[Synthetic] callback Callback_NativeEmbedDataInfo_Void = void (NativeEmbedDataInfo event); [Synthetic] callback Callback_NativeEmbedTouchInfo_Void = void (NativeEmbedTouchInfo event); [Entity=Class] -interface WebAttribute: [TypeArguments="WebAttribute"] CommonMethod { - +interface WebAttribute: [Extends, TypeArguments="WebAttribute"] CommonMethod { WebAttribute javaScriptAccess(boolean javaScriptAccess); WebAttribute fileAccess(boolean fileAccess); WebAttribute onlineImageAccess(boolean onlineImageAccess); @@ -1185,6 +1029,8 @@ interface WebAttribute: [TypeArguments="WebAttribute"] CommonMethod { WebAttribute metaViewport(boolean enabled); WebAttribute onPageEnd(Callback_OnPageEndEvent_Void callback_); WebAttribute onPageBegin(Callback_OnPageBeginEvent_Void callback_); + WebAttribute onLoadStarted(Callback_OnLoadStartedEvent_Void callback_); + WebAttribute onLoadFinished(Callback_OnLoadFinishedEvent_Void callback_); WebAttribute onProgressChange(Callback_OnProgressChangeEvent_Void callback_); WebAttribute onTitleReceive(Callback_OnTitleReceiveEvent_Void callback_); WebAttribute onGeolocationHide(Callback_Void callback_); @@ -1197,16 +1043,17 @@ interface WebAttribute: [TypeArguments="WebAttribute"] CommonMethod { WebAttribute onConsole(Callback_OnConsoleEvent_Boolean callback_); WebAttribute onErrorReceive(Callback_OnErrorReceiveEvent_Void callback_); WebAttribute onHttpErrorReceive(Callback_OnHttpErrorReceiveEvent_Void callback_); + WebAttribute onOverrideErrorPage(OnOverrideErrorPageCallback callback_); WebAttribute onDownloadStart(Callback_OnDownloadStartEvent_Void callback_); WebAttribute onRefreshAccessedHistory(Callback_OnRefreshAccessedHistoryEvent_Void callback_); [Deprecated] WebAttribute onUrlLoadIntercept(Type_WebAttribute_onUrlLoadIntercept_callback callback_); [Deprecated] - WebAttribute onSslErrorReceive(Callback_Literal_Function_handler_Object_error_Void callback_); + WebAttribute onSslErrorReceive(Callback_Opt_Literal_Function_handler_Object_error_Void callback_); WebAttribute onRenderExited(Callback_OnRenderExitedEvent_Void callback_); - WebAttribute onShowFileSelector(Callback_OnShowFileSelectorEvent_Boolean callback_); [Deprecated] - WebAttribute onRenderExited(Callback_Literal_Object_detail_Boolean callback_); + WebAttribute onRenderExited(Callback_Opt_Literal_Object_detail_Boolean callback_); + WebAttribute onShowFileSelector(Callback_OnShowFileSelectorEvent_Boolean callback_); [Deprecated] WebAttribute onFileSelectorShow(Type_WebAttribute_onFileSelectorShow_callback callback_); WebAttribute onResourceLoad(Callback_OnResourceLoadEvent_Void callback_); @@ -1257,6 +1104,8 @@ interface WebAttribute: [TypeArguments="WebAttribute"] CommonMethod { WebAttribute onLoadIntercept(Callback_OnLoadInterceptEvent_Boolean callback_); WebAttribute onControllerAttached(Callback_Void callback_); WebAttribute onOverScroll(Callback_OnOverScrollEvent_Void callback_); + WebAttribute onPdfScrollAtBottom(Callback_OnPdfScrollEvent_Void callback_); + WebAttribute onPdfLoadEvent(Callback_OnPdfLoadEvent_Void callback_); WebAttribute onSafeBrowsingCheckResult(OnSafeBrowsingCheckResultCallback callback_); WebAttribute onNavigationEntryCommitted(OnNavigationEntryCommittedCallback callback_); WebAttribute onIntelligentTrackingPreventionResult(OnIntelligentTrackingPreventionCallback callback_); @@ -1269,13 +1118,14 @@ interface WebAttribute: [TypeArguments="WebAttribute"] CommonMethod { WebAttribute onNativeEmbedLifecycleChange(Callback_NativeEmbedDataInfo_Void callback_); WebAttribute onNativeEmbedVisibilityChange(OnNativeEmbedVisibilityChangeCallback callback_); WebAttribute onNativeEmbedGestureEvent(Callback_NativeEmbedTouchInfo_Void callback_); + WebAttribute onNativeEmbedMouseEvent(MouseInfoCallback callback_); WebAttribute copyOptions(CopyOptions value); WebAttribute onOverrideUrlLoading(OnOverrideUrlLoadingCallback callback_); WebAttribute textAutosizing(boolean textAutosizing); WebAttribute enableNativeMediaPlayer(NativeMediaPlayerConfig config); - WebAttribute enableSmoothDragResize(boolean mode); WebAttribute onRenderProcessNotResponding(OnRenderProcessNotRespondingCallback callback_); WebAttribute onRenderProcessResponding(OnRenderProcessRespondingCallback callback_); + [Deprecated] WebAttribute selectionMenuOptions(sequence expandedMenuOptions); WebAttribute onViewportFitChanged(OnViewportFitChangedCallback callback_); WebAttribute onInterceptKeyboardAttach(WebKeyboardCallback callback_); @@ -1284,17 +1134,21 @@ interface WebAttribute: [TypeArguments="WebAttribute"] CommonMethod { WebAttribute editMenuOptions(EditMenuOptions editMenu); WebAttribute enableHapticFeedback(boolean enabled); WebAttribute bindSelectionMenu(WebElementType elementType, CustomBuilder content, WebResponseType responseType, optional SelectionMenuOptionsExt options); + WebAttribute optimizeParserBudget(boolean optimizeParserBudget); WebAttribute enableFollowSystemFontWeight(boolean follow); WebAttribute enableWebAVSession(boolean enabled); - WebAttribute optimizeParserBudget(boolean optimizeParserBudget); WebAttribute runJavaScriptOnDocumentStart(sequence scripts); WebAttribute runJavaScriptOnDocumentEnd(sequence scripts); WebAttribute runJavaScriptOnHeadEnd(sequence scripts); - + WebAttribute nativeEmbedOptions(optional EmbedOptions options); + WebAttribute enableDataDetector(boolean enable); + WebAttribute dataDetectorConfig(TextDataDetectorConfig config); + WebAttribute onActivateContent(Callback_Void callback_); + WebAttribute bypassVsyncCondition(WebBypassVsyncCondition condition); + WebAttribute gestureFocusMode(GestureFocusMode mode); }; [Entity=Interface] interface SslErrorEvent { - attribute SslErrorHandler handler; attribute SslError error; attribute String url; @@ -1302,28 +1156,26 @@ interface SslErrorEvent { attribute String referrer; attribute boolean isFatalError; attribute boolean isMainFrame; - + [Optional] + attribute sequence certChainData; }; [Entity=Literal, Synthetic] interface Literal_String_plainText { - attribute String plainText; - }; [Synthetic] callback Callback_Literal_String_plainText_Void = void (Literal_String_plainText selectedText); -[Entity=Interface] +[Entity=Interface, Deprecated] interface ExpandedMenuItemOptions { - + [Deprecated] attribute ResourceStr content; - [Optional] + [Optional, Deprecated] attribute ResourceStr startIcon; + [Deprecated] attribute Callback_Literal_String_plainText_Void action; - }; [Entity=Interface] interface NestedScrollOptionsExt { - [Optional] attribute NestedScrollMode scrollUp; [Optional] @@ -1332,5 +1184,15 @@ interface NestedScrollOptionsExt { attribute NestedScrollMode scrollRight; [Optional] attribute NestedScrollMode scrollLeft; - +}; +[Entity=Interface] +interface EmbedOptions { + [Optional] + attribute boolean supportDefaultIntrinsicSize; + [Optional] + attribute boolean supportCssDisplayChange; +}; +dictionary GestureFocusMode { + number DEFAULT = 0; + number GESTURE_TAP_AND_LONG_PRESS = 1; }; \ No newline at end of file diff --git a/idl/window_scene.idl b/idl/window_scene.idl index b6ad503..649a72c 100644 --- a/idl/window_scene.idl +++ b/idl/window_scene.idl @@ -1,14 +1,12 @@ package window_scene; +import units.Position as Position; +import common.CommonMethod as CommonMethod; [Entity=Interface] interface WindowSceneInterface { - [CallSignature] WindowSceneAttribute invoke(number persistentId); - }; [Entity=Class] -interface WindowSceneAttribute: [TypeArguments="WindowSceneAttribute"] CommonMethod { - +interface WindowSceneAttribute: [Extends, TypeArguments="WindowSceneAttribute"] CommonMethod { WindowSceneAttribute attractionEffect(Position destination, number fraction); - }; \ No newline at end of file diff --git a/idl/with_theme.idl b/idl/with_theme.idl index ab55249..3d3108b 100644 --- a/idl/with_theme.idl +++ b/idl/with_theme.idl @@ -1,18 +1,16 @@ package with_theme; -[Import="import('../api/@ohos.arkui.theme').CustomTheme"] -typedef [Import="import('../api/@ohos.arkui.theme').CustomTheme"] CustomTheme CustomTheme; +import ohos.arkui.theme.CustomTheme as CustomTheme; +import common.ThemeColorMode as ThemeColorMode; +import ohos.arkui.theme.CustomTheme as _CustomTheme; +typedef _CustomTheme CustomTheme; [Entity=Interface] interface WithThemeOptions { - [Optional] attribute CustomTheme theme; [Optional] attribute ThemeColorMode colorMode; - }; callback WithThemeInterface = WithThemeAttribute (WithThemeOptions options); [Entity=Class] interface WithThemeAttribute { - - }; \ No newline at end of file diff --git a/idl/xcomponent.idl b/idl/xcomponent.idl index cbe037e..bca26cd 100644 --- a/idl/xcomponent.idl +++ b/idl/xcomponent.idl @@ -1,33 +1,38 @@ package xcomponent; +import ImageAIOptions as ImageAIOptions; +import ImageAnalyzerConfig as ImageAnalyzerConfig; +import common.CommonMethod as CommonMethod; +import XComponentType as XComponentType; +import units.VoidCallback as VoidCallback; [Entity=Interface] interface SurfaceRect { - [Optional] attribute number offsetX; [Optional] attribute number offsetY; attribute number surfaceWidth; attribute number surfaceHeight; - }; [Entity=Interface] interface SurfaceRotationOptions { - [Optional] attribute boolean lock; - }; +[Synthetic] +callback Callback_String_Void = void (String surfaceId); +[Synthetic] +callback Callback_String_SurfaceRect_Void = void (String surfaceId, SurfaceRect rect); [Entity=Literal, Synthetic] interface Literal_Number_surfaceHeight_surfaceWidth { - attribute number surfaceWidth; attribute number surfaceHeight; - }; [Entity=Class] interface XComponentController { - constructor(); + attribute Callback_String_Void onSurfaceCreated; + attribute Callback_String_SurfaceRect_Void onSurfaceChanged; + attribute Callback_String_Void onSurfaceDestroyed; String getXComponentSurfaceId(); Object getXComponentContext(); [Deprecated] @@ -36,54 +41,81 @@ interface XComponentController { SurfaceRect getXComponentSurfaceRect(); void setXComponentSurfaceRotation(SurfaceRotationOptions rotationOptions); SurfaceRotationOptions getXComponentSurfaceRotation(); - void onSurfaceCreated(String surfaceId); - void onSurfaceChanged(String surfaceId, SurfaceRect rect); - void onSurfaceDestroyed(String surfaceId); [Throws] async void startImageAnalyzer(ImageAnalyzerConfig config); void stopImageAnalyzer(); - + (DrawingCanvas or undefined) lockCanvas(); + void unlockCanvasAndPost(DrawingCanvas canvas); }; [Entity=Interface] interface XComponentOptions { - attribute XComponentType type; attribute XComponentController controller; [Optional] attribute ImageAIOptions imageAIOptions; - + [Optional] + attribute number screenId; +}; +[Entity=Interface] +interface NativeXComponentParameters { + attribute XComponentType type; + [Optional] + attribute ImageAIOptions imageAIOptions; }; [Entity=Literal, Synthetic] -interface Type_XComponentInterface_value { - +interface Type_XComponentInterface_callable0_value { attribute String id; attribute String type; [Optional] attribute String libraryname; [Optional] attribute XComponentController controller; - +}; +[Entity=Literal, Synthetic] +interface Type_XComponentInterface_callable1_value { + attribute String id; + attribute XComponentType type; + [Optional] + attribute String libraryname; + [Optional] + attribute XComponentController controller; }; [Entity=Interface] interface XComponentInterface { - [Deprecated, CallSignature] - XComponentAttribute invoke(Type_XComponentInterface_value value); + XComponentAttribute invoke(Type_XComponentInterface_callable0_value value); [CallSignature] - XComponentAttribute invoke(Type_XComponentInterface_value value); + XComponentAttribute invoke(Type_XComponentInterface_callable1_value value); [CallSignature] XComponentAttribute invoke(XComponentOptions options); - + [CallSignature] + XComponentAttribute invoke(NativeXComponentParameters params); }; callback OnNativeLoadCallback = void (optional Object event); [Entity=Class] -interface XComponentAttribute: [TypeArguments="XComponentAttribute"] CommonMethod { - +interface XComponentAttribute: [Extends, TypeArguments="XComponentAttribute"] CommonMethod { XComponentAttribute onLoad(OnNativeLoadCallback callback_); XComponentAttribute onDestroy(VoidCallback event); XComponentAttribute enableAnalyzer(boolean enable); XComponentAttribute enableSecure(boolean isSecure); XComponentAttribute hdrBrightness(number brightness); XComponentAttribute enableTransparentLayer(boolean enabled); - +}; +[Entity=Interface] +interface XComponentParameter { + attribute String id; + attribute XComponentType type; + [Optional] + attribute String libraryname; + [Optional] + attribute XComponentController controller; +}; +[Entity=Interface] +interface XComponentInterface { + [CallSignature] + XComponentAttribute invoke(XComponentParameter value); + [CallSignature] + XComponentAttribute invoke(XComponentOptions options); + [CallSignature] + XComponentAttribute invoke(NativeXComponentParameters params); }; \ No newline at end of file -- Gitee