diff --git a/api/@ohos.rpc.d.ts b/api/@ohos.rpc.d.ts index 786e16f15371f3d3110542245889f58ea9dbe7cb..2b4622f2bdc03283977cff415dbbdca668138d00 100644 --- a/api/@ohos.rpc.d.ts +++ b/api/@ohos.rpc.d.ts @@ -3170,7 +3170,9 @@ declare namespace rpc { ): void; /** - * Obtains the PID of the {@link RemoteProxy} object. + * Obtains the PID of the caller. + *

This API must be called within an IPC context (onRemoteRequest/onRemoteMessagerequest). Any asynchronous + * operations (for exaple, using await) are strictly prohibited before calling this API. * * @returns { number } Return the PID of the {@link RemoteProxy} object. * @syscap SystemCapability.Communication.IPC.Core @@ -3179,7 +3181,9 @@ declare namespace rpc { getCallingPid(): number; /** - * Obtains the UID of the {@link RemoteProxy} object. + * Obtains the UID of the caller. + *

This API must be called within an IPC context (onRemoteRequest/onRemoteMessagerequest). Any asynchronous + * operations (for exaple, using await) are strictly prohibited before calling this API. * * @returns { number } Return the UID of the {@link RemoteProxy} object. * @syscap SystemCapability.Communication.IPC.Core @@ -3551,12 +3555,10 @@ declare namespace rpc { static getContextObject(): IRemoteObject; /** - * Obtains the PID of a proxy. - *

This method is static. The PID is a positive integer during the communication between - * the {@link RemoteProxy} object and {@link RemoteObject} object, and resumes to {@code 0} - * when the communication ends. If this method is called from the {@link RemoteProxy} object, - * {@code 0} is returned; if this method is called from the {@link RemoteObject} object, - * the PID of the corresponding {@link RemoteProxy} object is returned. + * Obtains the PID of the caller. + *

This API is a static method that must be called within an IPC context + * (onRemoteRequest/onRemoteMessagerequest); otherwise, the PID of the process will be returned. Any asynchronous + * operations (for exaple, using await) are strictly prohibited before calling this API. * * @returns { number } Return the PID of the proxy. * @syscap SystemCapability.Communication.IPC.Core @@ -3565,12 +3567,10 @@ declare namespace rpc { static getCallingPid(): number; /** - * Obtains the UID of a proxy. - *

This method is static. The UID is a positive integer during the communication between - * the {@link RemoteProxy} object and {@link RemoteObject} object, and resumes to {@code 0} - * when the communication ends. If this method is called from the {@link RemoteProxy} object, - * {@code 0} is returned; if this method is called from the {@link RemoteObject} object, - * the UID of the corresponding {@link RemoteProxy} object is returned. + * Obtains the UID of the caller. + *

This API is a static method that must be called within an IPC context + * (onRemoteRequest/onRemoteMessagerequest); otherwise, the UID of the process will be returned. Any asynchronous + * operations (for exaple, using await) are strictly prohibited before calling this API. * * @returns { number } Return the UID of the proxy. * @syscap SystemCapability.Communication.IPC.Core @@ -3579,8 +3579,10 @@ declare namespace rpc { static getCallingUid(): number; /** - * Obtains the TOKENID. - *

This method is static. + * Obtains the TokenId of the caller. + *

This API is a static method that must be called within an IPC context + * (onRemoteRequest/onRemoteMessagerequest). Any asynchronous operations (for exaple, using await) are + * strictly prohibited before calling this API. * * @returns { number } Return the TOKENID. * @syscap SystemCapability.Communication.IPC.Core @@ -3589,8 +3591,10 @@ declare namespace rpc { static getCallingTokenId(): number; /** - * Obtains the ID of the device where the peer process resides. - *

This method is static. + * Obtains the device ID of the caller. + *

This API is a static method that must be called within an IPC context + * (onRemoteRequest/onRemoteMessagerequest). Any asynchronous operations (for exaple, using await) are + * strictly prohibited before calling this API. * * @returns { string } Return the ID of the device where the peer process resides. * @syscap SystemCapability.Communication.IPC.Core @@ -3599,8 +3603,10 @@ declare namespace rpc { static getCallingDeviceID(): string; /** - * Obtains the ID of the local device. - *

This method is static. + * Obtains the local device ID. + *

This API is a static method that must be called within an IPC context + * (onRemoteRequest/onRemoteMessagerequest). Any asynchronous operations (for exaple, using await) are + * strictly prohibited before calling this API. * * @returns { string } Return the ID of the local device. * @syscap SystemCapability.Communication.IPC.Core @@ -3609,8 +3615,10 @@ declare namespace rpc { static getLocalDeviceID(): string; /** - * Checks whether a call is made on the same device. - *

This method is static. + * Checks whether the peer process is a process of the local device. + *

This API is a static method that must be called within an IPC context + * (onRemoteRequest/onRemoteMessagerequest). Any asynchronous operations (for exaple, using await) are + * strictly prohibited before calling this API. * * @returns { boolean } Return {@code true} if the call is made on the same device; return {@code false} otherwise. * @syscap SystemCapability.Communication.IPC.Core