Merge branch 'master' of gitee.com:openharmony/telephony_ril_adapter into master

Signed-off-by: Aurora <liuxiyao223@huawei.com>
This commit is contained in:
Aurora 2023-06-13 01:36:44 +00:00 committed by Gitee
commit 01739c22d6
43 changed files with 4213 additions and 788 deletions

View File

@ -34,8 +34,7 @@
"hilog",
"hiviewdfx_hilog_native",
"init",
"ipc",
"samgr"
"ipc"
],
"third_party": [
"eudev",
@ -56,37 +55,10 @@
]
},
"inner_kits": [
{
"type": "so",
"name": "//base/telephony/ril_adapter/interfaces/innerkits:hril_innerkits",
"header": {
"header_files": [
"hril_types.h",
"hril_sms_parcel.h",
"hril_sim_parcel.h",
"hril_request.h",
"hril_notification.h",
"hril_network_parcel.h",
"hril_modem_parcel.h",
"hril_data_parcel.h",
"hril_call_parcel.h",
"hril.h",
"hril_vendor_call_defs.h",
"hril_vendor_data_defs.h",
"hril_vendor_modem_defs.h",
"hril_vendor_network_defs.h",
"hril_vendor_sim_defs.h",
"hril_vendor_sms_defs.h"
],
"header_base": "//base/telephony/ril_adapter/interfaces/innerkits/include"
}
},
{
"header": {
"header_base" : "//base/telephony/ril_adapter/services/hril_hdf/include",
"header_files": [
"hril_hdf.h"
]
"header_files": []
},
"name":"//base/telephony/ril_adapter/services/hril_hdf:hril_hdf"
}
@ -94,9 +66,7 @@
{
"header": {
"header_base" : "//base/telephony/ril_adapter/services/hril/include",
"header_files": [
"hril_manager.h"
]
"header_files": []
},
"name":"//base/telephony/ril_adapter/services/hril:hril"
}

View File

@ -61,6 +61,6 @@ ohos_shared_library("hril_innerkits") {
}
relative_install_dir = "chipset-pub-sdk"
part_name = "drivers_interface_ril"
part_name = "ril_adapter"
subsystem_name = "telephony"
}

View File

@ -20,97 +20,289 @@
namespace OHOS {
namespace Telephony {
/* From 3GPP TS 27.007 V4.3.0 (2001-12) 7.7, AT + ATD */
/**
* @brief Defines the dial information in 3GPP TS 27.007 V4.3.0 (2001-12) 7.7,
* AT + ATD
*/
struct DialInfo {
/** Request serial number. */
int32_t serial = 0;
/**
* Type of address octet in integer format (refer TS 24.008 [8]
* subclauses 10.5.4.7); default 145 when dialling string includes
* international access code character "+", otherwise 129.
*/
std::string address = "";
int32_t clir = 0; /* Calling Line Identification Restriction. From TS 27.007 V3.4.0 (2000-03) */
/**
* Calling Line Identification Restriction. From TS 27.007 V3.4.0
* (2000-03).
*/
int32_t clir = 0;
};
/**
* @brief Defines the call status information in 3GPP TS 27.007 V4.3.0
* (2001-12) AT+CGDCONT.
*/
struct CallInfo {
/**
* Call identification number as described in 3GPP TS 22.030 [19]
* sub-clause 6.5.5.1. This number can be used in +CHLD command operations.
*/
int32_t index = 0;
/** Call direction. The value 0 indicates the calling party, and the value
* 1 indicates the called party. */
int32_t dir = 0;
/**
* Indicates the call state:
* 0: activated state
* 1: call hold state
* 2: calling party, dialing state
* 3: calling party, ringback tone state
* 4: called party, incoming call state
* 5: called party, call waiting state
* 6: disconnected state
* 7: disconnecting state
* 8: idle state
*/
int32_t state = 0;
/**
* Indicates the call mode:
* 0: voice call
* 1: data call
* 2: fax
*/
int32_t mode = 0;
/**
* Indicates the Multi-party call status:
* 0: not a multi-party(conference) call
* 1: a multi-party(conference) call
*/
int32_t mpty = 0;
/**
* Indicates the call domain of the voice call:
* 0: CS domain
* 1: IP multimedia system (IMS) domain
*/
int32_t voiceDomain = 0;
/**
* Indicates the call type:
* 0: Voice call
* 1: Video call: send one-way video, two-way voice
* 2: Video call: one-way receiving video, two-way voice
* 3: Video call: two-way video, two-way voice
*/
int32_t callType = 0;
/** phone number in format specified by <type> */
std::string number = "";
/**
* Type of address octet in integer format (refer TS 24.008 [8]
* subclauses 10.5.4.7); default 145 when dialling string includes
* international access code character "+", otherwise 129. See 3GPP
* TS 27.007 V4.3.0 (2001-12) 6.1.
*/
int32_t type = 0;
/**
* Alphanumeric representation of <number> corresponding to the entry found
* in phonebook; used character set should be the one selected with command
* select TE character set +CSCS.
*/
std::string alpha = "";
};
/**
* @brief Defines the call status information list.
*/
struct CallInfoList {
/** The size of CallInfoList. */
int32_t callSize = 0;
/** The ID of the call status information list. */
int32_t flag = 0;
/** Call status information list. */
std::vector<CallInfo> calls {};
};
/**
* @brief Defines the emergency information.
*/
struct EmergencyInfo {
/** Number index. */
int32_t index = 0;
/** Total number of numbers. */
int32_t total = 0;
/** Emergency call number in string format. */
std::string eccNum = "";
/**
* Emergency call type:
* 0: Interface message of initiating an emergency call
* 1: Bandit police
* 2: Rescue
* 4: Fire alarm
* 8: Marine Police
* 16: Alpine rescue
*/
int32_t category = 0;
/**
* Whether the number is valid with or without a card:
* 0: valid without card
* 1: Valid with card
*/
int32_t simpresent = 0;
/** Mobile country code. */
std::string mcc = "";
/**
* Distinguishes CS domain abnormal service status:
* 0: all States are valid
* 1: the CS domain is not in normal service
*/
int32_t abnormalService = 0;
};
/**
* @brief Defines the emergency info list.
*/
struct EmergencyInfoList {
/** The size of the emergency info list. */
int32_t callSize = 0;
/** The ID of emergency info list. */
int32_t flag = 0;
/** Emergency info list. */
std::vector<EmergencyInfo> calls {};
};
/**
* @brief Defines the call forwarding information.
*/
struct CallForwardSetInfo {
/** Request serial number. */
int32_t serial = 0;
/**
* Call forwarding type:
* 0: call forwarding unconditional
* 1: call forwarding on busy
* 2: call forwarding on no reply
* 3: call forwarding not reachable (no network service, or power-off)
* 4: any call forwarding
* 5: any call forwarding conditional
*/
int32_t reason = 0;
/**
* Call forwarding operation mode:
* 0: deactivation
* 1: activation
* 2: status query
* 3: registration
* 4: deletion
*/
int32_t mode = 0;
/** Phone number. */
std::string number = "";
/** Service class. For details, see 3GPP TS 27.007. */
int32_t classx = 0;
};
/**
* @brief Defines the Unstructured Supplementary Data Service (USSD)
* information.
*/
struct UssdNoticeInfo {
int32_t m = 0; /* Integer value.
0: The network does not require a TE reply (USSD-Notify initiated by the network or TE
The network does not need further information after starting operation);
1: The network needs a TE reply (USSD-Request initiated by the network, or TE sent
After starting the operation, the network needs further information);
2: The USSD session is released by the network;
3: Other local clients have responded;
4: The operation is not supported;
5: The network timed out. */
std::string str = ""; /* USSD string, the maximum length is 160 characters. */
/**
* Integer value.
* 0: The network does not require a TE reply (USSD-Notify initiated by the
* network or TE. The network does not need further information after
* starting operation);
* 1: The network needs a TE reply (USSD-Request initiated by the network,
* or TE sent After starting the operation, the network needs further
* information);
* 2: The USSD session is released by the network;
* 3: Other local clients have responded;
* 4: The operation is not supported;
* 5: The network timed out.
*/
int32_t m = 0;
/** USSD string, the maximum length is 160 characters. */
std::string str = "";
};
/**
* @brief Defines the supplementary service information.
*/
struct SsNoticeInfo {
/**
* Service type:
* 0: call forwarding unconditional
* 1: call forwarding on busy
* 2: call forwarding on no reply
* 3: call forwarding not reachable (no network service, or power-off)
*/
int32_t serviceType = 0;
/**
* Request type:
* 0: deactivation
* 1: activated
* 2: status query
* 3: registration
* 4: deletion
*/
int32_t requestType = 0;
/** Service class. For details, see 3GPP TS 27.007. */
int32_t serviceClass = 0;
int32_t result = 0; /* the result of the SS request */
/** Query result. For details, see {@link RilErrType}. */
int32_t result = 0;
};
/*
* Active reporting of SRVCC status is controlled by the +CIREP command.
/**
* @brief Active reporting of SRVCC status is controlled by the +CIREP command.
*
* This command complies with the 3GPP TS 27.007 protocol.
*/
struct SrvccStatus {
/*
/**
* SRVCC status.
* 1: SRVCC starts;
* 2: SRVCC is successful;
* 3: SRVCC is cancelled;
* 4: SRVCC failed.
* 1: SRVCC starts;
* 2: SRVCC is successful;
* 3: SRVCC is cancelled;
* 4: SRVCC failed.
*/
int32_t status = 1;
};
/*
* The ringback voice event reported by the modem during dialing.
* Note: Modem private commands, not a reported field specified by the 3gpp protocol.
/**
* @brief ringback voice event reported by the modem during dialing.
*
* Modem private commands, not a reported field specified by the 3gpp
* protocol.
*/
struct RingbackVoice {
/* 0 network alerting; 1 local alerting */
/** 0 network alerting; 1 local alerting */
int32_t status = 0;
};
} // namespace Telephony

View File

@ -20,150 +20,348 @@
namespace OHOS {
namespace Telephony {
/**
* @brief Defines the data service activation result.
*/
struct SetupDataCallResultInfo {
/** Activation result ID. */
int32_t flag = 0;
int32_t reason = 0; /* Data call fail reason. success is 0 */
int32_t retryTime = 0; /* if errorCode != 0, suggested retry time */
int32_t cid = 0; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* specifies a particular PDP context definition. The parameter is local to the TE-MT interface
* and is used in other PDP context-related commands. */
int32_t active = 0; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* indicates the state of PDP context activation
* 0 - deactivated
* 1 - activated */
std::string type = ""; /* PDP_type values from 3GPP TS 27.007 V17.3.0 (2021-09)
* specifies the type of packet data protocol. The default value is manufacturer specific. */
std::string netPortName = ""; /* Network interface name */
std::string address = ""; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* <local_addr and subnet_mask>: string type;
* shows the IP address and subnet mask of the MT. The string is given as dot-separated
* numeric (0-255) parameters on the form: "a1.a2.a3.a4.m1.m2.m3.m4" for IPv4 or
* "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
* m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16" for IPv6.
* When +CGPIAF is supported, its settings can influence the format of this parameter
* returned with the execute form of +CGCONTRDP */
std::string dns = ""; /* If the MT indicates more than two IP addresses of P-CSCF servers
* string type; shows the IP address of the secondary DNS server.When +CGPIAF is supported,
* its settings can influence the format of this parameter returned with the execute form of
* +CGCONTRDP. */
std::string dnsSec = ""; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* string type; shows the IP address of the secondary DNS server.When +CGPIAF is supported,
* its settings can influence the format of this parameter returned with the execute form
* of +CGCONTRDP. */
std::string gateway = ""; /* network gateway address */
int32_t maxTransferUnit = 0; /* Maximum Transfer Unit. The range of permitted values (minimum value = 1
* or if the initial PDP context is supported minimum value = 0)
* is returned by the test form of the command. */
std::string pCscfPrimAddr = ""; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* string type; shows the IP address of the primary P-CSCF server.When +CGPIAF is
* supported, its settings can influence the format of this parameter returned with
* the execute form of +CGCONTRDP. */
std::string pCscfSecAddr = ""; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* string type; shows the IP address of the secondary P-CSCF server. When +CGPIAF is
* supported, its settings can influence the format of this parameter returned with
* the execute form of +CGCONTRDP. */
int32_t pduSessionId = 0; /* from 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* integer type; identifies the PDU session, see 3GPP TS 24.501 [161]. */
/** Data call fail reason, success is 0. */
int32_t reason = 0;
/** If errorCode != 0, suggested retry time. */
int32_t retryTime = 0;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09), specifies a particular PDP
* context definition. The parameter is local to the TE-MT interface and is
* used in other PDP context-related commands.
*/
int32_t cid = 0;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09), indicates the state of PDP
* context activation.
* 0: deactivated
* 1: activated
*/
int32_t active = 0;
/**
* PDP_type values from 3GPP TS 27.007 V17.3.0 (2021-09)
* Specifies the type of packet data protocol. The default value is
* manufacturer specific.
*/
std::string type = "";
/** Network interface name. */
std::string netPortName = "";
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* <local_addr and subnet_mask>: string type;
* shows the IP address and subnet mask of the MT. The string is given as
* dot-separated numeric (0-255) parameters on the form:
* 1. "a1.a2.a3.a4.m1.m2.m3.m4" for IPv4 or
* 2. "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
* m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16" for IPv6.
* When +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP
*/
std::string address = "";
/**
* If the MT indicates more than two IP addresses of P-CSCF servers string
* type; shows the IP address of the secondary DNS server.When +CGPIAF is
* supported, its settings can influence the format of this parameter
* returned with the execute form of +CGCONTRDP.
*/
std::string dns = "";
/**
* From 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* string type; shows the IP address of the secondary DNS server.When
* +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP.
*/
std::string dnsSec = "";
/** Network gateway address. */
std::string gateway = "";
/**
* Maximum Transfer Unit. The range of permitted values (minimum value = 1
* or if the initial PDP context is supported minimum value = 0) is
* returned by the test form of the command.
*/
int32_t maxTransferUnit = 0;
/**
* From 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* string type; shows the IP address of the primary P-CSCF server.When
* +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP.
*/
std::string pCscfPrimAddr = "";
/**
* From 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* string type; shows the IP address of the secondary P-CSCF server. When
* +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP.
*/
std::string pCscfSecAddr = "";
/**
* From 3GPP TS 27.007 10.1.23 V4.3.0 (2001-12)
* integer type; identifies the PDU session, see 3GPP TS 24.501 [161].
*/
int32_t pduSessionId = 0;
};
/**
* @brief Defines the list of data service activation results.
*/
struct DataCallResultList {
size_t size = 0; /* Size of DataCall List */
std::vector<SetupDataCallResultInfo> dcList {}; /* DataCall List */
/** Size of DataCall List */
size_t size = 0;
/** DataCall List. */
std::vector<SetupDataCallResultInfo> dcList {};
};
/* from 3GPP TS 27.007 10.1 V4.3.0 (2001-12) */
/**
* @brief Defines PDP context information in 3GPP TS 27.007 10.1 V4.3.0
* (2001-12)
*/
struct DataProfileDataInfo {
/** Request serial number. */
int32_t serial = 0;
int32_t profileId = 0; /* Id of data profiles */
std::string apn = ""; /* (Access Point Name) a string parameter
* which is a logical name that is used to select the GGSN or the */
std::string protocol = ""; /* (Packet Data Protocol type) a string parameter which
* specifies the type of packet data protocol */
/** Id of data profiles. */
int32_t profileId = 0;
/** Access Point Name. */
std::string apn = "";
/**
* (Packet Data Protocol type) a string parameter which specifies the type
* of packet data protocol.
*/
std::string protocol = "";
/** Roaming protocol version. */
std::string roamingProtocol = "";
int32_t verType = 0; /* APN verification type */
/** APN verification type. */
int32_t verType = 0;
/** Indicates the username of pdp profile. */
std::string userName = "";
/** Indicates the password of pdp profile. */
std::string password = "";
};
/**
* @brief Defines the PDP context list.
*/
struct DataProfilesInfo {
/** Request serial number. */
int32_t serial = 0;
/** Number of PDP contexts. */
int32_t profilesSize = 0;
/** PDP context list. */
std::vector<DataProfileDataInfo> profiles {};
/** Roaming or not. */
bool isRoaming = false;
};
/**
* @brief Defines the data service information.
*/
struct DataCallInfo {
/** Request serial number. */
int32_t serial = 0;
int32_t radioTechnology = 0; /* Voice radio technology */
/** Voice radio technology. */
int32_t radioTechnology = 0;
/** PDP context information. */
DataProfileDataInfo dataProfileInfo;
bool modemCognitive = false; /* 1: APN setting setDataProfile. 0: no */
/**
* Whether the PDP context is set for the modem. The value true indicates
* that PDP context is set for the modem, and the value false indicates the
* opposite.
*/
bool modemCognitive = false;
/**
* Whether roaming is allowed. The value true indicates that roaming is
* allowed, and the value false indicates the opposite.
*/
bool roamingAllowed = false;
/**
* Whether the user is roaming. The value true indicates that the user is
* roaming, and the value false indicates the opposite.
*/
bool isRoaming = false;
};
/**
* @brief Defines the network bandwidth information.
*/
struct DataLinkBandwidthInfo {
/** Request serial number. */
int32_t serial = 0;
int32_t cid = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; specifies a particular QoS flow definition, Traffic Flows
* definition and a PDP Context definition (see the +CGDCONT and +CGDSCONT commands). */
int32_t qi = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* 0 5QI is selected by network
* [1 - 4] value range for guaranteed bit rate QoS flows
* 65, 66, 67 values for guaranteed bit rate QoS flows
* [71 - 76] value range for guaranteed bit rate QoS flows
* [5 - 9] value range for non-guaranteed bit rate QoS flows
* 69, 70, 79, 80 values for non-guaranteed bit rate QoS flows
* [82 - 85] value range for delay critical guaranteed bit rate QoS flows
* [128 - 254] value range for Operator-specific 5QIs */
int32_t dlGfbr = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]) */
int32_t ulGfbr = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
int32_t dlMfbr = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
int32_t ulMfbr = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
int32_t ulSambr = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the UL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit /s. */
int32_t dlSambr = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the DL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/ s. */
int32_t averagingWindow = 0; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the averaging window(see 3GPP TS 24.501 [161]) .The value is
* in milliseconds. */
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; specifies a particular QoS flow definition, Traffic Flows
* definition and a PDP Context definition (see the +CGDCONT and +CGDSCONT
* commands).
*/
int32_t cid = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* 0, 5QI is selected by network
* [1 - 4]: value range for guaranteed bit rate QoS flows
* 65, 66, 67: values for guaranteed bit rate QoS flows
* [71 - 76]: value range for guaranteed bit rate QoS flows
* [5 - 9]: value range for non-guaranteed bit rate QoS flows
* 69, 70, 79, 80: values for non-guaranteed bit rate QoS flows
* [82 - 85]: value range for delay critical guaranteed bit rate QoS flows
* [128 - 254]: value range for Operator-specific 5QIs
*/
int32_t qi = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL GFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t dlGfbr = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL GFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t ulGfbr = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL MFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t dlMfbr = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL MFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t ulMfbr = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the UL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/s.
*/
int32_t ulSambr = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the DL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/s.
*/
int32_t dlSambr = 0;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the averaging window(see 3GPP TS 24.501 [161]).
* The value is in milliseconds.
*/
int32_t averagingWindow = 0;
};
/**
* @brief Defines the network bandwidth reporting rule.
*/
struct DataLinkBandwidthReportingRule {
/** Request serial number. */
int32_t serial = 0;
/** Radio access technology. */
int32_t rat = 0;
/** Delay time. */
int32_t delayMs = 0;
/** Uplink delay. */
int32_t delayUplinkKbps = 0;
/** Downlink delay. */
int32_t delayDownlinkKbps = 0;
/** Maximum number of uplink parameters. */
int32_t maximumUplinkKbpsSize = 0;
/** Maximum number of downlink parameters. */
int32_t maximumDownlinkKbpsSize = 0;
/** Maximum uplink parameter list. */
std::vector<int32_t> maximumUplinkKbps {};
/** Maximum downlink parameter list. */
std::vector<int32_t> maximumDownlinkKbps {};
};
/**
* @brief Defines the data service performance mode.
*/
struct DataPerformanceInfo {
int32_t performanceEnable = 0; /* Data Performance Enable. eg: 1-enable, 0-disable */
int32_t enforce = 0; /* Whether Enforce Data Performance. eg: 1-enable, 0-disable */
/** Data Performance Enable. eg: 1-enable, 0-disable */
int32_t performanceEnable = 0;
/** Whether Enforce Data Performance. eg: 1-enable, 0-disable */
int32_t enforce = 0;
};
/**
* @brief Defines the sleep mode for data services.
*/
struct DataSleepInfo {
int32_t sleepEnable = 0; /* Sleep Mode Enable. eg: 1-enable, 0-disable */
/** Sleep Mode Enable. eg: 1-enable, 0-disable */
int32_t sleepEnable = 0;
};
/**
* @brief Defines the data link capability.
*/
struct DataLinkCapability {
int32_t primaryDownlinkKbps; /* Primary downlink capability in kbps */
int32_t primaryUplinkKbps; /* Primary uplink capability in kbps */
int32_t secondaryDownlinkKbps; /* Secondary downlink capability in kbps */
int32_t secondaryUplinkKbps; /* Secondary uplink capability in kbps */
/** Primary downlink capability in kbps. */
int32_t primaryDownlinkKbps;
/** Primary uplink capability in kbps. */
int32_t primaryUplinkKbps;
/** Secondary downlink capability in kbps. */
int32_t secondaryDownlinkKbps;
/** Secondary uplink capability in kbps. */
int32_t secondaryUplinkKbps;
};
} // namespace Telephony
} // namespace OHOS

View File

