Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
b72a6c21
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b72a6c21
编写于
6月 13, 2022
作者:
A
Annie_wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
Annie_wang
<
annie.wangli@huawei.com
>
上级
6a51b779
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
26 addition
and
22 deletion
+26
-22
en/application-dev/reference/apis/js-apis-rpc.md
en/application-dev/reference/apis/js-apis-rpc.md
+26
-22
未找到文件。
en/application-dev/reference/apis/js-apis-rpc.md
浏览文件 @
b72a6c21
...
...
@@ -78,7 +78,7 @@ writeRemoteObject(object: [IRemoteObject](#iremoteobject)): boolean
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -119,7 +119,7 @@ Reads the remote object from this **MessageParcel** object. You can use this met
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1698,7 +1698,7 @@ Writes information to this **MessageParcel** object indicating that no exception
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1901,7 +1901,7 @@ Writes an array of **IRemoteObject** objects to this **MessageParcel** object.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1947,7 +1947,7 @@ Reads an **IRemoteObject** array from this **MessageParcel** object.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -1994,7 +1994,7 @@ Reads the **IRemoteObject** array from this **MessageParcel** object.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -2456,7 +2456,7 @@ Called to perform subsequent operations when a death notification of the remote
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
```
...
...
@@ -2652,7 +2652,7 @@ Provides methods to implement **IRemoteObject**.
### sendRequest<sup>(deprecated)</sup>
> **NOTE**<br/>
> This API is deprecated since API Version 8. You are advised to use [sendRequest<sup>8+</sup>
](#sendrequest8-2).
> This API is deprecated since API Version 8. You are advised to use [sendRequest<sup>8+</sup>](#sendrequest8-2).
sendRequest(code : number, data : MessageParcel, reply : MessageParcel, options : MessageOption): boolean
...
...
@@ -2931,7 +2931,7 @@ Adds a callback for receiving the death notifications of the remote object, incl
FA.connectAbility(want, connect);
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
let deathRecipient = new MyDeathRecipient();
...
...
@@ -2982,7 +2982,7 @@ Removes the callback used to receive death notifications of the remote object.
FA.connectAbility(want, connect);
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
let deathRecipient = new MyDeathRecipient();
...
...
@@ -3362,7 +3362,7 @@ Flushes all suspended commands from the specified **RemoteProxy** to the corresp
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3497,7 +3497,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3561,7 +3561,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3627,7 +3627,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3694,7 +3694,7 @@ Provides a response to **sendRequest()**. The server processes the request and r
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3743,7 +3743,7 @@ Obtains the UID of the remote process.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3784,7 +3784,7 @@ Obtains the PID of the remote process.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3830,7 +3830,7 @@ Checks whether the remote object corresponding to the specified interface descri
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3871,7 +3871,7 @@ Obtains the interface descriptor.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -3914,7 +3914,7 @@ Binds an interface descriptor to an **IRemoteBroker** object.
```
class MyDeathRecipient {
onRemoteDied() {
console.log("server
is
died");
console.log("server died");
}
}
class TestRemoteObject extends rpc.RemoteObject {
...
...
@@ -4189,6 +4189,8 @@ Writes data to the shared file associated with this **Ashmem** object.
```
let ashmem = rpc.Ashmem.createAshmem("ashmem", 1024*1024);
let mapResult = ashmem.mapReadAndWriteAshmem();
console.info("RpcTest map ashmem result is " + mapResult);
var ByteArrayVar = [1, 2, 3, 4, 5];
let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0);
console.log("RpcTest: write to Ashmem result is : " + writeResult);
...
...
@@ -4219,6 +4221,8 @@ Reads data from the shared file associated with this **Ashmem** object.
```
let ashmem = rpc.Ashmem.createAshmem("ashmem", 1024*1024);
let mapResult = ashmem.mapReadAndWriteAshmem();
console.info("RpcTest map ashmem result is " + mapResult);
var ByteArrayVar = [1, 2, 3, 4, 5];
let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0);
console.log("RpcTest: write to Ashmem result is : " + writeResult);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录