harmony(鸿蒙)基础通信子系统JS API变更

2022-08-09 浏览 (932)

基础通信子系统JS API变更

OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,基础通信子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
nfctechNdefFormatableTagformatReadOnly(message: NdefMessage): Promise<number>;
formatReadOnly(message: NdefMessage, callback: AsyncCallback<number>): void;
新增
nfctechNdefFormatableTagformat(message: NdefMessage): Promise<number>;
format(message: NdefMessage, callback: AsyncCallback<number>): void;
新增
nfctechMifareUltralightTaggetType(): MifareUltralightType;新增
nfctechMifareUltralightTagwriteSinglePages(pageIndex: number, data: string): Promise<number>;
writeSinglePages(pageIndex: number, data: string, callback: AsyncCallback<number>): void;
新增
nfctechMifareUltralightTagreadMultiplePages(pageIndex: number): Promise<string>;
readMultiplePages(pageIndex: number, callback: AsyncCallback<string>): void;
新增
nfctechMifareUltralightTypeTYPE_ULTRALIGHT_C = 2新增
nfctechMifareUltralightTypeTYPE_ULTRALIGHT = 1新增
nfctechMifareUltralightTypeTYPE_UNKOWN = -1新增
nfctechMifareClassicTaggetSectorIndex(blockIndex: number): number;新增
nfctechMifareClassicTaggetBlockIndex(sectorIndex: number): number;新增
nfctechMifareClassicTagisEmulatedTag(): boolean;新增
nfctechMifareClassicTaggetTagSize(): number;新增
nfctechMifareClassicTaggetType(): MifareClassicType;新增
nfctechMifareClassicTaggetBlockCountInSector(sectorIndex: number): number;新增
nfctechMifareClassicTaggetSectorCount(): number;新增
nfctechMifareClassicTagrestoreFromBlock(blockIndex: number): Promise<number>;
restoreFromBlock(blockIndex: number, callback: AsyncCallback<number>): void;
新增
nfctechMifareClassicTagtransferToBlock(blockIndex: number): Promise<number>;
transferToBlock(blockIndex: number, callback: AsyncCallback<number>): void;
新增
nfctechMifareClassicTagdecrementBlock(blockIndex: number, value: number): Promise<number>;
decrementBlock(blockIndex: number, value: number, callback: AsyncCallback<number>): void;
新增
nfctechMifareClassicTagincrementBlock(blockIndex: number, value: number): Promise<number>;
incrementBlock(blockIndex: number, value: number, callback: AsyncCallback<number>): void;
新增
nfctechMifareClassicTagwriteSingleBlock(blockIndex: number, data: string): Promise<number>;
writeSingleBlock(blockIndex: number, data: string, callback: AsyncCallback<number>): void;
新增
nfctechMifareClassicTagreadSingleBlock(blockIndex: number): Promise<string>;
readSingleBlock(blockIndex: number, callback: AsyncCallback<string>): void;
新增
nfctechMifareClassicTagauthenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise<boolean>;
authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback: AsyncCallback<boolean>): void;
新增
nfctechMifareTagSizeMC_SIZE_4K = 4096新增
nfctechMifareTagSizeMC_SIZE_2K = 2048新增
nfctechMifareTagSizeMC_SIZE_1K = 1024新增
nfctechMifareTagSizeMC_SIZE_MINI = 320新增
nfctechMifareClassicTypeTYPE_PRO = 2新增
nfctechMifareClassicTypeTYPE_PLUS = 1新增
nfctechMifareClassicTypeTYPE_CLASSIC = 0新增
nfctechMifareClassicTypeTYPE_UNKNOWN = -1新增
nfctechNdefTaggetNdefTagTypeString(type: NfcForumType): string;新增
nfctechNdefTagsetReadOnly(): Promise<number>;
setReadOnly(callback: AsyncCallback<number>): void;
新增
nfctechNdefTagcanSetReadOnly(): Promise<boolean>;
canSetReadOnly(callback: AsyncCallback<boolean>): void;
新增
nfctechNdefTagwriteNdef(msg: NdefMessage): Promise<number>;
writeNdef(msg: NdefMessage, callback: AsyncCallback<number>): void;
新增
nfctechNdefTagreadNdef(): Promise<NdefMessage>;
readNdef(callback: AsyncCallback<NdefMessage>): void;
新增
nfctechNdefTagisNdefWritable(): Promise<boolean>;
isNdefWritable(callback: AsyncCallback<boolean>): void;
新增
nfctechNdefTaggetNdefMessage(): NdefMessage;新增
nfctechNdefTaggetNdefTagType(): NfcForumType;新增
nfctechNdefTagcreateNdefMessage(data: string): NdefMessage;
createNdefMessage(ndefRecords: NdefRecord[]): NdefMessage;
新增
nfctechNfcForumTypeMIFARE_CLASSIC = 101新增
nfctechNfcForumTypeNFC_FORUM_TYPE_4 = 4新增
nfctechNfcForumTypeNFC_FORUM_TYPE_3 = 3新增
nfctechNfcForumTypeNFC_FORUM_TYPE_2 = 2新增
nfctechNfcForumTypeNFC_FORUM_TYPE_1 = 1新增
nfctechNdefMessagemessageToString(ndefMessage: NdefMessage): string;新增
nfctechNdefMessagemakeExternalRecord(domainName: string, serviceName: string, externalData: string): NdefRecord;新增
nfctechNdefMessagemakeMimeRecord(mimeType: string, mimeData: string): NdefRecord;新增
nfctechNdefMessagemakeTextRecord(text: string, locale: string): NdefRecord;新增
nfctechNdefMessagemakeUriRecord(uri: string): NdefRecord;新增
nfctechNdefMessagegetNdefRecords(): NdefRecord[];新增
nfctechRtdTypeRTD_URI: 'U';新增
nfctechRtdTypeRTD_TEXT: 'T';新增
nfctechTnfTypeTNF_UNCHANGED = 0x6新增
nfctechTnfTypeTNF_UNKNOWN = 0x5新增
nfctechTnfTypeTNF_EXT_APP = 0x4新增
nfctechTnfTypeTNF_ABSOLUTE_URI = 0x3新增
nfctechTnfTypeTNF_MEDIA = 0x2新增
nfctechTnfTypeTNF_WELL_KNOWN = 0x1新增
nfctechTnfTypeTNF_EMPTY = 0x0新增
nfctechNdefRecordpayload: string;新增
nfctechNdefRecordid: string;新增
nfctechNdefRecordrtdType: string;新增
nfctechNdefRecordtnf: number;新增
nfctechIsoDepTagisExtendedApduSupported(): Promise<boolean>;
isExtendedApduSupported(callback: AsyncCallback<boolean>): void;
新增
nfctechIsoDepTaggetHiLayerResponse(): string;新增
nfctechIsoDepTaggetHistoricalBytes(): string;新增
ohos.bluetoothProfileIdPROFILE_PAN_NETWORK = 7新增
ohos.bluetoothScanFiltermanufactureDataMask?: ArrayBuffer;新增
ohos.bluetoothScanFiltermanufactureData?: ArrayBuffer;新增
ohos.bluetoothScanFiltermanufactureId?: number;新增
ohos.bluetoothScanFilterserviceDataMask?: ArrayBuffer;新增
ohos.bluetoothScanFilterserviceData?: ArrayBuffer;新增
ohos.bluetoothScanFilterserviceSolicitationUuidMask?: string;新增
ohos.bluetoothScanFilterserviceSolicitationUuid?: string;新增
ohos.bluetoothScanFilterserviceUuidMask?: string;新增
ohos.bluetoothPanProfileisTetheringOn(): boolean;新增
ohos.bluetoothPanProfilesetTethering(enable: boolean): void;新增
ohos.bluetoothPanProfileoff(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void;新增
ohos.bluetoothPanProfileon(type: "connectionStateChange", callback: Callback<StateChangeParam>): void;新增
ohos.bluetoothPanProfiledisconnect(device: string): boolean;新增
ohos.bluetoothbluetoothgetProfileInst(profileId: ProfileId): A2dpSourceProfile |HandsFreeAudioGatewayProfile |HidHostProfile |PanProfile;新增
ohos.nfc.tagTagInforemoteTagService: rpc.RemoteObject;新增
ohos.nfc.tagTagInfotagRfDiscId: number;新增
ohos.nfc.tagTagInfoextrasData: PacMap[];新增
ohos.nfc.tagTagInfotechnology: number[];新增
ohos.nfc.tagTagInfouid: string;新增
ohos.nfc.tagtaggetNdefFormatableTag(tagInfo: TagInfo): NdefFormatableTag新增
ohos.nfc.tagtaggetMifareUltralightTag(tagInfo: TagInfo): MifareUltralightTag新增
ohos.nfc.tagtaggetMifareClassicTag(tagInfo: TagInfo): MifareClassicTag新增
ohos.nfc.tagtaggetNdefTag(tagInfo: TagInfo): NdefTag新增
ohos.nfc.tagtaggetIsoDepTag(tagInfo: TagInfo): IsoDepTag新增
ohos.nfc.tagtagconst NDEF_FORMATABLE = 10;新增
ohos.wifiWifiLinkedInfomacType: number;新增
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_WAPI_PSK = 9新增
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_WAPI_CERT = 8新增
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_OWE = 7新增
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_EAP_SUITE_B = 6新增
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_EAP = 5新增
ohos.wifiWifiScanInfoinfoElems: Array<WifiInfoElem>;新增
ohos.wifiWifiScanInfocenterFrequency1: number;新增
ohos.wifiWifiScanInfocenterFrequency0: number;新增
ohos.wifiWifiChannelWidthWIDTH_INVALID新增
ohos.wifiWifiChannelWidthWIDTH_80MHZ_PLUS = 4新增
ohos.wifiWifiChannelWidthWIDTH_160MHZ = 3新增
ohos.wifiWifiChannelWidthWIDTH_80MHZ = 2新增
ohos.wifiWifiChannelWidthWIDTH_40MHZ = 1新增
ohos.wifiWifiChannelWidthWIDTH_20MHZ = 0新增
ohos.wifiWifiInfoElemcontent: Uint8Array;新增
ohos.wifiWifiInfoElemeid: number;新增
ohos.wifiWifiDeviceConfigeapConfig: WifiEapConfig;新增
ohos.wifiWifiEapConfigeapSubId: number;新增
ohos.wifiWifiEapConfigplmn: string;新增
ohos.wifiWifiEapConfigrealm: string;新增
ohos.wifiWifiEapConfigdomainSuffixMatch: string;新增
ohos.wifiWifiEapConfigaltSubjectMatch: string;新增
ohos.wifiWifiEapConfigclientCertAliases: string;新增
ohos.wifiWifiEapConfigcaPath: string;新增
ohos.wifiWifiEapConfigcaCertAliases: string;新增
ohos.wifiWifiEapConfigpassword: string;新增
ohos.wifiWifiEapConfiganonymousIdentity: string;新增
ohos.wifiWifiEapConfigidentity: string;新增
ohos.wifiWifiEapConfigphase2Method: Phase2Method;新增
ohos.wifiWifiEapConfigeapMethod: EapMethod;新增
ohos.wifiPhase2MethodPHASE2_AKA_PRIME新增
ohos.wifiPhase2MethodPHASE2_AKA新增
ohos.wifiPhase2MethodPHASE2_SIM新增
ohos.wifiPhase2MethodPHASE2_GTC新增
ohos.wifiPhase2MethodPHASE2_MSCHAPV2新增
ohos.wifiPhase2MethodPHASE2_MSCHAP新增
ohos.wifiPhase2MethodPHASE2_PAP新增
ohos.wifiPhase2MethodPHASE2_NONE新增
ohos.wifiEapMethodEAP_UNAUTH_TLS新增
ohos.wifiEapMethodEAP_AKA_PRIME新增
ohos.wifiEapMethodEAP_AKA新增
ohos.wifiEapMethodEAP_SIM新增
ohos.wifiEapMethodEAP_PWD新增
ohos.wifiEapMethodEAP_TTLS新增
ohos.wifiEapMethodEAP_TLS新增
ohos.wifiEapMethodEAP_PEAP新增
ohos.wifiEapMethodEAP_NONE新增
ohos.wifiwifigetP2pGroups(): Promise<Array<WifiP2pGroupInfo>>;
getP2pGroups(callback: AsyncCallback<Array<WifiP2pGroupInfo>>): void;
新增
ohos.wifiwifigetP2pLocalDevice(): Promise<WifiP2pDevice>;
getP2pLocalDevice(callback: AsyncCallback<WifiP2pDevice>): void;
新增
ohos.wifiwificonnectToCandidateConfig(networkId: number): void;新增
ohos.wifiwifigetCandidateConfigs(): Array<WifiDeviceConfig>;新增
ohos.wifiwifiremoveCandidateConfig(networkId: number): Promise<void>;
removeCandidateConfig(networkId: number, callback: AsyncCallback<void>): void;
新增
ohos.wifiwifiaddCandidateConfig(config: WifiDeviceConfig): Promise<number>;
addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback<number>): void;
新增
ohos.wifiwifigetScanInfosSync(): Array<WifiScanInfo>;新增
ohos.bluetoothA2dpSourceProfilegetPlayingState(device: string): PlayingState;废弃
ohos.nfc.tagTagInfosupportedProfiles: number[];废弃

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)OpenHarmony启用应用沙箱机制-适配指导

harmony(鸿蒙)3.2 beta2相对3.2 beta1变更详细说明

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)无障碍子系统JS API变更

harmony(鸿蒙)帐号子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)公共基础库子系统JS API变更

harmony(鸿蒙)DFX子系统JS API变更

harmony(鸿蒙)分布式数据管理子系统JS API变更

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/b938415d3ba74989b4d9f8155153f03e