@ -20,25 +20,61 @@
namespace OHOS {
namespace Telephony {
/**
* @brief Defines the common information.
*/
struct UniInfo {
/** Request serial number. */
int32_t serial = 0;
int32_t gsmIndex = 0; /* Index of Global System for Mobile Communications */
/** Index of Global System for Mobile Communications. */
int32_t gsmIndex = 0;
/** Common information ID. */
bool flag = false;
/** Parameter 1. */
int32_t arg1 = 0;
/** Parameter 2. */
int32_t arg2 = 0;
/** Temporary string. */
std::string strTmp = "";
};
/**
* @brief Defines the radio access technology of the CS domain.
*/
struct VoiceRadioTechnology {
/** System service status. */
HRilSrvStatus srvStatus = HRilSrvStatus::HRIL_NO_SRV_SERVICE;
/** System service domain. */
HRilSrvDomain srvDomain = HRilSrvDomain::HRIL_NO_DOMAIN_SERVICE;
/** Roaming status. */
HRilRoamStatus roamStatus = HRilRoamStatus::HRIL_ROAM_UNKNOWN;
/** Sim card status. */
HRilSimStatus simStatus = HRilSimStatus::HRIL_USIM_INVALID;
/** Sim card lock status. */
HRilSimLockStatus lockStatus = HRilSimLockStatus::HRIL_SIM_CARD_UNLOCK;
/** System mode. */
HRilSysMode sysMode = HRilSysMode::HRIL_NO_SYSMODE_SERVICE;
/** String corresponding to the system mode. */
std::string sysModeName = "";
/** Radio access technology type. For details, see {@link RilRadioTech}. */
HRilRadioTech actType = HRilRadioTech::RADIO_TECHNOLOGY_UNKNOWN;
/** String corresponding to the radio access technology type. */
std::string actName = "";
/** Radio access technology ID. */
int64_t flag = 0;
VoiceRadioTechnology() = default;

View File

@ -20,147 +20,366 @@
namespace OHOS {
namespace Telephony {
/**
* @brief Defines the carrier information.
*/
struct OperatorInfoResult {
/** Long carrier name of the registered network. */
std::string longName = "";
/** Short carrier name of the registered network. */
std::string shortName = "";
/** MCC+MNC of the registered network. */
std::string numeric = "";
};
/**
* @brief Defines the available network information.
*/
struct AvailableNetworkInfo {
/** Long name of the registered network in alphanumeric format. */
std::string longName = "";
/** Short name of the registered network in alphanumeric format. */
std::string shortName = "";
/** Available network ID(MCC+MNC). */
std::string numeric = "";
/** Network status. For details, see {@link RilRegStatus}. */
int32_t status = 0;
/** Radio access technology type. For details, see {@link RilRadioTech}. */
int32_t rat = 0;
};
/**
* @brief Defines the available network list.
*/
struct AvailableNetworkList {
/** The size of available network list. */
int32_t itemNum = 0;
/** Available network list. */
std::vector<AvailableNetworkInfo> availableNetworkInfo {};
/** Network list flag */
int64_t flag = 0;
};
/**
* @brief Defines the network mode information.
*/
struct SetNetworkModeInfo {
/** Network mode. For details, see {@link PreferredNetworkTypeInfo}. */
int32_t selectMode = 0;
std::string oper = ""; /* Operator information */
/** Operator information */
std::string oper = "";
/** flag, Used by search network manager in response. */
int64_t flag = 0;
};
/* Voice registration status results */
/**
* @brief Voice registration status results
*/
struct CsRegStatusInfo {
int32_t notifyType = 0; /* The notifyType,Indicate the content of the notification */
/** The notifyType,Indicate the content of the notification. */
int32_t notifyType = 0;
/**
* The corresponding valid registration states are
* NOT_REG_MT_NOT_SEARCHING_OP, "REG_MT_HOME, NOT_REG_MT_SEARCHING_OP,
* REG_DENIED, UNKNOWN, REG_ROAMING".
*/
HRilRegStatus regStatus =
HRilRegStatus::NO_REG_MT_NO_SEARCH; /* The corresponding valid registration states are
* NOT_REG_MT_NOT_SEARCHING_OP, "REG_MT_HOME, NOT_REG_MT_SEARCHING_OP,
* REG_DENIED, UNKNOWN, REG_ROAMING". */
HRilRegStatus::NO_REG_MT_NO_SEARCH;
/** Location area code. */
int32_t lacCode = 0;
/** Cell ID. */
int32_t cellId = 0;
/** Available voice radio technology, RMS defined by radio technology. */
HRilRadioTech radioTechnology =
HRilRadioTech::RADIO_TECHNOLOGY_UNKNOWN; /* Available voice radio technology, RMS defined by radio technology */
int64_t flag = 0; /* flag, Used by search network manager in response */
HRilRadioTech::RADIO_TECHNOLOGY_UNKNOWN;
/** flag, Used by search network manager in response. */
int64_t flag = 0;
};
/**
* @brief Defines the registration status information of the PS domain.
*/
struct PsRegStatusResultInfo {
int32_t notifyType = 0; /* The notifyType,Indicate the content of the notification */
HRilRegStatus regStatus = HRilRegStatus::NO_REG_MT_NO_SEARCH; /* valid when are is ITE UNKNOWN REG = REG, otherwise
it defined in RegStatus */
/** The notifyType,Indicate the content of the notification. */
int32_t notifyType = 0;
/**
* Valid when are is ITE UNKNOWN REG = REG, otherwise it defined in
* RegStatus.
*/
HRilRegStatus regStatus = HRilRegStatus::NO_REG_MT_NO_SEARCH;
/** Location area code. */
int32_t lacCode = 0;
/** Cell ID. */
int32_t cellId = 0;
/** Radio access technology type. For details, see {@link RilRadioTech}. */
HRilRadioTech radioTechnology = HRilRadioTech::RADIO_TECHNOLOGY_UNKNOWN;
/** Whether the NR mode is available.*/
bool isNrAvailable = false;
/** Whether ENDC is available. */
bool isEnDcAvailable = false;
/** Whether DCNR is restricted. */
bool isDcNrRestricted = false;
int64_t flag = 0; /* flag, Used by search network manager in response */
/** flag, Used by search network manager in response. */
int64_t flag = 0;
};
/**
* @brief Defines the physical channel configuration.
*/
struct PhysicalChannelConfig {
/** Connection status. */
HRilCellConnectionStatus cellConnStatus = HRilCellConnectionStatus::HRIL_SERVING_CELL_UNKNOWN;
/** Radio access technology type. For details, see {@link RilRadioTech}. */
HRilRadioTech ratType = HRilRadioTech::RADIO_TECHNOLOGY_UNKNOWN;
/** Downlink bandwidth in kHz. */
int32_t cellBandwidthDownlinkKhz = 0;
/** Uplink bandwidth in kHz. */
int32_t cellBandwidthUplinkKhz = 0;
/** Frequency range. */
int32_t freqRange = 0;
/** Downlink channel ID. */
int32_t downlinkChannelNum = 0;
/** Uplink channel ID. */
int32_t uplinkChannelNum = 0;
/** Physical cell ID. */
int32_t physicalCellId = 0;
/** Logical device ID. */
int32_t contextIdNum = 0;
/**
* A list of data calls mapped to this physical channel. An empty list
* means the physical channel has no data call mapped to it.
*/
std::vector<int32_t> contextIds {};
};
/**
* @brief Defines the channel configuration information list.
*/
struct ChannelConfigInfoList {
/** The size of ChannelConfigInfoList. */
int32_t itemNum = 0;
/** Physical channel configuration list. */
std::vector<PhysicalChannelConfig> channelConfigInfos {};
int64_t flag = 0; /* flag, Used by search network manager in response */
/** flag, Used by search network manager in response */
int64_t flag = 0;
};
/**
* @brief Defines the GSM cellular information.
*/
typedef struct {
int32_t band; /* value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t bsic; /* cell sit code 0~63 */
/** value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */
int32_t band;
/** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t arfcn;
/** cell sit code 0~63 */
int32_t bsic;
/** Cell ID. */
int32_t cellId;
int32_t lac; /* Location area code 0~FFFF */
int32_t rxlev; /* <RXLEV> dbm -120~37 */
int32_t rxQuality; /* 0~7 */
int32_t ta; /* 0~63 */
/** Location area code, which ranges from 0 to 0xFFFF. */
int32_t lac;
/** Signal received strength, which ranges from -120 to 37. */
int32_t rxlev;
/** Signal received quality, which ranges from 0 to 7. */
int32_t rxQuality;
/** Timing advance, which ranges from 0 to 63. */
int32_t ta;
} CellRatGsm;
/**
* @brief Defines the LTE cellular information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
/** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t arfcn;
/** Cell ID. */
int32_t cellId;
/** Physical cell ID. */
int32_t pci;
int32_t tac; /* Tracking Area Code 0~FFFF */
int32_t rsrp; /* Reference Signal Received Power -140~-44, dBm */
int32_t rsrq; /* Reference Signal Received Quality -19.5~-3 */
int32_t rssi; /* Receiving signal strength in dbm 90~-25 */
/** Tracking Area Code 0~FFFF */
int32_t tac;
/** Reference Signal Received Power -140~-44, dBm */
int32_t rsrp;
/** Reference Signal Received Quality -19.5~-3 */
int32_t rsrq;
/** Receiving signal strength in dbm 90~-25 */
int32_t rssi;
} CellRatLte;
/**
* @brief Defines the WCDMA cellular information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t psc; /* Primary Scrambling Code. 0~511 */
/** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t arfcn;
/** Primary Scrambling Code. 0~511 */
int32_t psc;
/** Cell ID. */
int32_t cellId;
int32_t lac; /* Tracking Area Code 0~FFFF */
int32_t rscp; /* Reference Signal Received Power -140~-44, dBm */
int32_t rxlev; /* Reference Signal Received Quality -19.5~-3 */
int32_t ecno; /* Receiving signal strength in dbm 90~-25 */
int32_t drx; /* Discontinuous reception cycle length. 6~9 */
int32_t ura; /* UTRAN Registration Area Identity. 0~65535 */
/** Tracking Area Code 0~FFFF. */
int32_t lac;
/** Reference Signal Received Power -140~-44, dBm */
int32_t rscp;
/** Reference Signal Received Quality -19.5~-3 */
int32_t rxlev;
/** Receiving signal strength in dbm 90~-25 */
int32_t ecno;
/** Discontinuous reception cycle length. 6~9 */
int32_t drx;
/** UTRAN Registration Area Identity. 0~65535 */
int32_t ura;
} CellRatWcdma;
/**
* @brief Defines the CDMA cellular information.
*/
typedef struct {
int32_t systemId; /* integer type and range is 0-65535 */
int32_t networkId; /* integer type and range is 0-65535 */
int32_t baseId; /* integer type and range is 0-65535 */
int32_t zoneId; /* integer type and range is 0-65535 */
int32_t pilotPn; /* integer type and range is 0-65535 */
int32_t pilotStrength; /* integer type and range is 0-65535 */
int32_t channel; /* integer type and range is 0-65535 */
int32_t longitude; /* integer type and range is -648000 -- 648000, unit: second */
int32_t latitude; /* integer type and range is -648000 -- 648000, unit: second */
/** integer type and range is 0-65535 */
int32_t systemId;
/** integer type and range is 0-65535 */
int32_t networkId;
/** integer type and range is 0-65535 */
int32_t baseId;
/** integer type and range is 0-65535 */
int32_t zoneId;
/** integer type and range is 0-65535 */
int32_t pilotPn;
/** integer type and range is 0-65535 */
int32_t pilotStrength;
/** integer type and range is 0-65535 */
int32_t channel;
/** integer type and range is -648000 -- 648000, unit: second */
int32_t longitude;
/** integer type and range is -648000 -- 648000, unit: second */
int32_t latitude;
} CellRatCdma;
/**
* @brief Defines the TD-SCDMA cellular information.
*/
typedef struct {
/** Absolute RF channel number of the BCCH carrier. */
int32_t arfcn;
/** Synchronization flag. */
int32_t syncId;
/** Super cell. */
int32_t sc;
/** Cell ID. */
int32_t cellId;
/** Location area code. */
int32_t lac;
/** Received signal code power. */
int32_t rscp;
/** Discontinuous reception cycle. */
int32_t drx;
/** Routing area code. */
int32_t rac;
/** Super cell ID. */
int32_t cpid;
} CellRatTdscdma;
/**
* @brief Defines the NR cellular information.
*/
typedef struct {
/** Absolute RF channel number of the BCCH carrier. */
int32_t nrArfcn;
/** Physical cell ID. */
int32_t pci;
/** Tracking Area Code, which ranges from 0 to FFFF. */
int32_t tac;
/** NR cell ID. */
int64_t nci;
} CellRatNr;
/**
* @brief Defines the current cell information.
*/
struct CurrentCellInfo {
/** Radio access technology type. */
int32_t ratType = 0;
/** Mobile country code (MCC). */
int32_t mcc = 0;
/** Mobile network code (MNC). */
int32_t mnc = 0;
/** Cell information parameters. */
union {
CellRatGsm gsm;
CellRatLte lte;
@ -171,69 +390,178 @@ struct CurrentCellInfo {
} ServiceCellParas;
};
/**
* @brief Defines the current cell information list.
*/
struct CellListCurrentInfo {
/** The size of current cell information list. */
int32_t itemNum = 0;
/** Current cell information. */
std::vector<CurrentCellInfo> cellCurrentInfo {};
};
/**
* @brief Defines the GSM cell information.
*/
typedef struct {
int32_t band; /* value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~1023 */
int32_t bsic; /* cell sit code 0~63 */
/** value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */
int32_t band;
/** Absolute Radio Frequency Channel Number of the BCCHcarrier 0~1023 */
int32_t arfcn;
/** cell sit code 0~63 */
int32_t bsic;
/** Cell information ID */
int32_t cellId;
int32_t lac; /* Location area code 0~FFFF */
int32_t rxlev; /* <RXLEV> dbm -120~37 */
/** Location area code 0~FFFF */
int32_t lac;
/** <RXLEV> dbm -120~37 */
int32_t rxlev;
} CellListRatGsm;
/**
* @brief Defines the LTE cell information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio FreListquency Channel Number of the BCCHcarrier 0~1023 */
/** Absolute Radio FreListquency Channel Number of the BCCHcarrier 0~1023
*/
int32_t arfcn;
/** Physical cell ID. */
int32_t pci;
int32_t rsrp; /* Reference Signal Received Power -140~-44, dBm */
int32_t rsrq; /* Reference Signal Received Quality -19.5~-3 */
int32_t rxlev; /* <RXLEV> dbm -120~37 */
/** Reference Signal Received Power -140~-44, dBm */
int32_t rsrp;
/** Reference Signal Received Quality -19.5~-3 */
int32_t rsrq;
/** <RXLEV> dbm -120~37 */
int32_t rxlev;
} CellListRatLte;
/**
* @brief Defines the WCDMA cell information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~16383 */
int32_t psc; /* Primary Scrambling Code. 0~511 */
int32_t rscp; /* Received Signal Code Power in dBm -120~25, dBm */
int32_t ecno; /* The ratio of power per modulation bit to noise spectral density. -25~0 */
/** Absolute Radio Frequency Channel Number of the BCCHcarrier 0~16383 */
int32_t arfcn;
/** Primary Scrambling Code. 0~511 */
int32_t psc;
/** Received Signal Code Power in dBm -120~25, dBm */
int32_t rscp;
/** The ratio of power per modulation bit to noise spectral density. -25~0
*/
int32_t ecno;
} CellListRatWcdma;
/**
* @brief Defines the CDMA cell information.
*/
typedef struct {
int32_t systemId; /* integer type and range is 0-65535 */
int32_t networkId; /* integer type and range is 0-65535 */
int32_t baseId; /* integer type and range is 0-65535 */
int32_t zoneId; /* integer type and range is 0-65535 */
int32_t pilotPn; /* integer type and range is 0-65535 */
int32_t pilotStrength; /* integer type and range is 0-65535 */
int32_t channel; /* integer type and range is 0-65535 */
int32_t longitude; /* integer type and range is -648000 -- 648000, unit: second */
int32_t latitude; /* integer type and range is -648000 -- 648000, unit: second */
/** integer type and range is 0-65535 */
int32_t systemId;
/** integer type and range is 0-65535 */
int32_t networkId;
/** integer type and range is 0-65535 */
int32_t baseId;
/** integer type and range is 0-65535 */
int32_t zoneId;
/** integer type and range is 0-65535 */
int32_t pilotPn;
/** integer type and range is 0-65535 */
int32_t pilotStrength;
/** integer type and range is 0-65535 */
int32_t channel;
/** integer type and range is -648000 -- 648000, unit: second */
int32_t longitude;
/** integer type and range is -648000 -- 648000, unit: second */
int32_t latitude;
} CellListRatCdma;
/**
* @brief Defines the TD-SCDMA cell information.
*/
typedef struct {
/** Absolute RF channel number of the BCCH carrier. */
int32_t arfcn;
/** Synchronization flag. */
int32_t syncId;
/** Super cell. */
int32_t sc;
/** Cell ID. */
int32_t cellId;
/** Location area code, which ranges from 0 to 0xFFFF. */
int32_t lac;
/** Received signal code power. */
int32_t rscp;
/** Discontinuous reception cycle. */
int32_t drx;
/** Routing area code. */
int32_t rac;
int32_t cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
/** 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if
* unknown */
int32_t cpid;
} CellListRatTdscdma;
/**
* @brief Defines the NR cell information.
*/
typedef struct {
/** Absolute RF channel number of the BCCH carrier. */
int32_t nrArfcn;
/** Physical cell ID. */
int32_t pci;
/** Tracking Area Code, which ranges from 0 to FFFF. */
int32_t tac;
/** NR cell ID. */
int64_t nci;
} CellListRatNr;
/**
* @brief Defines the neighboring cell information.
*/
struct CellNearbyInfo {
/**
* Access technology type:
* 0: unknown
* 1: GSM
* 2: CDMA
* 3: WCDMA
* 4: TD-SCDMA
* 5: LTE
* 6: NR
*/
int32_t ratType = 0;
/** Cell information for different network modes. */
union {
CellListRatGsm gsm;
CellListRatLte lte;
@ -244,39 +572,116 @@ struct CellNearbyInfo {
} ServiceCellParas;
};
/**
* @brief Defines the neighboring cell list.
*/
struct CellListNearbyInfo {
/** The size of nearby info of cell list. */
int32_t itemNum = 0;
/** Neighboring cell list. */
std::vector<CellNearbyInfo> cellNearbyInfo {};
};
/**
* @brief Defines the preferred network type.
*/
struct PreferredNetworkTypeInfo {
/**
* Network type
* 0: automatic
* 1: GSM
* 2: WCDMA.
* 3: LTE.
* 4: LTE and WCDMA
* 5: LTE, WCDMA, and GSM
* 6: WCDMA and GSM
* 7: CDMA
* 8: EV-DO
* 9: EV-DO and CDMA
* 10: WCDMA, GSM, EV-DO, and CDMA
* 11: LTE, EV-DO, and CDMA
* 12: LTE, WCDMA, GSM, EV-DO, and CDMA
* 13: TD-SCDMA
* 14: TD-SCDMA and GSM
* 15: TD-SCDMA and WCDMA
* 16: TD-SCDMA, WCDMA, and GSM
* 17: LTE and TD-SCDMA
* 18: LTE, TDSCDMA, and GSM
* 19: LTE, TD-SCDMA, and WCDMA
* 20: LTE, TDSCDMA, WCDMA, and GSM
* 21: TD-SCDMA, WCDMA, GSM, EV-DO, and CDMA
* 22: LTE, TD-SCDMA, WCDMA, GSM, EV-DO, and CDMA
* 31: NR
* 32: NR and LTE
* 33: NR, LTE, and WCDMA
* 34: NR, LTE, WCDMA, and GSM
* 35: NR, LTE, EV-DO, and CDMA
* 36: NR, LTE, WCDMA, GSM, EV-DO, and CDMA
* 37: NR, LTE, and TD-SCDMA.
* 38: NR, LTE, TDSCDMA, and GSM
* 39: NR, LTE, TD-SCDMA, and WCDMA
* 40: NR, LTE, TD-SCDMA, WCDMA, and GSM
* 41: NR, LTE, TD-SCDMA, WCDMA, GSM, EV-DO, and CDMA
*/
int32_t preferredNetworkType = 0;
/** Network ID */
int64_t flag = 0;
};
struct SsbIdInfo {
int32_t ssbId = 0;
int32_t rsrp = 0;
/** SSB index. */
int32_t ssbId;
/** Reference Signal Received Power -140~-44, dBm */
int32_t rsrp;
};
struct NeighboringCellSsbInfo {
int32_t pci = 0;
int32_t arfcn = 0;
int32_t rsrp = 0;
int32_t sinr = 0;
std::vector<SsbIdInfo> ssbIdList {}; /* Neighboring cell ssbId list, always size is 4 */
/** Physical cell ID. */
int32_t pci;
/** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t arfcn;
/** Reference Signal Received Power -140~-44, dBm */
int32_t rsrp;
/** Signal To Interference Plus Noise Ratio. */
int32_t sinr;
/** Neighboring cell ssbId list, always size is 4 */
std::vector<SsbIdInfo> ssbIdList;
};
struct NrCellSsbIds {
int32_t arfcn = 0;
int64_t cid = 0;
int32_t pic = 0;
int32_t rsrp = 0;
int32_t sinr = 0;
int32_t timeAdvance = 0;
std::vector<SsbIdInfo> sCellSsbList {}; /* Service cell ssbId list, always size is 8 */
int32_t nbCellCount = 0; /* Neighboring cell ssb list count, mas size is 4 */
std::vector<NeighboringCellSsbInfo> nbCellSsbList {}; /* Neighboring cell ssb info list, mas size is 4 */
/** Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t arfcn;
/** cid */
int64_t cid;
/** pic */
int32_t pic;
/** Reference Signal Received Power -140~-44, dBm */
int32_t rsrp;
/** Signal To Interference Plus Noise Ratio. */
int32_t sinr;
/** Time advance. */
int32_t timeAdvance;
/** Service cell ssbId list, always size is 8 */
std::vector<SsbIdInfo> sCellSsbList;
/** Neighboring cell ssb list count, mas size is 4 */
int32_t nbCellCount;
/** Neighboring cell ssb info list, mas size is 4 */
std::vector<NeighboringCellSsbInfo> nbCellSsbList;
};
} // namespace Telephony
} // namespace OHOS

View File

@ -18,50 +18,131 @@
typedef enum {
HNOTI_CALL_BASE = 1000,
/** Called when call state is updated. */
HNOTI_CALL_STATE_UPDATED,
/** Called when a new USSD message is received. */
HNOTI_CALL_USSD_REPORT,
/**
* Called when nework doesn't have in-band information, need to play
* out-band tone.
*/
HNOTI_CALL_RINGBACK_VOICE_REPORT,
/**
* Called when Single Radio Voice Call Continuity(SRVCC) progress state has
* changed.
*/
HNOTI_CALL_SRVCC_STATUS_REPORT,
/** Called when emergency number list is updated. */
HNOTI_CALL_EMERGENCY_NUMBER_REPORT,
/**
* Called when SS response is received when DIAL/USSD/SS is changed to SS
* by call control.
*/
HNOTI_CALL_SS_REPORT,
/** Called when RSRVCC status is updated. */
HNOTI_CALL_RSRVCC_STATUS_REPORT,
HNOTI_SMS_BASE = 1100,
/** Called when new SMS is received. */
HNOTI_SMS_NEW_SMS,
/** Called when new CDMA SMS is received. */
HNOTI_SMS_NEW_CDMA_SMS,
/** Called when SMS status is received. */
HNOTI_SMS_STATUS_REPORT,
/** Called when SMS has been stored on SIM card. */
HNOTI_SMS_NEW_SMS_STORED_ON_SIM,
/** Called when new cell broadcast is received. */
HNOTI_CB_CONFIG_REPORT,
HNOTI_SIM_BASE = 1200,
/** Called when sim status is changed. */
HNOTI_SIM_STATUS_CHANGED,
/** Called when STK session is terminated by SIM. */
HNOTI_SIM_STK_SESSION_END_NOTIFY,
/** Called when SIM issue a STK proactive command to applications. */
HNOTI_SIM_STK_PROACTIVE_NOTIFY,
/** Called when there is an ALPHA from UICC during Call Control. */
HNOTI_SIM_STK_ALPHA_NOTIFY,
/** Called when SIM notifies applcations some event happens. */
HNOTI_SIM_STK_EVENT_NOTIFY,
/** Called when SIM wants application to setup a voice call. */
HNOTI_SIM_STK_CALL_SETUP_NOTIFY,
/**
* Called when that file(s) in the SIM have been updated, or the SIM has
* been reinitialized.
*/
HNOTI_SIM_REFRESH_NOTIFY,
/** Called when radio protocol is updated. */
HNOTI_SIM_RADIO_PROTOCOL_UPDATED,
HNOTI_DATA_BASE = 1300,
/** Called when pdp context list is updated. */
HNOTI_DATA_PDP_CONTEXT_LIST_UPDATED,
/** Reporting the data link capability.*/
HNOTI_DATA_LINK_CAPABILITY_UPDATED,
HNOTI_NETWORK_BASE = 1400,
/** Called when CS registered status is updated. */
HNOTI_NETWORK_CS_REG_STATUS_UPDATED,
/** Called when signal strength is updated. */
HNOTI_NETWORK_SIGNAL_STRENGTH_UPDATED,
/** Called when radio has received a time message. */
HNOTI_NETWORK_TIME_UPDATED,
/** Called when time zone is updated. */
HNOTI_NETWORK_TIME_ZONE_UPDATED,
/** Called when IMS registration state is updated. */
HNOTI_NETWORK_IMS_REG_STATUS_UPDATED,
/** Called when PS registration state is updated. */
HNOTI_NETWORK_PS_REG_STATUS_UPDATED,
/** Called when update physical channel configuration. */
HNOTI_NETWORK_PHY_CHNL_CFG_UPDATED,
/** Called when current cell is updated. */
HNOTI_NETWORK_CURRENT_CELL_UPDATED,
/** Called when update rrc connection state.*/
HNOTI_NETWORK_RRC_CONNECTION_STATE_UPDATED,
HNOTI_COMMON_BASE = 1500,
/** Called when radio state is updated. */
HNOTI_MODEM_RADIO_STATE_UPDATED,
/** Called when voice technology is updated. */
HNOTI_MODEM_VOICE_TECH_UPDATED,
/** Called when DSDS mode is updated.*/
HNOTI_MODEM_DSDS_MODE_UPDATED,
HNOTI_COMMON_END = 1599,
} HRilNotification;
#endif // OHOS_RIL_NOTIFICATION_H

View File

@ -19,133 +19,393 @@
#define HRIL_RESPONSE_ACKNOWLEDGEMENT 800
typedef enum {
HREQ_CALL_BASE = 0,
/** Get call list. */
HREQ_CALL_GET_CALL_LIST,
/** Initiate voice call. */
HREQ_CALL_DIAL,
/** Hang up a call. */
HREQ_CALL_HANGUP,
/** Reject a specific call. */
HREQ_CALL_REJECT,
/** Answer incoming call. */
HREQ_CALL_ANSWER,
HREQ_CALL_HOLD_CALL, // call hold value 6
HREQ_CALL_UNHOLD_CALL, // call active value 6
/** call hold value 6 */
HREQ_CALL_HOLD_CALL,
/** call active value 7 */
HREQ_CALL_UNHOLD_CALL,
/** Switch waiting or holding call and active call. */
HREQ_CALL_SWITCH_CALL,
/** Combine holding and active call. */
HREQ_CALL_COMBINE_CONFERENCE,
HREQ_CALL_SEPARATE_CONFERENCE, // Keep all other calls except the xth call
/** Keep all other calls except the xth call */
HREQ_CALL_SEPARATE_CONFERENCE,
/** Holds and resumes a call. */
HREQ_CALL_CALL_SUPPLEMENT,
/** Send a DTMF tone. */
HREQ_CALL_SEND_DTMF,
/** Start playing a DTMF tone. */
HREQ_CALL_START_DTMF,
/** Stop playing a currently playing DTMF tone. */
HREQ_CALL_STOP_DTMF,
/**
* Called when set Calling line Identification Presentation Supplementary
* Service(CLIP).
*/
HREQ_CALL_SET_CLIP,
/**
* Called when get Calling line Identification Presentation Supplementary
* Service(CLIP).
*/
HREQ_CALL_GET_CLIP,
/** Called when get call waiting. */
HREQ_CALL_GET_CALL_WAITING,
/** Called when set call waiting. */
HREQ_CALL_SET_CALL_WAITING,
/** Called when get call restriction. */
HREQ_CALL_GET_CALL_RESTRICTION,
/** Called when set call restriction. */
HREQ_CALL_SET_CALL_RESTRICTION,
/** Called when get call transfer info. */
HREQ_CALL_GET_CALL_TRANSFER_INFO,
/** Called when set call transfer info. */
HREQ_CALL_SET_CALL_TRANSFER_INFO,
/** Called when get Calling line identification restriction(CLIR). */
HREQ_CALL_GET_CLIR,
/** Called when set Calling line identification restriction(CLIR). */
HREQ_CALL_SET_CLIR,
/** Called when get call preference. */
HREQ_CALL_GET_CALL_PREFERENCE,
/** Called when set call preference. */
HREQ_CALL_SET_CALL_PREFERENCE,
/**
* Called when set unstructured supplementary service data (USSD)
* information.
*/
HREQ_CALL_SET_USSD,
/**
* Called when get unstructured supplementary service data (USSD)
* information.
*/
HREQ_CALL_GET_USSD,
/** Called when set mute mode. */
HREQ_CALL_SET_MUTE,
/** Called when get mute mode. */
HREQ_CALL_GET_MUTE,
/** Get emergency list. */
HREQ_CALL_GET_EMERGENCY_LIST,
/** Set emergency list. */
HREQ_CALL_SET_EMERGENCY_LIST,
/** Get the call failure cause. */
HREQ_CALL_GET_FAIL_REASON,
/** Set the call barring password. */
HREQ_CALL_SET_BARRING_PASSWORD,
/** Close unfinished unstructured supplementary service data (USSD). */
HREQ_CALL_CLOSE_UNFINISHED_USSD,
HREQ_EXPLICIT_CALL_TRANSFER_CONNECTION,
HREQ_SET_VONR_SWITCH,
HREQ_SMS_BASE = 100,
/** Send GSM SMS. */
HREQ_SMS_SEND_GSM_SMS,
/** Send CDMA SMS. */
HREQ_SMS_SEND_CDMA_SMS,
/** Add SIM message. */
HREQ_SMS_ADD_SIM_MESSAGE,
/** Delete SIM message. */
HREQ_SMS_DEL_SIM_MESSAGE,
/** Update SIM message. */
HREQ_SMS_UPDATE_SIM_MESSAGE,
/**
* Send amd SMS message, and that more messages are expected to be sent
* soon.
*/
HREQ_SMS_SEND_SMS_MORE_MODE,
/** Acknowledge successful or failed receipt of SMS. */
HREQ_SMS_SEND_SMS_ACK,
/** Sets the default Short Message Service Center address on the device. */
HREQ_SMS_SET_SMSC_ADDR,
/** Get the default Short Message Service Center address on the device. */
HREQ_SMS_GET_SMSC_ADDR,
/** Activates GSM cell broadcast. */
HREQ_SMS_SET_CB_CONFIG,
/** Get the GSM cell broadcast configuration. */
HREQ_SMS_GET_CB_CONFIG,
/** Get the CDMA cell broadcast configuration. */
HREQ_SMS_GET_CDMA_CB_CONFIG,
/** Set the CDMA cell broadcast configuration. */
HREQ_SMS_SET_CDMA_CB_CONFIG,
/** Writes CDMA SMS messages to the SIM card. */
HREQ_SMS_ADD_CDMA_SIM_MESSAGE,
/** Deletes CDMA SMS messages from the SIM card. */
HREQ_SMS_DEL_CDMA_SIM_MESSAGE,
/** Updates CDMA SMS messages from SIM card. */
HREQ_SMS_UPDATE_CDMA_SIM_MESSAGE,
HREQ_SIM_BASE = 200,
/** Gets the SIM card status. */
HREQ_SIM_GET_SIM_STATUS,
/**
* Gets the international mobile subscriber identity (IMSI) of the SIM
* card.
*/
HREQ_SIM_GET_IMSI,
/** Gets SIM card data. */
HREQ_SIM_GET_SIM_IO,
/** Gets SIM card lock status. */
HREQ_SIM_GET_SIM_LOCK_STATUS,
/** Sets the SIM card lock. */
HREQ_SIM_SET_SIM_LOCK,
/** Changes the SIM card password. */
HREQ_SIM_CHANGE_SIM_PASSWORD,
/** Sets the PIN for unlocking. */
HREQ_SIM_UNLOCK_PIN,
/** Sets the PUK for unlocking. */
HREQ_SIM_UNLOCK_PUK,
/** Gets SIM PIN input times from sim card. */
HREQ_SIM_GET_SIM_PIN_INPUT_TIMES,
/** Sets the PIN2 for unlocking. */
HREQ_SIM_UNLOCK_PIN2,
/** Sets the PUK2 for unlocking. */
HREQ_SIM_UNLOCK_PUK2,
/** Gets SIM PIN2 input times from sim card. */
HREQ_SIM_GET_SIM_PIN2_INPUT_TIMES,
/** Specifies whether to activate a SIM card. */
HREQ_SIM_SET_ACTIVE_SIM,
/** Gets the protocol stack of the primary and secondary SIM cards. */
HREQ_SIM_GET_RADIO_PROTOCOL,
/** Sets the protocol stack for the primary and secondary SIM cards. */
HREQ_SIM_SET_RADIO_PROTOCOL,
/**
* Sends the TerminalResponse instruction of the SIM application toolkit
* (STK).
*/
HREQ_SIM_STK_SEND_TERMINAL_RESPONSE,
/** Sends the Envelope instruction of the STK. */
HREQ_SIM_STK_SEND_ENVELOPE,
/** Sned envelope response contain status of STK. */
HREQ_SIM_STK_SEND_ENVELOPE_RESPONSE_CONTAIN_STATUS,
/** Sends the CallSetup instruction of the STK. */
HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT,
/** Checks whether the STK is in the Ready state. */
HREQ_SIM_STK_IS_READY,
/**
* Opens the logical channel of the application protocol data unit (APDU).
*/
HREQ_SIM_OPEN_LOGICAL_CHANNEL,
/** Closes the logical channel of the APDU. */
HREQ_SIM_CLOSE_LOGICAL_CHANNEL,
/**
* Transmits APDU data over the logical channel. The logical channel is
* opened and closed by the application.
*/
HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL,
/**
* Transmits APDU data over the basic channel. The basic channel is the
* channel opened by default.
*/
HREQ_SIM_TRANSMIT_APDU_BASIC_CHANNEL,
/** Performs SIM card authentication. */
HREQ_SIM_AUTHENTICATION,
/** Unlocks a SIM card. */
HREQ_SIM_UNLOCK_SIM_LOCK,
HREQ_DATA_BASE = 300,
/** Sets an apn to initial attach network. */
HREQ_DATA_SET_INIT_APN_INFO,
/** Deactivates PDP context. */
HREQ_DATA_DEACTIVATE_PDP_CONTEXT,
/** Activates PDP context. */
HREQ_DATA_ACTIVATE_PDP_CONTEXT,
/** Gets PDP context list. */
HREQ_DATA_GET_PDP_CONTEXT_LIST,
/** Gets current link information. */
HREQ_DATA_GET_LINK_BANDWIDTH_INFO,
/** Sets the rule for reporting the data link bandwidth information. */
HREQ_DATA_SET_LINK_BANDWIDTH_REPORTING_RULE,
/** Sets the PDP context information for the data service. */
HREQ_DATA_SET_DATA_PROFILE_INFO,
/** Sends the data service performance mode. */
HREQ_DATA_SEND_DATA_PERFORMANCE_MODE,
/** Sends the data service sleep mode. */
HREQ_DATA_SEND_DATA_SLEEP_MODE,
/** Enables the data service of a SIM card slot. */
HREQ_DATA_SET_DATA_PERMITTED,
/** Get link capability. */
HREQ_DATA_GET_LINK_CAPABILITY,
HREQ_NETWORK_BASE = 400,
/** Gets the signal strength. */
HREQ_NETWORK_GET_SIGNAL_STRENGTH,
/** Gets the registration status of the CS domain. */
HREQ_NETWORK_GET_CS_REG_STATUS,
/** Gets the registration status of the PS domain. */
HREQ_NETWORK_GET_PS_REG_STATUS,
/** Gets the opreator info. */
HREQ_NETWORK_GET_OPERATOR_INFO,
/** Gets information about available networks. */
HREQ_NETWORK_GET_NETWORK_SEARCH_INFORMATION,
/** Gets the network selection mode. */
HREQ_NETWORK_GET_NETWORK_SELECTION_MODE,
/** Sets the network selection mode. */
HREQ_NETWORK_SET_NETWORK_SELECTION_MODE,
/** Gets information about neighboring cells. */
HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST,
/** Gets current cell info. */
HREQ_NETWORK_GET_CURRENT_CELL_INFO,
/** Sets the preferred network type. */
HREQ_NETWORK_SET_PREFERRED_NETWORK,
/** Gets the preferred network type. */
HREQ_NETWORK_GET_PREFERRED_NETWORK,
/** Get radio capability. */
HREQ_NETWORK_GET_RADIO_CAPABILITY,
/** Gets the physical channel configuration. */
HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG,
/** Sets the cell location update notification mode. */
HREQ_NETWORK_SET_LOCATE_UPDATES,
/** Sets the filter of notifications reported by the modem. */
HREQ_NETWORK_SET_NOTIFICATION_FILTER,
/** Sets the device status. */
HREQ_NETWORK_SET_DEVICE_STATE,
/** Get rrc connection state. */
HREQ_NETWORK_GET_RRC_CONNECTION_STATE,
/** Set nr option mode. */
HREQ_NETWORK_SET_NR_OPTION_MODE,
/** Get nr option mode. */
HREQ_NETWORK_GET_NR_OPTION_MODE,
/** Get nr ssbid info. */
HREQ_NETWORK_GET_NR_SSBID_INFO,
HREQ_COMMON_BASE = 500,
/** Sends a mobile phone power-off message to the modem. */
HREQ_MODEM_SHUT_DOWN,
/** Sets the modem status. */
HREQ_MODEM_SET_RADIO_STATUS,
/** Gets the modem status. */
HREQ_MODEM_GET_RADIO_STATUS,
/** Gets the international mobile equipment identity (IMEI). */
HREQ_MODEM_GET_IMEI,
/** Gets the mobile equipment identifier (MEID). */
HREQ_MODEM_GET_MEID,
/** Gets the baseband version. */
HREQ_MODEM_GET_BASEBAND_VERSION,
/** Gets the radio access technology of the CS domain. */
HREQ_MODEM_GET_VOICE_RADIO,
HREQ_MODEM_EXIT = 1000
} HRilRequest;
#endif // OHOS_RIL_REQUEST_H

View File

@ -20,123 +20,315 @@
namespace OHOS {
namespace Telephony {
/**
* @brief Defines the SIM card status information.
*/
struct CardStatusInfo {
/** SIM card index. */
int32_t index = 0;
/**
* SIM card type:
* 0: unknown.
* 1: common SIM card.
* 2: USIM, supporting 4G.
*/
int32_t simType = 0;
/**
* SIM card status:
* 1: unknown
* 0: SIM card not inserted
* 1: SIM card detected normally
* 2: PIN required
* 3: PUK required
* 4: PIN2 required
* 5: PUK2 required
*/
int32_t simState = 0;
};
/* Form 3GPP TS 27.007 V4.3.0 (2001-12) 8.18, + CRSM */
/**
* @brief Defines the SIM data request information in 3GPP TS 27.007 V4.3.0
* (2001-12) 8.18, + CRSM.
*/
struct SimIoRequestInfo {
int32_t command = 0; /* command passed on by the ME to the SIM; refer GSM 51.011 [28] */
int32_t fileId = 0; /* this is the identifier of an elementary datafile on SIM.
* Mandatory for every command except STATUS */
int32_t p1 = 0; /* parameters passed on by the MT to the SIM.
* These parameters are mandatory for every command,
* except GET RESPONSE and STATUS.
* The values are described in 3GPP TS 51.011 [28] */
int32_t p2 = 0;
int32_t p3 = 0;
std::string data = ""; /* information which shall be written to the SIM
* (hexadecimal character format; refer +CSCS). */
std::string path = ""; /* contains the path of an elementary file on the SIM/UICC
* in hexadecimal format as defined in ETSI TS 102 221 [60]
* (e.g. "7F205F70" in SIM and UICC case).
* The <pathid> shall only be used in the mode
* "select by path from MF" as defined in ETSI TS 102 221 [60] */
int32_t serial = 0;
std::string pin2 = "";
std::string aid = "";
};
/** Command passed on by the ME to the SIM; refer GSM 51.011 [28] */
int32_t command = 0;
/* Form 3GPP TS 27.007 V4.3.0 (2001-12) 8.18, + CRSM */
struct IccIoResultInfo {
int32_t sw1 = 0; /* information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command */
int32_t sw2 = 0;
std::string response = "";
};
/**
* This is the identifier of an elementary datafile on SIM.
* Mandatory for every command except STATUS
*/
int32_t fileId = 0;
struct SimLockInfo {
int32_t serial = 0;
std::string fac = ""; /* String type, which specifies the object operated by this command.
* "SC": SIM PIN1;
* "AO": prohibit all outgoing calls;
* "OI": All international outgoing calls are prohibited;
* "OX": All international outgoing calls are prohibited, except for the country of origin;
* "AI": All incoming calls are prohibited;
* "IR": When roaming outside the home area, all incoming calls are prohibited;
* "AB": prohibit all services (applicable only when <mode>=0);
* "AG": Outgoing call is prohibited (applicable only when <mode>=0);
* "AC": Incoming calls are prohibited (applicable only when <mode>=0);
* "FD": FDN;
* "PN": lock the network;
* "PU": lock subnet;
* "PP": Lock SP. */
int32_t mode = 0;
int32_t status = 0;
std::string passwd = "";
int32_t classx = 0;
};
struct SimPasswordInfo {
int32_t serial = 0;
std::string fac = ""; /* String type, which specifies the object operated by this command.
* SCSIM PIN1
* P2SIM PIN2
* "OI": All international outgoing calls are prohibited;
* "OX": All international outgoing calls are prohibited, except for the country of origin;
* "AI": All incoming calls are prohibited;
* "IR": When roaming outside the home area, all incoming calls are prohibited;
* "AB": prohibit all services (applicable only when <mode>=0);
* "AG": Outgoing call is prohibited (applicable only when <mode>=0);
* "AC": Incoming call service is prohibited (applicable only when <mode>=0). */
std::string oldPassword = "";
std::string newPassword = "";
int32_t passwordLength = 0; /* Max length of oldPassword or newPassword */
};
struct SimPinInputTimes {
int32_t serial = 0;
std::string code = ""; /* param of string.
* SIM PIN2 is mean that SIM PIN2 request. SIM PUK2 is mean that SIM PUK2 request. */
int32_t times = 0; /* The remaining number of entries, for PIN2, the maximum number of entries is 3 times;
* for PUK2, the maximum number of entries is 10 times. */
int32_t pukTimes = 0; /* The remaining number of PUK, the maximum number of entries is 10 times. */
int32_t pinTimes = 0; /* The remaining number of PIN, the maximum number of entries is 3 times. */
int32_t puk2Times = 0; /* The remaining number of PUK2, the maximum number of entries is 10 times. */
int32_t pin2Times = 0; /* The remaining number of PIN2, the maximum number of entries is 3 times. */
};
struct ApduSimIORequestInfo {
int32_t serial = 0;
int32_t channelId = 0;
int32_t type = 0;
int32_t instruction = 0;
/**
* Parameters passed on by the MT to the SIM.
* These parameters are mandatory for every command,
* except GET RESPONSE and STATUS.
* The values are described in 3GPP TS 51.011 [28]
*/
int32_t p1 = 0;
int32_t p2 = 0;
int32_t p3 = 0;
/**
* Information which shall be written to the SIM(hexadecimal character
* format; refer +CSCS).
*/
std::string data = "";
};
struct SimAuthenticationRequestInfo {
/**
* Contains the path of an elementary file on the SIM/UICC in hexadecimal
* format as defined in ETSI TS 102 221 [60] (e.g. "7F205F70" in SIM and
* UICC case). The <pathid> shall only be used in the mode "select by path
* from MF" as defined in ETSI TS 102 221 [60].
*/
std::string path = "";
/** Request serial number. */
int32_t serial = 0;
/** PIN2 */
std::string pin2 = "";
/** App ID. */
std::string aid = "";
std::string authData = "";
};
struct OpenLogicalChannelResponse {
int32_t sw1 = 0; /* information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command */
/**
* @brief Defines the response to the SIM data request in 3GPP TS 27.007 V4.3.0
* (2001-12) 8.18, + CRSM.
*/
struct IccIoResultInfo {
/**
* Information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases, on successful or
* failed execution of the command
*/
int32_t sw1 = 0;
int32_t sw2 = 0;
int32_t channelId = 0;
/** Response information */
std::string response = "";
};
/**
* @brief Defines the SIM card lock information.
*/
struct SimLockInfo {
/** Request serial number. */
int32_t serial = 0;
/**
* String type, which specifies the object operated by this command.
* "SC": SIM PIN1;
* "AO": prohibit all outgoing calls;
* "OI": All international outgoing calls are prohibited;
* "OX": All international outgoing calls are prohibited, except for the country of origin;
* "AI": All incoming calls are prohibited;
* "IR": When roaming outside the home area, all incoming calls are prohibited;
* "AB": prohibit all services (applicable only when <mode>=0);
* "AG": Outgoing call is prohibited (applicable only when <mode>=0);
* "AC": Incoming calls are prohibited (applicable only when <mode>=0);
* "FD": FDN;
* "PN": lock the network;
* "PU": lock subnet;
* "PP": Lock SP.
*/
std::string fac = "";
/**
* Mode:
* 0: deactivation (When fac is set to PN, PU, or PP, the operation is equivalent to unlocking.)
* 1: activation (When fac is set to PN, PU, or PP, activation is not supported.)
* 2: query
*/
int32_t mode = 0;
/**
* SIM card lock status.
* It indicates the activation status of the first three layers of locks when fac is set to PN, PU, or PP.
* 0: not activated
* 1: activated
*/
int32_t status = 0;
/** Password text */
std::string passwd = "";
/**
* Service type. The value is the sum of integers that represent the service type. The default value is 255.
* 1: telephony service
* 2: data service
* 4: fax service
* 8: SMS service
* 16: data circuit sync
* 32: data circuit async
* 64: dedicated packet access
* 128: dedicated portable device (PAD) access
*/
int32_t classx = 0;
};
/**
* @brief Defines the SIM card password information.
*/
struct SimPasswordInfo {
/** Request serial number. */
int32_t serial = 0;
/**
* String type, which specifies the object operated by this command.
* SCSIM PIN1
* P2SIM PIN2
* "OI": All international outgoing calls are prohibited;
* "OX": All international outgoing calls are prohibited, except for the country of origin;
* "AI": All incoming calls are prohibited;
* "IR": When roaming outside the home area, all incoming calls are prohibited;
* "AB": prohibit all services (applicable only when <mode>=0);
* "AG": Outgoing call is prohibited (applicable only when <mode>=0);
* "AC": Incoming call service is prohibited (applicable only when <mode>=0).
*/
std::string fac = "";
/** Old password text */
std::string oldPassword = "";
/** New password text */
std::string newPassword = "";
/** Max length of oldPassword or newPassword */
int32_t passwordLength = 0;
};
/**
* @brief Defines the maximum number of SIM password attempts.
*/
struct SimPinInputTimes {
/** Request serial number. */
int32_t serial = 0;
/**
* Param of string.
* SIM PIN2 is mean that SIM PIN2 request. SIM PUK2 is mean that SIM PUK2
* request.
*/
std::string code = "";
/**
* The remaining number of entries, for PIN2, the maximum number of entries is 3 times;
* for PUK2, the maximum number of entries is 10 times.
*/
int32_t times = 0;
/**
* The remaining number of PUK, the maximum number of entries is 10 times.
*/
int32_t pukTimes = 0;
/**
* The remaining number of PIN, the maximum number of entries is 3 times.
*/
int32_t pinTimes = 0;
/**
* The remaining number of PUK2, the maximum number of entries is 10
* times.
*/
int32_t puk2Times = 0;
/**
* The remaining number of PIN2, the maximum number of entries is 3 times.
*/
int32_t pin2Times = 0;
};
/**
* @brief Defines the APDU data transmission request information.
*/
struct ApduSimIORequestInfo {
/** Request serial number. */
int32_t serial = 0;
/** Channel ID */
int32_t channelId = 0;
/** APDU instruction type. For details, see ETSI 102 221 [55]. */
int32_t type = 0;
/** APDU instruction. For details, see ETSI 102 221 [55]. */
int32_t instruction = 0;
/**
* Command parameter 1 of the SIM data request. For details, see 3GPP
* TS 51.011[28].
*/
int32_t p1 = 0;
/**
* Command parameter 2 of the SIM data request. For details, see 3GPP
* TS 51.011[28].
*/
int32_t p2 = 0;
/**
* Command parameter 3 of the SIM data request. For details, see 3GPP
* TS 51.011[28]. If p3 is a negative value, a 4-byte APDU is sent to the
* SIM card.
*/
int32_t p3 = 0;
/** Data to be transmitted */
std::string data = "";
};
/**
* @brief Defines the SIM card authentication request information.
*/
struct SimAuthenticationRequestInfo {
/** Request serial number. */
int32_t serial = 0;
/** App ID */
std::string aid = "";
/** Authentication data */
std::string authData = "";
};
/**
* @brief Defines the response to the request for enabling the logical channel of the APDU.
*/
struct OpenLogicalChannelResponse {
/**
* Information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases, on successful or
* failed execution of the command
*/
int32_t sw1 = 0;
/**
* Status word 2 of the SIM card, which is returned by the SIM card after
* command execution.
*/
int32_t sw2 = 0;
/** ID of the opened logical channel */
int32_t channelId = 0;
/** Response information */
std::string response = "";
};
/**
* @brief Defines the response to the request for unlocking the SIM card.
*/
struct LockStatusResp {
/** Query result. For details, see {@link RilErrType}. */
int32_t result = 0;
/** Number of remaining attempts */
int32_t remain = 0;
};
} // namespace Telephony

View File

@ -20,91 +20,222 @@
namespace OHOS {
namespace Telephony {
/**
* @brief Defines a GSM SMS message.
*/
struct GsmSmsMessageInfo {
/** Request serial number. */
int32_t serial = 0;
std::string smscPdu = ""; /* Short Message Service Center Protocol Data Unit see GSM 03.40 */
std::string pdu = ""; /* Protocol Data Unit */
/** Short Message Service Center Protocol Data Unit see GSM 03.40 */
std::string smscPdu = "";
/** Protocol Data Unit */
std::string pdu = "";
/** GSM SMS Status. */
int32_t state = 0;
};
/**
* @brief Defines a CDMA SMS message.
*/
struct SendCdmaSmsMessageInfo {
/** Request serial number. */
int32_t serial = 0;
std::string smscPdu = ""; /* Short Message Service Center Protocol Data Unit see GSM 03.40 */
/** Short Message Service Center Protocol Data Unit see GSM 03.40 */
std::string smscPdu = "";
/** CDMA SMS Status. */
int32_t state = 0;
};
/**
* @brief Defines the SMS message information in a SIM card.
*/
struct SmsMessageIOInfo {
/** Request serial number. */
int32_t serial = 0;
std::string smscPdu = ""; /* Short Message Service Center Protocol Data Unit see GSM 03.40 */
std::string pdu = ""; /* Protocol Data Unit */
/** Short Message Service Center Protocol Data Unit see GSM 03.40. */
std::string smscPdu = "";
/** Protocol Data Unit */
std::string pdu = "";
/** The status of SMS message information in a SIM card. */
int32_t state = 0;
/** Message index. */
int32_t index = 0;
};
/**
* @brief Defines the SMSC address information.
*/
struct ServiceCenterAddress {
/** Request serial number. */
int32_t serial = 0;
/** SMSC address type. For details, see 3GPP TS 24.011 [6]. */
int32_t tosca = 0;
std::string address = ""; /* Protocol Data Unit */
/** Protocol Data Unit */
std::string address = "";
};
/* From 3GPP TS 27.005 AT+CSCB = [<mode>[,<mids>[,<dcss>]]] */
/**
* @brief Defines the GSM cell broadcast configuration information in 3GPP
* TS 27.005 AT+CSCB = [<mode>[,<mids>[,<dcss>]]].
*/
struct CBConfigInfo {
/** Request serial number. */
int32_t serial = 0;
/** Mode (activated or not). */
int32_t mode = 0;
/**
* Response type:
* 0: query and report
* 1: report
*/
int32_t indicationType = 0;
/** Message IDs. */
std::string mids = "";
/** Data coding schemes. */
std::string dcss = "";
};
/**
* @brief Defines the CDMA cell broadcast configuration information.
*/
struct CdmaCBConfigInfo {
/** Service. */
int32_t service = 0;
/** Language. */
int32_t language = 0;
/** Selected or not. */
int32_t checked = 0;
};
/**
* @brief Defines the CDMA cell broadcast configuration information list.
*/
struct CdmaCBConfigInfoList {
/** Request serial number. */
int32_t serial = 0;
/** The size of CB config information list. */
int32_t size = 0;
/** CB config information list. */
std::vector<CdmaCBConfigInfo> list {};
};
/* From 3GPP TS 27.005 if text mode (+CMGF=1):
<CR><LF>+CBM:
<sn>,<mid>,<dcs>,<page>,<pages><CR><LF><data><CR>
<LF> if PDU mode
(+CMGF=0):
<CR><LF>+CBM: <length><CR><LF><pdu><CR><LF>
*/
/**
* @brief Defines the cell broadcast report information.
*
* From 3GPP TS 27.005 if text mode (+CMGF=1):
* <CR><LF>+CBM:
* <sn>,<mid>,<dcs>,<page>,<pages><CR><LF><data><CR>
* <LF> if PDU mode
* (+CMGF=0):
* <CR><LF>+CBM: <length><CR><LF><pdu><CR><LF>
*/
struct CBConfigReportInfo {
/**
* Response type:
* 0: query and report
* 1: report
*/
int32_t indicationType = 0;
/** Cell broadcast SN */
int32_t sn = 0;
/** Message IDs */
int32_t mid = 0;
/** Cell broadcast page number. */
int32_t page = 0;
/** Total number of cell broadcast pages. */
int32_t pages = 0;
/** Data coding schemes. */
std::string dcs = "";
/** Decoded cell broadcast content. */
std::string data = "";
/** Number of PDU bytes. */
int32_t length = 0;
/** Protocol data unit. */
std::string pdu = "";
};
/**
* @brief Defines the SMS message information.
*/
struct SmsMessageInfo {
/**
* Response type:
* 0: query and report
* 1: report
*/
int32_t indicationType = 0;
/** Total number. */
int32_t size = 0;
std::vector<uint8_t> pdu {}; /* Protocol Data Unit */
/** Protocol data unit. */
std::vector<uint8_t> pdu {};
};
/**
* @brief Defines the processing mode of received SMS messages.
*/
struct ModeData {
/** Request serial number. */
int32_t serial = 0;
/** Whether to receive SMS messages */
bool result = false;
/**
* Processing mode of received SMS messages. For details, see {@link
* AckIncomeCause}.
*/
int32_t mode = 0;
std::string pdu = ""; /* Protocol Data Unit */
/** Protocol Data Unit. */
std::string pdu = "";
};
/**
* @brief Defines an SMS message response.
*/
struct SendSmsResultInfo {
int32_t msgRef = 0; /* TP-Message-Reference for GSM, and BearerData MessageId for CDMA
* from 3GPP2 C.S0015-B, v2.0, 4.5-1 */
std::string pdu = ""; /* Protocol Data Unit */
/**
* TP-Message-Reference for GSM, and BearerData MessageId for CDMA
* from 3GPP2 C.S0015-B, v2.0, 4.5-1
*/
int32_t msgRef = 0;
/** Protocol Data Unit */
std::string pdu = "";
/** Error code */
int32_t errCode = 0;
/** SMS message response ID */
int64_t flag = 0;
};
@ -136,13 +267,27 @@ struct CdmaSmsMessageInfo {
};
struct CdmaSmsInfo {
/**
* Response type:
* 0: query and report
* 1: report
*/
int32_t indicationType = 0;
int32_t msgRef = 0; /* TP-Message-Reference for GSM, and BearerData MessageId for CDMA
* from 3GPP2 C.S0015-B, v2.0, 4.5-1 */
std::string pdu = ""; /* Protocol Data Unit */
int32_t errCode = 0; /* if unknown or not applicable, that is -1
* from 3GPP 27.005, 3.2.5 for GSM/UMTS,
* 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA */
/**
* TP-Message-Reference for GSM, and BearerData MessageId for CDMA
* from 3GPP2 C.S0015-B, v2.0, 4.5-1
*/
int32_t msgRef = 0;
/** Protocol Data Unit. */
std::string pdu = "";
/**
* If unknown or not applicable, that is -1 from 3GPP 27.005, 3.2.5 for
* GSM/UMTS, 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA
*/
int32_t errCode = 0;
};
} // namespace Telephony
} // namespace OHOS

View File

@ -23,50 +23,117 @@
namespace OHOS {
namespace Telephony {
enum class HRilErrType : int32_t {
/** No error */
NONE = 0,
/** An error that not included in bellow items */
HRIL_ERR_GENERIC_FAILURE,
/** Invalid parameter */
HRIL_ERR_INVALID_PARAMETER,
/** Full memory */
HRIL_ERR_MEMORY_FULL,
/** Send command failed */
HRIL_ERR_CMD_SEND_FAILURE,
/** NO CARRIER response returned */
HRIL_ERR_CMD_NO_CARRIER,
/** The response is invalid */
HRIL_ERR_INVALID_RESPONSE,
/** The new status of radio to set is same with previous */
HRIL_ERR_REPEAT_STATUS,
/** Network search error */
HRIL_ERR_NETWORK_SEARCHING,
/** Network search interrupted */
HRIL_ERR_NETWORK_SEARCHING_INTERRUPTED,
/** The AT channel is closed */
HRIL_ERR_MODEM_DEVICE_CLOSE,
// network error
/** No sim card error */
HRIL_ERR_NO_SIMCARD_INSERTED,
/** Need pin code */
HRIL_ERR_NEED_PIN_CODE,
/** Need puk code */
HRIL_ERR_NEED_PUK_CODE,
/** Network search timeout */
HRIL_ERR_NETWORK_SEARCH_TIMEOUT,
/** Pin or puk password is not correct */
HRIL_ERR_PINPUK_PASSWORD_NOCORRECT,
/** Invalid modem parameter */
HRIL_ERR_INVALID_MODEM_PARAMETER = 50,
/** IPC failure */
HRIL_ERR_HDF_IPC_FAILURE = 300,
/** Null point error */
HRIL_ERR_NULL_POINT,
/** Vendor not implement error. */
HRIL_ERR_VENDOR_NOT_IMPLEMENT
};
enum class HRilNotiType { HRIL_NOTIFICATION, HRIL_NO_DEFINE };
/**
* @brief Indicates the specific APN type.
*/
enum class HRilApnTypes : int32_t {
/** None */
NONE = 0,
/** APN type for default data traffic */
DEFAULT = 1,
/** APN type for MMS traffic */
MMS = 2,
/** APN type for SUPL assisted GPS */
SUPL = 4,
/** APN type for DUN traffic */
DUN = 8,
/** APN type for HiPri traffic */
HIPRI = 16,
/** APN type for FOTA */
FOTA = 32,
/** APN type for IMS */
IMS = 64,
/** APN type for CBS */
CBS = 128,
/** APN type for IA Initial Attach APN */
IA = 256,
/** APN type for Emergency PDN */
EMERGENCY = 512,
ALL = 1023,
};
/**
* @brief Indicates whether the hril notification need lock.
*/
enum HRilRunningLockTypes { UNNEED_LOCK, NEED_LOCK };
/**
* @brief Indicates the hril response type.
*/
enum HRilResponseTypes {
HRIL_RESPONSE_REQUEST,
HRIL_RESPONSE_NOTICE,
@ -75,55 +142,118 @@ enum HRilResponseTypes {
HRIL_RESPONSE_NOTICE_MUST_ACK,
};
/* From 3GPP TS 27.007 V4.3.0 (2001-12) 8.5, AT + CSQ */
/**
* @brief From 3GPP TS 27.007 V4.3.0 (2001-12) 8.5, AT + CSQ.
*/
struct GsmRssi {
int32_t rxlev = 0; /* Received Signal Strength Indication, value range 0 ~ 31, max is 99, if unknown then set to
max */
int32_t ber = 0; /* bit error rate, value range 0 ~ 7, max is 99, if unknown then set to max
* as RXQUAL values in the table in TS 45.008 [20] subclauses 8.2.4. */
/**
* Received Signal Strength Indication, value range 0 ~ 31, max is 99,
* if unknown then set to max
*/
int32_t rxlev = 0;
/**
* Bit error rate, value range 0 ~ 7, max is 99, if unknown then set to
* max as RXQUAL values in the table in TS 45.008 [20] subclauses 8.2.4.
*/
int32_t ber = 0;
};
/* From 3GPP TS 27.007 V17.1.0 (2021-03) 8.69 */
/**
* @brief From 3GPP TS 27.007 V17.1.0 (2021-03) 8.69.
*/
struct CdmaRssi {
int32_t absoluteRssi = 0; /* Absolute value of signal strength. This value is the actual Rssi value
* multiplied by -1.
* e.g: Rssi is -75, then this response value will be 75 */
int32_t ecno = 0; /* integer type, ratio of the received energy per PN chip to the total received power spectral
* density (see 3GPP TS 25.133 [95] subclauses) */
/**
* Absolute value of signal strength. This value is the actual Rssi value
* multiplied by -1. e.g: Rssi is -75, then this response value will be 75.
*/
int32_t absoluteRssi = 0;
/**
* integer type, ratio of the received energy per PN chip to the total
* received power spectral density (see 3GPP TS 25.133 [95] subclauses)
*/
int32_t ecno = 0;
};
/**
* @brief Indicates some parameters which can reflect the strength of WCDMA signal.
*/
struct WCdmaRssi {
int32_t rxlev = 0; /* integer type, received signal strength level
* (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value 0~99 */
int32_t ecio = 0; /* integer type, ratio of the received energy per PN chip to the total received power
* spectral density (see 3GPP TS 25.133 [95] sub-clause). */
int32_t rscp = 0; /* integer type, received signal code power (see 3GPP TS 25.133 [95] sub-clause 9.1.1.3 and
* 3GPP TS 25.123 [96] sub-clause 9.1.1.1.3).
* range value 0 ~ 96, 255 not known or not detectable */
int32_t ber = 0; /* bit error rate, value range 0 ~ 7, max is 99, if unknown then set to max */
/**
* integer type, received signal strength level (see 3GPP TS 45.008 [20]
* sub-clause 8.1.4) value 0~99.
*/
int32_t rxlev = 0;
/**
* integer type, ratio of the received energy per PN chip to the total
* received power spectral density (see 3GPP TS 25.133 [95] sub-clause).
*/
int32_t ecio = 0;
/**
* integer type, received signal code power (see 3GPP TS 25.133 [95]
* sub-clause 9.1.1.3 and 3GPP TS 25.123 [96] sub-clause 9.1.1.1.3).
* range value 0 ~ 96, 255 not known or not detectable.
*/
int32_t rscp = 0;
/**
* Bit error rate, value range 0 ~ 7, max is 99, if unknown then set to
* max
*/
int32_t ber = 0;
};
/**
* @brief Indicates some parameters which can reflect the strength of LTE signal.
*/
struct LteRssi {
int32_t rxlev = 0; /* integer type, received signal strength level
* (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value 0~99 */
int32_t rsrq = 0; /* integer type, reference signal received quality (see 3GPP TS 36.133 [96] sub-clause 9.1.7)
* value range 0~33, 255 not known or not detectable */
int32_t rsrp = 0; /* integer type, reference signal received power (see 3GPP TS 36.133 [96] sub-clause 9.1.4)
* value range 0~97, 255 not known or not detectable */
int32_t snr = 0; /* integer type, representing the signal-to-interference plus noise ratio, suitable for LTE mode
* value range 0~251, 255 not known or not detectable */
/**
* integer type, received signal strength level
* (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value 0~99.
*/
int32_t rxlev = 0;
/**
* integer type, reference signal received quality (see 3GPP TS 36.133 [96] sub-clause 9.1.7)
* value range 0~33, 255 not known or not detectable.
*/
int32_t rsrq = 0;
/**
* integer type, reference signal received power (see 3GPP TS 36.133 [96] sub-clause 9.1.4)
* value range 0~97, 255 not known or not detectable.
*/
int32_t rsrp = 0;
/**
* integer type, representing the signal-to-interference plus noise ratio, suitable for LTE mode
* value range 0~251, 255 not known or not detectable.
*/
int32_t snr = 0;
};
/**
* @brief Indicates some parameters which can reflect the strength of TD-SCDMA signal.
*/
struct TdScdmaRssi {
int32_t rscp = 0;
};
/**
* @brief Indicates some parameters which can reflect the strength of NR signal.
*/
struct NrRssi {
int32_t rsrp = 0;
int32_t rsrq = 0;
int32_t sinr = 0;
};
/**
* @brief Indicates signal level of some RATs.
*/
struct Rssi {
GsmRssi gw;
CdmaRssi cdma;
@ -133,11 +263,15 @@ struct Rssi {
NrRssi nr;
};
/* from 3GPP TS 27.007 V4.3.0 (2001-12) */
/**
* @brief From 3GPP TS 27.007 V4.3.0 (2001-12).
*/
struct GetCallWaitingInfo {
int32_t status = 0; /* 0 not active
* 1 active */
int32_t typeClass = 0; /* <classx> default, SLM790 is 255 */
/** 0: not active, 1:active */
int32_t status = 0;
/** <classx> default, SLM790 is 255 */
int32_t typeClass = 0;
};
struct HRilResponseHeadInfo {
@ -145,6 +279,10 @@ struct HRilResponseHeadInfo {
HRilResponseTypes type = HRilResponseTypes::HRIL_RESPONSE_REQUEST;
};
/**
* @brief Indicates the response information, for example whether the
* request is success, serial number, response type etc.
*/
struct HRilRadioResponseInfo {
int32_t flag = -1;
int32_t serial = -1;
@ -173,13 +311,26 @@ enum HRilOperatorInfoResult {
};
enum HRilCircuitModeRegState {
HRIL_STAT_NO_REG_MT_NO_SEARCHING_OP = 0, /* not registered, MT is not searching an operator */
HRIL_STAT_REGISTERED_HOME_NETWORK = 1, /* registered, home network */
HRIL_STAT_NO_REGISTERED_MT_TRY_ATTACH = 2, /* not registered, but MT is currently trying
* to attach or searching an operator */
HRIL_STAT_REGISTERED_DENIED = 3, /* registration denied */
HRIL_STAT_UNKNOWN = 4, /* unknown (e.g. out of GERAN/UTRAN coverage) */
HRIL_STAT_REGISTERED_ROAMING = 5, /* registered, roaming */
/** Not registered, MT is not searching an operator */
HRIL_STAT_NO_REG_MT_NO_SEARCHING_OP = 0,
/** Registered, home network */
HRIL_STAT_REGISTERED_HOME_NETWORK = 1,
/**
* Not registered, but MT is currently trying to attach or searching an
* operator
*/
HRIL_STAT_NO_REGISTERED_MT_TRY_ATTACH = 2,
/** Registration denied */
HRIL_STAT_REGISTERED_DENIED = 3,
/** Unknown (e.g. out of GERAN/UTRAN coverage) */
HRIL_STAT_UNKNOWN = 4,
/** Registered, roaming */
HRIL_STAT_REGISTERED_ROAMING = 5,
};
enum HRilServiceSupportStat {
@ -187,7 +338,9 @@ enum HRilServiceSupportStat {
HRIL_SERVICE_SUPPORT = 1,
};
/* from 3GPP TS 27.007 V17.1.0 9.2.2.1.1 */
/**
* @brief Indicates the data denied reason, from 3GPP TS 27.007 V17.1.0 9.2.2.1.1.
*/
enum HRilReasonDataDenied {
HREASON_GPRS_SERVICE_NOT_ALLOW = 0,
HREASON_GPRS_AND_NON_GPRS_SERVICE_NOT_ALLOW = 1,
@ -203,15 +356,24 @@ enum HRilNetworkMode {
HRIL_NETWORK_MANUAL_MODE,
};
/* IMS specific */
/**
* @brief Indicates the specific IMS type.
*/
enum HRilIMSRegType {
NETWORK_IMS_REG_FEATURE_TYPE_VOLTE = 0x01, /* VoLTE type */
NETWORK_IMS_REG_FEATURE_TYPE_SMS = 0x02, /* SMS over IP type */
NETWORK_IMS_REG_FEATURE_TYPE_RCS = 0x04, /* RCS type */
NETWORK_IMS_REG_FEATURE_TYPE_VT = 0x08, /* VT type */
/** VoLTE type */
NETWORK_IMS_REG_FEATURE_TYPE_VOLTE = 0x01,
/** SMS over IP type */
NETWORK_IMS_REG_FEATURE_TYPE_SMS = 0x02,
/** RCS type */
NETWORK_IMS_REG_FEATURE_TYPE_RCS = 0x04,
/** VT type */
NETWORK_IMS_REG_FEATURE_TYPE_VT = 0x08,
};
// cs registration response
/** CS registration response */
static constexpr uint32_t HRIL_CS_REG_STATE = 1;
static constexpr uint32_t HRIL_CS_REG_RESP_ACT = 4;
static constexpr uint32_t HRIL_RSSNR = 7;
@ -220,7 +382,8 @@ static constexpr uint32_t HRIL_CS_REG_RESP_SYSTEM_IS_IN_PRL = 11;
static constexpr uint32_t HRIL_CS_REG_RESP_DEFAULT_ROAMING_INDICATOR = 12;
static constexpr uint32_t HRIL_CS_REG_RESP_TIMING_ADVANCE = 13;
static constexpr uint32_t HRIL_CS_REG_STATUS_MAX_LEN = 5;
// ps registration response
/** PS registration response */
static constexpr uint32_t HRIL_PS_REG_STATUS_MAX_LEN = 5;
static constexpr uint32_t HRIL_PS_RADIO_TECHNOLOGY = 4;
static constexpr uint32_t HRIL_PS_DENIED_ERROR_CODE = 4;
@ -230,17 +393,20 @@ static constexpr uint32_t HRIL_PS_DEF_DATA_CALLS_VAL = 1;
static constexpr uint32_t HRIL_LOCATION_REG_STATE = 1;
static constexpr uint32_t HRIL_LOCATION_LOC = 2;
static constexpr uint32_t HRIL_LOCATION_CI = 3;
// ims registration response
/** IMS registration response */
static constexpr uint32_t HRIL_IMS_REG_STATUS_MAX_LEN = 2;
static constexpr uint32_t HRIL_IMS_REG_STATUS = 0;
static constexpr uint32_t HRIL_IMS_REG_FLAG = 1;
static constexpr uint32_t HRIL_NETWORKS_SELECT_MODE = 0;
// Get the number of SIM cards in the system configuration
/** Get the number of SIM cards in the system configuration */
inline const int32_t HRIL_SYSPARA_SIZE = 128;
inline constexpr const char *HRIL_DEFAULT_SLOT_COUNT = "1";
inline constexpr const char *HRIL_TEL_SIM_SLOT_COUNT = "const.telephony.slotCount";
// interface token
/** Interface token */
inline const std::u16string HRIL_INTERFACE_TOKEN = u"ohos.telephony.hril";
} // namespace Telephony
} // namespace OHOS

View File

@ -25,111 +25,250 @@
extern "C" {
#endif
/* From 3GPP TS 27.007 V4.3.0 (2001-12) AT+CGDCONT */
/**
* @brief From 3GPP TS 27.007 V4.3.0 (2001-12) AT+CGDCONT
*/
typedef struct {
int32_t index; /* Call identification number as described in 3GPP TS 22.030 [19] sub-clause 6.5.5.1.
* This number can be used in +CHLD command operations */
int32_t dir; /* 0 mobile originated (MO) call
* 1 mobile terminated (MT) call */
HRilCallState state; /* call state */
HRilCallMode mode; /* call mode */
int32_t mpty; /* 0 call is not one of multiparty (conference) call parties
* 1 call is one of multiparty (conference) call parties */
int32_t voiceDomain; /* Identifies the service domain.
* 0: CS domain phone
* 1: IMS domain phone */
int32_t callType; /* 0: voice call
* 1: Video call: send one-way video, two-way voice
* 2: Video call: one-way receiving video, two-way voice
* 3: Video call: two-way video, two-way voice */
char *number; /* phone number in format specified by <type> */
/**
* Call identification number as described in 3GPP TS 22.030 [19] sub-clause 6.5.5.1.
* This number can be used in +CHLD command operations
*/
int32_t index;
int32_t type; /* Type of address octet in integer format (refer TS 24.008 [8] subclauses 10.5.4.7);
* default 145 when dialling string includes international access code character "+",
* otherwise 129. see 3GPP TS 27.007 V4.3.0 (2001-12) 6.1 */
char *alpha; /* alphanumeric representation of <number> corresponding to the entry found in phonebook;
* used character set should be the one selected with command select TE character set +CSCS */
/**
* 0: mobile originated (MO) call
* 1: mobile terminated (MT) call
*/
int32_t dir;
/** call state */
HRilCallState state;
/** call mode */
HRilCallMode mode;
/**
* 0: call is not one of multiparty (conference) call parties
* 1: call is one of multiparty (conference) call parties
*/
int32_t mpty;
/**
* Identifies the service domain.
* 0: CS domain phone
* 1: IMS domain phone
*/
int32_t voiceDomain;
/**
* 0: voice call
* 1: Video call: send one-way video, two-way voice
* 2: Video call: one-way receiving video, two-way voice
* 3: Video call: two-way video, two-way voice
*/
int32_t callType;
/** Phone number in format specified by <type> */
char *number;
/**
* Type of address octet in integer format (refer TS 24.008 [8] subclauses 10.5.4.7);
* default 145 when dialling string includes international access code character "+",
* otherwise 129. see 3GPP TS 27.007 V4.3.0 (2001-12) 6.1
*/
int32_t type;
/**
* Alphanumeric representation of <number> corresponding to the entry found
* in phonebook; used character set should be the one selected with command
* select TE character set +CSCS
*/
char *alpha;
} HRilCallInfo;
/* From 3GPP TS 27.007 V4.3.0 (2001-12) ATD%s%s */
/**
* @brief From 3GPP TS 27.007 V4.3.0 (2001-12) ATD%s%s
*/
typedef struct {
char *address; /* Type of address octet in integer format (refer TS 24.008 [8] subclauses 10.5.4.7);
* default 145 when dialling string includes international access code character "+", otherwise
* 129. */
int32_t clir; /* This command refers to CLIR service according to 3GPP TS 22.081 [3] that allows a calling
* subscriber to enable or disable the presentation of the CLI to the called party when originating
* a call. <n> (parameter sets the adjustment for outgoing calls): 0 presentation indicator is used
* according to the subscription of the CLIR service 1 CLIR invocation 2 CLIR suppression <m>
* (parameter shows the subscriber CLIR service status in the network): 0 CLIR not provisioned 1
* CLIR provisioned in permanent mode 2 unknown (e.g. no network, etc.) 3 CLIR temporary mode
* presentation restricted 4 CLIR temporary mode presentation allowed */
/**
* Type of address octet in integer format (refer TS 24.008 [8] subclauses 10.5.4.7);
* default 145 when dialling string includes international access code character "+", otherwise
* 129.
*/
char *address;
/**
* This command refers to CLIR service according to 3GPP TS 22.081 [3] that allows a calling
* subscriber to enable or disable the presentation of the CLI to the called party when originating
* a call. <n> (parameter sets the adjustment for outgoing calls): 0 presentation indicator is used
* according to the subscription of the CLIR service 1 CLIR invocation 2 CLIR suppression <m>
* (parameter shows the subscriber CLIR service status in the network): 0 CLIR not provisioned 1
* CLIR provisioned in permanent mode 2 unknown (e.g. no network, etc.) 3 CLIR temporary mode
* presentation restricted 4 CLIR temporary mode presentation allowed
*/
int32_t clir;
} HRilDial;
/**
* @brief Defines the call forwarding information.
*/
typedef struct {
int32_t reason; /* call forwarding type <0-5> */
int32_t mode; /* call forwarding operation mode */
char *number; /* phone number */
int32_t classx; /* is a sum of integers each representing a class of information default 255
* 1 voice (telephony)
* 2 data (refers to all bearer services; with <mode>=2 this may refer only
* to some bearer service if TA does not support values 16, 32, 64 and 128)
* 4 fax (facsimile services)
* 8 short message service
* 16 data circuit sync
* 32 data circuit async
* 64 dedicated packet access
* 128 dedicated PAD access
*/
int32_t time; /* when "no reply" is enabled or queried, this gives the time in seconds to wait
* before call is forwarded, default value 20
*/
int32_t status; /* 0: not active, 1: active */
/** Call forwarding type <0-5> */
int32_t reason;
/** Call forwarding operation mode */
int32_t mode;
/** Phone number */
char *number;
/**
* Is a sum of integers each representing a class of information default 255
* 1: voice (telephony)
* 2: data (refers to all bearer services; with <mode>=2 this may refer
* only to some bearer service if TA does not support values 16, 32, 64 and 128)
* 4: fax (facsimile services)
* 8: short message service
* 16: data circuit sync
* 32: data circuit async
* 64: dedicated packet access
* 128: dedicated PAD access
*/
int32_t classx;
/**
* when "no reply" is enabled or queried, this gives the time in seconds to wait
* before call is forwarded, default value 20
*/
int32_t time;
/** 0: not active, 1: active */
int32_t status;
} HRilCFInfo;
/**
* @brief Defines the dual tone multi-frequency (DTMF) information.
*/
typedef struct {
/** Call ID */
int32_t callId;
/** DTMF keyword */
const char *dtmfKey;
/** Duration for playing the DTMF tone */
int32_t onLength;
/** Interval for sending DTMF signals */
int32_t offLength;
/** DTMF string length */
int32_t stringLength;
} CallDtmfInfo;
/**
* @brief Defines the call restriction password.
*/
typedef struct {
/** Operation object */
const char *fac;
/**
* Operation mode:
* 0: deactivation
* 1: activation
*/
int32_t mode;
/** Password */
const char *password;
} CallRestrictionInfo;
/**
* @brief Defines the call restriction password.
*/
typedef struct {
/** Operation object */
const char *fac;
/** Old password */
const char *oldPassword;
/** New password */
const char *newPassword;
} HRilSetBarringInfo;
/**
* @brief Defines the call forwarding information.
*/
typedef struct {
int32_t reason; /* call forwarding type <0-5> */
/** Call forwarding type <0-5> */
int32_t reason;
/** Call forwarding status. */
int32_t status;
/**
* Is a sum of integers each representing a class of information default 255
* 1: voice (telephony)
* 2: data (refers to all bearer services; with <mode>=2 this may refer
* only to some bearer service if TA does not support values 16, 32, 64 and 128)
* 4: fax (facsimile services)
* 8: short message service
* 16: data circuit sync
* 32: data circuit async
* 64: dedicated packet access
* 128: dedicated PAD access
*/
int32_t classx;
/** Call forwarding number. */
char *number;
int32_t type; /* default 145 when dialling string includes international access code
* character "+", otherwise 129,
* other value refer TS 24.008 [8] sub-clause 10.5.4.7
*/
/**
* Default 145 when dialling string includes international access code
* character "+", otherwise 129, other value refer TS 24.008 [8]
* sub-clause 10.5.4.7
*/
int32_t type;
/** Time. */
int32_t time;
} HRilCFQueryInfo;
/**
* @brief Defines the CLIP information.
*/
typedef struct {
int32_t action; /* parameter sets/shows the result code presentation status in the TA */
int32_t clipStat; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
/** Parameter sets/shows the result code presentation status in the TA */
int32_t action;
/**
* Parameter shows the subscriber CLIP service status in the network, <0-4>
*/
int32_t clipStat;
} HRilGetClipResult;
/**
* @brief Defines the CLIR information.
*/
typedef struct {
int32_t action; /* parameter sets/shows the result code presentation status in the TA */
int32_t clirStat; /* parameter shows the subscriber CLIP service status in the network, <0-4> */
/** Parameter sets/shows the result code presentation status in the TA */
int32_t action;
/**
* Parameter shows the subscriber CLIP service status in the network,
* <0-4>
*/
int32_t clirStat;
} HRilGetCallClirResult;
/**
* @brief Defines the call waiting information.
*/
typedef struct {
int32_t status; /* 0 or 1 */
/** Call wait status, could be 0 or 1 */
int32_t status;
/**
* 1: voice (telephony);
* 2: data;
@ -143,8 +282,13 @@ typedef struct {
int32_t classCw;
} HRilCallWaitResult;
/**
* @brief Defines the call barring information.
*/
typedef struct {
int32_t status; /* 0 or 1 */
/** Call restructuib status, could be 0 or 1 */
int32_t status;
/**
* 1: voice (telephony);
* 2: data;
@ -158,120 +302,524 @@ typedef struct {
int32_t classCw;
} HRilCallRestrictionResult;
/**
* @brief Defines the USSD result information.
*/
typedef struct {
int32_t m; /* Integer value.
0: The network does not require a TE reply (USSD-Notify initiated by the network or TE
The network does not need further information after starting operation);
1: The network needs a TE reply (USSD-Request initiated by the network, or TE sent
After starting the operation, the network needs further information);
2: The USSD session is released by the network;
3: Other local clients have responded;
4: The operation is not supported;
5: The network timed out. */
char *str; /* USSD string, the maximum length is 160 characters. */
/**
* Integer value.
* 0: The network does not require a TE reply (USSD-Notify initiated by the network or TE
* The network does not need further information after starting operation);
* 1: The network needs a TE reply (USSD-Request initiated by the network, or TE sent
* After starting the operation, the network needs further information);
* 2: The USSD session is released by the network;
* 3: Other local clients have responded;
* 4: The operation is not supported;
* 5: The network timed out.
*/
int32_t m;
/**
* USSD string, the maximum length is 160 characters.
*/
char *str;
} HRilUssdNoticeInfo;
/**
* @brief Defines the supplementary service information.
*/
typedef struct {
/**
* Service type:
* 0: call forwarding unconditional
* 1: call forwarding on busy
* 2: call forwarding on no reply
* 3: call forwarding not reachable (no network service, or power-off)
*/
int32_t serviceType;
/**
* Request type:
* 0: deactivation
* 1: activated
* 2: status query
* 3: registration
* 4: deletion
*/
int32_t requestType;
/** Service class. For details, see 3GPP TS 27.007. */
int32_t serviceClass;
int32_t result; /* the result of the SS request */
/** The result of the SS request */
int32_t result;
} HRilSsNoticeInfo;
/**
* @brief Defines the emergency information.
*/
typedef struct {
int32_t index; /* Number index */
int32_t total; /* Total number of numbers */
char *eccNum; /* Emergency call number in string format */
int32_t category; /* Emergency call type
0: interface message of initiating an emergency call
1: Bandit police
2: Rescue
4: Fire alarm
8: Marine Police
16: Alpine rescue */
int32_t simpresent; /* the number is valid with or without a card
0: valid without card
1: Valid with card */
char *mcc; /* Country code */
int32_t abnormalService; /* distinguishes CS domain abnormal service status
0: all States are valid
1: the CS domain is not in normal service */
/** Number index */
int32_t index;
/** Total number of numbers */
int32_t total;
/** Emergency call number in string format */
char *eccNum;
/**
* Emergency call type
* 0: interface message of initiating an emergency call
* 1: Bandit police
* 2: Rescue
* 4: Fire alarm
* 8: Marine Police
* 16: Alpine rescue
*/
int32_t category;
/**
* The number is valid with or without a card
* 0: valid without card
* 1: Valid with card
*/
int32_t simpresent;
/** Country code */
char *mcc;
/**
* Distinguishes CS domain abnormal service status
* 0: all States are valid
* 1: the CS domain is not in normal service
*/
int32_t abnormalService;
} HRilEmergencyInfo;
/*
* Active reporting of SRVCC status is controlled by the +CIREP command.
/**
* @brief Active reporting of SRVCC status is controlled by the +CIREP command.
*
* This command complies with the 3GPP TS 27.007 protocol.
*/
typedef struct {
/*
/**
* SRVCC status.
* 1: SRVCC starts;
* 2: SRVCC is successful;
* 3: SRVCC is cancelled;
* 4: SRVCC failed.
* 1: SRVCC starts;
* 2: SRVCC is successful;
* 3: SRVCC is cancelled;
* 4: SRVCC failed.
*/
int32_t status;
} HRilCallSrvccStatus;
/*
* Query the bandwidth information of the voice channel during the call.
* Note: Modem private commands, not a reported field specified by the 3gpp protocol.
/**
* @brief Query the bandwidth information of the voice channel during the call.
*
* Note: Modem private commands, not a reported field specified by the 3gpp
* protocol.
*/
typedef struct {
/**
* Integer value, voice channel type:
* 0: No in-band audio information;
* 1: In-band voice is available, narrowband voice;
* 2: In-band voice is available, broadband voice.
* 0: No in-band audio information;
* 1: In-band voice is available, narrowband voice;
* 2: In-band voice is available, broadband voice.
*/
int32_t status;
/**
* Integer value, call domain of voice call:
* 0: 3GPP CS domain voice call;
* 1: IMS domain voice call;
* 2: 3GPP2 CS domain voice call.
* 0: 3GPP CS domain voice call;
* 1: IMS domain voice call;
* 2: 3GPP2 CS domain voice call.
*/
int32_t voiceDomain;
} HRilCallCsChannelInfo;
typedef struct {
/**
* @brief Gets the call status list.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}
* @see ReqDataInfo
*/
void (*GetCallList)(const ReqDataInfo *requestInfo);
/**
* @brief Makes a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}
* @param data HRilDial, for details, see {@link HRilDial}
* @param dataLen The length of data.
* @see ReqDataInfo | HRilDial
*/
void (*Dial)(const ReqDataInfo *requestInfo, const HRilDial *data, size_t dataLen);
/**
* @brief Ends a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}
* @param data gsmIndex, Indicates the connection index
* @param dataLen The length of data.
* @see ReqDataInfo
*/
void (*Hangup)(const ReqDataInfo *requestInfo, const uint32_t *data, size_t dataLen);
/**
* @brief Rejects a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*Reject)(const ReqDataInfo *requestInfo);
/**
* @brief Answers a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}
* @see ReqDataInfo
*/
void (*Answer)(const ReqDataInfo *requestInfo);
/**
* @brief Obtains the calling line identification presentation (CLIP)
* information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}
* @see ReqDataInfo
*/
void (*GetClip)(const ReqDataInfo *requestInfo);
/**
* @brief Sets the calling line identification presentation (CLIP)
* information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param action Whether to enable or disable the CLIP function. The value
* 0 means to disable the CLIP function, and the value 1 means the
* opposite.
* @see ReqDataInfo
*/
void (*SetClip)(const ReqDataInfo *requestInfo, int32_t action);
/**
* @brief Holds a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*HoldCall)(const ReqDataInfo *requestInfo);
/**
* @brief Unholds a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*UnHoldCall)(const ReqDataInfo *requestInfo);
/**
* @brief Switches a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*SwitchCall)(const ReqDataInfo *requestInfo);
/**
* @brief Combines calls into a conference call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param callType Call type.
* @see ReqDataInfo
*/
void (*CombineConference)(const ReqDataInfo *requestInfo, int32_t callType);
/**
* @brief Separates calls from a conference call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param callType Call type.
* @see ReqDataInfo
*/
void (*SeparateConference)(const ReqDataInfo *requestInfo, int32_t callIndex, int32_t callType);
/**
* @brief Holds and resumes a call.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param type Type of ending calls. The value 0 indicates that the call is
* ended directly; The value 1 means release the held call and the wait
* call; The value 2 means that release the active call and recover the
* held call; The value 3 means that release all calls.
* @see ReqDataInfo
*/
void (*CallSupplement)(const ReqDataInfo *requestInfo, int32_t type);
/**
* @brief Gets the call waiting status.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetCallWaiting)(const ReqDataInfo *requestInfo);
/**
* @brief Sets the call waiting status.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param active Whether to enable or disable call waiting. The value
* <b>0</b> means to disable the call waiting function, and the value
* <b>1</b> means the opposite.
* @see ReqDataInfo
*/
void (*SetCallWaiting)(const ReqDataInfo *requestInfo, int32_t active);
/**
* @brief Sets the call forwarding status.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param info Call forwarding information, for details, see {@link
* CallForwardSetInfo}.
* @see ReqDataInfo
*/
void (*SetCallTransferInfo)(const ReqDataInfo *requestInfo, HRilCFInfo info);
/**
* @brief Gets the call forwarding information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param reason Call forwarding type, The value 0 indicates unconditional
* call forwarding, 1 indicates call forwarding when the user is busy, 2
* indicates call forwarding when the user does not reply, and 3 indicates
* call forwarding when the user is unreachable.
* @see ReqDataInfo
*/
void (*GetCallTransferInfo)(const ReqDataInfo *requestInfo, int32_t reason);
/**
* @brief Gets the call restriction information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param fac Object for call restriction.
* @see ReqDataInfo
*/
void (*GetCallRestriction)(const ReqDataInfo *requestInfo, const char *fac);
/**
* @brief Sets the call restriction information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param info Call restriction information.
* @see ReqDataInfo
*/
void (*SetCallRestriction)(const ReqDataInfo *requestInfo, CallRestrictionInfo info);
/**
* @brief Obtains the calling line identification restriction (CLIR)
* information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetClir)(const ReqDataInfo *requestInfo);
/**
* @brief Sets the CLIR information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param action Whether to enable or disable the CLIR function. The value
* 0 means to disable the CLIR function, and the value 1 means the
* opposite.
* @see ReqDataInfo
*/
void (*SetClir)(const ReqDataInfo *requestInfo, int32_t action);
/**
* @brief Enables DTMF.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param info DTMF information.
* @see ReqDataInfo | CallDtmfInfo
*/
void (*StartDtmf)(const ReqDataInfo *requestInfo, CallDtmfInfo info);
/**
* @brief Sends dual tone multi-frequency (DTMF).
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param info DTMF information.
* @see ReqDataInfo | CallDtmfInfo
*/
void (*SendDtmf)(const ReqDataInfo *requestInfo, CallDtmfInfo info);
/**
* @brief Disables DTMF.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param info DTMF information.
* @see ReqDataInfo | CallDtmfInfo
*/
void (*StopDtmf)(const ReqDataInfo *requestInfo, CallDtmfInfo info);
/**
* @brief Gets IMS call list.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetImsCallList)(const ReqDataInfo *requestInfo);
/**
* @brief Obtains the call preference mode.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetCallPreferenceMode)(const ReqDataInfo *requestInfo);
/**
* @brief Sets the call preference mode.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*SetCallPreferenceMode)(const ReqDataInfo *requestInfo, int32_t mode);
/**
* @brief Gets LTE IMS switch status.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetLteImsSwitchStatus)(const ReqDataInfo *requestInfo);
/**
* @brief Sets LTE IMS switch status.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param active Whether to enable or disable call waiting. The value
* <b>0</b> means to disable the call waiting function, and the value
* <b>1</b> means the opposite.
* @see ReqDataInfo
*/
void (*SetLteImsSwitchStatus)(const ReqDataInfo *requestInfo, int32_t active);
/**
* @brief Sets unstructured supplementary service data (USSD) information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param str USSD information.
* @see ReqDataInfo
*/
void (*SetUssd)(const ReqDataInfo *requestInfo, const char *str);
/**
* @brief Obtains the USSD information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetUssd)(const ReqDataInfo *requestInfo);
/**
* @brief Sets the mute mode.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param mute Whether to enable the mute function. The value 0 means to
* disable the mute function, and the value 1 means the opposite.
* @see ReqDataInfo
*/
void (*SetMute)(const ReqDataInfo *requestInfo, int32_t mute);
/**
* @brief Obtains the mute mode.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetMute)(const ReqDataInfo *requestInfo);
/**
* @brief Obtains the emergency number.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetEmergencyCallList)(const ReqDataInfo *requestInfo);
/**
* @brief Obtains the call failure cause.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetCallFailReason)(const ReqDataInfo *requestInfo);
/**
* @brief Sets the emergency call number.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param emergencyInfo Emergency call information.
* @param len The size of emergencyInfo.
* @see ReqDataInfo
*/
void (*SetEmergencyCallList)(const ReqDataInfo *requestInfo, HRilEmergencyInfo *emergencyInfo, const int len);
/**
* @brief Change call barring facility password.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param info Call restriction information.
* @see ReqDataInfo
*/
void (*SetBarringPassword)(const ReqDataInfo *requestInfo, HRilSetBarringInfo info);
/**
* @brief Close unfinished unstructured supplementary service data (USSD).
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*CloseUnFinishedUssd)(const ReqDataInfo *requestInfo);
void (*ExplicitCallTransferConnection)(const ReqDataInfo *requestInfo);
void (*SetVonrSwitch)(const ReqDataInfo *requestInfo, int32_t status);

View File

@ -22,144 +22,410 @@
extern "C" {
#endif
/**
* @brief Defines the data call response.
*/
typedef struct {
int32_t reason; /* Data call fail reason. success is 0 */
int32_t retryTime; /* if errorCode != 0, suggested retry time */
int32_t cid; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* specifies a particular PDP context definition. The parameter is local to the TE-MT interface and
* is used in other PDP context-related commands. */
int32_t active; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* indicates the state of PDP context activation
* 0 - deactivated
* 1 - activated */
char *type; /* PDP_type values from 3GPP TS 27.007 V17.3.0 (2021-09)
* specifies the type of packet data protocol. The default value is manufacturer specific. */
char *netPortName; /* Network interface name */
char *address; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* <local_addr and subnet_mask>: string type;
* shows the IP address and subnet mask of the MT. The string is given as dot-separated
* numeric (0-255) parameters on the form: "a1.a2.a3.a4.m1.m2.m3.m4" for IPv4 or
* "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
* m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16" for IPv6.
* When +CGPIAF is supported, its settings can influence the format of this parameter returned
* with the execute form of +CGCONTRDP */
char *dns; /* shows the IP address of the primary DNS server. */
char *dnsSec; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* string type; shows the IP address of the secondary DNS server.When +CGPIAF is supported,
* its settings can influence the format of this parameter returned with the execute form of
* +CGCONTRDP. */
char *gateway; /* shows the Gateway Address of the MT.
* The string is given as dot-separated numeric (0- 255) parameters. */
int32_t maxTransferUnit; /* Maximum Transfer Unit. shows the IPv4 MTU size in octets. */
char *pCscfPrimAddr; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* string type; shows the IP address of the primary P-CSCF server.When +CGPIAF is
* supported, its settings can influence the format of this parameter returned with
* the execute form of +CGCONTRDP. */
char *pCscfSecAddr; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* string type; shows the IP address of the secondary P-CSCF server. When +CGPIAF is
* supported, its settings can influence the format of this parameter returned with the
* execute form of +CGCONTRDP. */
int32_t pduSessionId; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
* integer type; identifies the PDU session, see 3GPP TS 24.501 [161]. */
/** Data call fail reason. success is 0 */
int32_t reason;
/** If errorCode != 0, suggested retry time */
int32_t retryTime;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* Specifies a particular PDP context definition. The parameter is local to
* the TE-MT interface and is used in other PDP context-related commands.
*/
int32_t cid;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* Indicates the state of PDP context activation
* 0: deactivated
* 1: activated
*/
int32_t active;
/**
* PDP_type values from 3GPP TS 27.007 V17.3.0 (2021-09)
* Specifies the type of packet data protocol. The default value is
* manufacturer specific.
*/
char *type;
/**
* Network interface name
*/
char *netPortName;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* <local_addr and subnet_mask>: string type;
* shows the IP address and subnet mask of the MT. The string is given as
* dot-separated numeric (0-255) parameters on the form:
* "a1.a2.a3.a4.m1.m2.m3.m4" for IPv4 or
* "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
* m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16" for IPv6.
* When +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP
*/
char *address;
/** Shows the IP address of the primary DNS server. */
char *dns;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* string type; shows the IP address of the secondary DNS server.When
* +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP.
*/
char *dnsSec;
/**
* Shows the Gateway Address of the MT. The string is given as
* dot-separated numeric (0- 255) parameters.
*/
char *gateway;
/** Maximum Transfer Unit. shows the IPv4 MTU size in octets. */
int32_t maxTransferUnit;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* string type; shows the IP address of the primary P-CSCF server.When
* +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP.
*/
char *pCscfPrimAddr;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* string type; shows the IP address of the secondary P-CSCF server. When
* +CGPIAF is supported, its settings can influence the format of this
* parameter returned with the execute form of +CGCONTRDP.
*/
char *pCscfSecAddr;
/**
* From 3GPP TS 27.007 V17.3.0 (2021-09)
* integer type; identifies the PDU session, see 3GPP TS 24.501 [161].
*/
int32_t pduSessionId;
} HRilDataCallResponse;
typedef struct { /* from 3GPP TS 27.007 V17.3.0 (2021-09) */
int32_t cid; /* specifies a particular PDP context definition. The parameter is local to the TE-MT interface and
* is used in other PDP context-related commands. */
int32_t reason; /* Reason for the data request. */
int32_t rat; /* Radio Access Technology */
int32_t roamingEnable; /* Roaming Enable. eg: 1--enable, 0--disnable */
int32_t verType; /* Authentication protocol used for this PDP context.
* 0 None. Used to indicate that no authentication protocol is used for this PDP context.
* Username and password are removed if previously specified.
* 1 PAP
* 2 CHAP */
char *userName; /* User name for access to the IP network. */
char *password; /* Password for access to the IP network. */
char *apn; /* (Access Point Name) a string parameter
* which is a logical name that is used to select the GGSN or the */
char *type; /* PDP_type values from 3GPP TS 27.007 section 10.1.1.
* specifies the type of packet data protocol. The default value is manufacturer specific. */
char *roamingType; /* PDP_type values from 3GPP TS 27.007 section 10.1.1.
* specifies the type of packet data protocol. The default value is manufacturer specific. */
/**
* @brief Defines the data information. from 3GPP TS 27.007 V17.3.0 (2021-09)
*/
typedef struct {
/**
* Specifies a particular PDP context definition. The parameter is local to
* the TE-MT interface and is used in other PDP context-related commands.
*/
int32_t cid;
/** Reason for the data request. */
int32_t reason;
/** Radio Access Technology */
int32_t rat;
/** Roaming Enable. eg: 1--enable, 0--disnable */
int32_t roamingEnable;
/**
* Authentication protocol used for this PDP context.
* 0: None. Used to indicate that no authentication protocol is used for this
* PDP context. Username and password are removed if previously specified.
* 1: PAP
* 2: CHAP
*/
int32_t verType;
/** User name for access to the IP network. */
char *userName;
/** Password for access to the IP network. */
char *password;
/** Access Point Name */
char *apn;
/**
* PDP_type values from 3GPP TS 27.007 section 10.1.1.
* Specifies the type of packet data protocol. The default value is
* manufacturer specific.
*/
char *type;
/**
* PDP_type values from 3GPP TS 27.007 section 10.1.1.
* Specifies the type of packet data protocol. The default value is
* manufacturer specific.
*/
char *roamingType;
} HRilDataInfo;
/**
* @brief Defines the band width information.
*/
typedef struct {
int32_t cid; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; specifies a particular QoS flow definition, Traffic Flows
* definition and a PDP Context definition (see the +CGDCONT and +CGDSCONT commands). */
int32_t qi; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* 0 5QI is selected by network
* [1 - 4] value range for guaranteed bit rate QoS flows
* 65, 66, 67 values for guaranteed bit rate QoS flows
* [71 - 76] value range for guaranteed bit rate QoS flows
* [5 - 9] value range for non-guaranteed bit rate QoS flows
* 69, 70, 79, 80 values for non-guaranteed bit rate QoS flows
* [82 - 85] value range for delay critical guaranteed bit rate QoS flows
* [128 - 254] value range for Operator-specific 5QIs */
int32_t dlGfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]) */
int32_t ulGfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
int32_t dlMfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
int32_t ulMfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
* omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
int32_t ulSambr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the UL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/s. */
int32_t dlSambr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the DL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/s. */
int32_t averagingWindow; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the averaging window(see 3GPP TS 24.501 [161]).
* The value is in milliseconds. */
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; specifies a particular QoS flow definition, Traffic Flows
* definition and a PDP Context definition (see the +CGDCONT and +CGDSCONT
* commands).
*/
int32_t cid;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* 0 5QI is selected by network
* [1 - 4] value range for guaranteed bit rate QoS flows
* 65, 66, 67 values for guaranteed bit rate QoS flows
* [71 - 76] value range for guaranteed bit rate QoS flows
* [5 - 9] value range for non-guaranteed bit rate QoS flows
* 69, 70, 79, 80 values for non-guaranteed bit rate QoS flows
* [82 - 85] value range for delay critical guaranteed bit rate QoS flows
* [128 - 254] value range for Operator-specific 5QIs
*/
int32_t qi;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL GFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161])
*/
int32_t dlGfbr;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL GFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t ulGfbr;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates DL MFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t dlMfbr;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates UL MFBR in case of GBR 5QI. The value is in
* kbit/s. This parameter is omitted for a non-GBR 5QI (see 3GPP TS 24.501
* [161]).
*/
int32_t ulMfbr;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the UL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/s.
*/
int32_t ulSambr;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the DL session AMBR(see 3GPP TS 24.501 [161]).
* The value is in kbit/s.
*/
int32_t dlSambr;
/**
* From 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
* integer type; indicates the averaging window(see 3GPP TS 24.501 [161]).
* The value is in milliseconds.
*/
int32_t averagingWindow;
} HRilLinkBandwidthInfo;
/**
* @brief Defines the network bandwidth reporting rule.
*/
typedef struct {
/** Radio Access Technology*/
RatType rat;
int32_t delayMs; /* integer type; (0,1,2,…) indicates the targeted time between request to transfer an SDU
* at one SAP to its delivery at the other SAP, in milliseconds. If the parameter is set to
* '0' the subscribed value will be requested (refer 3GPP TS 24.008 [8] clause 10.5.6.5). */
/**
* integer type; (0,1,2,) indicates the targeted time between request to
* transfer an SDU at one SAP to its delivery at the other SAP, in
* milliseconds. If the parameter is set to '0' the subscribed value will
* be requested (refer 3GPP TS 24.008 [8] clause 10.5.6.5).
*/
int32_t delayMs;
/** Uplink delay. */
int32_t delayUplinkKbps;
/** Downlink delay. */
int32_t delayDownlinkKbps;
/** Maximum number of uplink parameters. */
int32_t maximumUplinkKbpsSize;
/** Maximum number of downlink parameters. */
int32_t maximumDownlinkKbpsSize;
/** Maximum uplink parameter list. */
int32_t *maximumUplinkKbps;
/** Maximum downlink parameter list. */
int32_t *maximumDownlinkKbps;
} HRilLinkBandwidthReportingRule;
/**
* @brief Defines the data service performance mode.
*/
typedef struct {
int32_t performanceEnable; /* Performance Enable. eg: 1-enable, 0-disable */
int32_t enforce; /* Whether Enforce Data Performance. eg: 1-enable, 0-disable */
/** Performance Enable. eg: 1-enable, 0-disable */
int32_t performanceEnable;
/** Whether Enforce Data Performance. eg: 1-enable, 0-disable */
int32_t enforce;
} HRilDataPerformanceInfo;
/**
* @brief Defines the sleep mode for data services.
*/
typedef struct {
int32_t sleepEnable; /* Sleep Mode Enable. eg: 1-enable, 0-disable */
/** Sleep Mode Enable. eg: 1-enable, 0-disable */
int32_t sleepEnable;
} HRilDataSleepInfo;
/**
* @brief Defines the data link capability.
*/
typedef struct {
int32_t primaryDownlinkKbps; /* Primary downlink capability in kbps */
int32_t primaryUplinkKbps; /* Primary uplink capability in kbps */
int32_t secondaryDownlinkKbps; /* Secondary downlink capability in kbps */
int32_t secondaryUplinkKbps; /* Secondary uplink capability in kbps */
/** Primary downlink capability in kbps. */
int32_t primaryDownlinkKbps;
/** Primary uplink capability in kbps. */
int32_t primaryUplinkKbps;
/** Secondary downlink capability in kbps. */
int32_t secondaryDownlinkKbps;
/** Secondary uplink capability in kbps. */
int32_t secondaryUplinkKbps;
} HRilDataLinkCapability;
/**
* @brief Defines the data request method.
*/
typedef struct {
/**
* @brief Sets the initial default network access technology (APN).
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*SetInitApnInfo)(const ReqDataInfo *requestInfo, const HRilDataInfo *data);
/**
* @brief Activates the packet data protocol (PDP) context.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param data Indicates the data information.
* @see ReqDataInfo | HRilDataInfo
*/
void (*ActivatePdpContext)(const ReqDataInfo *requestInfo, const HRilDataInfo *data);
/**
* @brief Deactivates the PDP context.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param data Indicates the data information.
* @see ReqDataInfo | HRilDataInfo
*/
void (*DeactivatePdpContext)(const ReqDataInfo *requestInfo, const HRilDataInfo *data);
/**
* @brief Obtains the PDP context list.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetPdpContextList)(const ReqDataInfo *requestInfo);
/**
* @brief Obtains the current link information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param cid Indicates a particular PDP context definition.
* @see ReqDataInfo
*/
void (*GetLinkBandwidthInfo)(const ReqDataInfo *requestInfo, int32_t cid);
/**
* @brief Sets the rule for reporting the data link bandwidth information.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param data Indicates the network bandwidth reporting rule.
* @see ReqDataInfo | HRilLinkBandwidthReportingRule
*/
void (*SetLinkBandwidthReportingRule)(const ReqDataInfo *requestInfo, const HRilLinkBandwidthReportingRule *data);
/**
* @brief Sets the PDP context information for the data service.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param data Indicates the data information.
* @param len Indicates the length of data.
* @see ReqDataInfo | HRilDataInfo
*/
void (*SetDataProfileInfo)(const ReqDataInfo *requestInfo, const HRilDataInfo *data, int32_t len);
/**
* @brief Sends the data service performance mode.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param data Indicates the data service performance mode.
* @see ReqDataInfo | HRilDataPerformanceInfo
*/
void (*SendDataPerformanceMode)(const ReqDataInfo *requestInfo, const HRilDataPerformanceInfo *data);
/**
* @brief Sends the data service sleep mode.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param data Indicates the sleep mode for data services.
* @see ReqDataInfo | HRilDataSleepInfo
*/
void (*SendDataSleepMode)(const ReqDataInfo *requestInfo, const HRilDataSleepInfo *data);
/**
* @brief Enables the data service of a SIM card slot.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @param enabled Whether to enable the data service.
* @see ReqDataInfo
*/
void (*SetDataPermitted)(const ReqDataInfo *requestInfo, int32_t enabled);
/**
* @brief Get link capability.
*
* @param requestInfo Request data info, for details, see {@link
* ReqDataInfo}.
* @see ReqDataInfo
*/
void (*GetLinkCapability)(const ReqDataInfo *requestInfo);
} HRilDataReq;
#ifdef __cplusplus

View File

@ -22,15 +22,45 @@
extern "C" {
#endif
/**
* @brief Enumerates RIL system service states.
*/
typedef struct {
/**
* System service status
*/
HRilSrvStatus srvStatus;
/**
* System service domain
*/
HRilSrvDomain srvDomain;
/**
* Roaming status
*/
HRilRoamStatus roamStatus;
/**
* SIM card status
*/
HRilSimStatus simStatus;
/**
* SIM card lock status
*/
HRilSimLockStatus lockStatus;
/**
* System mode
*/
HRilSysMode sysMode;
/**
* String corresponding to the system mode
*/
char *sysModeName;
/**
* Radio access technology type. For details, see {@link RilRadioTech}.
*/
HRilRadioTech actType;
/**
* String corresponding to the radio access technology type
*/
char *actName;
} HRilVoiceRadioInfo;

View File

@ -24,262 +24,798 @@
extern "C" {
#endif
/* From 3GPP TS 27.007 8.5 */
/**
* @brief Defines the GSM received signal strength indicator.
*
* From 3GPP TS 27.007 8.5
*/
typedef struct {
int32_t rxlev; /* integer type, received signal strength level (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value
0~99 */
int32_t ber; /* bit error rate, value range 0 ~ 7, max is 99, if unknown then set to max */
/**
* Integer type, received signal strength level (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value
* 0~99
*/
int32_t rxlev;
/**
* Bit error rate, value range 0 ~ 7, max is 99, if unknown then set to max
*/
int32_t ber;
} HRilGsmRssi;
/* From 3GPP TS 27.007 8.5 */
/**
* @brief Defines the WCDMA received signal strength indicator.
*
* From 3GPP TS 27.007 8.5
*/
typedef struct {
int32_t rxlev; /* integer type, received signal strength level (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value
0~99 */
int32_t ecio; /* integer type, ratio of the received energy per PN chip to the total received power
* spectral density (see 3GPP TS 25.133 [95] sub-clause). */
int32_t rscp; /* integer type, received signal code power (see 3GPP TS 25.133 [95] sub-clause 9.1.1.3 and
* 3GPP TS 25.123 [96] sub-clause 9.1.1.1.3).
* range value 0 ~ 96, 255 not known or not detectable */
int32_t ber; /* bit error rate, value range 0 ~ 7, max is 99, if unknown then set to max */
/**
* Integer type, received signal strength level (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value
* 0~99
*/
int32_t rxlev;
/**
* Integer type, ratio of the received energy per PN chip to the total received power
* spectral density (see 3GPP TS 25.133 [95] sub-clause).
*/
int32_t ecio;
/**
* Integer type, received signal code power (see 3GPP TS 25.133 [95] sub-clause 9.1.1.3 and
* 3GPP TS 25.123 [96] sub-clause 9.1.1.1.3).
* range value 0 ~ 96, 255 not known or not detectable
*/
int32_t rscp;
/**
* Bit error rate, value range 0 ~ 7, max is 99, if unknown then set to max
*/
int32_t ber;
} HRilWcdmaRssi;
/* From 3GPP TS 27.007 8.69 */
/**
* @brief Defines the CDMA received signal strength indicator.
*
* From 3GPP TS 27.007 8.69
*/
typedef struct {
int32_t absoluteRssi; /* Absolute value of signal strength. This value is the actual Rssi value
* multiplied by -1.
* e.g: Rssi is -75, then this response value will be 75 */
int32_t ecno; /* ratio of the received energy per PN chip to the total received power spectral density,
* e.g: If the actual Ec/Io is -12.5 dB, then this response value will be 125.
* from 3GPP TS 25.133[95] */
/**
* Absolute value of signal strength. This value is the actual Rssi value
* multiplied by -1.
* e.g: Rssi is -75, then this response value will be 75
*/
int32_t absoluteRssi;
/**
* Ratio of the received energy per PN chip to the total received power spectral density,
* e.g: If the actual Ec/Io is -12.5 dB, then this response value will be 125.
* from 3GPP TS 25.133[95]
*/
int32_t ecno;
} HRilCdmaRssi;
/**
* @brief Defines the LTE signal strength.
*/
typedef struct {
int32_t rxlev; /* integer type, received signal strength level (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value
0~99 */
int32_t rsrq; /* integer type, reference signal received quality (see 3GPP TS 36.133 [96] sub-clause 9.1.7)
* value range 0~33, 255 not known or not detectable */
int32_t rsrp; /* integer type, reference signal received power (see 3GPP TS 36.133 [96] sub-clause 9.1.4)
* value range 0~97, 255 not known or not detectable */
int32_t snr; /* integer type, representing the signal-to-interference plus noise ratio, suitable for LTE mode
* value range 0~251, 255 not known or not detectable */
/**
* Integer type, received signal strength level (see 3GPP TS 45.008 [20] sub-clause 8.1.4) value
* 0~99
*/
int32_t rxlev;
/**
* Integer type, reference signal received quality (see 3GPP TS 36.133 [96] sub-clause 9.1.7)
* value range 0~33, 255 not known or not detectable
*/
int32_t rsrq;
/**
* Integer type, reference signal received power (see 3GPP TS 36.133 [96] sub-clause 9.1.4)
* value range 0~97, 255 not known or not detectable
*/
int32_t rsrp;
/**
* Integer type, representing the signal-to-interference plus noise ratio, suitable for LTE mode
* value range 0~251, 255 not known or not detectable
*/
int32_t snr;
} HRilLteRssi;
/**
* @brief Defines the TD-SCDMA signal strength.
*/
typedef struct {
/**
* Received signal code power
*/
int32_t rscp;
} HRilTdScdmaRssi;
/**
* @brief Defines the NR signal strength.
*/
typedef struct {
/**
* Reference signal received power
*/
int32_t rsrp;
/**
* Received signal quality
*/
int32_t rsrq;
/**
* Signal to interference plus noise ratio
*/
int32_t sinr;
} HRilNrRssi;
/**
* @brief Defines the received signal strength information.
*/
typedef struct {
/**
* GSM received signal strength indicator
*/
HRilGsmRssi gsmRssi;
/**
* CDMA received signal strength indicator
*/
HRilCdmaRssi cdmaRssi;
/**
* WCDMA received signal strength indicator
*/
HRilWcdmaRssi wcdmaRssi;
/**
* LTE received signal strength indicator
*/
HRilLteRssi lteRssi;
/**
* TD-SCDMA received signal strength indicator
*/
HRilTdScdmaRssi tdScdmaRssi;
/**
* NR received signal strength indicator
*/
HRilNrRssi nrRssi;
} HRilRssi;
/**
* @brief Defines the network mode information.
*/
typedef struct {
/**
* Request SN
*/
int32_t serial;
/**
* Network mode
*/
int32_t selectMode;
/**
* Carrier
*/
char *oper;
} HRilSetNetworkModeInfo;
/**
* @brief Defines the registration type
*/
typedef enum {
CS_REG_TYPE = 1, /* Corresponds to AT command: AT+CREG */
PS_REG_TYPE, /* Corresponds to AT command: AT+CGREG */
/**
* Corresponds to AT command: AT+CREG
*/
CS_REG_TYPE = 1,
/**
* Corresponds to AT command: AT+CGREG
*/
PS_REG_TYPE,
} HRilRegType;
/**
* @brief Defines the registration position index in response
*/
typedef enum {
REG_STAT_POS = 0, /* AT command: +CREG,+CGREG,regState field position index in response */
REG_LAC_POS, /* Lac field position index in response */
REG_CELL_ID_POS, /* CellId field position index in response */
REG_ACT_POS, /* ActType field position index in response */
REG_NR_AVAILABLE_POS, /* AT command: +C5GREG,isNrAvailable field position index in response */
REG_EN_DC_AVAILABLE_POS, /* AT command: +C5GREG,isEnDcAvailable field position index in response */
REG_DC_NR_RESTRICTED_POS, /* AT command: +C5GREG,isDcNrAvailable field position index in response */
/**
* AT command: +CREG,+CGREG,regState field position index in response
*/
REG_STAT_POS = 0,
/**
* Lac field position index in response
*/
REG_LAC_POS,
/**
* CellId field position index in response
*/
REG_CELL_ID_POS,
/**
* ActType field position index in response
*/
REG_ACT_POS,
/**
* AT command: +C5GREG,isNrAvailable field position index in response
*/
REG_NR_AVAILABLE_POS,
/**
* AT command: +C5GREG,isEnDcAvailable field position index in response
*/
REG_EN_DC_AVAILABLE_POS,
/**
* AT command: +C5GREG,isDcNrAvailable field position index in response
*/
REG_DC_NR_RESTRICTED_POS,
} HRilRegPosIndex;
/**
* @brief Defines the registration message type
*/
typedef enum {
REG_NOTIFY_TYPE = 0, /* AT command: +CREG,+CGREG data Message notify type */
REG_RESPONSE_TYPE, /* AT command: +CREG,+CGREG data Message response type */
/**
* AT command: +CREG,+CGREG data Message notify type
*/
REG_NOTIFY_TYPE = 0,
/**
* AT command: +CREG,+CGREG data Message response type
*/
REG_RESPONSE_TYPE,
} HRilRegMsgType;
/**
* @brief Defines the registration status information.
*/
typedef struct {
/**
* registration type
*/
HRilRegType regType;
/**
* registration message type
*/
HRilRegMsgType regMsgType;
/**
* Notification type
*/
HRilRegNotifyMode notifyMode;
/**
* Registration status
*/
HRilRegStatus regStatus;
/**
* Location area code
*/
int32_t lacCode;
/**
* Cell ID
*/
int32_t cellId;
/**
* Radio access technology type
*/
HRilRadioTech actType;
/**
* Whether the NR mode is available
*/
int32_t isNrAvailable;
/**
* Whether ENDC is available
*/
int32_t isEnDcAvailable;
/**
* Whether DCNR is restricted
*/
int32_t isDcNrRestricted;
} HRilRegStatusInfo;
/**
* @brief Defines the physical channel configuration.
*/
typedef struct {
/**
* Connection status
*/
HRilCellConnectionStatus cellConnStatus;
/**
* Radio access technology type
*/
HRilRadioTech ratType;
/**
* Downlink bandwidth in kHz
*/
int32_t cellBandwidthDownlinkKhz;
/**
* Uplink bandwidth in kHz.
*/
int32_t cellBandwidthUplinkKhz;
/**
* Frequency range
*/
int32_t freqRange;
/**
* Downlink channel ID
*/
int32_t downlinkChannelNum;
/**
* Uplink channel ID
*/
int32_t uplinkChannelNum;
/**
* Physical cell ID
*/
int32_t physicalCellId;
/**
* Logical device ID
*/
int32_t contextIdNum;
/**
* Uplink channel ID
*/
int32_t *contextIds;
} HRilPhyChannelConfig;
/**
* @brief Defines the channel configuration information list.
*/
typedef struct {
/**
* Number
*/
int32_t itemNum;
/**
* Physical channel configuration
*/
HRilPhyChannelConfig *channelConfigs;
} HRilChannelConfigList;
/**
* @brief Defines the registration status information of the IMS.
*/
typedef struct {
/**
* Notification type
*/
int32_t notifyType;
/**
* Registration information
*/
int32_t regInfo;
/**
* Extension information
*/
int32_t extInfo;
} HRilImsRegStatusInfo;
/**
* @brief Defines the available network information.
*/
typedef struct {
/**
* Long name of the registered network in alphanumeric format
*/
char *longName;
/**
* Short name of the registered network in alphanumeric format
*/
char *shortName;
/**
* Available network ID
*/
char *numeric;
/**
* Network status
*/
int32_t status;
/**
* Radio access technology type
*/
int32_t rat;
} AvailableOperInfo;
/**
* @brief Defines the CDMA cellular information.
*/
typedef struct {
int32_t systemId; /* integer type and range is 0-65535 */
int32_t networkId; /* integer type and range is 0-65535 */
int32_t baseId; /* integer type and range is 0-65535 */
int32_t zoneId; /* integer type and range is 0-65535 */
int32_t pilotPn; /* integer type and range is 0-65535 */
int32_t pilotStrength; /* integer type and range is 0-65535 */
int32_t channel; /* integer type and range is 0-65535 */
int32_t longitude; /* integer type and range is -648000 -- 648000, unit: second */
int32_t latitude; /* integer type and range is -648000 -- 648000, unit: second */
/**
* System ID range is 0-65535
*/
int32_t systemId;
/**
* Network ID range is 0-65535
*/
int32_t networkId;
/**
* Basic ID range is 0-65535
*/
int32_t baseId;
/**
* Zone ID range is 0-65535
*/
int32_t zoneId;
/**
* PN pilot sequence range is 0-65535
*/
int32_t pilotPn;
/**
* Pilot signal strength range is 0-65535
*/
int32_t pilotStrength;
/**
* Channel range is 0-65535
*/
int32_t channel;
/**
* Longitude range is -648000 -- 648000, unit: second
*/
int32_t longitude;
/**
* Latitude range is -648000 -- 648000, unit: second
*/
int32_t latitude;
} CellRatCdma;
// cellList
/**
* @brief Defines the GSM cell information.
*/
typedef struct {
int32_t band; /* value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~1023 */
int32_t bsic; /* cell sit code 0~63 */
/**
* Cell band information, value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900
*/
int32_t band;
/**
* Absolute RF channel number of the broadcast control channel (BCCH) carrier, which ranges from 0 to 1023
*/
int32_t arfcn;
/**
* Base transceiver station identity code 0~63
*/
int32_t bsic;
/**
* Cell information ID
*/
int32_t cellId;
int32_t lac; /* Location area code 0~FFFF */
int32_t rxlev; /* <RXLEV> dbm -120~37 */
/**
* Location area code, which ranges from 0 to 0xFFFF
*/
int32_t lac;
/**
* Signal received strength, which ranges from -120 to 37
*/
int32_t rxlev;
} CellListRatGsm;
/**
* @brief Defines the LTE cell information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~39649 */
int32_t pci; /* Physical cell ID. 0~503 */
int32_t rsrp; /* Reference Signal Received Power -140~-44, dBm */
int32_t rsrq; /* Reference Signal Received Quality -19.5~-3 */
int32_t rxlev; /* <RXLEV> dbm -120~37 */
/**
* Absolute RF channel number of the BCCH carrier, which ranges from 0 to 1023
*/
int32_t arfcn;
/**
* Physical cell ID. 0~503
*/
int32_t pci;
/**
* Signal received power, which ranges from -140 to -44
*/
int32_t rsrp;
/**
* Signal received quality, which ranges from -19 to -3
*/
int32_t rsrq;
/**
* Signal received strength, which ranges from -120 to 37
*/
int32_t rxlev;
} CellListRatLte;
/**
* @brief Defines the WCDMA cell information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCHcarrier 0~16383 */
int32_t psc; /* Primary Scrambling Code. 0~511 */
int32_t rscp; /* Received Signal Code Power in dBm -120~25, dBm */
int32_t ecno; /* The ratio of power per modulation bit to noise spectral density. -25~0 */
/**
* Absolute RF channel number of the BCCH carrier, which ranges from 0 to 16383
*/
int32_t arfcn;
/**
* Primary Scrambling Code. 0~511
*/
int32_t psc;
/**
* Received Signal Code Power in dBm -120~25, dBm
*/
int32_t rscp;
/**
* The ratio of power per modulation bit to noise spectral density. -25~0
*/
int32_t ecno;
} CellListRatWcdma;
/**
* @brief Defines the TD-SCDMA cellular information.
*/
typedef struct {
/**
* Absolute RF channel number of the BCCH carrier
*/
int32_t arfcn;
/**
* Synchronization flag
*/
int32_t syncId;
/**
* Super cell
*/
int32_t sc;
/**
* Cell ID
*/
int32_t cellId;
/**
* Location area code
*/
int32_t lac;
/**
* Received signal code power
*/
int32_t rscp;
/**
* Discontinuous reception cycle
*/
int32_t drx;
/**
* Routing area code
*/
int32_t rac;
/**
* Super cell ID
*/
int32_t cpid;
} CellRatTdscdma;
/**
* @brief Defines the NR cellular information.
*/
typedef struct {
/**
* Absolute RF channel number of the BCCH carrier
*/
int32_t nrArfcn;
/**
* Physical cell ID
*/
int32_t pci;
/**
* Type allocation code
*/
int32_t tac;
/**
* NR cell ID
*/
int64_t nci;
/**
* Signal received power, which ranges from -140 to -44
*/
int32_t rsrp;
/**
* Signal received quality, which ranges from -19 to -3
*/
int32_t rsrq;
} CellRatNr;
/**
* @brief Defines the cell information.
*/
typedef struct {
/**
* Radio access technology type
*/
int32_t ratType;
union {
/**
* GSM cellular information
*/
CellListRatGsm gsm;
/**
* LTE cellular information
*/
CellListRatLte lte;
/**
* WCDMA signal strength
*/
CellListRatWcdma wcdma;
/**
* CDMA signal strength
*/
CellRatCdma cdma;
/**
* TD-SCDMA signal strength
*/
CellRatTdscdma tdscdma;
/**
* NR signal strength
*/
CellRatNr nr;
} ServiceCellParas;
} CellInfo;
/**
* @brief Defines the cell information list.
*/
typedef struct {
/**
* Number
*/
int32_t itemNum;
/**
* Neighboring cell list
*/
CellInfo *cellNearbyInfo;
} CellInfoList;
/**
* @brief Defines the GSM cellular information.
*/
typedef struct {
int32_t band; /* value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900 */
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t bsic; /* cell sit code 0~63 */
/**
* Cell band information value:0~3 0:GSM850 1:GSM900 0:GSM1800 0:GSM1900
*/
int32_t band;
/**
* Absolute RF channel number of the BCCH carrier, which ranges from 0 to 1023
*/
int32_t arfcn;
/**
* Base transceiver station identity code
*/
int32_t bsic;
/**
* Cell ID
*/
int32_t cellId;
int32_t lac; /* Location area code 0~FFFF */
int32_t rxlev; /* <RXLEV> dbm -120~37 */
int32_t rxQuality; /* 0~7 */
int32_t ta; /* 0~63 */
/**
* Location area code, which ranges from 0 to 0xFFFF
*/
int32_t lac;
/**
* Signal received strength, which ranges from -120 to 37
*/
int32_t rxlev;
/**
* Signal received quality, which ranges from 0 to 7
*/
int32_t rxQuality;
/**
* Timing advance, which ranges from 0 to 63
*/
int32_t ta;
} CellRatGsm;
/**
* @brief Defines the LTE cellular information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
/**
* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023
*/
int32_t arfcn;
/**
* Cell ID
*/
int32_t cellId;
int32_t pci; /* Physical cell ID. 0~503 */
int32_t tac; /* Tracking Area Code 0~FFFF */
int32_t rsrp; /* Reference Signal Received Power -140~-44 dBm */
int32_t rsrq; /* Reference Signal Received Quality -19.5~-3 */
int32_t rssi; /* Receiving signal strength in dbm 90~-25 */
/**
* Physical cell ID. 0~503
*/
int32_t pci;
/**
* Tracking Area Code 0~FFFF
*/
int32_t tac;
/**
* Reference Signal Received Power -140~-44 dBm
*/
int32_t rsrp;
/**
* Reference Signal Received Quality -19.5~-3
*/
int32_t rsrq;
/**
* Receiving signal strength in dbm 90~-25
*/
int32_t rssi;
} CellRatLte;
/**
* @brief Defines the WCDMA cellular information.
*/
typedef struct {
int32_t arfcn; /* Absolute Radio Frequency Channel Number of the BCCH carrier 0~1023 */
int32_t psc; /* Primary Scrambling Code. 0~511 */
/**
* Absolute RF channel number of the BCCH carrier, which ranges from 0 to 16383
*/
int32_t arfcn;
/**
* Primary Scrambling Code. 0~511
*/
int32_t psc;
/**
* Cell ID
*/
int32_t cellId;
int32_t lac; /* Tracking Area Code 0~FFFF */
int32_t rscp; /* Reference Signal Received Power -140~-44, dBm */
int32_t rxlev; /* Reference Signal Received Quality -19.5~-3 */
int32_t ecno; /* Receiving signal strength in dbm 90~-25 */
int32_t drx; /* Discontinuous reception cycle length. 6~9 */
int32_t ura; /* UTRAN Registration Area Identity. 0~65535 */
/**
* Location area code, which ranges from 0 to 0xFFFF
*/
int32_t lac;
/**
* Reference Signal Received Power -140~-44, dBm
*/
int32_t rscp;
/**
* Signal received strength, which ranges from -19 to -3
*/
int32_t rxlev;
/**
* Received signal strength in dbm, which ranges from -90 to -25
*/
int32_t ecno;
/**
* Discontinuous reception cycle, which ranges from 6 to 9
*/
int32_t drx;
/**
* UMTS Terrestrial Radio Access Network (UTRAN) registration zone ID
*/
int32_t ura;
} CellRatWcdma;
/**
* @brief Defines the current cell information vendor
*/
typedef struct {
/**
* Radio access technology type
*/
int32_t ratType;
/**
* Mobile country code (MCC)
*/
int32_t mcc;
/**
* Mobile network code (MNC)
*/
int32_t mnc;
union {
/**
* GSM cellular information
*/
CellRatGsm gsm;
/**
* LTE cellular information
*/
CellRatLte lte;
/**
* WCDMA cellular information
*/
CellRatWcdma wcdma;
/**
* CDMA cellular information
*/
CellRatCdma cdma;
/**
* TD-SCDMA cellular information
*/
CellRatTdscdma tdscdma;
/**
* NR cellular information
*/
CellRatNr nr;
} ServiceCellParas;
} CurrentCellInfoVendor;
/**
* @brief Defines the current cell information list
*/
typedef struct {
/**
* Number of cells
*/
int32_t itemNum;
/**
* Current cell information
*/
CurrentCellInfoVendor *currentCellInfo;
} CurrentCellInfoList;

View File

@ -24,130 +24,311 @@
extern "C" {
#endif
/* Form 3GPP TS 27.007 V4.3.0 (2001-12) 8.18, + CRSM */
/**
* @brief Defines the SIM data request information.
*
* Form 3GPP TS 27.007 V4.3.0 (2001-12) 8.18, + CRSM
*/
typedef struct {
int32_t command; /* command passed on by the MT to the SIM; refer 3GPP TS 51.011 [28]
* 176 READ BINARY
* 178 READ RECORD
* 192 GET RESPONSE
* 214 UPDATE BINARY
* 220 UPDATE RECORD
* 242 STATUS
* 203 RETRIEVE DATA
* 219 SET DATA
*/
int32_t fileid; /* this is the identifier of an elementary datafile on SIM.
* Mandatory for every command except STATUS. */
int32_t p1; /* parameters passed on by the MT to the SIM. These parameters are mandatory for every command,
* except GET RESPONSE and STATUS. The values are described in 3GPP TS 51.011 [28]. */
int32_t p2; /* parameters passed on by the MT to the SIM. These parameters are mandatory for every command,
* except GET RESPONSE and STATUS. The values are described in 3GPP TS 51.011 [28]. */
int32_t p3; /* parameters passed on by the MT to the SIM. These parameters are mandatory for every command,
* except GET RESPONSE and STATUS. The values are described in 3GPP TS 51.011 [28]. */
char *data; /* information which shall be written to the SIM (hexadecimal character format; refer +CSCS). */
char *pathid; /* contains the path of an elementary file on the SIM/UICC in hexadecimal format
* as defined in ETSI TS 102 221 [60] (e.g. "7F205F70" in SIM and UICC case).
* The <pathid> shall only be used in the mode "select by path from MF"
* as defined in ETSI TS 102 221 [60]. */
/**
* Command passed on by the MT to the SIM; refer 3GPP TS 51.011 [28]
* 176 READ BINARY
* 178 READ RECORD
* 192 GET RESPONSE
* 214 UPDATE BINARY
* 220 UPDATE RECORD
* 242 STATUS
* 203 RETRIEVE DATA
* 219 SET DATA
*/
int32_t command;
/**
* This is the identifier of an elementary datafile on SIM.
* Mandatory for every command except STATUS.
*/
int32_t fileid;
/**
* Parameters passed on by the MT to the SIM. These parameters are mandatory for every command,
* except GET RESPONSE and STATUS. The values are described in 3GPP TS 51.011 [28].
*/
int32_t p1;
/**
* Parameters passed on by the MT to the SIM. These parameters are mandatory for every command,
* except GET RESPONSE and STATUS. The values are described in 3GPP TS 51.011 [28].
*/
int32_t p2;
/**
* Parameters passed on by the MT to the SIM. These parameters are mandatory for every command,
* except GET RESPONSE and STATUS. The values are described in 3GPP TS 51.011 [28].
*/
int32_t p3;
/**
* Information which shall be written to the SIM (hexadecimal character format; refer +CSCS).
*/
char *data;
/**
* Contains the path of an elementary file on the SIM/UICC in hexadecimal format
* as defined in ETSI TS 102 221 [60] (e.g. "7F205F70" in SIM and UICC case).
* The <pathid> shall only be used in the mode "select by path from MF"
* as defined in ETSI TS 102 221 [60].
*/
char *pathid;
/**
* PIN2
*/
char *pin2;
} HRilSimIO;
/* Form TS 27.007.8.18 +CRSM */
/**
* @brief Defines the response to the SIM data request.
*
* Form TS 27.007.8.18 +CRSM
*/
typedef struct {
int32_t sw1; /* information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command. */
int32_t sw2; /* information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command. */
char *response; /* response of a successful completion of the command previously issued
* (hexadecimal character format; refer +CSCS). STATUS and GET RESPONSE return data,
* which gives information about the current elementary datafield.This information
* includes the type of file and its size (refer 3GPP TS 51.011 [28]). After READ BINARY,
* READ RECORD or RETRIEVE DATA command the requested data will be returned.
* <response> is not returned after a successful UPDATE BINARY,
* UPDATE RECORD or SET DATA command */
/**
* Information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command.
*/
int32_t sw1;
/**
* Information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command.
*/
int32_t sw2;
/**
* Response of a successful completion of the command previously issued
* (hexadecimal character format; refer +CSCS). STATUS and GET RESPONSE return data,
* which gives information about the current elementary datafield.This information
* includes the type of file and its size (refer 3GPP TS 51.011 [28]). After READ BINARY,
* READ RECORD or RETRIEVE DATA command the requested data will be returned.
* <response> is not returned after a successful UPDATE BINARY,
* UPDATE RECORD or SET DATA command
*/
char *response;
} HRilSimIOResponse;
/**
* @brief Defines the response to the request for enabling the logical channel of the APDU.
*/
typedef struct {
int32_t sw1; /* information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command. */
int32_t sw2; /* information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command. */
/**
* Information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command.
*/
int32_t sw1;
/**
* Information from the SIM about the execution of the actual command.
* These parameters are delivered to the TE in both cases,
* on successful or failed execution of the command.
*/
int32_t sw2;
/**
* ID of the opened logical channel
*/
int32_t channelId;
/**
* Response information
*/
char *response;
} HRilOpenLogicalChannelResponse;
/**
* @brief Defines the SIM card status information.
*/
typedef struct {
int32_t index; /* sim index */
/**
* SIM card index
*/
int32_t index;
/**
* SIM card type:
*/
HRilSimType simType;
/**
* SIM card status:
*/
HRilSimState simState;
} HRilCardState;
/**
* @brief Defines the lock status information.
*/
typedef struct {
/**
* Query result. For details, see {@link RilErrType}.
*/
int32_t result;
/**
* Number of remaining attempts
*/
int32_t remain;
} HRilLockStatus;
/* From 3GPP TS 27.007 7.4 */
/**
* @brief Defines the SIM card lock information.
*
* From 3GPP TS 27.007 7.4
*/
typedef struct {
char *fac; /* ("SC","AO","OI","OX","AI","IR","AB","AG","AC","FD","PN","PU","PP") */
int32_t mode; /* 0 unlock
* 1 lock
* 2 query status */
int32_t status; /* 0 not active
* 1 active */
char *passwd; /* shall be the same as password specified for the facility
* from the MT user interface or with command Change Password +CPWD */
int32_t classx; /* is a sum of integers each representing a class of information (default 7 - voice, data and
* fax): 1 voice (telephony) 2 data (refers to all bearer services; with <mode>=2 this may refer
* only to some bearer service if TA does not support values 16, 32, 64 and 128) 4 fax (facsimile
* services) 8 short message service 16 data circuit sync 32 data circuit async 64
* dedicated packet access 128 dedicated PAD access */
/**
* ("SC","AO","OI","OX","AI","IR","AB","AG","AC","FD","PN","PU","PP")
*/
char *fac;
/**
* 0 unlock
* 1 lock
* 2 query status
*/
int32_t mode;
/**
* 0 not active
* 1 active
*/
int32_t status;
/**
* Shall be the same as password specified for the facility
* from the MT user interface or with command Change Password +CPWD
*/
char *passwd;
/**
* Is a sum of integers each representing a class of information (default 7 - voice, data and
* fax): 1 voice (telephony) 2 data (refers to all bearer services; with <mode>=2 this may refer
* only to some bearer service if TA does not support values 16, 32, 64 and 128) 4 fax (facsimile
* services) 8 short message service 16 data circuit sync 32 data circuit async 64
* dedicated packet access 128 dedicated PAD access
*/
int32_t classx;
} HRilSimClock;
/* From 3GPP TS 27.007 7.5 */
/**
* @brief Defines the SIM card password information.
*
* From 3GPP TS 27.007 7.5
*/
typedef struct {
char *fac; /* ("SC","AO","OI","OX","AI","IR","AB","AG","AC","FD","PN","PU","PP") */
char *oldPassword; /* <oldPassword> shall be the same as password specified for the facility from the MT
* user interface or with command Change Password +CPWD and <newPassword> is the new
* password; maximum length of password can be determined with <passwordLength> */
/**
* ("SC","AO","OI","OX","AI","IR","AB","AG","AC","FD","PN","PU","PP")
*/
char *fac;
/**
* <oldPassword> shall be the same as password specified for the facility from the MT
* user interface or with command Change Password +CPWD and <newPassword> is the new
* password
*/
char *oldPassword;
char *newPassword;
int32_t passwordLength; /* maximum length of the password for the facility */
/**
* Maximum length of the password for the facility
*/
int32_t passwordLength;
} HRilSimPassword;
/**
* @brief Defines the maximum number of SIM password attempts.
*/
typedef struct {
char *code;
/**
* Number of remaining password attempts
*/
int32_t times;
/**
* Number of remaining PUK attempts
*/
int32_t pukTimes;
/**
* Number of remaining PIN attempts
*/
int32_t pinTimes;
/**
* Number of remaining PUK2 attempts
*/
int32_t puk2Times;
/**
* Number of remaining PIN2 attempts
*/
int32_t pin2Times;
} HRilPinInputTimes;
/**
* @brief Enumerates radio protocol phases.
*/
typedef struct {
/**
* Session ID
*/
int32_t sessionId;
/**
* Radio protocol parameters.
*/
HRilRadioProtocolPhase phase;
/**
* Radio protocol technology:
*/
int32_t technology;
/**
* Modem ID, corresponding to slotId at the bottom layer
*/
int32_t modemId;
/**
* Radio protocol status.
*/
HRilRadioProtocolStatus status;
} HRilRadioProtocol;
/**
* @brief Defines the APDU data transmission request information.
*/
typedef struct {
/**
* Channel ID
*/
int32_t channelId;
/**
* APDU instruction type. For details, see ETSI 102 221 [55].
*/
int32_t type;
/**
* APDU instruction. For details, see ETSI 102 221 [55].
*/
int32_t instruction;
/**
* Command parameter 1 of the SIM data request. For details, see 3GPP TS 51.011[28].
*/
int32_t p1;
/**
* Command parameter 2 of the SIM data request. For details, see 3GPP TS 51.011[28].
*/
int32_t p2;
/**
* Command parameter 3 of the SIM data request. For details, see 3GPP TS 51.011[28].
* If p3 is a negative value, a 4-byte APDU is sent to the SIM card.
*/
int32_t p3;
/**
* Data to be transmitted
*/
char *data;
} HRilApduSimIO;
/**
* @brief Defines the SIM card authentication request information.
*/
typedef struct {
/**
* Request SN
*/
int32_t serial;
/**
* App ID
*/
char *aid;
/**
* Authentication data
*/
char *data;
} HRilSimAuthenticationRequestInfo;

View File

@ -23,55 +23,143 @@
extern "C" {
#endif
/**
* @brief Defines the SMS response.
*/
typedef struct {
int32_t msgRef; /* TP-Message-Reference for GSM, and BearerData MessageId for CDMA
* from 3GPP2 C.S0015-B, v2.0, 4.5-1 */
char *pdu; /* Protocol Data Unit */
int32_t errCode; /* if unknown or not applicable, that is -1
* from 3GPP 27.005, 3.2.5 for GSM/UMTS,
* 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA */
/**
* TP-Message-Reference for GSM, and BearerData MessageId for CDMA
* from 3GPP2 C.S0015-B, v2.0, 4.5-1
*/
int32_t msgRef;
/**
*Protocol Data Unit
*/
char *pdu;
/**
* if unknown or not applicable, that is -1
* from 3GPP 27.005, 3.2.5 for GSM/UMTS,
* 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA
*/
int32_t errCode;
} HRilSmsResponse;
/**
* @brief Defines the SMS message information in a SIM card.
*/
typedef struct {
/**
* Number index
*/
int32_t index;
/**
* Status
*/
int32_t state;
/**
* Short message service center
*/
char *smsc;
char *pdu; /* Protocol Data Unit */
/**
* Protocol Data Unit
*/
char *pdu;
} HRilSmsWriteSms;
/**
* @brief Defines the SMSC address information.
*/
typedef struct {
/**
* SMSC address type. For details, see 3GPP TS 24.011 [6].
*/
int32_t tosca;
/**
* SMSC address. For details, see 3GPP TS 24.011 [6].
*/
char *address;
} HRilServiceCenterAddress;
/* From 3GPP TS 27.005 AT+CSCB=[<mode>[,<mids>[,<dcss>]]] */
/**
* @brief Defines the GSM cell broadcast configuration information.
*
* From 3GPP TS 27.005 AT+CSCB=[<mode>[,<mids>[,<dcss>]]]
*/
typedef struct {
/**
* Mode (activated or not)
*/
int32_t mode;
/**
* Message IDs
*/
char *mids;
/**
* Data coding schemes
*/
char *dcss;
} HRilCBConfigInfo;
/**
* @brief Defines the CDMA cell broadcast configuration information.
*/
typedef struct {
/**
* Service
*/
int32_t service;
/**
* Language
*/
int32_t language;
/**
* Selected or not
*/
unsigned char checked;
} HRilCdmaCBConfigInfo;
/* From 3GPP TS 27.005 if text mode (+CMGF=1):
<CR><LF>+CBM:
<sn>,<mid>,<dcs>,<page>,<pages><CR><LF><data><CR>
<LF> if PDU mode
(+CMGF=0):
<CR><LF>+CBM: <length><CR><LF><pdu><CR><LF>
*/
/**
* @brief Defines the cell broadcast report information.
*
* From 3GPP TS 27.005 if text mode (+CMGF=1):
* <CR><LF>+CBM:
* <sn>,<mid>,<dcs>,<page>,<pages><CR><LF><data><CR>
* <LF> if PDU mode
* (+CMGF=0):
* <CR><LF>+CBM: <length><CR><LF><pdu><CR><LF>
*/
typedef struct {
/**
* Cell broadcast SN
*/
int32_t sn;
/**
* Message IDs
*/
int32_t mid;
/**
* Cell broadcast page number
*/
int32_t page;
/**
* Total number of cell broadcast pages
*/
int32_t pages;
/**
* Data coding schemes
*/
char *dcs;
/**
* Decoded cell broadcast content
*/
char *data;
/**
* Number of PDU bytes
*/
int32_t length;
/**
* Protocol data unit
*/
char *pdu;
} HRilCBConfigReportInfo;

View File

@ -34,6 +34,8 @@ ohos_shared_library("hril") {
"$RIL_HRIL/hril_timer_callback.cpp",
]
version_script = "$RIL_ADAPTER/services/hril/libhril.versionscript"
public_configs = [ ":ril_hril_config" ]
configs = [ "$RIL_ADAPTER/utils:utils_config" ]

View File

@ -67,6 +67,7 @@ public:
int32_t CloseUnFinishedUssd(int32_t serialId);
bool IsCallResponse(uint32_t code);
bool IsCallNotification(uint32_t code);
int32_t SetVonrSwitch(int32_t serialId, int32_t status);
int32_t GetCallListResponse(
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
@ -140,6 +141,8 @@ public:
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
int32_t CloseUnFinishedUssdResponse(
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
int32_t SetVonrSwitchResponse(
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
int32_t CallStateUpdated(int32_t notifyType, HRilErrNumber error, const void *response, size_t responseLen);
int32_t CallUssdNotice(int32_t notifyType, HRilErrNumber error, const void *response, size_t responseLen);

View File

@ -103,6 +103,7 @@ public:
int32_t SetBarringPassword(
int32_t slotId, int32_t serialId, const OHOS::HDI::Ril::V1_1::SetBarringInfo &setBarringInfo);
int32_t CloseUnFinishedUssd(int32_t slotId, int32_t serialId);
int32_t SetVonrSwitch(int32_t slotId, int32_t serialId, int32_t status);
// Data
int32_t ActivatePdpContext(

View File

@ -0,0 +1,23 @@
# Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
1.0 {
global:
extern "C++" {
*HRil*;
*OnTimerCallback*;
*On*Report*;
};
local:
*;
};

View File

@ -97,6 +97,7 @@ void HRilCall::AddCallResponseToMap()
respMemberFuncMap_[HREQ_CALL_GET_FAIL_REASON] = &HRilCall::GetCallFailReasonResponse;
respMemberFuncMap_[HREQ_CALL_SET_BARRING_PASSWORD] = &HRilCall::SetBarringPasswordResponse;
respMemberFuncMap_[HREQ_CALL_CLOSE_UNFINISHED_USSD] = &HRilCall::CloseUnFinishedUssdResponse;
respMemberFuncMap_[HREQ_SET_VONR_SWITCH] = &HRilCall::SetVonrSwitchResponse;
}
int32_t HRilCall::GetCallList(int32_t serialId)
@ -309,6 +310,11 @@ int32_t HRilCall::CloseUnFinishedUssd(int32_t serialId)
return RequestVendor(serialId, HREQ_CALL_CLOSE_UNFINISHED_USSD, callFuncs_, &HRilCallReq::CloseUnFinishedUssd);
}
int32_t HRilCall::SetVonrSwitch(int32_t serialId, int32_t status)
{
return RequestVendor(serialId, HREQ_SET_VONR_SWITCH, callFuncs_, &HRilCallReq::SetVonrSwitch, status);
}
void HRilCall::BuildICallList(
HDI::Ril::V1_1::CallInfoList &callInfoList, const void *response, size_t responseLen)
{
@ -732,6 +738,12 @@ int32_t HRilCall::CloseUnFinishedUssdResponse(
return Response(responseInfo, &HDI::Ril::V1_1::IRilCallback::CloseUnFinishedUssdResponse);
}
int32_t HRilCall::SetVonrSwitchResponse(
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen)
{
return Response(responseInfo, &HDI::Ril::V1_1::IRilCallback::SetVonrSwitchResponse);
}
int32_t HRilCall::CallStateUpdated(
int32_t notifyType, const HRilErrNumber error, const void *response, size_t responseLen)
{

View File

@ -530,6 +530,11 @@ int32_t HRilManager::CloseUnFinishedUssd(int32_t slotId, int32_t serialId)
return TaskSchedule(MODULE_HRIL_CALL, hrilCall_[slotId], &HRilCall::CloseUnFinishedUssd, serialId);
}
int32_t HRilManager::SetVonrSwitch(int32_t slotId, int32_t serialId, int32_t status)
{
return TaskSchedule(MODULE_HRIL_CALL, hrilCall_[slotId], &HRilCall::SetVonrSwitch, serialId, status);
}
// Data
int32_t HRilManager::ActivatePdpContext(
int32_t slotId, int32_t serialId, const OHOS::HDI::Ril::V1_1::DataCallInfo &dataCallInfo)

View File

@ -145,7 +145,7 @@ int32_t HRilSms::UpdateSimMessage(int32_t serialId, const OHOS::HDI::Ril::V1_1::
int32_t result = RequestVendor(
serialId, HREQ_SMS_UPDATE_SIM_MESSAGE, smsFuncs_, &HRilSmsReq::UpdateSimMessage, &msg, sizeof(HRilSmsWriteSms));
TELEPHONY_LOGI("UpdateSimMessage result is: %{public}d", result);
SafeFrees(msg.pdu);
SafeFrees(msg.pdu, msg.smsc);
return result;
}

View File

@ -23,6 +23,8 @@ config("ril_hril_hdf_config") {
ohos_shared_library("hril_hdf") {
sources = [ "$HRIL_HDF_ROOT/src/hril_hdf.c" ]
version_script = "$HRIL_HDF_ROOT/libhril_hdf.versionscript"
public_configs = [ ":ril_hril_hdf_config" ]
configs = [ "$RIL_ADAPTER/utils:utils_config" ]

View File

@ -0,0 +1,22 @@
# Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
1.0 {
global:
extern "C++" {
*InitRilAdapter*;
*ReleaseRilAdapter*;
};
local:
*;
};

View File

@ -72,6 +72,7 @@ void ReqSetEmergencyCallList(const ReqDataInfo *requestInfo, HRilEmergencyInfo *
void ReqGetCallFailReason(const ReqDataInfo *requestInfo);
void ReqSetBarringPassword(const ReqDataInfo *requestInfo, HRilSetBarringInfo info);
void ReqCloseUnFinishedUssd(const ReqDataInfo *requestInfo);
void ReqSetVonrSwitch(const ReqDataInfo *requestInfo, int32_t status);
void ReportCallStateUpdated(const char *str);
void ReportSrvccStatusUpdate(const char *str);

View File

@ -19,8 +19,6 @@
#include "at_support.h"
#include "hril_vendor_sms_defs.h"
#define MIN_SMSC_LEN 2
void ReqSendGsmSms(const ReqDataInfo *requestInfo, const char *const *data, size_t dataLen);
void ReqSendSmsAck(const ReqDataInfo *requestInfo, const int32_t *data, size_t dataLen);
void ReqSendCdmaSms(const ReqDataInfo *requestInfo, const char *data, size_t dataLen);

View File

@ -1498,3 +1498,13 @@ void ReqGetCallFailReason(const ReqDataInfo *requestInfo)
OnCallReport(GetSlotId(requestInfo), reportInfo, (const uint8_t *)&lastCcCause, sizeof(lastCcCause));
FreeResponseInfo(pResponse);
}
void ReqSetVonrSwitch(const ReqDataInfo *requestInfo, int32_t status)
{
int32_t err = HRIL_ERR_SUCCESS;
ResponseInfo *pResponse = NULL;
struct ReportInfo reportInfo = CreateReportInfo(requestInfo, err, HRIL_RESPONSE, 0);
OnCallReport(GetSlotId(requestInfo), reportInfo, NULL, 0);
FreeResponseInfo(pResponse);
}

View File

@ -248,9 +248,8 @@ static void SimMessageError(
static void WriteSimMessage(const ReqDataInfo *requestInfo, const HRilSmsWriteSms *data, size_t dataLen)
{
char cmd[MAX_CMD_LENGTH] = {0};
char smsPdu[MAX_CMD_LENGTH] = {0};
char smscArr[MIN_SMSC_LEN + 1] = { 0 };
char cmd[MAX_CMD_LENGTH] = { 0 };
char smsPdu[MAX_CMD_LENGTH] = { 0 };
int32_t err;
HRilSmsWriteSms *msg = NULL;
ResponseInfo *responseInfo = NULL;
@ -264,7 +263,7 @@ static void WriteSimMessage(const ReqDataInfo *requestInfo, const HRilSmsWriteSm
}
msg = ((HRilSmsWriteSms *)data);
if (msg->smsc == NULL || (strcmp(msg->smsc, "") == 0)) {
msg->smsc = smscArr;
msg->smsc = (char *)malloc(strlen("00") + 1);
if (strcpy_s(msg->smsc, strlen("00") + 1, "00") != EOK) {
TELEPHONY_LOGE("Set smsc failed");
reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_GENERIC_FAILURE, HRIL_RESPONSE, 0);
@ -358,7 +357,6 @@ bool CheckSimMessageValid(
{
ResponseInfo *responseInfo = NULL;
struct ReportInfo reportInfo = { 0 };
char smscArr[MIN_SMSC_LEN + 1] = { 0 };
if (data == NULL) {
TELEPHONY_LOGE("data is nullptr");
reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_GENERIC_FAILURE, HRIL_RESPONSE, 0);
@ -368,7 +366,7 @@ bool CheckSimMessageValid(
}
msg = ((HRilSmsWriteSms *)data);
if (msg->smsc == NULL || (strcmp(msg->smsc, "") == 0)) {
msg->smsc = smscArr;
msg->smsc = (char *)malloc(strlen("00") + 1);
if (strcpy_s(msg->smsc, strlen("00") + 1, "00") != EOK) {
TELEPHONY_LOGE("Set smsc failed");
reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_GENERIC_FAILURE, HRIL_RESPONSE, 0);

View File

@ -92,6 +92,7 @@ static const HRilCallReq g_callReqOps = {
.SetEmergencyCallList = ReqSetEmergencyCallList,
.SetBarringPassword = ReqSetBarringPassword,
.CloseUnFinishedUssd = ReqCloseUnFinishedUssd,
.SetVonrSwitch = ReqSetVonrSwitch,
};
static const HRilSimReq g_simReqOps = {

View File

@ -38,7 +38,7 @@ ohos_fuzztest("CallEmergencyNoticeFuzzTest") {
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libpub_utils",
"ipc:ipc_core",
"ipc:ipc_single",
"samgr:samgr_proxy",
]
defines = [

View File

@ -38,7 +38,7 @@ ohos_fuzztest("CallUssdNoticeFuzzTest") {
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libpub_utils",
"ipc:ipc_core",
"ipc:ipc_single",
"samgr:samgr_proxy",
]
defines = [

View File

@ -38,7 +38,7 @@ ohos_fuzztest("NewSmsNotifyFuzzTest") {
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libpub_utils",
"ipc:ipc_core",
"ipc:ipc_single",
"samgr:samgr_proxy",
]
defines = [

View File

@ -38,7 +38,7 @@ ohos_fuzztest("PdpContextListUpdatedFuzzTest") {
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libpub_utils",
"ipc:ipc_core",
"ipc:ipc_single",
"samgr:samgr_proxy",
]
defines = [

View File

@ -38,7 +38,7 @@ ohos_fuzztest("SimStkProactiveNotifyFuzzTest") {
"hdf_core:libhdf_host",
"hdf_core:libhdf_ipc_adapter",
"hdf_core:libpub_utils",
"ipc:ipc_core",
"ipc:ipc_single",
"samgr:samgr_proxy",
]
defines = [

View File

@ -86,6 +86,7 @@ public:
const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, int32_t callFail) override;
int32_t SetBarringPasswordResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
int32_t CloseUnFinishedUssdResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
int32_t SetVonrSwitchResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
// Data
int32_t PdpContextListUpdated(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,

View File

@ -78,6 +78,7 @@ enum class HdiId {
HREQ_CALL_GET_FAIL_REASON,
HREQ_CALL_SET_BARRING_PASSWORD,
HREQ_CALL_CLOSE_UNFINISHED_USSD,
HREQ_SET_VONR_SWITCH,
HREQ_SMS_BASE = 100,
HREQ_SMS_SEND_GSM_SMS,
@ -299,6 +300,7 @@ public:
const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, int32_t callFail) override;
int32_t SetBarringPasswordResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
int32_t CloseUnFinishedUssdResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
int32_t SetVonrSwitchResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
// Data
int32_t PdpContextListUpdated(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,

View File

@ -1288,5 +1288,37 @@ HWTEST_F(RilCallTest, Telephony_DriverSystem_CloseUnFinishedUssd_V1_0200, Functi
EXPECT_EQ(SUCCESS, ret);
ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_CALL_CLOSE_UNFINISHED_USSD));
}
/**
* @tc.number Telephony_DriverSystem_SetVonrSwitch_V1_0100
* @tc.name Set vonr switch
* @tc.desc Function test
*/
HWTEST_F(RilCallTest, Telephony_DriverSystem_SetVonrSwitch_V1_0100, Function | MediumTest | Level3)
{
if (!RilTestUtil::IsReady(SLOTID_1)) {
return;
}
int32_t ret = g_rilInterface->SetVonrSwitch(SLOTID_1, RilTestUtil::GetSerialId(), 0);
RilTestUtil::WaitFor(WAIT_TIME_SECOND);
EXPECT_EQ(SUCCESS, ret);
ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_SET_VONR_SWITCH));
}
/**
* @tc.number Telephony_DriverSystem_SetVonrSwitch_V1_0200
* @tc.name Set vonr switch
* @tc.desc Function test
*/
HWTEST_F(RilCallTest, Telephony_DriverSystem_SetVonrSwitch_V1_0200, Function | MediumTest | Level3)
{
if (!RilTestUtil::IsReady(SLOTID_2)) {
return;
}
int32_t ret = g_rilInterface->SetVonrSwitch(SLOTID_2, RilTestUtil::GetSerialId(), 0);
RilTestUtil::WaitFor(WAIT_TIME_SECOND);
EXPECT_EQ(SUCCESS, ret);
ASSERT_TRUE(RilTestUtil::GetBoolResult(HdiId::HREQ_SET_VONR_SWITCH));
}
} // namespace Telephony
} // namespace OHOS

View File

@ -1106,6 +1106,15 @@ int32_t RilCallbackTest::CloseUnFinishedUssdResponse(const RilRadioResponseInfo
return 0;
}
int32_t RilCallbackTest::SetVonrSwitchResponse(const RilRadioResponseInfo &responseInfo)
{
TELEPHONY_LOGI("GetBoolResult SetVonrSwitchResponse");
hdiId_ = HdiId::HREQ_SET_VONR_SWITCH;
resultInfo_ = responseInfo;
NotifyAll();
return 0;
}
/**
* modem
**/

View File

@ -86,6 +86,7 @@ bool TestCallInterface(std::shared_ptr<HRilManager> manager)
EXPECT_NE(HDF_SUCCESS, manager->StopDtmf(0, 0, info));
const OHOS::HDI::Ril::V1_1::SetBarringInfo setBarringInfo;
EXPECT_NE(HDF_SUCCESS, manager->SetBarringPassword(0, 0, setBarringInfo));
EXPECT_NE(HDF_SUCCESS, manager->SetVonrSwitch(0, 0, 0));
return true;
}
@ -300,6 +301,7 @@ HWTEST_F(BranchTest, Telephony_HrilManager_Call_002, Function | MediumTest | Lev
EXPECT_NE(HDF_SUCCESS, call->CallEmergencyNotice(0, HRilErrNumber::HRIL_ERR_NULL_POINT, nullptr, 0));
EXPECT_NE(HDF_SUCCESS, call->CallSsNotice(0, HRilErrNumber::HRIL_ERR_NULL_POINT, nullptr, 0));
EXPECT_NE(HDF_SUCCESS, call->CallRsrvccStatusNotify(0, HRilErrNumber::HRIL_ERR_NULL_POINT, nullptr, 0));
EXPECT_NE(HDF_SUCCESS, call->SetVonrSwitchResponse(0, responseInfo, nullptr, 1));
}
/**

View File

@ -939,6 +939,12 @@ int32_t RilCallbackTest::CloseUnFinishedUssdResponse(const RilRadioResponseInfo
return 0;
}
int32_t RilCallbackTest::SetVonrSwitchResponse(const RilRadioResponseInfo &responseInfo)
{
PrintResponseInfo("SetVonrSwitchResponse", responseInfo);
return 0;
}
/**
* modem
**/

View File

@ -94,6 +94,7 @@ typedef enum {
HREQ_CALL_SET_EMERGENCY_LIST,
HREQ_CALL_GET_FAIL_REASON,
HREQ_CALL_SET_BARRING_PASSWORD,
HREQ_SET_VONR_SWITCH,
HREQ_SMS_BASE = 100,
HREQ_SMS_SEND_GSM_SMS,