blob: d0504e075123370f04203a5bf05d7754c6e3a47c [file] [log] [blame]
b.liud440f9f2025-04-18 10:44:31 +08001/*-----------------------------------------------------------------------------------------------*/
2/**
3 @file ql_nw.h
4 @brief network registration API
5*/
6/*-----------------------------------------------------------------------------------------------*/
7
8/*-------------------------------------------------------------------------------------------------
9 Copyright (c) 2024 mobiletek Wireless Solution, Co., Ltd. All Rights Reserved.
10 mobiletek Wireless Solution Proprietary and Confidential.
11-------------------------------------------------------------------------------------------------*/
12
13/*-------------------------------------------------------------------------------------------------
14 EDIT HISTORY
15 This section contains comments describing changes made to the file.
16 Notice that changes are listed in reverse chronological order.
17 $Header: $
18 when who what, where, why
19 -------- --------- -----------------------------------------------------------------
20 20241022 yq.wang Created .
21-------------------------------------------------------------------------------------------------*/
22
23
24#ifndef __QL_NW_H__
25#define __QL_NW_H__
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31
32#define QL_NW_MODE_NONE 0x00 /**< No network. */
33#define QL_NW_MODE_GSM 0x01 /**< Include GSM networks. */
34#define QL_NW_MODE_WCDMA 0x02 /**< Include WCDMA networks. */
35#define QL_NW_MODE_CDMA 0x04 /**< Include CDMA networks. */
36#define QL_NW_MODE_EVDO 0x08 /**< Include EVDO networks. */
37#define QL_NW_MODE_LTE 0x10 /**< Include LTE networks. */
38#define QL_NW_MODE_TDSCDMA 0x20 /**< Include TDSCDMA networks. */
39#define QL_NW_MODE_NR5G 0x40 /**< Include NR5G networks. */
40#define QL_NW_MODE_PRL 0x10000 /**< Give preference according to the preferred roaming list. */
41
42#define QL_NW_NR5G_SO_NONE 0X00 /**< No service option */
43#define QL_NW_NR5G_SO_TDD 0X01 /**< Include service option TDD, Time Division Duplex */
44#define QL_NW_NR5G_SO_SUB6 0X02 /**< Include service option SUB6, 5G frequency, SUB_6GHz */
45#define QL_NW_NR5G_SO_MMWAVE 0X04 /**< Include service option MMWARE, 5G frequency, 30~300GHz */
46#define QL_NW_NR5G_SO_NSA 0X08 /**< Include service option NSA, Non_Stand Alone, 5G base station and 4G core network */
47#define QL_NW_NR5G_SO_SA 0X10 /**< Include service option SA, Stan Alone, 5G base station and 5G core network */
48
49#define QL_NW_LOWER_POWER_MASK_DISABLE 0x00
50#define QL_NW_LOWER_POWER_MASK_NORMAL 0x01
51#define QL_NW_LOWER_POWER_MASK_NETWORK 0x02
52#define QL_NW_LOWER_POWER_MASK_SIM 0x04
53#define QL_NW_LOWER_POWER_MASK_SMS 0x08
54#define QL_NW_LOWER_POWER_MASK_VOICE 0x10
55
56#define QL_NW_NITZ_BUF_LEN 30
57#define QL_NW_SCAN_MAX_LIST_NUM 40
58#define QL_NW_MAX_GSM_CELL_INFO_NUM 20
59#define QL_NW_MAX_UMTS_CELL_INFO_NUM 20
60#define QL_NW_MAX_LTE_CELL_INFO_NUM 20
61
62#define QL_NW_MAX_WEA_ALERT_LENGTH_V01 512
63#define QL_NW_MAX_ETWS_ALERT_LENGTH_V01 256
64
65typedef enum QL_NW_SIGNAL_STRENGTH_LEVEL_ENUM
66{
67 QL_NW_SIGNAL_STRENGTH_LEVEL_MIN = -1,
68 QL_NW_SIGNAL_STRENGTH_LEVEL_NONE = 0, /**< none or unknown signal strength level */
69 QL_NW_SIGNAL_STRENGTH_LEVEL_POOR = 1, /**< poor signal strength level */
70 QL_NW_SIGNAL_STRENGTH_LEVEL_MODERATE = 2, /**< moderate signal strength level */
71 QL_NW_SIGNAL_STRENGTH_LEVEL_GOOD = 3, /**< good signal strength level */
72 QL_NW_SIGNAL_STRENGTH_LEVEL_GREAT = 4, /**< great signal strength level */
73 QL_NW_SIGNAL_STRENGTH_LEVEL_MAX
74}QL_NW_SIGNAL_STRENGTH_LEVEL_E;
75
76typedef enum QL_NW_ROAM_STATE_TYPE_ENUM
77{
78 QL_NW_ROAM_STATE_OFF = 0, /**< None, or roaming indicator off. */
79 QL_NW_ROAM_STATE_ON = 1 /**< Roaming indicator on. */
80}QL_NW_ROAM_STATE_TYPE_E;
81
82typedef enum QL_NW_NETWORK_STATUS_TYPE_ENUM
83{
84 QL_NW_NETWORK_STATUS_NONE = 0, /**< Network status not available. */
85 QL_NW_NETWORK_STATUS_CURRENT_SERVING = 1, /**< Current serving network. */
86 QL_NW_NETWORK_STATUS_PREFERRED = 2, /**< Preferred network. */
87 QL_NW_NETWORK_STATUS_NOT_PREFERRED = 3, /**< Not the preferred network. */
88 QL_NW_NETWORK_STATUS_AVAILABLE = 4, /**< Service available. */
89 QL_NW_NETWORK_STATUS_FORBIDDEN = 5 /**< Forbidden service. */
90}QL_NW_NETWORK_STATUS_TYPE_E;
91
92typedef enum QL_NW_RADIO_TECH_TYPE_ENUM
93{
94 QL_NW_RADIO_TECH_TD_SCDMA = 1,
95 QL_NW_RADIO_TECH_GSM = 2, /**< GSM; only supports voice. */
96 QL_NW_RADIO_TECH_HSPAP = 3, /**< HSPA+. */
97 QL_NW_RADIO_TECH_LTE = 4, /**< LTE. */
98 QL_NW_RADIO_TECH_EHRPD = 5, /**< EHRPD. */
99 QL_NW_RADIO_TECH_EVDO_B = 6, /**< EVDO B. */
100 QL_NW_RADIO_TECH_HSPA = 7, /**< HSPA. */
101 QL_NW_RADIO_TECH_HSUPA = 8, /**< HSUPA. */
102 QL_NW_RADIO_TECH_HSDPA = 9, /**< HSDPA. */
103 QL_NW_RADIO_TECH_EVDO_A = 10, /**< EVDO A. */
104 QL_NW_RADIO_TECH_EVDO_0 = 11, /**< EVDO 0. */
105 QL_NW_RADIO_TECH_1xRTT = 12, /**< 1xRTT. */
106 QL_NW_RADIO_TECH_IS95B = 13, /**< IS95B. */
107 QL_NW_RADIO_TECH_IS95A = 14, /**< IS95A. */
108 QL_NW_RADIO_TECH_UMTS = 15, /**< UMTS. */
109 QL_NW_RADIO_TECH_EDGE = 16, /**< EDGE. */
110 QL_NW_RADIO_TECH_GPRS = 17, /**< GPRS. */
111 QL_NW_RADIO_TECH_NR5G = 18, /**< NR5G. */
112 QL_NW_RADIO_TECH_NONE = 19 /**< No technology selected. */
113}QL_NW_RADIO_TECH_TYPE_E;
114
115typedef enum QL_NW_TECH_DOMAIN_TYPE_ENUM
116{
117 QL_NW_TECH_DOMAIN_NONE = 0, /**< None. */
118 QL_NW_TECH_DOMAIN_3GPP = 1, /**< 3GPP. */
119 QL_NW_TECH_DOMAIN_3GPP2 = 2, /**< 3GPP2. */
120}QL_NW_TECH_DOMAIN_TYPE_E;
121
122typedef enum QL_NW_DENY_REASON_TYPE_ENUM
123{
124 QL_NW_IMSI_UNKNOWN_IN_HSS_DENY_REASON = 2, /**< IMSI unknown in HSS */
125 QL_NW_ILLEGAL_UE_DENY_REASON = 3, /**< Illegal UE */
126 QL_NW_IMEI_NOT_ACCEPTED_DENY_REASON = 5, /**< IMEI not accepted */
127 QL_NW_ILLEGAL_ME_DENY_REASON = 6, /**< Illegal ME */
128 QL_NW_EPS_SERVICES_NOT_ALLOWED_DENY_REASON = 7, /**< EPS services not allowed */
129 QL_NW_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED_DENY_REASON = 8, /**< EPS services and non-EPS services not allowed */
130 QL_NW_UE_ID_CANNOT_BE_DERIVED_BY_THE_NETWORK_DENY_REASON = 9, /**< UE identifity cannot be derived by the network */
131 QL_NW_IMPLICITY_DETACHED_DENY_REASON = 10, /**< Implicitly detached */
132 QL_NW_PLMN_NOT_ALLOWED_DENY_REASON = 11, /**< PLMN not allowed */
133 QL_NW_TRACKING_AREA_NOT_ALLOWED_DENY_REASON = 12, /**< Tracking area not allowed */
134 QL_NW_ROAMING_NOT_ALLOWED_IN_THIS_TRACNING_AREA_DENY_REASON = 13, /**< Roaming not allowed in this tracking area */
135 QL_NW_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN_DENY_REASON = 14, /**< EPS services not allowed in this PLMN */
136 QL_NW_NO_SUITALBE_CELLS_IN_TRACKING_AREA_DENY_REASON = 15, /**< No suitable cells in tracking area */
137 QL_NW_MSC_TEMPORARILY_NOT_REACHABLE_DENY_REASON = 16, /**< MSC temporarily not reachable */
138 QL_NW_NETWORK_FAILURE_DENY_REASON = 17, /**< Network failure */
139 QL_NW_CS_DOMAIN_NOT_AVAILABLE_DENY_REASON = 18, /**< CS domain not available */
140 QL_NW_EMS_FAILURE_DENY_REASON = 19, /**< ESM failure */
141 QL_NW_MAC_FAILURE_DENY_REASON = 20, /**< MAC failure */
142 QL_NW_SYNC_FAILURE_DENY_REASON = 21, /**< Synch failure */
143 QL_NW_CONGESTION_DENY_REASON = 22, /**< Congestion */
144 QL_NW_UE_SECURITY_CAPABILITIES_MISMATCH_DENY_REASON = 23, /**< UE security capabilities mismatch */
145 QL_NW_SECURITY_MODE_REJECTED_DENY_REASON = 24, /**< Security mode rejected, unspecified */
146 QL_NW_NOT_AUTHORIZED_FOR_THIS_CSG_DENY_REASON = 25, /**< Not authorized for this CSG */
147 QL_NW_NON_EPS_AUTHENTICATION_UNCACCEPTABLE_DENY_REASON = 26, /**< Non-EPS authentication unacceptable */
148 QL_NW_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED_IN_THIS_PLMN_DENY_REASON = 35, /**< Requested service option not authorized in this PLMN */
149 QL_NW_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE_DENY_REASON = 39, /**< CS service temporarily not available */
150 QL_NW_NO_ESP_BEARER_CONTEXT_ACTIVATED_DENY_REASON = 40, /**< No EPS bearer context activated */
151 QL_NW_SEMAMTICALLY_INCORRECT_MESSAGE_DENY_REASON = 95, /**< Semantically incorrect message. */
152 QL_NW_INVALID_MANDATORY_INFORMATION_DENY_REASON = 96, /**< Invalid mandatory information. */
153 QL_NW_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED_DENY_REASON = 97, /**< Message type non-existent or not implemented. */
154 QL_NW_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCAL_STATE_DENY_REASON = 98, /**< Message type not compatible with protocol state. */
155 QL_NW_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED_DENY_REASON = 99, /**< Information element non-existent or not implemented. */
156 QL_NW_CONDITIONAL_IE_ERROR_DENY_REASON = 100, /**< Conditional IE error. */
157 QL_NW_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCAL_STATE_DENY_REASON = 101, /**< Message not compatible with protocol state. */
158}QL_NW_DENY_REASON_TYPE_E;
159
160typedef enum QL_NW_SERVICE_TYPE_ENUM
161{
162 QL_NW_SERVICE_NONE = 0, /**< Not registered or no data. */
163 QL_NW_SERVICE_LIMITED = 1, /**< Registered; emergency service only. */
164 QL_NW_SERVICE_FULL = 2, /**< Registered, full service. */
165}QL_NW_SERVICE_TYPE_E;
166
167typedef enum QL_NW_SELECTION_TYPE_ENUM
168{
169 QL_NW_SELECTION_AUTOMATIC = 0, /**< Automatic network selection. */
170 QL_NW_SELECTION_MANUAL = 1, /**< Manual network selection. */
171}QL_NW_SELECTION_TYPE_E;
172
173typedef enum QL_NW_CELL_ACCESS_STATE_TYPE_ENUM
174{
175 QL_NW_CELL_ACCESS_NONE = 0, /**< Unknown cell access state. */
176 QL_NW_CELL_ACCESS_NORMAL_ONLY = 1, /**< Cell access is allowed for normal calls only. */
177 QL_NW_CELL_ACCESS_EMERGENCY_ONLY = 2, /**< Cell access is allowed for emergency calls only. */
178 QL_NW_CELL_ACCESS_NO_CALLS = 3, /**< Cell access is not allowed for any call type. */
179 QL_NW_CELL_ACCESS_ALL_CALLS = 4, /**< Cell access is allowed for all call types. */
180}QL_NW_CELL_ACCESS_STATE_TYPE_E;
181
182/** wea config items */
183typedef enum
184{
185 QL_NW_WEA_CONFIG_PRESIDENTIAL_ALERT = (1 << 0),
186 QL_NW_WEA_CONFIG_EXTREME_ALERT = (1 << 1),
187 QL_NW_WEA_CONFIG_SEVERE_ALERT = (1 << 2),
188 QL_NW_WEA_CONFIG_AMBER_ALERT = (1 << 3),
189 QL_NW_WEA_CONFIG_PUBLIC_SAFETY_ALERT = (1 << 4),
190 QL_NW_WEA_CONFIG_STATE_LOCAL_TEST_ALERT = (1 << 5),
191 QL_NW_WEA_CONFIG_RMT_ALERT = (1 << 6),
192 QL_NW_WEA_CONFIG_EXERCISE_ALERT = (1 << 7),
193 QL_NW_WEA_CONFIG_CMSP_DEFINED_ALERT = (1 << 8),
194 QL_NW_WEA_CONFIG_SPANISH_ALERT = (1 << 9),
195} QL_NW_WEA_CONFIG_E;
196
197/** bind subscription */
198typedef enum QL_NW_BIND_SUB_TYPE_ENUM
199{
200 QL_NW_BIND_SUB_PRIMARY = 0,
201 QL_NW_BIND_SUB_SECONDARY = 1,
202}QL_NW_BIND_SUB_TYPE_E;
203
204typedef struct
205{
206 uint64_t preferred_nw_mode; /**< Preferred network mode for connections; a bitmask of QL_NW_MODE_xxxx.*/
207 QL_NW_ROAM_STATE_TYPE_E preferred_roaming; /**< Roaming preference. 0 -- None, or roaming indicator off, 1 -- roaming indicator on*/
208}ql_nw_pref_nwmode_roaming_info_t;
209
210typedef struct
211{
212 char nitz_time[QL_NW_NITZ_BUF_LEN + 1]; /**< format: YY/MM/DD,HH:MM:SS'+/-'TZ,daylight, Here TZ multiplied by 4*/
213 uint64_t abs_time; /**< 0 means invalid */
214 int8_t leap_sec; /**< 0 means invalid */
215}ql_nw_nitz_time_info_t;
216
217typedef struct
218{
219 char long_eons[512 + 1]; /**< Long EONS.*/
220 char short_eons[512 + 1]; /**< Short EONS.*/
221 char mcc[3 + 1]; /**< Mobile country code.*/
222 char mnc[3 + 1]; /**< Mobile network code.*/
223}ql_nw_mobile_operator_name_info_t;
224
225typedef struct
226{
227 ql_nw_mobile_operator_name_info_t operator_name; /**< Operator name.*/
228 QL_NW_NETWORK_STATUS_TYPE_E network_status; /**< Network status.*/
229 QL_NW_RADIO_TECH_TYPE_E rat; /**< Radio technology.*/
230}ql_nw_scan_entry_info_t;
231
232typedef struct
233{
234 uint32_t entry_len; /**< Must be set to the number of elements in entry. */
235 ql_nw_scan_entry_info_t entry[QL_NW_SCAN_MAX_LIST_NUM]; /**< Scan entry.*/
236}ql_nw_scan_result_list_info_t;
237
238typedef struct
239{
240 QL_NW_TECH_DOMAIN_TYPE_E tech_domain; /**< Technology domain: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
241 QL_NW_RADIO_TECH_TYPE_E radio_tech; /**< Radio technology; see #QL_NW_RADIO_TECH_TYPE_E.*/
242 QL_NW_ROAM_STATE_TYPE_E roaming; /**< 0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/
243 QL_NW_DENY_REASON_TYPE_E deny_reason; /**< Set when registration state is #QL_NW_DENY_REASON_TYPE_E, please refer to 3GPP 24301 SPEC ANNEX A chapter*/
244 QL_NW_SERVICE_TYPE_E reg_state; /**< Registration state.*/
245 char mcc[3+1]; /**< Mobile country code.*/
246 char mnc[3+1]; /**< Mobile network code.*/
247 uint8_t forbidden; /**< Forbidden: 0 -- No, 1 -- Yes.*/
248 uint32_t cid; /**< Cell ID for the registered 3GPP system.*/
249 uint16_t lac; /**< Locatin area code for the registered 3GPP system.*/
250 uint16_t psc; /**< Primary scrambling code (WCDMA only); 0 -- None.*/
251 uint16_t tac; /**< Tracking area code information for LTE.*/
252 uint8_t inPRL; /**< 0 -- Not in PRL, 1 -- In PRL.*/
253 uint8_t css; /**< Concurrent services supported: 0 -- No, 1 -- Yes.*/
254 uint16_t sid; /**< CDMA system ID.*/
255 uint16_t nid; /**< CDMA network ID.*/
256 uint16_t bsid; /**< Base station ID. @newpagetable */
257
258 uint16_t nr5g_svc_opt; /**< NR5G service option or type, defined by QL_NW_NR5G_SO_XXX */
259 uint16_t nr5g_pci; /**< NR5G physical Cell ID */
260 uint64_t nr5g_cid; /**< NR5G SA Cell ID */
261 uint32_t nr5g_tac; /**< NR5G tac info */
262
263 uint8_t endc_available; /**< EUTRA-NR Dual Connectivity */
264
265}ql_nw_reg_status_info_t;
266
267typedef struct
268{
269 QL_NW_SELECTION_TYPE_E nw_selection_type; /**< Network selection type. */
270 char mcc[3 + 1]; /**< Mobile country code for a manual network selection.*/
271 char mnc[3 + 1]; /**< Mobile network code for a manual network selection.*/
272 QL_NW_RADIO_TECH_TYPE_E rat; /**< Radio technology.*/
273}ql_nw_pref_net_t;
274
275typedef struct
276{
277 int8_t rssi; /**< RSSI in dBm. Indicates received signal strength. A signed value; -125 or lower indicates no signal.*/
278}ql_nw_gsm_signal_info_t;
279
280typedef struct
281{
282 int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/
283 int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
284}ql_nw_wcdma_signal_info_t;
285
286typedef struct
287{
288 int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. a signed value; -125 or lower indicates no signal.*/
289 int8_t rscp; /**< RSCP in dBm.*/
290 int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
291 int8_t sinr; /**< Measured SINR in dB. @newpagetable */
292}ql_nw_tdscdma_signal_info_t;
293
294typedef struct
295{
296 int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/
297 int8_t rsrq; /**< RSRQ value in dB (signed integer value), as measured by L1. Range: -3 to -20 (-3 equals -3 dB, -20 equals -20 dB).*/
298 int16_t rsrp; /**< Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).*/
299 int16_t snr; /**< SNR level as a scaled integer in units of 0.1 dB; e.g., -16 dB has a value of -160 and 24.6 dB has a value of 246.*/
300}ql_nw_lte_signal_info_t;
301
302typedef struct
303{
304 int16_t rsrq; /**< Current RSRQ in dBm, as measured by L1.*/
305 int16_t rsrp; /**< Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).*/
306 int16_t snr; /**< SNR level as a scaled integer in units of 0.1 dB; e.g., -16 dB has a value of -160 and 24.6 dB has a value of 246.*/
307}ql_nw_nr5g_signal_info_t;
308
309typedef struct
310{
311 int8_t rssi; /**< RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/
312 int16_t ecio; /**< Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
313}ql_nw_cdma_signal_info_t;
314
315typedef struct
316{
317 int8_t rssi; /**< rssi in dbm. indicates forward link pilot power (agc) + ec/io. a signed value; -125 or lower indicates no signal.*/
318 int16_t ecio; /**< ec/io value representing negative 0.5 db increments, e.g., 2 equals -1 dbm.*/
319 int8_t sinr; /**< sinr level.*/
320 int32_t io; /**< received io in dbm. */
321}ql_nw_hdr_signal_info_t;
322
323typedef struct
324{
325 uint8_t has_gsm; /**< Must be set to TRUE if gsm_sig_info is being passed. */
326 ql_nw_gsm_signal_info_t gsm; /**< GSM signal information. */
327 uint8_t has_wcdma; /**< Must be set to TRUE if wcdma_sig_info is being passed. */
328 ql_nw_wcdma_signal_info_t wcdma; /**< WCDMA signal information. */
329 uint8_t has_tdscdma; /**< Must be set to TRUE if tdscdma_sig_info is being passed. */
330 ql_nw_tdscdma_signal_info_t tdscdma; /**< TDSCDMA signal information. */
331 uint8_t has_lte; /**< Must be set to TRUE if lte_sig_info is being passed. */
332 ql_nw_lte_signal_info_t lte; /**< LTE signal information. */
333 uint8_t has_nr5g; /**< Must be set to TRUE if nr5g_sig_info is being passed. */
334 ql_nw_nr5g_signal_info_t nr5g; /**< NR5G signal information. */
335 uint8_t has_cdma; /**< Must be set to TRUE if cdma_sig_info is being passed. */
336 ql_nw_cdma_signal_info_t cdma; /**< CDMA signal information. */
337 uint8_t has_hdr; /**< Must be set to TRUE if hdr_sig_info is being passed. */
338 ql_nw_hdr_signal_info_t hdr; /**< HDR signal information. */
339}ql_nw_signal_strength_info_t;
340
341typedef struct
342{
343 uint32_t cid; /**< Cell ID, (0 indicates information is not represent).*/
344 char plmn[3]; /**< MCC/MNC inforamtion code.(This field should be ignored when cid is not present). */
345 uint16_t lac; /**< Location area code.(This field should be ignord when cid is not present). */
346 uint16_t arfcn; /**< Absolute RF channel number. */
347 uint8_t bsic; /**< Base station identity code. (0 indicates information is not present). */
348 int16_t rssi; /**< Received signal strength indicator in dBm.*/
349}ql_nw_gsm_info_t;;
350
351typedef struct
352{
353 uint32_t cid; /**< Cell ID (0 indicates information is not present). */
354 uint32_t lcid; /**< UTRAN Cell ID (0 indicates information is not present). */
355 char plmn[3]; /**< MCC/MNC information code.(This field should be ignored when cid is not present). */
356 uint16_t lac; /**< Location area code. (This field should be ignored when cid is not present). */
357 uint16_t uarfcn; /**< UTRA absolute RF channel number. */
358 uint16_t psc; /**< Primary scrambling code. */
359 int16_t rssi; /**< Received signal strength indicator in dBm.*/
360}ql_nw_umts_info_t;
361
362typedef struct
363{
364 uint32_t cid; /**< Global cell ID in the system information block (0 indicates information is not present). */
365 char plmn[3]; /**< MCC/MNC information code.(This filed should be ignored when cid is not present). */
366 uint16_t tac; /**< Tracing area code (This field should be ignored when cid is not present). */
367 uint16_t pci; /**< Physical cell ID. Range: 0 to 503. */
368 uint32_t earfcn; /**< E-UTRA absolute radio frequency channel number of the cell. RANGE: 0 TO 65535. */
369 int16_t rssi; /**< Received signal strength indicator in dBm.*/
370}ql_nw_lte_info_t;
371
372typedef struct {
373
374 uint64_t cid; /**< Global cell ID in the system information block (0 indicates information is not present). */
375 char plmn[3]; /**< MCC/MNC information coded(This field should be ignored when cid is not present.) */
376 uint32_t tac; /**< Tracking area code (This field should be ignored when cid is not present). */
377 uint16_t pci; /**< Physical cell ID. Range: 0 to 503.*/
378 uint32_t arfcn; /**< UTRA absolute radio frequency channel number of the cell. Range: 0 to 65535.*/
379 int16_t rsrq; /**< Current RSRQ in units of 0.1 dB, as measured by L1.*/
380 int16_t rsrp; /**< Current RSRP in units of 0.1 dB, as measured by L1.*/
381 int16_t snr; /**< Current SNR in dBm, as measured by L1.*/
382}ql_nw_nr5g_info_t;
383
384typedef struct
385{
386 uint16_t sid; /**< System ID. */
387 uint16_t nid; /**< Network ID. */
388 uint16_t bid; /**< Base station ID. */
389 uint16_t refpn; /**< Reference PN. */
390 uint32_t base_lat; /**< Latitude of the current base station in units of 0.25 sec. */
391 uint32_t base_long; /**< Longitude of the current base station in units of 0.25 sec. */
392 int16_t rssi; /**< Received signal strength indicator in dBm. */
393}ql_nw_cdma_info_t;
394
395typedef struct
396{
397 QL_NW_RADIO_TECH_TYPE_E serving_rat;
398 uint8_t gsm_info_valid; /**< Must be set to true if gsm_info is being passed */
399 uint8_t gsm_info_len; /**< Must be set to the number of elements in entry*/
400 ql_nw_gsm_info_t gsm_info[QL_NW_MAX_GSM_CELL_INFO_NUM]; /**< GSM cell information (Serving and neighbor. */
401 uint8_t umts_info_valid; /**< Must be set to true if umts_info is being passed */
402 uint8_t umts_info_len; /**< Must be set to the number of elements in entry*/
403 ql_nw_umts_info_t umts_info[QL_NW_MAX_UMTS_CELL_INFO_NUM];/**< UMTS cell information (Serving and neighbor). */
404 uint8_t lte_info_valid; /**< Must be set to true if lte_info is being passed */
405 uint8_t lte_info_len; /**< Must be set to the number of elements in entry*/
406 ql_nw_lte_info_t lte_info[QL_NW_MAX_LTE_CELL_INFO_NUM]; /**< LTE cell information (Serving and neighbor). */
407 uint8_t nr5g_info_valid; /**< Must be set to true if nr5g_info is being passed */
408 ql_nw_nr5g_info_t nr5g_info; /**< NR5G cell information (Serving). */
409 uint8_t cdma_info_valid; /**< Must be set to true if cdma_info is being passed */
410 ql_nw_cdma_info_t cdma_info; /**< CDMA cell information (Serving). */
411}ql_nw_cell_info_t;
412
413typedef struct
414{
415 uint8_t Presidential_alert; /**< Enable Presidential_alert: 0 -- Disable(can't Disable); 1 -- Enable */
416 uint8_t Extreme_alert; /**< Enable or disable Extreme_alert: 0 -- Disable; 1 -- Enable */
417 uint8_t Severe_alert; /**< Enable or disable Severe_alert: 0 -- Disable; 1 -- Enable */
418 uint8_t Amber_alert; /**< Enable or disable Amber_alert: 0 -- Disable; 1 -- Enable */
419 uint8_t PublicSafety_alert; /**< Enable or disable PublicSafety_alert: 0 -- Disable; 1 -- Enable */
420 uint8_t StateLocalTest_alert; /**< Enable or disable StateLocalTest_alert: 0 -- Disable; 1 -- Enable */
421 uint8_t RMT_alert; /**< Enable or disable RMT_alert: 0 -- Disable; 1 -- Enable */
422 uint8_t Exercise_alert; /**< Enable or disable Exercise_alert: 0 -- Disable; 1 -- Enable */
423 uint8_t CMSPDefined_alert; /**< Enable or disable CMSPDefined_alert: 0 -- Disable; 1 -- Enable */
424 uint8_t Spanish_alert; /**< Enable or disable Spanish_alert: 0 -- Disable; 1 -- Enable */
425}ql_nw_wea_config_t;
426
427typedef struct
428{
429 uint8_t wea_alert_info_valid;
430 char wea_alert_info[QL_NW_MAX_WEA_ALERT_LENGTH_V01];
431}ql_nw_wea_alert_info_t;
432
433typedef struct
434{
435 uint8_t etws_primary_info_valid;
436 char etws_primary_info[QL_NW_MAX_ETWS_ALERT_LENGTH_V01];
437 uint8_t etws_secondary_info_valid;
438 char etws_secondary_info[QL_NW_MAX_ETWS_ALERT_LENGTH_V01];
439}ql_nw_etws_alert_info_t;
440
441typedef void (*ql_nw_voice_reg_ind_cb)(ql_nw_reg_status_info_t *p_info);
442
443typedef void (*ql_nw_data_reg_ind_cb)(ql_nw_reg_status_info_t *p_info);
444
445typedef void (*ql_nw_signal_strength_ind_cb)(ql_nw_signal_strength_info_t *p_info, QL_NW_SIGNAL_STRENGTH_LEVEL_E level);
446
447typedef void (*ql_nw_cell_access_status_ind_cb)(QL_NW_CELL_ACCESS_STATE_TYPE_E status);
448
449typedef void (*ql_nw_nitz_time_update_ind_cb)(ql_nw_nitz_time_info_t *p_info);
450
451typedef void (*ql_nw_network_scan_async_cb)(int async_index, ql_nw_scan_result_list_info_t *p_info);
452
453typedef void (*ql_nw_wea_reg_ind_cb)(ql_nw_wea_alert_info_t *p_info);
454
455typedef void (*ql_nw_etws_reg_ind_cb)(ql_nw_etws_alert_info_t *p_info);
456
457typedef void (*ql_nw_service_error_cb_f)(int error);
458
459
460/*-----------------------------------------------------------------------------------------------*/
461/**
462 @brief Initialize NW service.
463 @note You must call this function before other functions can be used in this module.
464 @return Whether the NW service was successfully intialized.
465 @retval QL_ERR_OK successful
466 @retval QL_ERR_SERVICE_NOT_READY service is not ready, need to retry
467 @retval Other error code defined by ql_type.h
468 */
469/*-----------------------------------------------------------------------------------------------*/
470int ql_nw_init(void);
471
472/*-----------------------------------------------------------------------------------------------*/
473/**
474 @brief Deinitializes NW service.
475 @return Whether the NW service was deinitialized successfully.
476 @retval QL_ERR_OK successful.
477 @retval Other error code defined by ql_type.h.
478 */
479/*-----------------------------------------------------------------------------------------------*/
480int ql_nw_deinit(void);
481
482/*-----------------------------------------------------------------------------------------------*/
483/**
484 @brief scan network status.
485 @param[out] async_index The index of request msg
486 @param[in] async_cb The callback function of request msg
487 @return Whether to successfully trigger the network scan operation
488 @retval QL_ERR_OK successful
489 @retval QL_ERR_NOT_INIT uninitialized
490 @retval QL_ERR_SERVICE_NOT_READY service is not ready
491 @retval QL_ERR_INVALID_ARG Invalid arguments
492 @retval Other error code defined by ql_type.h
493 */
494/*-----------------------------------------------------------------------------------------------*/
495int ql_nw_network_scan(int *async_index, ql_nw_network_scan_async_cb async_cb);
496
497
498/*-----------------------------------------------------------------------------------------------*/
499/**
500 @brief set power mode.
501 @param[in] lower_mode, defined by QL_NW_LOWER_POWER_MASK_XXX
502 @return Whether to successfully set the power mode
503 @retval QL_ERR_OK successful
504 @retval QL_ERR_NOT_INIT uninitialized
505 @retval QL_ERR_SERVICE_NOT_READY service is not ready
506 @retval QL_ERR_INVALID_ARG Invalid arguments
507 @retval Other error code defined by ql_type.h
508 */
509/*-----------------------------------------------------------------------------------------------*/
510int ql_nw_set_power_mode(uint8_t lower_mode);
511
512
513/*-----------------------------------------------------------------------------------------------*/
514/**
515 @brief set perferred NW mode and roaming indicator.
516 @param[in] p_info Pointer that point to ql_nw_pref_nwmode_roaming_info_t
517 @return Whether to successfully set nwmode and roaming
518 @retval QL_ERR_OK successful
519 @retval QL_ERR_NOT_INIT uninitialized
520 @retval QL_ERR_SERVICE_NOT_READY service is not ready
521 @retval QL_ERR_INVALID_ARG Invalid arguments
522 @retval Other error code defined by ql_type.h
523 */
524/*-----------------------------------------------------------------------------------------------*/
525int ql_nw_set_pref_nwmode_roaming(ql_nw_pref_nwmode_roaming_info_t *p_info);
526
527
528/*-----------------------------------------------------------------------------------------------*/
529/**
530 @brief get perferred NW mode and roaming indicator.
531 @param[out] p_info Pointer that point to ql_nw_pref_nwmode_roaming_info_t
532 @return Whether to successfully get nwmode and roaming
533 @retval QL_ERR_OK successful
534 @retval QL_ERR_NOT_INIT uninitialized
535 @retval QL_ERR_SERVICE_NOT_READY service is not ready
536 @retval QL_ERR_INVALID_ARG Invalid arguments
537 @retval Other error code defined by ql_type.h
538 */
539/*-----------------------------------------------------------------------------------------------*/
540int ql_nw_get_pref_nwmode_roaming(ql_nw_pref_nwmode_roaming_info_t *p_info);
541
542
543/*-----------------------------------------------------------------------------------------------*/
544/**
545 @brief get mobile operator name.
546 @param[out] p_info Pointer that point to ql_nw_mobile_operator_name_info_t
547 @return Whether to successfully get the mobile operator name
548 @retval QL_ERR_OK successful
549 @retval QL_ERR_NOT_INIT uninitialized
550 @retval QL_ERR_SERVICE_NOT_READY service is not ready
551 @retval QL_ERR_INVALID_ARG Invalid arguments
552 @retval Other error code defined by ql_type.h
553 */
554/*-----------------------------------------------------------------------------------------------*/
555int ql_nw_get_mobile_operator_name(ql_nw_mobile_operator_name_info_t *p_info);
556
557
558/*-----------------------------------------------------------------------------------------------*/
559/**
560 @brief get cell information.
561 @param[out] p_info Pointer that point to ql_nw_cell_info_t
562 @return Whether to successfully get the cell information
563 @retval QL_ERR_OK successful
564 @retval QL_ERR_NOT_INIT uninitialized
565 @retval QL_ERR_SERVICE_NOT_READY service is not ready
566 @retval QL_ERR_INVALID_ARG Invalid arguments
567 @retval Other error code defined by ql_type.h
568 */
569/*-----------------------------------------------------------------------------------------------*/
570int ql_nw_get_cell_info(ql_nw_cell_info_t *p_info);
571
572/*-----------------------------------------------------------------------------------------------*/
573/**
574 @brief get voice registration status.
575 @param[out] p_info Pointer that point to ql_nw_reg_status_info_t
576 @return Whether to successfully get the voice registration status
577 @retval QL_ERR_OK successful
578 @retval QL_ERR_NOT_INIT uninitialized
579 @retval QL_ERR_SERVICE_NOT_READY service is not ready
580 @retval QL_ERR_INVALID_ARG Invalid arguments
581 @retval Other error code defined by ql_type.h
582 */
583/*-----------------------------------------------------------------------------------------------*/
584int ql_nw_get_voice_reg_status(ql_nw_reg_status_info_t *p_info);
585
586
587/*-----------------------------------------------------------------------------------------------*/
588/**
589 @brief get data registration status.
590 @param[out] p_info Pointer that point to ql_nw_reg_status_info_t
591 @return Whether to successfully get the data registration status
592 @retval QL_ERR_OK successful
593 @retval QL_ERR_NOT_INIT uninitialized
594 @retval QL_ERR_SERVICE_NOT_READY service is not ready
595 @retval QL_ERR_INVALID_ARG Invalid arguments
596 @retval Other error code defined by ql_type.h
597 */
598/*-----------------------------------------------------------------------------------------------*/
599int ql_nw_get_data_reg_status(ql_nw_reg_status_info_t *p_info);
600
601
602/*-----------------------------------------------------------------------------------------------*/
603/**
604 @brief get current signal strength.
605 @param[out] p_info Pointer that point to ql_nw_signal_strength_info_t
606 @param[out] p_level: signal strength level
607 @return Whether to successfully get the signal strength
608 @retval QL_ERR_OK successful
609 @retval QL_ERR_NOT_INIT uninitialized
610 @retval QL_ERR_SERVICE_NOT_READY service is not ready
611 @retval QL_ERR_INVALID_ARG Invalid arguments
612 @retval Other error code defined by ql_type.h
613 */
614/*-----------------------------------------------------------------------------------------------*/
615int ql_nw_get_signal_strength(ql_nw_signal_strength_info_t *p_info, QL_NW_SIGNAL_STRENGTH_LEVEL_E* p_level);
616
617
618/*-----------------------------------------------------------------------------------------------*/
619/**
620 @brief get current cell acccess status.
621 @param[out] p_info Pointer that point to QL_NW_CELL_ACCESS_STATE_TYPE_E
622 @return Whether to successfully get the cell access status
623 @retval QL_ERR_OK successful
624 @retval QL_ERR_NOT_INIT uninitialized
625 @retval QL_ERR_SERVICE_NOT_READY service is not ready
626 @retval QL_ERR_INVALID_ARG Invalid arguments
627 @retval Other error code defined by ql_type.h
628 */
629/*-----------------------------------------------------------------------------------------------*/
630int ql_nw_get_cell_access_status(QL_NW_CELL_ACCESS_STATE_TYPE_E *p_info);
631
632
633/*-----------------------------------------------------------------------------------------------*/
634/**
635 @brief get network time.
636 @param[out] p_info Pointer that point to ql_nw_nitz_time_info_t
637 @return Whether to successfully get the network time
638 @retval QL_ERR_OK successful
639 @retval QL_ERR_NOT_INIT uninitialized
640 @retval QL_ERR_SERVICE_NOT_READY service is not ready
641 @retval QL_ERR_INVALID_ARG Invalid arguments
642 @retval Other error code defined by ql_type.h
643 */
644/*-----------------------------------------------------------------------------------------------*/
645int ql_nw_get_nitz_time_info(ql_nw_nitz_time_info_t *p_info);
646
647
648/*-----------------------------------------------------------------------------------------------*/
649/**
650 @brief register voice registration event.
651 @param[in] cb_func Voice registration indication callback function
652 @return Whether the voice registration event was successfully registered.
653 @retval QL_ERR_OK successful
654 @retval QL_ERR_NOT_INIT uninitialized
655 @retval QL_ERR_SERVICE_NOT_READY service is not ready
656 @retval QL_ERR_INVALID_ARG Invalid arguments
657 @retval Other error code defined by ql_type.h
658 */
659/*-----------------------------------------------------------------------------------------------*/
660int ql_nw_set_voice_reg_ind_cb(ql_nw_voice_reg_ind_cb cb_func);
661
662
663/*-----------------------------------------------------------------------------------------------*/
664/**
665 @brief register data registration event.
666 @param[in] cb_func Data registration indication callback function
667 @return Whether the data registration event was successfully registered.
668 @retval QL_ERR_OK successful
669 @retval QL_ERR_NOT_INIT uninitialized
670 @retval QL_ERR_SERVICE_NOT_READY service is not ready
671 @retval QL_ERR_INVALID_ARG Invalid arguments
672 @retval Other error code defined by ql_type.h
673 */
674/*-----------------------------------------------------------------------------------------------*/
675int ql_nw_set_data_reg_ind_cb(ql_nw_data_reg_ind_cb cb_func);
676
677
678/*-----------------------------------------------------------------------------------------------*/
679/**
680 @brief register signal strength event.
681 @param[in] cb_func Signal strength indication callback function
682 @return Whether the signal strength event was successfully registered
683 @retval QL_ERR_OK successful
684 @retval QL_ERR_NOT_INIT uninitialized
685 @retval QL_ERR_SERVICE_NOT_READY service is not ready
686 @retval QL_ERR_INVALID_ARG Invalid arguments
687 @retval Other error code defined by ql_type.h
688 */
689/*-----------------------------------------------------------------------------------------------*/
690int ql_nw_set_signal_strength_ind_cb(ql_nw_signal_strength_ind_cb cb_func);
691
692
693/*-----------------------------------------------------------------------------------------------*/
694/**
695 @brief register cell access status event.
696 @param[in] cb_func Cell access status indication callback function
697 @return Whether the cell access status event was successfully registered
698 @retval QL_ERR_OK successful
699 @retval QL_ERR_NOT_INIT uninitialized
700 @retval QL_ERR_SERVICE_NOT_READY service is not ready
701 @retval QL_ERR_INVALID_ARG Invalid arguments
702 @retval Other error code defined by ql_type.h
703 */
704/*-----------------------------------------------------------------------------------------------*/
705int ql_nw_set_cell_access_status_ind_cb(ql_nw_cell_access_status_ind_cb cb_func);
706
707
708/*-----------------------------------------------------------------------------------------------*/
709/**
710 @brief register network time event.
711 @param[in] cb_func nitz time update indication callback function
712 @return Whether the network time event was successfully registered
713 @retval QL_ERR_OK successful
714 @retval QL_ERR_NOT_INIT uninitialized
715 @retval QL_ERR_SERVICE_NOT_READY service is not ready
716 @retval QL_ERR_INVALID_ARG Invalid arguments
717 @retval Other error code defined by ql_type.h
718 */
719/*-----------------------------------------------------------------------------------------------*/
720int ql_nw_set_nitz_time_update_ind_cb(ql_nw_nitz_time_update_ind_cb cb_func);
721
722/*-----------------------------------------------------------------------------------------------*/
723/**
724 @brief register wea alert event.
725 @param[in] cb_func wea alert indication callback function
726 @return Whether the network time event was successfully registered
727 @retval QL_ERR_OK successful
728 @retval QL_ERR_NOT_INIT uninitialized
729 @retval QL_ERR_SERVICE_NOT_READY service is not ready
730 @retval QL_ERR_INVALID_ARG Invalid arguments
731 @retval Other error code defined by ql_type.h
732 */
733/*-----------------------------------------------------------------------------------------------*/
734int ql_nw_set_wea_alert_ind_cb(ql_nw_wea_reg_ind_cb cb_func);
735
736/*-----------------------------------------------------------------------------------------------*/
737/**
738 @brief register etws alert event.
739 @param[in] cb_func etws alert indication callback function
740 @return Whether the network time event was successfully registered
741 @retval QL_ERR_OK successful
742 @retval QL_ERR_NOT_INIT uninitialized
743 @retval QL_ERR_SERVICE_NOT_READY service is not ready
744 @retval QL_ERR_INVALID_ARG Invalid arguments
745 @retval Other error code defined by ql_type.h
746 */
747/*-----------------------------------------------------------------------------------------------*/
748int ql_nw_set_etws_alert_ind_cb(ql_nw_etws_reg_ind_cb cb_func);
749
750/*-----------------------------------------------------------------------------------------------*/
751/**
752 @brief set wea alert config.
753 @param[in] item Items to set.
754 @param[in] p_info Pointer that point to ql_nw_wea_config_t.
755 @return Whether to successfully set the wea config.
756 @retval QL_ERR_OK successful
757 @retval QL_ERR_NOT_INIT uninitialized
758 @retval QL_ERR_SERVICE_NOT_READY service is not ready
759 @retval QL_ERR_INVALID_ARG Invalid arguments
760 @retval Other error code defined by ql_type.h
761 */
762/*-----------------------------------------------------------------------------------------------*/
763int ql_nw_set_wea_config(int item, ql_nw_wea_config_t *p_info);
764
765/*-----------------------------------------------------------------------------------------------*/
766/**
767 @brief Gets wea config.
768 @param[out] p_config wea config.
769 @return Whether the wea config was successfully obtained.
770 @retval QL_ERR_OK successful.
771 @retval QL_ERR_INVALID_ARG invalid argument.
772 @retval QL_ERR_UNKNOWN unknown error, failed to connect to service.
773 @retval QL_ERR_SERVICE_NOT_READY service is not ready, need to retry.
774 @retval Other error code defined by ql_type.h.
775 */
776/*-----------------------------------------------------------------------------------------------*/
777int ql_nw_get_wea_config(ql_nw_wea_config_t *p_config);
778
779/*-----------------------------------------------------------------------------------------------*/
780/**
781 @brief set etws alert config.
782 @param[in] etws config.
783 @return Whether to successfully set the etws config.
784 @retval QL_ERR_OK successful
785 @retval QL_ERR_NOT_INIT uninitialized
786 @retval QL_ERR_SERVICE_NOT_READY service is not ready
787 @retval QL_ERR_INVALID_ARG Invalid arguments
788 @retval Other error code defined by ql_type.h
789 */
790/*-----------------------------------------------------------------------------------------------*/
791int ql_nw_set_etws_config(uint8_t enable_etws);
792
793/*-----------------------------------------------------------------------------------------------*/
794/**
795 @brief get etws alert config.
796 @param[out] p_enable_etws Pointer.
797 @return Whether to successfully set the etws config.
798 @retval QL_ERR_OK successful
799 @retval QL_ERR_NOT_INIT uninitialized
800 @retval QL_ERR_SERVICE_NOT_READY service is not ready
801 @retval QL_ERR_INVALID_ARG Invalid arguments
802 @retval Other error code defined by ql_type.h
803 */
804/*-----------------------------------------------------------------------------------------------*/
805int ql_nw_get_etws_config(uint8_t* p_enable_etws);
806
807/*-----------------------------------------------------------------------------------------------*/
808/**
809 @brief bind subscription
810 @param[in] sub_type subscription type
811 @return Whether to successfully bind subscription.
812 @retval QL_ERR_OK successful
813 @retval QL_ERR_NOT_INIT uninitialized
814 @retval QL_ERR_SERVICE_NOT_READY service is not ready
815 @retval QL_ERR_INVALID_ARG Invalid arguments
816 @retval Other error code defined by ql_type.h
817 */
818/*-----------------------------------------------------------------------------------------------*/
819int ql_nw_bind_subscription(QL_NW_BIND_SUB_TYPE_E sub_type);
820
821/*-----------------------------------------------------------------------------------------------*/
822/**
823 @brief get high capability subscription.
824 @param[out] p_high_cap pointer that point to QL_NW_BIND_SUB_TYPE_E
825 @return Whether the high capability subscription was successfully obtained.
826 @retval QL_ERR_OK successful
827 @retval QL_ERR_NOT_INIT uninitialized
828 @retval QL_ERR_SERVICE_NOT_READY service is not ready
829 @retval QL_ERR_INVALID_ARG Invalid arguments
830 @retval Other error code defined by ql_type.h
831 */
832/*-----------------------------------------------------------------------------------------------*/
833int ql_nw_get_high_cap_sub(QL_NW_BIND_SUB_TYPE_E *p_high_cap);
834
835/*-----------------------------------------------------------------------------------------------*/
836/**
837 @brief set the SIM card index that can uniquely register to the 5G network.
838 the main difference between high and non-high capability subscription is that high capability
839 subscription can register to 5G network while non-high capability subscription can only
840 register to LTE or GSM.
841 @param[in] high_cap high capability subscription
842 @return Whether to successfully set the high capability subscription.
843 @retval QL_ERR_OK successful
844 @retval QL_ERR_NOT_INIT uninitialized
845 @retval QL_ERR_SERVICE_NOT_READY service is not ready
846 @retval QL_ERR_INVALID_ARG Invalid arguments
847 @retval Other error code defined by ql_type.h
848 */
849/*-----------------------------------------------------------------------------------------------*/
850int ql_nw_set_high_cap_sub(QL_NW_BIND_SUB_TYPE_E high_cap);
851
852/*-----------------------------------------------------------------------------------------------*/
853/**
854 @brief Disable NR5G, NR5G_SA and NR5G_NSA can be disabled individually or together.
855 @param[in] opt_mask Option mask value. Value:
856 0 - Do not disable NR5G
857 QL_NW_NR5G_SO_SA - Disable NR5G SA
858 QL_NW_NR5G_SO_NSA - Disable NR5G NSA
859 @return Whether to successfully disable NR5G mode.
860 @retval QL_ERR_OK successful
861 @retval QL_ERR_NOT_INIT uninitialized
862 @retval QL_ERR_SERVICE_NOT_READY service is not ready
863 @retval QL_ERR_INVALID_ARG Invalid arguments
864 @retval Other error code defined by ql_type.h
865 */
866/*-----------------------------------------------------------------------------------------------*/
867int ql_nw_disable_nr5g(uint16_t opt_mask);
868
869/*-----------------------------------------------------------------------------------------------*/
870/**
871 @brief Registration server error callback. Currently, only if the server exits abnormally,
872 the callback function will be executed, and the error code is QL_ERR_ABORTED;
873 @param[in] cb Callback function
874 @return
875 QL_ERR_OK - successful
876 Other - error code defined by ql_type.h
877 */
878/*-----------------------------------------------------------------------------------------------*/
879int ql_nw_set_service_error_cb(ql_nw_service_error_cb_f cb);
880
881#ifdef __cplusplus
882}
883#endif
884
885#endif