1 /*
2  * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_RIL_REQUEST_H
17 #define OHOS_RIL_REQUEST_H
18 
19 #define HRIL_RESPONSE_ACKNOWLEDGEMENT 800
20 typedef enum {
21     HREQ_CALL_BASE = 0,
22 
23     /** Get call list. */
24     HREQ_CALL_GET_CALL_LIST,
25 
26     /** Initiate voice call. */
27     HREQ_CALL_DIAL,
28 
29     /** Hang up a call. */
30     HREQ_CALL_HANGUP,
31 
32     /** Reject a specific call. */
33     HREQ_CALL_REJECT,
34 
35     /** Answer incoming call. */
36     HREQ_CALL_ANSWER,
37 
38     /** call hold value 6 */
39     HREQ_CALL_HOLD_CALL,
40 
41     /** call active value 7 */
42     HREQ_CALL_UNHOLD_CALL,
43 
44     /** Switch waiting or holding call and active call. */
45     HREQ_CALL_SWITCH_CALL,
46 
47     /** Combine holding and active call. */
48     HREQ_CALL_COMBINE_CONFERENCE,
49 
50     /** Keep all other calls except the xth call */
51     HREQ_CALL_SEPARATE_CONFERENCE,
52 
53     /** Holds and resumes a call. */
54     HREQ_CALL_CALL_SUPPLEMENT,
55 
56     /** Send a DTMF tone. */
57     HREQ_CALL_SEND_DTMF,
58 
59     /** Start playing a DTMF tone. */
60     HREQ_CALL_START_DTMF,
61 
62     /** Stop playing a currently playing DTMF tone. */
63     HREQ_CALL_STOP_DTMF,
64 
65     /**
66      * Called when set Calling line Identification Presentation Supplementary
67      * Service(CLIP).
68      */
69     HREQ_CALL_SET_CLIP,
70 
71     /**
72      * Called when get Calling line Identification Presentation Supplementary
73      * Service(CLIP).
74      */
75     HREQ_CALL_GET_CLIP,
76 
77     /** Called when get call waiting. */
78     HREQ_CALL_GET_CALL_WAITING,
79 
80     /** Called when set call waiting. */
81     HREQ_CALL_SET_CALL_WAITING,
82 
83     /** Called when get call restriction. */
84     HREQ_CALL_GET_CALL_RESTRICTION,
85 
86     /** Called when set call restriction. */
87     HREQ_CALL_SET_CALL_RESTRICTION,
88 
89     /** Called when get call transfer info. */
90     HREQ_CALL_GET_CALL_TRANSFER_INFO,
91 
92     /** Called when set call transfer info. */
93     HREQ_CALL_SET_CALL_TRANSFER_INFO,
94 
95     /** Called when get Calling line identification restriction(CLIR). */
96     HREQ_CALL_GET_CLIR,
97 
98     /** Called when set Calling line identification restriction(CLIR). */
99     HREQ_CALL_SET_CLIR,
100 
101     /** Called when get call preference. */
102     HREQ_CALL_GET_CALL_PREFERENCE,
103 
104     /** Called when set call preference. */
105     HREQ_CALL_SET_CALL_PREFERENCE,
106 
107     /**
108      * Called when set unstructured supplementary service data (USSD)
109      * information.
110      */
111     HREQ_CALL_SET_USSD,
112 
113     /**
114      * Called when get unstructured supplementary service data (USSD)
115      * information.
116      */
117     HREQ_CALL_GET_USSD,
118 
119     /** Called when set mute mode. */
120     HREQ_CALL_SET_MUTE,
121 
122     /** Called when get mute mode. */
123     HREQ_CALL_GET_MUTE,
124 
125     /** Get emergency list. */
126     HREQ_CALL_GET_EMERGENCY_LIST,
127 
128     /** Set emergency list. */
129     HREQ_CALL_SET_EMERGENCY_LIST,
130 
131     /** Get the call failure cause. */
132     HREQ_CALL_GET_FAIL_REASON,
133 
134     /** Set the call barring password. */
135     HREQ_CALL_SET_BARRING_PASSWORD,
136 
137     /** Close unfinished unstructured supplementary service data (USSD). */
138     HREQ_CALL_CLOSE_UNFINISHED_USSD,
139     HREQ_EXPLICIT_CALL_TRANSFER_CONNECTION,
140     HREQ_SET_VONR_SWITCH,
141 
142     /** Enable or disable supplementary service related notification from the network. */
143     HREQ_CALL_SET_SUPP_SRV_NOTIFICATION,
144 
145     /** Set the TTY mode. */
146     HREQ_CALL_GET_TTY_MODE,
147 
148     /** Get the TTY mode. */
149     HREQ_CALL_SET_TTY_MODE,
150 
151     HREQ_SMS_BASE = 100,
152 
153     /** Send GSM SMS. */
154     HREQ_SMS_SEND_GSM_SMS,
155 
156     /** Send CDMA SMS. */
157     HREQ_SMS_SEND_CDMA_SMS,
158 
159     /** Add SIM message. */
160     HREQ_SMS_ADD_SIM_MESSAGE,
161 
162     /** Delete SIM message. */
163     HREQ_SMS_DEL_SIM_MESSAGE,
164 
165     /** Update SIM message. */
166     HREQ_SMS_UPDATE_SIM_MESSAGE,
167 
168     /**
169      * Send amd SMS message, and that more messages are expected to be sent
170      * soon.
171      */
172     HREQ_SMS_SEND_SMS_MORE_MODE,
173 
174     /** Acknowledge successful or failed receipt of SMS. */
175     HREQ_SMS_SEND_SMS_ACK,
176 
177     /** Sets the default Short Message Service Center address on the device. */
178     HREQ_SMS_SET_SMSC_ADDR,
179 
180     /** Get the default Short Message Service Center address on the device. */
181     HREQ_SMS_GET_SMSC_ADDR,
182 
183     /** Activates GSM cell broadcast. */
184     HREQ_SMS_SET_CB_CONFIG,
185 
186     /** Get the GSM cell broadcast configuration. */
187     HREQ_SMS_GET_CB_CONFIG,
188 
189     /** Get the CDMA cell broadcast configuration. */
190     HREQ_SMS_GET_CDMA_CB_CONFIG,
191 
192     /** Set the CDMA cell broadcast configuration. */
193     HREQ_SMS_SET_CDMA_CB_CONFIG,
194 
195     /** Writes CDMA SMS messages to the SIM card. */
196     HREQ_SMS_ADD_CDMA_SIM_MESSAGE,
197 
198     /** Deletes CDMA SMS messages from the SIM card. */
199     HREQ_SMS_DEL_CDMA_SIM_MESSAGE,
200 
201     /** Updates CDMA SMS messages from SIM card. */
202     HREQ_SMS_UPDATE_CDMA_SIM_MESSAGE,
203 
204     /** Set whether memory is available for new SMS messages. */
205     HREQ_SMS_SET_MEMORY_STATUS,
206 
207     HREQ_SIM_BASE = 200,
208 
209     /** Gets the SIM card status. */
210     HREQ_SIM_GET_SIM_STATUS,
211 
212     /**
213      * Gets the international mobile subscriber identity (IMSI) of the SIM
214      * card.
215      */
216     HREQ_SIM_GET_IMSI,
217 
218     /** Gets SIM card data. */
219     HREQ_SIM_GET_SIM_IO,
220 
221     /** Gets SIM card lock status. */
222     HREQ_SIM_GET_SIM_LOCK_STATUS,
223 
224     /** Sets the SIM card lock. */
225     HREQ_SIM_SET_SIM_LOCK,
226 
227     /** Changes the SIM card password. */
228     HREQ_SIM_CHANGE_SIM_PASSWORD,
229 
230     /** Sets the PIN for unlocking. */
231     HREQ_SIM_UNLOCK_PIN,
232 
233     /** Sets the PUK for unlocking. */
234     HREQ_SIM_UNLOCK_PUK,
235 
236     /** Gets SIM PIN input times from sim card. */
237     HREQ_SIM_GET_SIM_PIN_INPUT_TIMES,
238 
239     /** Sets the PIN2 for unlocking. */
240     HREQ_SIM_UNLOCK_PIN2,
241 
242     /** Sets the PUK2 for unlocking. */
243     HREQ_SIM_UNLOCK_PUK2,
244 
245     /** Gets SIM PIN2 input times from sim card. */
246     HREQ_SIM_GET_SIM_PIN2_INPUT_TIMES,
247 
248     /** Specifies whether to activate a SIM card. */
249     HREQ_SIM_SET_ACTIVE_SIM,
250 
251     /** Gets the protocol stack of the primary and secondary SIM cards. */
252     HREQ_SIM_GET_RADIO_PROTOCOL,
253 
254     /** Sets the protocol stack for the primary and secondary SIM cards. */
255     HREQ_SIM_SET_RADIO_PROTOCOL,
256 
257     /**
258      * Sends the TerminalResponse instruction of the SIM application toolkit
259      * (STK).
260      */
261     HREQ_SIM_STK_SEND_TERMINAL_RESPONSE,
262 
263     /** Sends the Envelope instruction of the STK. */
264     HREQ_SIM_STK_SEND_ENVELOPE,
265 
266     /** Sned envelope response contain status of STK. */
267     HREQ_SIM_STK_SEND_ENVELOPE_RESPONSE_CONTAIN_STATUS,
268 
269     /** Sends the CallSetup instruction of the STK. */
270     HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT,
271 
272     /** Checks whether the STK is in the Ready state. */
273     HREQ_SIM_STK_IS_READY,
274 
275     /**
276      * Opens the logical channel of the application protocol data unit (APDU).
277      */
278     HREQ_SIM_OPEN_LOGICAL_CHANNEL,
279 
280     /** Closes the logical channel of the APDU. */
281     HREQ_SIM_CLOSE_LOGICAL_CHANNEL,
282 
283     /**
284      * Transmits APDU data over the logical channel. The logical channel is
285      * opened and closed by the application.
286      */
287     HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL,
288 
289     /**
290      * Transmits APDU data over the basic channel. The basic channel is the
291      * channel opened by default.
292      */
293     HREQ_SIM_TRANSMIT_APDU_BASIC_CHANNEL,
294 
295     /** Performs SIM card authentication. */
296     HREQ_SIM_AUTHENTICATION,
297 
298     /** Unlocks a SIM card. */
299     HREQ_SIM_UNLOCK_SIM_LOCK,
300 
301     /** Send SIM matched OperatorInfo. */
302     HREQ_SIM_SEND_NCFG_OPER_INFO,
303 
304     /** Set SIM card power state. */
305     HREQ_SIM_SET_SIM_POWER_STATE,
306 
307     HREQ_DATA_BASE = 300,
308 
309     /** Sets an apn to initial attach network. */
310     HREQ_DATA_SET_INIT_APN_INFO,
311 
312     /** Deactivates PDP context. */
313     HREQ_DATA_DEACTIVATE_PDP_CONTEXT,
314 
315     /** Activates PDP context. */
316     HREQ_DATA_ACTIVATE_PDP_CONTEXT,
317 
318     /** Gets PDP context list. */
319     HREQ_DATA_GET_PDP_CONTEXT_LIST,
320 
321     /** Gets current link information. */
322     HREQ_DATA_GET_LINK_BANDWIDTH_INFO,
323 
324     /** Sets the rule for reporting the data link bandwidth information. */
325     HREQ_DATA_SET_LINK_BANDWIDTH_REPORTING_RULE,
326 
327     /** Sets the PDP context information for the data service. */
328     HREQ_DATA_SET_DATA_PROFILE_INFO,
329 
330     /** Sends the data service performance mode. */
331     HREQ_DATA_SEND_DATA_PERFORMANCE_MODE,
332 
333     /** Sends the data service sleep mode. */
334     HREQ_DATA_SEND_DATA_SLEEP_MODE,
335 
336     /** Enables the data service of a SIM card slot. */
337     HREQ_DATA_SET_DATA_PERMITTED,
338 
339     /** Get link capability. */
340     HREQ_DATA_GET_LINK_CAPABILITY,
341 
342     /** Clean all data connections. */
343     HREQ_DATA_CLEAN_ALL_CONNECTIONS,
344 
345     HREQ_NETWORK_BASE = 400,
346 
347     /** Gets the signal strength. */
348     HREQ_NETWORK_GET_SIGNAL_STRENGTH,
349 
350     /** Gets the registration status of the CS domain. */
351     HREQ_NETWORK_GET_CS_REG_STATUS,
352 
353     /** Gets the registration status of the PS domain. */
354     HREQ_NETWORK_GET_PS_REG_STATUS,
355 
356     /** Gets the opreator info. */
357     HREQ_NETWORK_GET_OPERATOR_INFO,
358 
359     /** Gets information about available networks. */
360     HREQ_NETWORK_GET_NETWORK_SEARCH_INFORMATION,
361 
362     /** Gets the network selection mode. */
363     HREQ_NETWORK_GET_NETWORK_SELECTION_MODE,
364 
365     /** Sets the network selection mode. */
366     HREQ_NETWORK_SET_NETWORK_SELECTION_MODE,
367 
368     /** Gets information about neighboring cells. */
369     HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST,
370 
371     /** Gets current cell info. */
372     HREQ_NETWORK_GET_CURRENT_CELL_INFO,
373 
374     /** Sets the preferred network type. */
375     HREQ_NETWORK_SET_PREFERRED_NETWORK,
376 
377     /** Gets the preferred network type. */
378     HREQ_NETWORK_GET_PREFERRED_NETWORK,
379 
380     /** Get radio capability. */
381     HREQ_NETWORK_GET_RADIO_CAPABILITY,
382 
383     /** Gets the physical channel configuration. */
384     HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG,
385 
386     /** Sets the cell location update notification mode. */
387     HREQ_NETWORK_SET_LOCATE_UPDATES,
388 
389     /** Sets the filter of notifications reported by the modem. */
390     HREQ_NETWORK_SET_NOTIFICATION_FILTER,
391 
392     /** Sets the device status. */
393     HREQ_NETWORK_SET_DEVICE_STATE,
394 
395     /** Get rrc connection state. */
396     HREQ_NETWORK_GET_RRC_CONNECTION_STATE,
397 
398     /** Set nr option mode. */
399     HREQ_NETWORK_SET_NR_OPTION_MODE,
400 
401     /** Get nr option mode. */
402     HREQ_NETWORK_GET_NR_OPTION_MODE,
403 
404     /** Get nr ssbid info. */
405     HREQ_NETWORK_GET_NR_SSBID_INFO,
406 
407     HREQ_COMMON_BASE = 500,
408 
409     /** Sends a mobile phone power-off message to the modem. */
410     HREQ_MODEM_SHUT_DOWN,
411 
412     /** Sets the modem status. */
413     HREQ_MODEM_SET_RADIO_STATUS,
414 
415     /** Gets the modem status. */
416     HREQ_MODEM_GET_RADIO_STATUS,
417 
418     /** Gets the international mobile equipment identity (IMEI). */
419     HREQ_MODEM_GET_IMEI,
420 
421     /** Gets the international mobile equipment identity (IMEISV). */
422     HREQ_MODEM_GET_IMEISV,
423 
424     /** Gets the mobile equipment identifier (MEID). */
425     HREQ_MODEM_GET_MEID,
426 
427     /** Gets the baseband version. */
428     HREQ_MODEM_GET_BASEBAND_VERSION,
429 
430     /** Gets the radio access technology of the CS domain. */
431     HREQ_MODEM_GET_VOICE_RADIO,
432 
433     HREQ_MODEM_EXIT = 1000
434 } HRilRequest;
435 #endif // OHOS_RIL_REQUEST_H
436