OSDN Git Service

Develop HIDL interface for radio (RIL).
[android-x86/hardware-interfaces.git] / radio / 1.0 / IRadio.hal
1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package android.hardware.radio@1.0;
18
19 import IRadioResponse;
20 import IRadioIndication;
21
22 /*
23  * This interface is used by telephony & telecom to talk to cellular radio.
24  * All the functions have minimum two parameters:
25  * slotId: which corresponds to sim slot id.
26  * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
27  * duration of a method call. If clients provide colliding serials (including passing the same
28  * serial to different methods), multiple responses (one for each method call) must still be served.
29  */
30 interface IRadio {
31     /*
32      * Set response functions for radio requests & radio indications.
33      *
34      * @param slotId SIM slot id for which the function is called; needed for multi-sim
35      * @param radioResponse Object containing response functions
36      * @param radioIndication Object containing radio indications
37      */
38     setResponseFunctions(int32_t slotId, IRadioResponse radioResponse,
39             IRadioIndication radioIndication);
40
41     /*
42      * Requests status of the ICC card
43      *
44      * @param slotId SIM slot id for which the function is called; needed for multi-sim
45      * @param serial Serial number of request.
46      *
47      * Response function is IRadioResponse.getIccCardStatusResponse()
48      *
49      */
50     oneway getIccCardStatus(int32_t slotId, int32_t serial);
51
52     /*
53      * Supplies ICC PIN. Only called if CardStatus has AppState.PIN state
54      *
55      * @param slotId SIM slot id for which the function is called; needed for multi-sim
56      * @param serial Serial number of request.
57      * @param pin PIN value
58      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
59      *
60      * Response function is IRadioResponse.supplyIccPinForAppResponse()
61      *
62      */
63     oneway supplyIccPinForApp(int32_t slotId, int32_t serial, string pin, string aid);
64
65     /*
66      * Supplies ICC PUK and new PIN.
67      *
68      * @param slotId SIM slot id for which the function is called; needed for multi-sim
69      * @param serial Serial number of request.
70      * @param puk PUK value
71      * @param pin New PIN value
72      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
73      *
74      * Response function is IRadioResponse.supplyIccPukForAppResponse()
75      *
76      */
77     oneway supplyIccPukForApp(int32_t slotId, int32_t serial, string puk, string pin, string aid);
78
79     /*
80      * Supplies ICC PIN2. Only called following operation where SIM_PIN2 was
81      * returned as a a failure from a previous operation.
82      *
83      * @param slotId SIM slot id for which the function is called; needed for multi-sim
84      * @param serial Serial number of request.
85      * @param pin2 PIN2 value
86      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
87      *
88      * Response function is IRadioResponse.supplyIccPin2ForAppResponse()
89      *
90      */
91     oneway supplyIccPin2ForApp(int32_t slotId, int32_t serial, string pin2, string aid);
92
93     /*
94      * Supplies ICC PUK2 and new PIN2.
95      *
96      * @param slotId SIM slot id for which the function is called; needed for multi-sim
97      * @param serial Serial number of request.
98      * @param puk2 PUK2 value
99      * @param pin2 New PIN2 value
100      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
101      *
102      * Response function is IRadioResponse.supplyIccPuk2ForAppResponse()
103      *
104      */
105     oneway supplyIccPuk2ForApp(int32_t slotId, int32_t serial, string puk2, string pin2,
106             string aid);
107
108     /*
109      * Supplies old ICC PIN and new PIN.
110      *
111      * @param slotId SIM slot id for which the function is called; needed for multi-sim
112      * @param serial Serial number of request.
113      * @param oldPin Old pin value
114      * @param newPin New pin value
115      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
116      *
117      * Response function is IRadioResponse.changeIccPinForAppResponse()
118      *
119      */
120     oneway changeIccPinForApp(int32_t slotId, int32_t serial, string oldPin, string newPin,
121             string aid);
122
123     /*
124      * Supplies old ICC PIN2 and new PIN2.
125      *
126      * @param slotId SIM slot id for which the function is called; needed for multi-sim
127      * @param serial Serial number of request.
128      * @param oldPin2 Old pin2 value
129      * @param newPin2 New pin2 value
130      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
131      *
132      * Response function is IRadioResponse.changeIccPin2ForAppResponse()
133      *
134      */
135     oneway changeIccPin2ForApp(int32_t slotId, int32_t serial, string oldPin2, string newPin2,
136             string aid);
137
138     /*
139      * Requests that network personalization be deactivated
140      *
141      * @param slotId SIM slot id for which the function is called; needed for multi-sim
142      * @param serial Serial number of request.
143      * @param netPin Network depersonlization code
144      *
145      * Response function is IRadioResponse.supplyNetworkDepersonalizationResponse()
146      *
147      */
148     oneway supplyNetworkDepersonalization(int32_t slotId, int32_t serial, string netPin);
149
150     /*
151      * Requests current call list
152      *
153      * @param slotId SIM slot id for which the function is called; needed for multi-sim
154      * @param serial Serial number of request.
155      *
156      * Response function is IRadioResponse.getCurrentCallsResponse()
157      *
158      */
159     oneway getCurrentCalls(int32_t slotId, int32_t serial);
160
161     /*
162      * Initiate voice call.
163      * This method is never used for supplementary service codes
164      *
165      * @param slotId SIM slot id for which the function is called; needed for multi-sim
166      * @param serial Serial number of request.
167      * @param dialInfo Dial struct
168      *
169      * Response function is IRadioResponse.dialResponse()
170      *
171      */
172     oneway dial(int32_t slotId, int32_t serial, Dial dialInfo);
173
174     /*
175      * Get the SIM IMSI
176      * Only valid when radio state is "RADIO_STATE_ON"
177      *
178      * @param slotId SIM slot id for which the function is called; needed for multi-sim
179      * @param serial Serial number of request.
180      * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
181      *
182      * Response function is IRadioResponse.getImsiForAppResponse()
183      *
184      */
185     oneway getImsiForApp(int32_t slotId, int32_t serial, string aid);
186
187     /*
188      * Hang up a specific line (like AT+CHLD=1x)
189      * After this HANGUP request returns, Radio must show the connection is NOT
190      * active anymore in next requestGetCurrentCalls query.
191      *
192      * @param slotId SIM slot id for which the function is called; needed for multi-sim
193      * @param serial Serial number of request.
194      * @param gsmIndex Connection index (value of 'x' in CHLD above)
195      *
196      * Response function is IRadioResponse.hangupResponse()
197      *
198      */
199     oneway hangup(int32_t slotId, int32_t serial, int32_t gsmIndex);
200
201     /*
202      * Hang up waiting or held (like AT+CHLD=0)
203      * After this HANGUP request returns, Radio must show the connection is NOT
204      * active anymore in next getCurrentCalls() query.
205      *
206      * @param slotId SIM slot id for which the function is called; needed for multi-sim
207      * @param serial Serial number of request.
208      *
209      * Response function is IRadioResponse.hangupWaitingOrBackgroundResponse()
210      *
211      */
212     oneway hangupWaitingOrBackground(int32_t slotId, int32_t serial);
213
214     /*
215      * Hang up waiting or held (like AT+CHLD=1)
216      * After this HANGUP request returns, Radio must show the connection is NOT
217      * active anymore in next getCurrentCalls query.
218      *
219      * @param slotId SIM slot id for which the function is called; needed for multi-sim
220      * @param serial Serial number of request.
221      *
222      * Response function is IRadioResponse.hangupForegroundResumeBackgroundResponse()
223      *
224      */
225     oneway hangupForegroundResumeBackground(int32_t slotId, int32_t serial);
226
227     /*
228      * Switch waiting or holding call and active call (like AT+CHLD=2)
229      * State transitions must be as follows:
230      *
231      * Call transitions must happen as shown below.
232      *
233      *   BEFORE                               AFTER
234      * Call 1   Call 2                 Call 1       Call 2
235      * ACTIVE   HOLDING                HOLDING     ACTIVE
236      * ACTIVE   WAITING                HOLDING     ACTIVE
237      * HOLDING  WAITING                HOLDING     ACTIVE
238      * ACTIVE   IDLE                   HOLDING     IDLE
239      * IDLE     IDLE                   IDLE        IDLE
240      *
241      * @param slotId SIM slot id for which the function is called; needed for multi-sim
242      * @param serial Serial number of request.
243      *
244      * Response function is IRadioResponse.switchWaitingOrHoldingAndActiveResponse()
245      *
246      */
247     oneway switchWaitingOrHoldingAndActive(int32_t slotId, int32_t serial);
248
249     /*
250      * Conference holding and active (like AT+CHLD=3)
251      *
252      * @param slotId SIM slot id for which the function is called; needed for multi-sim
253      * @param serial Serial number of request.
254      *
255      * Response function is IRadioResponse.conferenceResponse()
256      *
257      */
258     oneway conference(int32_t slotId, int32_t serial);
259
260     /*
261      * Send UDUB (user determined user busy) to ringing or
262      * waiting call answer)
263      *
264      * @param slotId SIM slot id for which the function is called; needed for multi-sim
265      * @param serial Serial number of request.
266      *
267      * Response function is IRadioResponse.rejectCallResponse()
268      *
269      */
270     oneway rejectCall(int32_t slotId, int32_t serial);
271
272     /*
273      * Requests the failure cause code for the most recently terminated call.
274      *
275      * @param slotId SIM slot id for which the function is called; needed for multi-sim
276      * @param serial Serial number of request.
277      *
278      * Response function is IRadioResponse.getLastCallFailCauseResponse()
279      *
280      */
281     oneway getLastCallFailCause(int32_t slotId, int32_t serial);
282
283     /*
284      * Requests current signal strength and associated information.
285      * Must succeed if radio is on.
286      *
287      * @param slotId SIM slot id for which the function is called; needed for multi-sim
288      * @param serial Serial number of request.
289      *
290      * Response function is IRadioResponse.getSignalStrengthResponse()
291      */
292     oneway getSignalStrength(int32_t slotId, int32_t serial);
293
294     /*
295      * Request current voice registration state
296      *
297      * @param slotId SIM slot id for which the function is called; needed for multi-sim
298      * @param serial Serial number of request.
299      *
300      * Response function is IRadioResponse.getVoiceRegistrationStateResponse()
301      */
302     oneway getVoiceRegistrationState(int32_t slotId, int32_t serial);
303
304     /*
305      * Request current data registration state
306      *
307      * @param slotId SIM slot id for which the function is called; needed for multi-sim
308      * @param serial Serial number of request.
309      *
310      * Response function is IRadioResponse.getDataRegistrationStateResponse()
311      */
312     oneway getDataRegistrationState(int32_t slotId, int32_t serial);
313
314     /*
315      * Request current operator ONS or EONS
316      *
317      * @param slotId SIM slot id for which the function is called; needed for multi-sim
318      * @param serial Serial number of request.
319      *
320      * Response function is IRadioResponse.getOperatorResponse()
321      */
322     oneway getOperator(int32_t slotId, int32_t serial);
323
324     /*
325      * Toggle radio on and off (for "airplane" mode)
326      * If the radio is turned off/on the radio modem subsystem
327      * is expected return to an initialized state. For instance,
328      * any voice and data calls must be terminated and all associated
329      * lists emptied.
330      *
331      * @param slotId SIM slot id for which the function is called; needed for multi-sim
332      * @param serial Serial number of request.
333      * @param on To turn on radio -> on = true, to turn off radio -> on = false.
334      *
335      * Response function is IRadioResponse.setRadioPowerResponse()
336      */
337     oneway setRadioPower(int32_t slotId, int32_t serial, bool on);
338
339     /*
340      * Send a DTMF tone
341      *
342      * If the implementation is currently playing a tone requested via
343      * startDtmf(), that tone must be cancelled and the new tone
344      * must be played instead
345      *
346      * @param slotId SIM slot id for which the function is called; needed for multi-sim
347      * @param serial Serial number of request.
348      * @param s string with single char having one of 12 values: 0-9, *, #
349      *
350      * Response function is IRadioResponse.sendDtmfResponse()
351      */
352     oneway sendDtmf(int32_t slotId, int32_t serial, string s);
353
354     /*
355      * Send an SMS message
356      *
357      * @param slotId SIM slot id for which the function is called; needed for multi-sim
358      * @param serial Serial number of request.
359      * @param smscPDU is SMSC address in GSM BCD format prefixed by a length byte
360      *        (as expected by TS 27.005) or empty string for default SMSC
361      * @param pdu is SMS in PDU format as an ASCII hex string less the SMSC address
362      *        TP-Layer-Length is be "strlen(pdu)/2"
363      *
364      * Response function is IRadioResponse.sendSmsResponse()
365      *
366      * Based on the return error, caller decides to resend if sending sms
367      * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
368      * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
369      */
370     oneway sendSms(int32_t slotId, int32_t serial, string smscPDU, string pdu);
371
372     /*
373      * Send an SMS message. Identical to sendSms,
374      * except that more messages are expected to be sent soon. If possible,
375      * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
376      *
377      * @param slotId SIM slot id for which the function is called; needed for multi-sim
378      * @param serial Serial number of request.
379      * @param smscPDU is SMSC address in GSM BCD format prefixed by a length byte
380      *        (as expected by TS 27.005) or empty string for default SMSC
381      * @param pdu is SMS in PDU format as an ASCII hex string less the SMSC address
382      *        TP-Layer-Length is be "strlen(pdu)/2"
383      *
384      * Response function is IRadioResponse.sendSMSExpectMoreResponse()
385      *
386      * Based on the return error, caller decides to resend if sending sms
387      * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
388      * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
389      */
390     oneway sendSMSExpectMore(int32_t slotId, int32_t serial, string smscPDU, string pdu);
391
392     /*
393      * Setup a packet data connection. If DataCallResponse.status
394      * return DataCallFailCause:NONE it is added to the list of data calls and a
395      * unsolDataCallListChanged() is sent. The call remains in the
396      * list until deactivateDataCall() is issued or the
397      * radio is powered off/on. This list is returned by getDataCallList()
398      * and dataCallListChanged().
399      *
400      * The RIL is expected to:
401      *  - Create one data call context.
402      *  - Create and configure a dedicated interface for the context
403      *  - The interface must be point to point.
404      *  - The interface is configured with one or more addresses and
405      *    is capable of sending and receiving packets. The prefix length
406      *    of the addresses must be /32 for IPv4 and /128 for IPv6.
407      *  - Must NOT change the linux routing table.
408      *  - Support up to getDataRegistrationState response[5]
409      *    number of simultaneous data call contexts.
410      *
411      * @param slotId SIM slot id for which the function is called; needed for multi-sim
412      * @param serial Serial number of request.
413      * @param radioTechnology Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
414      *        for values above 2 this is RadioTechnology + 2.
415      * @param profile is a RadioDataProfile (support is optional)
416      * @param apn is the APN to connect to if radio technology is GSM/UMTS. This APN must
417      *        override the one in the profile. empty string indicates no APN overrride.
418      * @param user is the username for APN, or empty string
419      * @param password is the password for APN, or empty string
420      * @param authType is the PAP / CHAP auth type. Values:
421      *        0 => PAP and CHAP is never performed.
422      *        1 => PAP may be performed; CHAP is never performed.
423      *        2 => CHAP may be performed; PAP is never performed.
424      *        3 => PAP / CHAP may be performed - baseband dependent.
425      * @param protocol is the connection type to request must be one of the
426      *        PDP_type values in TS 27.007 section 10.1.1.
427      *        For example, "IP", "IPV6", "IPV4V6", or "PPP".
428      *
429      * Response function is IRadioResponse.setupDataCallResponse()
430      */
431     oneway setupDataCall(int32_t slotId, int32_t serial, int32_t radioTechnology,
432             int32_t profile, string apn, string user, string password, int32_t authType,
433             string protocol);
434
435     /*
436      * Request ICC I/O operation.
437      * This is similar to the TS 27.007 "restricted SIM" operation
438      * where it assumes all of the EF selection must be done by the
439      * callee
440      *
441      * Arguments and responses that are unused for certain
442      * values of "command" must be ignored or set to empty string
443      *
444      * @param slotId SIM slot id for which the function is called; needed for multi-sim
445      * @param serial Serial number of request.
446      * @param iccIo IccIo
447      *
448      * Please note that IccIo has a "PIN2" field which may be empty string,
449      * or may specify a PIN2 for operations that require a PIN2 (eg
450      * updating FDN records)
451      *
452      * Response function is IRadioResponse.iccIOForAppResponse()
453      */
454     oneway iccIOForApp(int32_t slotId, int32_t serial, IccIo iccIo);
455
456     /*
457      * Send a USSD message.
458      *
459      * If a USSD session already exists, the message must be sent in the
460      * context of that session. Otherwise, a new session must be created.
461      *
462      * The network reply must be reported via unsolOnUssd
463      *
464      * Only one USSD session must exist at a time, and the session is assumed
465      * to exist until:
466      * a) The android system invokes cancelUssd()
467      * b) The implementation sends a unsolOnUssd() with a type code
468      * of "0" (USSD-Notify/no further action) or "2" (session terminated)
469      *
470      * @param slotId SIM slot id for which the function is called; needed for multi-sim
471      * @param serial Serial number of request.
472      * @param ussd string containing the USSD request in UTF-8 format
473      *
474      * Response function is IRadioResponse.sendUssdResponse()
475      *
476      * See also requestCancelUssd, unsolOnUssd
477      */
478     oneway sendUssd(int32_t slotId, int32_t serial, string ussd);
479
480     /*
481      * Cancel the current USSD session if one exists.
482      *
483      * @param slotId SIM slot id for which the function is called; needed for multi-sim
484      * @param serial Serial number of request.
485      *
486      * Response function is IRadioResponse.cancelPendingUssdResponse()
487      */
488     oneway cancelPendingUssd(int32_t slotId, int32_t serial);
489
490     /*
491      * Gets current CLIR status
492      *
493      * @param slotId SIM slot id for which the function is called; needed for multi-sim
494      * @param serial Serial number of request.
495      *
496      * Response function is IRadioResponse.getClirResponse()
497      */
498     oneway getClir(int32_t slotId, int32_t serial);
499
500     /*
501      * Set current CLIR status
502      *
503      * @param slotId SIM slot id for which the function is called; needed for multi-sim
504      * @param serial Serial number of request.
505      * @param status "n" parameter from TS 27.007 7.7
506      *
507      * Response function is IRadioResponse.setClirResponse()
508      */
509     oneway setClir(int32_t slotId, int32_t serial, int32_t status);
510
511     /*
512      * Request call forward status.
513      *
514      * @param slotId SIM slot id for which the function is called; needed for multi-sim
515      * @param serial Serial number of request.
516      * @param callInfo CallForwardInfo
517      *
518      * Response function is IRadioResponse.getCallForwardStatusResponse()
519      */
520     oneway getCallForwardStatus(int32_t slotId, int32_t serial,
521             CallForwardInfo callInfo);
522
523     /*
524      * Configure call forward rule
525      *
526      * @param slotId SIM slot id for which the function is called; needed for multi-sim
527      * @param serial Serial number of request.
528      * @param callInfo CallForwardInfo
529      *
530      * Response function is IRadioResponse.setCallForwardResponse()
531      */
532     oneway setCallForward(int32_t slotId, int32_t serial, CallForwardInfo callInfo);
533
534     /*
535      * Query current call waiting state
536      *
537      * @param slotId SIM slot id for which the function is called; needed for multi-sim
538      * @param serial Serial number of request.
539      * @param serviceClass Service class is the TS 27.007 service class to query
540      *
541      * Response function is IRadioResponse.getCallWaitingResponse()
542      */
543     oneway getCallWaiting(int32_t slotId, int32_t serial, int32_t serviceClass);
544
545     /*
546      * Configure current call waiting state
547      *
548      * @param slotId SIM slot id for which the function is called; needed for multi-sim
549      * @param serial Serial number of request.
550      * @param enable is false for "disabled" and true for "enabled"
551      * @param serviceClass is the TS 27.007 service class bit vector of services to modify
552      *
553      * Response function is IRadioResponse.setCallWaitingResponse()
554      */
555     oneway setCallWaiting(int32_t slotId, int32_t serial, bool enable,
556             int32_t serviceClass);
557
558     /*
559      * Acknowledge successful or failed receipt of SMS previously indicated
560      * via unsolResponseNewSms
561      *
562      * @param slotId SIM slot id for which the function is called; needed for multi-sim
563      * @param serial Serial number of request.
564      * @param success is true on successful receipt
565      *        (basically, AT+CNMA=1 from TS 27.005 is 0 on failed receipt
566      *        (basically, AT+CNMA=2 from TS 27.005)
567      * @param cause: if success is false, this contains the failure cause as defined
568      *        in TS 23.040, 9.2.3.22.
569      *
570      * Response function is IRadioResponse.acknowledgeLastIncomingGsmSmsResponse()
571      */
572     oneway acknowledgeLastIncomingGsmSms(int32_t slotId, int32_t serial, bool success,
573             SmsAcknowledgeFailCause cause);
574
575     /*
576      * Answer incoming call
577      * Must not be called for WAITING calls.
578      * switchWaitingOrHoldingAndActive() must be used in this case
579      * instead
580      *
581      * @param slotId SIM slot id for which the function is called; needed for multi-sim
582      * @param serial Serial number of request.
583      *
584      * Response function is IRadioResponse.acceptCallResponse()
585      */
586     oneway acceptCall(int32_t slotId, int32_t serial);
587
588     /*
589      * Deactivate packet data connection and remove from the
590      * data call list if RadioError:NONE is returned. Any other return
591      * values must also try to remove the call from the list. An
592      * unsolDataCallListChanged must be
593      * issued because of an deactivateDataCall.
594      *
595      * @param slotId SIM slot id for which the function is called; needed for multi-sim
596      * @param serial Serial number of request.
597      * @param cid Indicates CID
598      * @param reasonRadioShutDown Indicates Disconnect Reason
599      *        false => No specific reason specified
600      *        true => Radio shutdown requested
601      *
602      * Response function is IRadioResponse.deactivateDataCallResponse()
603      */
604     oneway deactivateDataCall(int32_t slotId, int32_t serial, int32_t cid,
605             bool reasonRadioShutDown);
606
607     /*
608      * Query the status of a facility lock state
609      *
610      * @param slotId SIM slot id for which the function is called; needed for multi-sim
611      * @param serial Serial number of request.
612      * @param facility is the facility string code from TS 27.007 7.4
613      *        (eg "AO" for BAOC, "SC" for SIM lock)
614      * @param password is the password, or "" if not required
615      * @param serviceClass is the TS 27.007 service class bit vector of services to query
616      * @param appId is AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
617      *        This is only applicable in the case of Fixed Dialing Numbers (FDN) requests.
618      *
619      * Response function is IRadioResponse.getFacilityLockForAppResponse()
620      */
621     oneway getFacilityLockForApp(int32_t slotId, int32_t serial, string facility,
622             string password, int32_t serviceClass, string appId);
623
624     /*
625      * Enable/disable one facility lock
626      *
627      * @param slotId SIM slot id for which the function is called; needed for multi-sim
628      * @param serial Serial number of request.
629      * @param facility is the facility string code from TS 27.007 7.4 (eg "AO" for BAOC)
630      * @param lockState false for "unlock" and true for "lock"
631      * @param password is the password
632      * @param serviceClass is string representation of decimal TS 27.007
633      *        service class bit vector. Eg, the string
634      *        "1" means "set this facility for voice services"
635      * @param appId is AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
636      *        This is only applicable in the case of Fixed Dialing Numbers (FDN) requests.
637      *
638      * Response function is IRadioResponse.setFacilityLockForAppResponse()
639      */
640     oneway setFacilityLockForApp(int32_t slotId, int32_t serial, string facility, bool lockState,
641             string password, int32_t serviceClass, string appId);
642
643     /*
644      * Change call barring facility password
645      *
646      * @param slotId SIM slot id for which the function is called; needed for multi-sim
647      * @param serial Serial number of request.
648      * @param facility facility string code from TS 27.007 7.4 (eg "AO" for BAOC)
649      * @param oldPassword old password
650      * @param newPassword new password
651      *
652      * Response function is IRadioResponse.setBarringPasswordResponse()
653      */
654     oneway setBarringPassword(int32_t slotId, int32_t serial, string facility,
655             string oldPassword, string newPassword);
656
657     /*
658      * Query current network selection mode
659      *
660      * @param slotId SIM slot id for which the function is called; needed for multi-sim
661      * @param serial Serial number of request.
662      *
663      * Response function is IRadioResponse.getNetworkSelectionModeResponse()
664      */
665     oneway getNetworkSelectionMode(int32_t slotId, int32_t serial);
666
667     /*
668      * Specify that the network must be selected automatically.
669      * This request must not respond until the new operator is selected and registered.
670      *
671      * @param slotId SIM slot id for which the function is called; needed for multi-sim
672      * @param serial Serial number of request.
673      *
674      * Response function is IRadioResponse.setNetworkSelectionModeAutomaticResponse()
675      */
676     oneway setNetworkSelectionModeAutomatic(int32_t slotId, int32_t serial);
677
678     /*
679      * Manually select a specified network.
680      * This request must not respond until the new operator is selected and registered.
681      *
682      * @param slotId SIM slot id for which the function is called; needed for multi-sim
683      * @param serial Serial number of request.
684      * @param operatorNumeric string specifying MCCMNC of network to select (eg "310170")
685      *
686      * Response function is IRadioResponse.setNetworkSelectionModeManualResponse()
687      */
688     oneway setNetworkSelectionModeManual(int32_t slotId, int32_t serial, string operatorNumeric);
689
690     /*
691      * Scans for available networks
692      * This request must not respond until the new operator is selected and registered.
693      *
694      * @param slotId SIM slot id for which the function is called; needed for multi-sim
695      * @param serial Serial number of request.
696      *
697      * Response function is IRadioResponse.getAvailableNetworksResponse()
698      */
699     oneway getAvailableNetworks(int32_t slotId, int32_t serial);
700
701     /*
702      * Start playing a DTMF tone. Continue playing DTMF tone until
703      * stopDtmf is received.
704      * If a startDtmf() is received while a tone is currently playing,
705      * it must cancel the previous tone and play the new one.
706      *
707      * @param slotId SIM slot id for which the function is called; needed for multi-sim
708      * @param serial Serial number of request.
709      * @param s string having a single character with one of 12 values: 0-9,*,#
710      *
711      * Response function is IRadioResponse.startDtmfResponse()
712      */
713     oneway startDtmf(int32_t slotId, int32_t serial, string s);
714
715     /*
716      * Stop playing a currently playing DTMF tone.
717      *
718      * @param slotId SIM slot id for which the function is called; needed for multi-sim
719      * @param serial Serial number of request.
720      *
721      * Response function is IRadioResponse.stopDtmfResponse()
722      */
723     oneway stopDtmf(int32_t slotId, int32_t serial);
724
725     /*
726      * Return string value indicating baseband version, eg response from AT+CGMR
727      *
728      * @param slotId SIM slot id for which the function is called; needed for multi-sim
729      * @param serial Serial number of request.
730      *
731      * Response function is IRadioResponse.getBasebandVersionResponse()
732      */
733     oneway getBasebandVersion(int32_t slotId, int32_t serial);
734
735     /*
736      * Separate a party from a multiparty call placing the multiparty call
737      * (less the specified party) on hold and leaving the specified party
738      * as the only other member of the current (active) call
739      *
740      * Like AT+CHLD=2x
741      *
742      * See TS 22.084 1.3.8.2 (iii)
743      * TS 22.030 6.5.5 "Entering "2X followed by send"
744      * TS 27.007 "AT+CHLD=2x"
745      *
746      * @param slotId SIM slot id for which the function is called; needed for multi-sim
747      * @param serial Serial number of request.
748      * @param gsmIndex contains Connection index (value of 'x' in CHLD above)
749      *
750      * Response function is IRadioResponse.separateConnectionResponse()
751      */
752     oneway separateConnection(int32_t slotId, int32_t serial, int32_t gsmIndex);
753
754     /*
755      * Turn on or off uplink (microphone) mute.
756      * Must only be sent while voice call is active.
757      * Must always be reset to "disable mute" when a new voice call is initiated
758      *
759      * @param slotId SIM slot id for which the function is called; needed for multi-sim
760      * @param serial Serial number of request.
761      * @param enable true for "enable mute" and false for "disable mute"
762      *
763      * Response function is IRadioResponse.setMuteResponse()
764      */
765     oneway setMute(int32_t slotId, int32_t serial, bool enable);
766
767     /*
768      * Queries the current state of the uplink mute setting
769      *
770      * @param slotId SIM slot id for which the function is called; needed for multi-sim
771      * @param serial Serial number of request.
772      *
773      * Response function is IRadioResponse.getMuteResponse()
774      */
775     oneway getMute(int32_t slotId, int32_t serial);
776
777     /*
778      * Queries the status of the CLIP supplementary service
779      * (for MMI code "*#30#")
780      *
781      * @param slotId SIM slot id for which the function is called; needed for multi-sim
782      * @param serial Serial number of request.
783      *
784      * Response function is IRadioResponse.getClipResponse()
785      */
786     oneway getClip(int32_t slotId, int32_t serial);
787
788     /*
789      * Returns the data call list. An entry is added when a
790      * setupDataCall() is issued and removed on a
791      * deactivateDataCall(). The list is emptied when
792      * setRadioPower() off/on is issued.
793      *
794      * @param slotId SIM slot id for which the function is called; needed for multi-sim
795      * @param serial Serial number of request.
796      *
797      * Response function is IRadioResponse.getDataCallListResponse()
798      */
799     oneway getDataCallList(int32_t slotId, int32_t serial);
800
801     /*
802      * This request is reserved for OEM-specific uses. It passes raw byte arrays back and forth.
803      *
804      * @param slotId SIM slot id for which the function is called; needed for multi-sim
805      * @param serial Serial number of request.
806      * @param data data passed as raw bytes to oem
807      *
808      * Response function is IRadioResponse.sendOemRilRequestRawResponse()
809      */
810     oneway sendOemRilRequestRaw(int32_t slotId, int32_t serial, vec<uint8_t> data);
811
812     /*
813      * This request is reserved for OEM-specific uses. It passes strings back and forth.
814      *
815      * @param slotId SIM slot id for which the function is called; needed for multi-sim
816      * @param serial Serial number of request.
817      * @param data data passed as strings to oem
818      *
819      * Response function is IRadioResponse.sendOemRilRequestStringsResponse()
820      */
821     oneway sendOemRilRequestStrings(int32_t slotId, int32_t serial, vec<string> data);
822
823     /*
824      * Indicates the current state of the screen. When the screen is off, the
825      * Radio must notify the baseband to suppress certain notifications (eg,
826      * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
827      * in an effort to conserve power. These notifications must resume when the
828      * screen is on.
829      *
830      * @param slotId SIM slot id for which the function is called; needed for multi-sim
831      * @param serial Serial number of request.
832      * @param enable true = screen on, false = screen off.
833      *
834      * Response function is IRadioResponse.sendScreenStateResponse()
835      */
836     oneway sendScreenState(int32_t slotId, int32_t serial, bool enable);
837
838     /*
839      * Enables/disables supplementary service related notifications from the network.
840      * Notifications are reported via unsolSuppSvcNotification().
841      *
842      * @param slotId SIM slot id for which the function is called; needed for multi-sim
843      * @param serial Serial number of request.
844      * @param enable true = notifications enabled, false = notifications disabled.
845      *
846      * Response function is IRadioResponse.setSuppServiceNotificationsResponse()
847      */
848     oneway setSuppServiceNotifications(int32_t slotId, int32_t serial, bool enable);
849
850     /*
851      * Stores a SMS message to SIM memory.
852      *
853      * @param slotId SIM slot id for which the function is called; needed for multi-sim
854      * @param serial Serial number of request.
855      * @param smsWriteArgs SmsWriteArgs defined in types.hal
856      *
857      * Response function is IRadioResponse.writeSmsToSimResponse()
858      */
859     oneway writeSmsToSim(int32_t slotId, int32_t serial, SmsWriteArgs smsWriteArgs);
860
861     /*
862      * Deletes a SMS message from SIM memory.
863      *
864      * @param slotId SIM slot id for which the function is called; needed for multi-sim
865      * @param serial Serial number of request.
866      * @param index Record index of the message to delete.
867      *
868      * Response function is IRadioResponse.deleteSmsOnSimResponse()
869      */
870     oneway deleteSmsOnSim(int32_t slotId, int32_t serial, int32_t index);
871
872     /*
873      * Assign a specified band for RF configuration.
874      *
875      * @param slotId SIM slot id for which the function is called; needed for multi-sim
876      * @param serial Serial number of request.
877      * @param mode RadioBandMode defined in types.hal
878      *
879      * Response function is IRadioResponse.setBandModeResponse()
880      */
881     oneway setBandMode(int32_t slotId, int32_t serial, RadioBandMode mode);
882
883     /*
884      * Get the list of band modes supported by RF.
885      *
886      * @param slotId SIM slot id for which the function is called; needed for multi-sim
887      * @param serial Serial number of request.
888      *
889      * Response function is IRadioResponse.getAvailableBandModesResponse()
890      */
891     oneway getAvailableBandModes(int32_t slotId, int32_t serial);
892
893     /*
894      * Requests to send a SAT/USAT envelope command to SIM.
895      * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
896      *
897      * @param slotId SIM slot id for which the function is called; needed for multi-sim
898      * @param serial Serial number of request.
899      * @param command SAT/USAT command in hexadecimal format string starting with command tag
900      *
901      * Response function is IRadioResponse.sendEnvelopeResponse()
902      */
903     oneway sendEnvelope(int32_t slotId, int32_t serial, string command);
904
905     /*
906      * Requests to send a terminal response to SIM for a received proactive command
907      *
908      * @param slotId SIM slot id for which the function is called; needed for multi-sim
909      * @param serial Serial number of request.
910      * @param commandResponse SAT/USAT response in hexadecimal format string starting with
911      *        first byte of response data
912      *
913      * Response function is IRadioResponse.sendTerminalResponseResponseToSim()
914      */
915     oneway sendTerminalResponseToSim(int32_t slotId, int32_t serial, string commandResponse);
916 };