From 1e37c8da0035f864be1087f4f6c83bb7b2d0e6f6 Mon Sep 17 00:00:00 2001 From: liuyibo Date: Tue, 30 Aug 2022 21:36:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?Description:=E6=B6=88=E9=99=A4RPC=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84IDE=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=20Feature=20or=20Bugfix:=E6=8C=89=E7=85=A7IDE?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=A3=80=E6=9F=A5=E8=A6=81=E6=B1=82=E6=95=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=8D=E8=A7=84=E8=8C=83=E5=86=99=E6=B3=95=20Binary?= =?UTF-8?q?=20Source:=20No=20Signed-off-by:=20liuyibo=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.rpc.d.ts | 73 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 34f5edc604..9baa826b75 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -811,7 +811,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - interface IRemoteObject { + abstract class IRemoteObject { /** * Queries the description of an interface. * @@ -976,27 +976,39 @@ declare namespace rpc { class MessageOption { /** * Indicates synchronous call. + * + * @constant + * @default 0 * @since 7 */ - TF_SYNC = 0; + TF_SYNC: number; /** * Indicates asynchronous call. + * + * @constant + * @default 1 * @since 7 */ - TF_ASYNC = 1; + TF_ASYNC: number; /** * Indicates the sendRequest API for returning the file descriptor. + * + * @constant + * @default 16 * @since 7 */ - TF_ACCEPT_FDS = 0x10; + TF_ACCEPT_FDS: number; /** * Indicates the wait time for RPC, in seconds. It is NOT used in IPC case. + * + * @constant + * @default 4 * @since 7 */ - TF_WAIT_TIME = 4; + TF_WAIT_TIME: number; /** * A constructor used to create a MessageOption instance. @@ -1005,7 +1017,7 @@ declare namespace rpc { * @param waitTime Maximum wait time for a RPC call. The default value is TF_WAIT_TIME. * @since 7 */ - constructor(syncFlags?: number, waitTime = TF_WAIT_TIME); + constructor(syncFlags?: number, waitTime?: number); /** * Obtains the SendRequest call flag, which can be synchronous or asynchronous. @@ -1045,7 +1057,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - class RemoteObject implements IRemoteObject { + class RemoteObject extends IRemoteObject { /** * A constructor to create a RemoteObject instance. * @@ -1195,37 +1207,52 @@ declare namespace rpc { class RemoteProxy implements IRemoteObject { /** * Indicates the message code for a Ping operation. + * + * @constant + * @default 1599098439 * @since 7 */ - PING_TRANSACTION = ('_' << 24) | ('P' << 16) | ('N' << 8) | 'G'; + PING_TRANSACTION: number; /** * Indicates the message code for a dump operation. + * + * @constant + * @default 1598311760 * @since 7 */ - DUMP_TRANSACTION = ('_' << 24) | ('D' << 16) | ('M' << 8) | 'P'; + DUMP_TRANSACTION: number; /** * Indicates the message code for a transmission. + * + * @constant + * @default 1598968902 * @since 7 */ - INTERFACE_TRANSACTION = ('_' << 24) | ('N' << 16) | ('T' << 8) | 'F'; + INTERFACE_TRANSACTION: number; /** * Indicates the minimum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x1 * @since 7 */ - MIN_TRANSACTION_ID = 0x1; + MIN_TRANSACTION_ID: number; /** * Indicates the maximum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x00FFFFFF * @since 7 */ - MAX_TRANSACTION_ID = 0x00FFFFFF; + MAX_TRANSACTION_ID: number; /** * Queries a local interface with a specified descriptor. @@ -1476,27 +1503,39 @@ declare namespace rpc { class Ashmem { /** * The mapped memory is executable. + * + * @constant + * @default 4 * @since 8 */ - PROT_EXEC = 4; + PROT_EXEC: number; /** * The mapped memory is inaccessible. + * + * @constant + * @default 0 * @since 8 */ - PROT_NONE = 0; + PROT_NONE: number; /** * The mapped memory is readable. + * + * @constant + * @default 1 * @since 8 */ - PROT_READ = 1; + PROT_READ: number; /** * The mapped memory is writable. + * + * @constant + * @default 2 * @since 8 */ - PROT_WRITE = 2; + PROT_WRITE: number; /** * Creates an Ashmem object with the specified name and size. @@ -1587,4 +1626,4 @@ declare namespace rpc { } } -export default rpc; +export default rpc; \ No newline at end of file -- Gitee From 583117278bde88eb25198497c7eb0085169d43e0 Mon Sep 17 00:00:00 2001 From: liuyibo Date: Tue, 30 Aug 2022 21:36:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Description:=E6=B6=88=E9=99=A4RPC=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84IDE=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=20Feature=20or=20Bugfix:=E6=8C=89=E7=85=A7IDE?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=A3=80=E6=9F=A5=E8=A6=81=E6=B1=82=E6=95=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=8D=E8=A7=84=E8=8C=83=E5=86=99=E6=B3=95=20Binary?= =?UTF-8?q?=20Source:=20No=20Signed-off-by:=20liuyibo=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.rpc.d.ts | 73 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 34f5edc604..9baa826b75 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -811,7 +811,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - interface IRemoteObject { + abstract class IRemoteObject { /** * Queries the description of an interface. * @@ -976,27 +976,39 @@ declare namespace rpc { class MessageOption { /** * Indicates synchronous call. + * + * @constant + * @default 0 * @since 7 */ - TF_SYNC = 0; + TF_SYNC: number; /** * Indicates asynchronous call. + * + * @constant + * @default 1 * @since 7 */ - TF_ASYNC = 1; + TF_ASYNC: number; /** * Indicates the sendRequest API for returning the file descriptor. + * + * @constant + * @default 16 * @since 7 */ - TF_ACCEPT_FDS = 0x10; + TF_ACCEPT_FDS: number; /** * Indicates the wait time for RPC, in seconds. It is NOT used in IPC case. + * + * @constant + * @default 4 * @since 7 */ - TF_WAIT_TIME = 4; + TF_WAIT_TIME: number; /** * A constructor used to create a MessageOption instance. @@ -1005,7 +1017,7 @@ declare namespace rpc { * @param waitTime Maximum wait time for a RPC call. The default value is TF_WAIT_TIME. * @since 7 */ - constructor(syncFlags?: number, waitTime = TF_WAIT_TIME); + constructor(syncFlags?: number, waitTime?: number); /** * Obtains the SendRequest call flag, which can be synchronous or asynchronous. @@ -1045,7 +1057,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - class RemoteObject implements IRemoteObject { + class RemoteObject extends IRemoteObject { /** * A constructor to create a RemoteObject instance. * @@ -1195,37 +1207,52 @@ declare namespace rpc { class RemoteProxy implements IRemoteObject { /** * Indicates the message code for a Ping operation. + * + * @constant + * @default 1599098439 * @since 7 */ - PING_TRANSACTION = ('_' << 24) | ('P' << 16) | ('N' << 8) | 'G'; + PING_TRANSACTION: number; /** * Indicates the message code for a dump operation. + * + * @constant + * @default 1598311760 * @since 7 */ - DUMP_TRANSACTION = ('_' << 24) | ('D' << 16) | ('M' << 8) | 'P'; + DUMP_TRANSACTION: number; /** * Indicates the message code for a transmission. + * + * @constant + * @default 1598968902 * @since 7 */ - INTERFACE_TRANSACTION = ('_' << 24) | ('N' << 16) | ('T' << 8) | 'F'; + INTERFACE_TRANSACTION: number; /** * Indicates the minimum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x1 * @since 7 */ - MIN_TRANSACTION_ID = 0x1; + MIN_TRANSACTION_ID: number; /** * Indicates the maximum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x00FFFFFF * @since 7 */ - MAX_TRANSACTION_ID = 0x00FFFFFF; + MAX_TRANSACTION_ID: number; /** * Queries a local interface with a specified descriptor. @@ -1476,27 +1503,39 @@ declare namespace rpc { class Ashmem { /** * The mapped memory is executable. + * + * @constant + * @default 4 * @since 8 */ - PROT_EXEC = 4; + PROT_EXEC: number; /** * The mapped memory is inaccessible. + * + * @constant + * @default 0 * @since 8 */ - PROT_NONE = 0; + PROT_NONE: number; /** * The mapped memory is readable. + * + * @constant + * @default 1 * @since 8 */ - PROT_READ = 1; + PROT_READ: number; /** * The mapped memory is writable. + * + * @constant + * @default 2 * @since 8 */ - PROT_WRITE = 2; + PROT_WRITE: number; /** * Creates an Ashmem object with the specified name and size. @@ -1587,4 +1626,4 @@ declare namespace rpc { } } -export default rpc; +export default rpc; \ No newline at end of file -- Gitee From 60099890549383ebd8163686feb0919507cf63ee Mon Sep 17 00:00:00 2001 From: Yippo Date: Wed, 31 Aug 2022 11:20:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?Description:=E6=B6=88=E9=99=A4RPC=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84IDE=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=20Feature=20or=20Bugfix:=E6=8C=89=E7=85=A7IDE?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=A3=80=E6=9F=A5=E8=A6=81=E6=B1=82=E6=95=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=8D=E8=A7=84=E8=8C=83=E5=86=99=E6=B3=95=20Binary?= =?UTF-8?q?=20Source:=20No=20Signed-off-by:=20Yippo=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.rpc.d.ts | 73 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 34f5edc604..9baa826b75 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -811,7 +811,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - interface IRemoteObject { + abstract class IRemoteObject { /** * Queries the description of an interface. * @@ -976,27 +976,39 @@ declare namespace rpc { class MessageOption { /** * Indicates synchronous call. + * + * @constant + * @default 0 * @since 7 */ - TF_SYNC = 0; + TF_SYNC: number; /** * Indicates asynchronous call. + * + * @constant + * @default 1 * @since 7 */ - TF_ASYNC = 1; + TF_ASYNC: number; /** * Indicates the sendRequest API for returning the file descriptor. + * + * @constant + * @default 16 * @since 7 */ - TF_ACCEPT_FDS = 0x10; + TF_ACCEPT_FDS: number; /** * Indicates the wait time for RPC, in seconds. It is NOT used in IPC case. + * + * @constant + * @default 4 * @since 7 */ - TF_WAIT_TIME = 4; + TF_WAIT_TIME: number; /** * A constructor used to create a MessageOption instance. @@ -1005,7 +1017,7 @@ declare namespace rpc { * @param waitTime Maximum wait time for a RPC call. The default value is TF_WAIT_TIME. * @since 7 */ - constructor(syncFlags?: number, waitTime = TF_WAIT_TIME); + constructor(syncFlags?: number, waitTime?: number); /** * Obtains the SendRequest call flag, which can be synchronous or asynchronous. @@ -1045,7 +1057,7 @@ declare namespace rpc { * @import import rpc from '@ohos.rpc' * @since 7 */ - class RemoteObject implements IRemoteObject { + class RemoteObject extends IRemoteObject { /** * A constructor to create a RemoteObject instance. * @@ -1195,37 +1207,52 @@ declare namespace rpc { class RemoteProxy implements IRemoteObject { /** * Indicates the message code for a Ping operation. + * + * @constant + * @default 1599098439 * @since 7 */ - PING_TRANSACTION = ('_' << 24) | ('P' << 16) | ('N' << 8) | 'G'; + PING_TRANSACTION: number; /** * Indicates the message code for a dump operation. + * + * @constant + * @default 1598311760 * @since 7 */ - DUMP_TRANSACTION = ('_' << 24) | ('D' << 16) | ('M' << 8) | 'P'; + DUMP_TRANSACTION: number; /** * Indicates the message code for a transmission. + * + * @constant + * @default 1598968902 * @since 7 */ - INTERFACE_TRANSACTION = ('_' << 24) | ('N' << 16) | ('T' << 8) | 'F'; + INTERFACE_TRANSACTION: number; /** * Indicates the minimum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x1 * @since 7 */ - MIN_TRANSACTION_ID = 0x1; + MIN_TRANSACTION_ID: number; /** * Indicates the maximum value of a valid message code. * *

This constant is used to check the validity of an operation. + * + * @constant + * @default 0x00FFFFFF * @since 7 */ - MAX_TRANSACTION_ID = 0x00FFFFFF; + MAX_TRANSACTION_ID: number; /** * Queries a local interface with a specified descriptor. @@ -1476,27 +1503,39 @@ declare namespace rpc { class Ashmem { /** * The mapped memory is executable. + * + * @constant + * @default 4 * @since 8 */ - PROT_EXEC = 4; + PROT_EXEC: number; /** * The mapped memory is inaccessible. + * + * @constant + * @default 0 * @since 8 */ - PROT_NONE = 0; + PROT_NONE: number; /** * The mapped memory is readable. + * + * @constant + * @default 1 * @since 8 */ - PROT_READ = 1; + PROT_READ: number; /** * The mapped memory is writable. + * + * @constant + * @default 2 * @since 8 */ - PROT_WRITE = 2; + PROT_WRITE: number; /** * Creates an Ashmem object with the specified name and size. @@ -1587,4 +1626,4 @@ declare namespace rpc { } } -export default rpc; +export default rpc; \ No newline at end of file -- Gitee