telephony_radio.h
Overview
Defines C APIs for the radio module.
File to include: <telephony/core_service/telephony_radio.h>
Library: libtelephony_radio.so
System capability: SystemCapability.Telephony.CoreService
Since: 13
Related module: Telephony
Summary
Functions
| Name | Description |
|---|---|
| Telephony_RadioResult OH_Telephony_GetNetworkState(Telephony_NetworkState *state) | Obtains the network status. |
| Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Telephony_NetworkState *state) | Obtains the network status of the SIM card in the specified slot. |
Function Description
OH_Telephony_GetNetworkState()
Telephony_RadioResult OH_Telephony_GetNetworkState(Telephony_NetworkState *state)
Description
Obtains the network status.
System capability: SystemCapability.Telephony.CoreService
Required permissions: ohos.permission.GET_NETWORK_INFO
Since: 13
Parameters
| Name | Description |
|---|---|
| Telephony_NetworkState *state | Structure of the network status information received by the user. |
Returns
| Type | Description |
|---|---|
| Telephony_RadioResult | Result code. For details, see Telephony_RadioResult. TEL_RADIO_SUCCESS: Operation succeeded. TEL_RADIO_PERMISSION_DENIED: Permission denied. TEL_RADIO_ERR_MARSHALLING_FAILED: Marshalling failed. TEL_RADIO_ERR_SERVICE_CONNECTION_FAILED: Telephony service connection failed. TEL_RADIO_ERR_OPERATION_FAILED: Telephony service operation failed. TEL_RADIO_ERR_INVALID_PARAM: Invalid parameter. |
OH_Telephony_GetNetworkStateForSlot()
Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Telephony_NetworkState *state)
Description
Obtains the network status of the SIM card in the specified slot.
System capability: SystemCapability.Telephony.CoreService
Required permissions: ohos.permission.GET_NETWORK_INFO
Since: 13
Parameters
| Name | Description |
|---|---|
| int32_t slotId | Card slot ID. |
| Telephony_NetworkState *state | Structure of the network status information received by the user. |
Returns
| Type | Description |
|---|---|
| Telephony_RadioResult | Result code. For details, see Telephony_RadioResult. TEL_RADIO_SUCCESS: Operation succeeded. TEL_RADIO_PERMISSION_DENIED: Permission denied. TEL_RADIO_ERR_MARSHALLING_FAILED: Marshalling failed. TEL_RADIO_ERR_SERVICE_CONNECTION_FAILED: Telephony service connection failed. TEL_RADIO_ERR_OPERATION_FAILED: Telephony service operation failed. TEL_RADIO_ERR_INVALID_PARAM: Invalid parameter. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 js-apis-sms-sys
openharmony 鸿蒙 capi-telephony-radio-type-h
openharmony 鸿蒙 js-apis-sim-sys
openharmony 鸿蒙 js-apis-telephony-data-sys
openharmony 鸿蒙 js-apis-observer-sys
openharmony 鸿蒙 capi-telephony-data-h