1# telephony_radio.h 2 3## Overview 4 5Defines C APIs for the radio module. 6 7**Library**: libtelephony_radio.so 8 9**System capability**: SystemCapability.Telephony.CoreService 10 11**Since**: 13 12 13**Related module**: [Telephony](capi-telephony.md) 14 15## Summary 16 17### Functions 18 19| Name| Description| 20| -- | -- | 21| [Telephony_RadioResult OH_Telephony_GetNetworkState(Telephony_NetworkState *state)](#oh_telephony_getnetworkstate) | Obtains the network status.| 22| [Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Telephony_NetworkState *state)](#oh_telephony_getnetworkstateforslot) | Obtains the network status of the SIM card in the specified slot.| 23 24## Function Description 25 26### OH_Telephony_GetNetworkState() 27 28``` 29Telephony_RadioResult OH_Telephony_GetNetworkState(Telephony_NetworkState *state) 30``` 31 32**Description** 33 34Obtains the network status. 35 36**System capability**: SystemCapability.Telephony.CoreService 37 38**Required permissions**: ohos.permission.GET_NETWORK_INFO 39 40**Since**: 13 41 42 43**Parameters** 44 45| Name| Description| 46| -- | -- | 47| [Telephony_NetworkState](capi-telephony-telephony-networkstate.md) *state | Structure of the network status information received by the user.| 48 49**Returns** 50 51| Type| Description| 52| -- | -- | 53| [Telephony_RadioResult](capi-telephony-radio-type-h.md#telephony_radioresult) | Result code. For details, see [Telephony_RadioResult](capi-telephony-radio-type-h.md#telephony_radioresult).<br> [TEL_RADIO_SUCCESS](capi-telephony-radio-type-h.md#telephony_radioresult): Operation succeeded.<br> [TEL_RADIO_PERMISSION_DENIED](capi-telephony-radio-type-h.md#telephony_radioresult): Permission denied.<br> [TEL_RADIO_ERR_MARSHALLING_FAILED](capi-telephony-radio-type-h.md#telephony_radioresult): Marshalling failed.<br> [TEL_RADIO_ERR_SERVICE_CONNECTION_FAILED](capi-telephony-radio-type-h.md#telephony_radioresult): Telephony service connection failed.<br> [TEL_RADIO_ERR_OPERATION_FAILED](capi-telephony-radio-type-h.md#telephony_radioresult): Telephony service operation failed.<br> [TEL_RADIO_ERR_INVALID_PARAM](capi-telephony-radio-type-h.md#telephony_radioresult): Invalid parameter.| 54 55### OH_Telephony_GetNetworkStateForSlot() 56 57``` 58Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Telephony_NetworkState *state) 59``` 60 61**Description** 62 63Obtains the network status of the SIM card in the specified slot. 64 65**System capability**: SystemCapability.Telephony.CoreService 66 67**Required permissions**: ohos.permission.GET_NETWORK_INFO 68 69**Since**: 13 70 71 72**Parameters** 73 74| Name| Description| 75| -- | -- | 76| int32_t slotId | Card slot ID.| 77| [Telephony_NetworkState](capi-telephony-telephony-networkstate.md) *state | Structure of the network status information received by the user.| 78 79**Returns** 80 81| Type| Description| 82| -- | -- | 83| [Telephony_RadioResult](capi-telephony-radio-type-h.md#telephony_radioresult) | Result code. For details, see [Telephony_RadioResult](capi-telephony-radio-type-h.md#telephony_radioresult).<br> [TEL_RADIO_SUCCESS](capi-telephony-radio-type-h.md#telephony_radioresult): Operation succeeded.<br> [TEL_RADIO_PERMISSION_DENIED](capi-telephony-radio-type-h.md#telephony_radioresult): Permission denied.<br> [TEL_RADIO_ERR_MARSHALLING_FAILED](capi-telephony-radio-type-h.md#telephony_radioresult): Marshalling failed.<br> [TEL_RADIO_ERR_SERVICE_CONNECTION_FAILED](capi-telephony-radio-type-h.md#telephony_radioresult): Telephony service connection failed.<br> [TEL_RADIO_ERR_OPERATION_FAILED](capi-telephony-radio-type-h.md#telephony_radioresult): Telephony service operation failed.<br> [TEL_RADIO_ERR_INVALID_PARAM](capi-telephony-radio-type-h.md#telephony_radioresult): Invalid parameter.| 84