1e41f4b71Sopenharmony_ci# ipc_cremote_object.h
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciProvides C interfaces for creating and destroying a remote object, transferring data, and observing the dead status of a remote object.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**Library**: libipc_capi.so
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Communication.IPC.Core
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci**Since**: 12
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci**Related module**: [OHIPCRemoteObject](_o_h_i_p_c_remote_object.md)
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci## Summary
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci### Structs
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci| Name| Description| 
23e41f4b71Sopenharmony_ci| -------- | -------- |
24e41f4b71Sopenharmony_ci| struct  [OH_IPC_MessageOption](_o_h___i_p_c___message_option.md) | Defines an IPC message.| 
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci### Types
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci| Name| Description| 
30e41f4b71Sopenharmony_ci| -------- | -------- |
31e41f4b71Sopenharmony_ci| typedef int(\* [OH_OnRemoteRequestCallback](_o_h_i_p_c_remote_object.md#oh_onremoterequestcallback)) (uint32_t code, const OHIPCParcel \*data, OHIPCParcel \*reply, void \*userData) | Defines a callback used to process the remote data request at the stub.| 
32e41f4b71Sopenharmony_ci| typedef void(\* [OH_OnRemoteDestroyCallback](_o_h_i_p_c_remote_object.md#oh_onremotedestroycallback)) (void \*userData) | Defines a callback to be invoked when an observed object of the stub is destroyed.| 
33e41f4b71Sopenharmony_ci| typedef void(\* [OH_OnDeathRecipientCallback](_o_h_i_p_c_remote_object.md#oh_ondeathrecipientcallback)) (void \*userData) | Defines a callback to be invoked when the remote **OHIPCRemoteStub** object dies unexpectedly.| 
34e41f4b71Sopenharmony_ci| typedef void(\* [OH_OnDeathRecipientDestroyCallback](_o_h_i_p_c_remote_object.md#oh_ondeathrecipientdestroycallback)) (void \*userData) | Defines a callback to be invoked when the **OHIPCDeathRecipient** object is destroyed.| 
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci### Enums
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci| Name| Description| 
40e41f4b71Sopenharmony_ci| -------- | -------- |
41e41f4b71Sopenharmony_ci| OH_IPC_RequestMode {<br>[OH_IPC_REQUEST_MODE_SYNC](_o_h_i_p_c_remote_object.md) = 0,<br>[OH_IPC_REQUEST_MODE_ASYNC](_o_h_i_p_c_remote_object.md) = 1<br>} | Enumerates the IPC request modes.| 
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci### Functions
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci| Name| Description| 
47e41f4b71Sopenharmony_ci| -------- | -------- |
48e41f4b71Sopenharmony_ci| OHIPCRemoteStub \* [OH_IPCRemoteStub_Create](_o_h_i_p_c_remote_object.md#oh_ipcremotestub_create) (const char \*descriptor, [OH_OnRemoteRequestCallback](_o_h_i_p_c_remote_object.md#oh_onremoterequestcallback) requestCallback, [OH_OnRemoteDestroyCallback](_o_h_i_p_c_remote_object.md#oh_onremotedestroycallback) destroyCallback, void \*userData) | Creates an **OHIPCRemoteStub** object.| 
49e41f4b71Sopenharmony_ci| void [OH_IPCRemoteStub_Destroy](_o_h_i_p_c_remote_object.md#oh_ipcremotestub_destroy) (OHIPCRemoteStub \*stub) | Destroys an **OHIPCRemoteStub** object.| 
50e41f4b71Sopenharmony_ci| void [OH_IPCRemoteProxy_Destroy](_o_h_i_p_c_remote_object.md#oh_ipcremoteproxy_destroy) (OHIPCRemoteProxy \*proxy) | Destroys an **OHIPCRemoteProxy** object.| 
51e41f4b71Sopenharmony_ci| int [OH_IPCRemoteProxy_SendRequest](_o_h_i_p_c_remote_object.md#oh_ipcremoteproxy_sendrequest) (const OHIPCRemoteProxy \*proxy, uint32_t code, const OHIPCParcel \*data, OHIPCParcel \*reply, const [OH_IPC_MessageOption](_o_h___i_p_c___message_option.md) \*option) | Sends an IPC message.| 
52e41f4b71Sopenharmony_ci| int [OH_IPCRemoteProxy_GetInterfaceDescriptor](_o_h_i_p_c_remote_object.md#oh_ipcremoteproxy_getinterfacedescriptor) (OHIPCRemoteProxy \*proxy, char \*\*descriptor, int32_t \*len, [OH_IPC_MemAllocator](_o_h_i_p_c_parcel.md#oh_ipc_memallocator) allocator) | Obtains the interface descriptor from the stub.| 
53e41f4b71Sopenharmony_ci| OHIPCDeathRecipient \* [OH_IPCDeathRecipient_Create](_o_h_i_p_c_remote_object.md#oh_ipcdeathrecipient_create) ([OH_OnDeathRecipientCallback](_o_h_i_p_c_remote_object.md#oh_ondeathrecipientcallback) deathRecipientCallback, [OH_OnDeathRecipientDestroyCallback](_o_h_i_p_c_remote_object.md#oh_ondeathrecipientdestroycallback) destroyCallback, void \*userData) | Creates an **OHIPCDeathRecipient** object, which triggers a notification when the **OHIPCRemoteStub** object dies unexpectedly.| 
54e41f4b71Sopenharmony_ci| void [OH_IPCDeathRecipient_Destroy](_o_h_i_p_c_remote_object.md#oh_ipcdeathrecipient_destroy) (OHIPCDeathRecipient \*recipient) | Destroys an **OHIPCDeathRecipient** object.| 
55e41f4b71Sopenharmony_ci| int [OH_IPCRemoteProxy_AddDeathRecipient](_o_h_i_p_c_remote_object.md#oh_ipcremoteproxy_adddeathrecipient) (OHIPCRemoteProxy \*proxy, OHIPCDeathRecipient \*recipient) | Subscribes to the death of an **OHIPCRemoteStub** object for an **OHIPCRemoteProxy** object.| 
56e41f4b71Sopenharmony_ci| int [OH_IPCRemoteProxy_RemoveDeathRecipient](_o_h_i_p_c_remote_object.md#oh_ipcremoteproxy_removedeathrecipient) (OHIPCRemoteProxy \*proxy, OHIPCDeathRecipient \*recipient) | Unsubscribes from the death of the **OHIPCRemoteStub** object for an **OHIPCRemoteProxy** object.| 
57e41f4b71Sopenharmony_ci| int [OH_IPCRemoteProxy_IsRemoteDead](_o_h_i_p_c_remote_object.md#oh_ipcremoteproxy_isremotedead) (const OHIPCRemoteProxy \*proxy) | Checks whether the **OHIPCRemoteStub** object corresponding to the **OHIPCRemoteProxy** object is dead.| 
58