From 1b60f571285dad192bbe698c58845b1b4c77ea88 Mon Sep 17 00:00:00 2001 From: RayShih Date: Fri, 23 Sep 2022 14:07:30 +0800 Subject: [PATCH] fix some vod problems Signed-off-by: RayShih --- .../v3.2-beta1/js-apidiff-soft-bus.md | 43 ------------------- .../api-change/v3.2-beta1/readme.md | 1 - zh-cn/application-dev/napi/napi-guidelines.md | 6 +-- .../v3.2-beta1/js-apidiff-soft-bus.md | 43 ------------------- .../api-change/v3.2-beta1/readme.md | 1 - 5 files changed, 3 insertions(+), 91 deletions(-) delete mode 100644 en/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md delete mode 100644 zh-cn/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md diff --git a/en/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md b/en/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md deleted file mode 100644 index 2bc0ae8d79..0000000000 --- a/en/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md +++ /dev/null @@ -1,43 +0,0 @@ -# JS API Changes of the DSoftBus Subsystem - -The table below lists the APIs changes of the DSoftBus subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release. - -## API Changes - -| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| -|---|---|---|---| -| ohos.rpc | Ashmem | readFromAshmem(size: number, offset: number): number[]; | Added| -| ohos.rpc | Ashmem | writeToAshmem(buf: number[], size: number, offset: number): boolean; | Added| -| ohos.rpc | Ashmem | setProtection(protectionType: number): boolean; | Added| -| ohos.rpc | Ashmem | mapReadOnlyAshmem(): boolean; | Added| -| ohos.rpc | Ashmem | mapReadAndWriteAshmem(): boolean; | Added| -| ohos.rpc | Ashmem | mapAshmem(mapType: number): boolean; | Added| -| ohos.rpc | Ashmem | getAshmemSize(): number; | Added| -| ohos.rpc | Ashmem | unmapAshmem(): void; | Added| -| ohos.rpc | Ashmem | closeAshmem(): void; | Added| -| ohos.rpc | Ashmem | static createAshmemFromExisting(ashmem: Ashmem): Ashmem; | Added| -| ohos.rpc | Ashmem | static createAshmem(name: string, size: number): Ashmem; | Added| -| ohos.rpc | Ashmem | PROT_WRITE = 2; | Added| -| ohos.rpc | Ashmem | PROT_READ = 1; | Added| -| ohos.rpc | Ashmem | PROT_NONE = 0; | Added| -| ohos.rpc | Ashmem | PROT_EXEC = 4; | Added| -| ohos.rpc | IPCSkeleton | static getCallingTokenId(): number; | Added| -| ohos.rpc | SendRequestResult | reply: MessageParcel; | Added| -| ohos.rpc | SendRequestResult | data: MessageParcel; | Added| -| ohos.rpc | SendRequestResult | code: number; | Added| -| ohos.rpc | SendRequestResult | errCode: number; | Added| -| ohos.rpc | MessageParcel | readRawData(size: number): number[]; | Added| -| ohos.rpc | MessageParcel | writeRawData(rawData: number[], size: number): boolean; | Added| -| ohos.rpc | MessageParcel | getRawDataCapacity(): number; | Added| -| ohos.rpc | MessageParcel | readAshmem(): Ashmem; | Added| -| ohos.rpc | MessageParcel | writeAshmem(ashmem: Ashmem): boolean; | Added| -| ohos.rpc | MessageParcel | readFileDescriptor(): number; | Added| -| ohos.rpc | MessageParcel | writeFileDescriptor(fd: number): boolean; | Added| -| ohos.rpc | MessageParcel | containFileDescriptors(): boolean; | Added| -| ohos.rpc | MessageParcel | static dupFileDescriptor(fd: number) :number; | Added| -| ohos.rpc | MessageParcel | static closeFileDescriptor(fd: number): void; | Added| -| ohos.rpc | MessageParcel | readRemoteObjectArray(objects: IRemoteObject[]): void;
readRemoteObjectArray(): IRemoteObject[]; | Added| -| ohos.rpc | MessageParcel | readSequenceableArray(sequenceableArray: Sequenceable[]): void; | Added| -| ohos.rpc | MessageParcel | writeRemoteObjectArray(objectArray: IRemoteObject[]): boolean; | Added| -| ohos.rpc | MessageParcel | readException(): void; | Added| -| ohos.rpc | MessageParcel | writeNoException(): void; | Added| diff --git a/en/release-notes/api-change/v3.2-beta1/readme.md b/en/release-notes/api-change/v3.2-beta1/readme.md index af94d7cfcd..09973cb28e 100644 --- a/en/release-notes/api-change/v3.2-beta1/readme.md +++ b/en/release-notes/api-change/v3.2-beta1/readme.md @@ -18,7 +18,6 @@ This directory records the API changes in OpenHarmony 3.2 Beta1 over OpenHarmony - [Multimodal input subsystem](js-apidiff-multi-modal-input.md) - [Multimedia subsystem](js-apidiff-multimedia.md) - [Distributed scheduler subsystem](js-apidiff-resource-scheduler.md) - - [DSoftBus subsystem](js-apidiff-soft-bus.md) - [Test subsystem](js-apidiff-unitest.md) - [Web subsystem](js-apidiff-web.md) - [Window manager subsystem](js-apidiff-window.md) diff --git a/zh-cn/application-dev/napi/napi-guidelines.md b/zh-cn/application-dev/napi/napi-guidelines.md index b9161842bd..99035e6ecc 100644 --- a/zh-cn/application-dev/napi/napi-guidelines.md +++ b/zh-cn/application-dev/napi/napi-guidelines.md @@ -17,12 +17,12 @@ js侧通过`import`引入native侧包含处理js逻辑的so,如:`import hell ### so命名规则 -* 每个模块对应一个so -* 如模块名为`hello`,则so的名字为`libhello.so`,`napi_module`中`nm_modname`字段应为`hello`,大小写与模块名保持一致,应用使用时写作:`import hello from 'libhello.so'` +* 每个模块对应一个so。 +* 如模块名为`hello`,则so的名字为`libhello.so`,`napi_module`中`nm_modname`字段应为`hello`,大小写与模块名保持一致,应用使用时写作:`import hello from 'libhello.so'`。 ### js对象线程限制 -ark引擎会对js对象线程使用进行保护,不正确使用会引起应用crash。 +ark引擎会对js对象线程使用进行保护,使用不当会引起应用crash,因此需要遵循如下原则: * napi接口只能在js线程使用。 * env与线程绑定,不能跨线程使用。native侧js对象只能在创建时的线程使用,即与线程所持有的env绑定。 diff --git a/zh-cn/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md b/zh-cn/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md deleted file mode 100644 index 9dfaa045bc..0000000000 --- a/zh-cn/release-notes/api-change/v3.2-beta1/js-apidiff-soft-bus.md +++ /dev/null @@ -1,43 +0,0 @@ -# 分布式软总线子系统JS API变更 - -OpenHarmony 3.2 Beta1版本相较于OpenHarmony 3.1 Release版本,分布式软总线子系统的API变更如下: - -## 接口变更 - -| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | -|---|---|---|---| -| ohos.rpc | Ashmem | readFromAshmem(size: number, offset: number): number[]; | 新增 | -| ohos.rpc | Ashmem | writeToAshmem(buf: number[], size: number, offset: number): boolean; | 新增 | -| ohos.rpc | Ashmem | setProtection(protectionType: number): boolean; | 新增 | -| ohos.rpc | Ashmem | mapReadOnlyAshmem(): boolean; | 新增 | -| ohos.rpc | Ashmem | mapReadAndWriteAshmem(): boolean; | 新增 | -| ohos.rpc | Ashmem | mapAshmem(mapType: number): boolean; | 新增 | -| ohos.rpc | Ashmem | getAshmemSize(): number; | 新增 | -| ohos.rpc | Ashmem | unmapAshmem(): void; | 新增 | -| ohos.rpc | Ashmem | closeAshmem(): void; | 新增 | -| ohos.rpc | Ashmem | static createAshmemFromExisting(ashmem: Ashmem): Ashmem; | 新增 | -| ohos.rpc | Ashmem | static createAshmem(name: string, size: number): Ashmem; | 新增 | -| ohos.rpc | Ashmem | PROT_WRITE = 2; | 新增 | -| ohos.rpc | Ashmem | PROT_READ = 1; | 新增 | -| ohos.rpc | Ashmem | PROT_NONE = 0; | 新增 | -| ohos.rpc | Ashmem | PROT_EXEC = 4; | 新增 | -| ohos.rpc | IPCSkeleton | static getCallingTokenId(): number; | 新增 | -| ohos.rpc | SendRequestResult | reply: MessageParcel; | 新增 | -| ohos.rpc | SendRequestResult | data: MessageParcel; | 新增 | -| ohos.rpc | SendRequestResult | code: number; | 新增 | -| ohos.rpc | SendRequestResult | errCode: number; | 新增 | -| ohos.rpc | MessageParcel | readRawData(size: number): number[]; | 新增 | -| ohos.rpc | MessageParcel | writeRawData(rawData: number[], size: number): boolean; | 新增 | -| ohos.rpc | MessageParcel | getRawDataCapacity(): number; | 新增 | -| ohos.rpc | MessageParcel | readAshmem(): Ashmem; | 新增 | -| ohos.rpc | MessageParcel | writeAshmem(ashmem: Ashmem): boolean; | 新增 | -| ohos.rpc | MessageParcel | readFileDescriptor(): number; | 新增 | -| ohos.rpc | MessageParcel | writeFileDescriptor(fd: number): boolean; | 新增 | -| ohos.rpc | MessageParcel | containFileDescriptors(): boolean; | 新增 | -| ohos.rpc | MessageParcel | static dupFileDescriptor(fd: number) :number; | 新增 | -| ohos.rpc | MessageParcel | static closeFileDescriptor(fd: number): void; | 新增 | -| ohos.rpc | MessageParcel | readRemoteObjectArray(objects: IRemoteObject[]): void;
readRemoteObjectArray(): IRemoteObject[]; | 新增 | -| ohos.rpc | MessageParcel | readSequenceableArray(sequenceableArray: Sequenceable[]): void; | 新增 | -| ohos.rpc | MessageParcel | writeRemoteObjectArray(objectArray: IRemoteObject[]): boolean; | 新增 | -| ohos.rpc | MessageParcel | readException(): void; | 新增 | -| ohos.rpc | MessageParcel | writeNoException(): void; | 新增 | diff --git a/zh-cn/release-notes/api-change/v3.2-beta1/readme.md b/zh-cn/release-notes/api-change/v3.2-beta1/readme.md index a1d5c465ff..23dfd6ebeb 100644 --- a/zh-cn/release-notes/api-change/v3.2-beta1/readme.md +++ b/zh-cn/release-notes/api-change/v3.2-beta1/readme.md @@ -18,7 +18,6 @@ - [多模输入](js-apidiff-multi-modal-input.md) - [多媒体](js-apidiff-multimedia.md) - [资源调度](js-apidiff-resource-scheduler.md) - - [分布式软总线](js-apidiff-soft-bus.md) - [测试框架](js-apidiff-unitest.md) - [Web](js-apidiff-web.md) - [窗口管理](js-apidiff-window.md) -- GitLab