提交 b72a6c21 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 6a51b779
...@@ -78,7 +78,7 @@ writeRemoteObject(object: [IRemoteObject](#iremoteobject)): boolean ...@@ -78,7 +78,7 @@ writeRemoteObject(object: [IRemoteObject](#iremoteobject)): boolean
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -119,7 +119,7 @@ Reads the remote object from this **MessageParcel** object. You can use this met ...@@ -119,7 +119,7 @@ Reads the remote object from this **MessageParcel** object. You can use this met
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -1698,7 +1698,7 @@ Writes information to this **MessageParcel** object indicating that no exception ...@@ -1698,7 +1698,7 @@ Writes information to this **MessageParcel** object indicating that no exception
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -1901,7 +1901,7 @@ Writes an array of **IRemoteObject** objects to this **MessageParcel** object. ...@@ -1901,7 +1901,7 @@ Writes an array of **IRemoteObject** objects to this **MessageParcel** object.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -1947,7 +1947,7 @@ Reads an **IRemoteObject** array from this **MessageParcel** object. ...@@ -1947,7 +1947,7 @@ Reads an **IRemoteObject** array from this **MessageParcel** object.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -1994,7 +1994,7 @@ Reads the **IRemoteObject** array from this **MessageParcel** object. ...@@ -1994,7 +1994,7 @@ Reads the **IRemoteObject** array from this **MessageParcel** object.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -2456,7 +2456,7 @@ Called to perform subsequent operations when a death notification of the remote ...@@ -2456,7 +2456,7 @@ Called to perform subsequent operations when a death notification of the remote
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
``` ```
...@@ -2652,7 +2652,7 @@ Provides methods to implement **IRemoteObject**. ...@@ -2652,7 +2652,7 @@ Provides methods to implement **IRemoteObject**.
### sendRequest<sup>(deprecated)</sup> ### sendRequest<sup>(deprecated)</sup>
> **NOTE**<br/> > **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 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 ...@@ -2931,7 +2931,7 @@ Adds a callback for receiving the death notifications of the remote object, incl
FA.connectAbility(want, connect); FA.connectAbility(want, connect);
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
let deathRecipient = new MyDeathRecipient(); let deathRecipient = new MyDeathRecipient();
...@@ -2982,7 +2982,7 @@ Removes the callback used to receive death notifications of the remote object. ...@@ -2982,7 +2982,7 @@ Removes the callback used to receive death notifications of the remote object.
FA.connectAbility(want, connect); FA.connectAbility(want, connect);
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
let deathRecipient = new MyDeathRecipient(); let deathRecipient = new MyDeathRecipient();
...@@ -3362,7 +3362,7 @@ Flushes all suspended commands from the specified **RemoteProxy** to the corresp ...@@ -3362,7 +3362,7 @@ Flushes all suspended commands from the specified **RemoteProxy** to the corresp
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3497,7 +3497,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch ...@@ -3497,7 +3497,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3561,7 +3561,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch ...@@ -3561,7 +3561,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3627,7 +3627,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch ...@@ -3627,7 +3627,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3694,7 +3694,7 @@ Provides a response to **sendRequest()**. The server processes the request and r ...@@ -3694,7 +3694,7 @@ Provides a response to **sendRequest()**. The server processes the request and r
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3743,7 +3743,7 @@ Obtains the UID of the remote process. ...@@ -3743,7 +3743,7 @@ Obtains the UID of the remote process.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3784,7 +3784,7 @@ Obtains the PID of the remote process. ...@@ -3784,7 +3784,7 @@ Obtains the PID of the remote process.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3830,7 +3830,7 @@ Checks whether the remote object corresponding to the specified interface descri ...@@ -3830,7 +3830,7 @@ Checks whether the remote object corresponding to the specified interface descri
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3871,7 +3871,7 @@ Obtains the interface descriptor. ...@@ -3871,7 +3871,7 @@ Obtains the interface descriptor.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -3914,7 +3914,7 @@ Binds an interface descriptor to an **IRemoteBroker** object. ...@@ -3914,7 +3914,7 @@ Binds an interface descriptor to an **IRemoteBroker** object.
``` ```
class MyDeathRecipient { class MyDeathRecipient {
onRemoteDied() { onRemoteDied() {
console.log("server is died"); console.log("server died");
} }
} }
class TestRemoteObject extends rpc.RemoteObject { class TestRemoteObject extends rpc.RemoteObject {
...@@ -4189,6 +4189,8 @@ Writes data to the shared file associated with this **Ashmem** object. ...@@ -4189,6 +4189,8 @@ Writes data to the shared file associated with this **Ashmem** object.
``` ```
let ashmem = rpc.Ashmem.createAshmem("ashmem", 1024*1024); 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]; var ByteArrayVar = [1, 2, 3, 4, 5];
let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0); let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0);
console.log("RpcTest: write to Ashmem result is : " + writeResult); console.log("RpcTest: write to Ashmem result is : " + writeResult);
...@@ -4219,6 +4221,8 @@ Reads data from the shared file associated with this **Ashmem** object. ...@@ -4219,6 +4221,8 @@ Reads data from the shared file associated with this **Ashmem** object.
``` ```
let ashmem = rpc.Ashmem.createAshmem("ashmem", 1024*1024); 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]; var ByteArrayVar = [1, 2, 3, 4, 5];
let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0); let writeResult = ashmem.writeToAshmem(ByteArrayVar, 5, 0);
console.log("RpcTest: write to Ashmem result is : " + writeResult); 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.
先完成此消息的编辑!
想要评论请 注册