# IAbilityConnection<a name="ZH-CN_TOPIC_0000001054479567"></a>## **Overview**<a name="section1135888675093531"></a>**Related Modules:**[AbilityKit](AbilityKit.md)**Description:**Provides callbacks to be invoked when a remote [Service](Service.md) ability is connected or disconnected. ## **Summary**<a name="section495081729093531"></a>## Data Fields<a name="pub-attribs"></a><aname="table668467472093531"></a><table><theadalign="left"><trid="row1519684370093531"><thclass="cellrowborder"valign="top"width="50%"id="mcps1.1.3.1.1"><pid="p447945243093531"><aname="p447945243093531"></a><aname="p447945243093531"></a>Variable Name</p></th><thclass="cellrowborder"valign="top"width="50%"id="mcps1.1.3.1.2"><pid="p69779550093531"><aname="p69779550093531"></a><aname="p69779550093531"></a>Description</p></th></tr></thead><tbody><trid="row1852392276093531"><tdclass="cellrowborder"valign="top"width="50%"headers="mcps1.1.3.1.1 "><pid="p1636655364093531"><aname="p1636655364093531"></a><aname="p1636655364093531"></a><ahref="AbilityKit.md#ga3b9bfacbcf1564c83cffbfff7889998a">OnAbilityConnectDone</a> )(<ahref="ElementName.md">ElementName</a>*elementName, SvcIdentity *serviceSid, int resultCode, void *data)</p></td><tdclass="cellrowborder"valign="top"width="50%"headers="mcps1.1.3.1.2 "><pid="p384130105093531"><aname="p384130105093531"></a><aname="p384130105093531"></a>void(* </p><pid="p998948282093531"><aname="p998948282093531"></a><aname="p998948282093531"></a>Called when a client is connected to a <ahref="Service.md">Service</a> ability. </p></td></tr><trid="row1262690490093531"><tdclass="cellrowborder"valign="top"width="50%"headers="mcps1.1.3.1.1 "><pid="p1055921306093531"><aname="p1055921306093531"></a><aname="p1055921306093531"></a><ahref="AbilityKit.md#gaba7cf0abb517890ef1a3949e398aaf1d">OnAbilityDisconnectDone</a> )(<ahref="ElementName.md">ElementName</a>*elementName, int resultCode, void *data)</p></td><tdclass="cellrowborder"valign="top"width="50%"headers="mcps1.1.3.1.2 "><pid="p594567871093531"><aname="p594567871093531"></a><aname="p594567871093531"></a>void(* </p><pid="p1012132056093531"><aname="p1012132056093531"></a><aname="p1012132056093531"></a>Called after all connections to a <ahref="Service.md">Service</a> ability are disconnected. </p></td></tr></tbody></table>