summaryrefslogtreecommitdiffstats
path: root/radio/1.0/IRadio.hal
blob: 236dbf5bd6e61d2fdc2913eb3baa6054df2ddecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.radio@1.0;

import IRadioResponse;
import IRadioIndication;

/**
 * This interface is used by telephony & telecom to talk to cellular radio.
 * All the functions have minimum one parameter:
 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
 * duration of a method call. If clients provide colliding serials (including passing the same
 * serial to different methods), multiple responses (one for each method call) must still be served.
 */
interface IRadio {
    /**
     * Set response functions for radio requests & radio indications.
     *
     * @param radioResponse Object containing response functions
     * @param radioIndication Object containing radio indications
     */
    setResponseFunctions(IRadioResponse radioResponse,
            IRadioIndication radioIndication);

    /**
     * Requests status of the ICC card
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getIccCardStatusResponse()
     *
     */
    oneway getIccCardStatus(int32_t serial);

    /**
     * Supplies ICC PIN. Only called if CardStatus has AppState.PIN state
     *
     * @param serial Serial number of request.
     * @param pin PIN value
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.supplyIccPinForAppResponse()
     *
     */
    oneway supplyIccPinForApp(int32_t serial, string pin, string aid);

    /**
     * Supplies ICC PUK and new PIN.
     *
     * @param serial Serial number of request.
     * @param puk PUK value
     * @param pin New PIN value
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.supplyIccPukForAppResponse()
     *
     */
    oneway supplyIccPukForApp(int32_t serial, string puk, string pin, string aid);

    /**
     * Supplies ICC PIN2. Only called following operation where SIM_PIN2 was
     * returned as a a failure from a previous operation.
     *
     * @param serial Serial number of request.
     * @param pin2 PIN2 value
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.supplyIccPin2ForAppResponse()
     *
     */
    oneway supplyIccPin2ForApp(int32_t serial, string pin2, string aid);

    /**
     * Supplies ICC PUK2 and new PIN2.
     *
     * @param serial Serial number of request.
     * @param puk2 PUK2 value
     * @param pin2 New PIN2 value
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.supplyIccPuk2ForAppResponse()
     *
     */
    oneway supplyIccPuk2ForApp(int32_t serial, string puk2, string pin2,
            string aid);

    /**
     * Supplies old ICC PIN and new PIN.
     *
     * @param serial Serial number of request.
     * @param oldPin Old pin value
     * @param newPin New pin value
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.changeIccPinForAppResponse()
     *
     */
    oneway changeIccPinForApp(int32_t serial, string oldPin, string newPin,
            string aid);

    /**
     * Supplies old ICC PIN2 and new PIN2.
     *
     * @param serial Serial number of request.
     * @param oldPin2 Old pin2 value
     * @param newPin2 New pin2 value
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.changeIccPin2ForAppResponse()
     *
     */
    oneway changeIccPin2ForApp(int32_t serial, string oldPin2, string newPin2,
            string aid);

    /**
     * Requests that network personalization be deactivated
     *
     * @param serial Serial number of request.
     * @param netPin Network depersonlization code
     *
     * Response function is IRadioResponse.supplyNetworkDepersonalizationResponse()
     *
     */
    oneway supplyNetworkDepersonalization(int32_t serial, string netPin);

    /**
     * Requests current call list
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getCurrentCallsResponse()
     *
     */
    oneway getCurrentCalls(int32_t serial);

    /**
     * Initiate voice call.
     * This method is never used for supplementary service codes
     *
     * @param serial Serial number of request.
     * @param dialInfo Dial struct
     *
     * Response function is IRadioResponse.dialResponse()
     *
     */
    oneway dial(int32_t serial, Dial dialInfo);

    /**
     * Get the SIM IMSI
     * Only valid when radio state is "RADIO_STATE_ON"
     *
     * @param serial Serial number of request.
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *
     * Response function is IRadioResponse.getImsiForAppResponse()
     *
     */
    oneway getImsiForApp(int32_t serial, string aid);

    /**
     * Hang up a specific line (like AT+CHLD=1x)
     * After this HANGUP request returns, Radio must show the connection is NOT
     * active anymore in next requestGetCurrentCalls query.
     *
     * @param serial Serial number of request.
     * @param gsmIndex Connection index (value of 'x' in CHLD above)
     *
     * Response function is IRadioResponse.hangupResponse()
     *
     */
    oneway hangup(int32_t serial, int32_t gsmIndex);

    /**
     * Hang up waiting or held (like AT+CHLD=0)
     * After this HANGUP request returns, Radio must show the connection is NOT
     * active anymore in next getCurrentCalls() query.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.hangupWaitingOrBackgroundResponse()
     *
     */
    oneway hangupWaitingOrBackground(int32_t serial);

    /**
     * Hang up waiting or held (like AT+CHLD=1)
     * After this HANGUP request returns, Radio must show the connection is NOT
     * active anymore in next getCurrentCalls query.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.hangupForegroundResumeBackgroundResponse()
     *
     */
    oneway hangupForegroundResumeBackground(int32_t serial);

    /**
     * Switch waiting or holding call and active call (like AT+CHLD=2)
     * State transitions must be as follows:
     *
     * Call transitions must happen as shown below.
     *
     *   BEFORE                               AFTER
     * Call 1   Call 2                 Call 1       Call 2
     * ACTIVE   HOLDING                HOLDING     ACTIVE
     * ACTIVE   WAITING                HOLDING     ACTIVE
     * HOLDING  WAITING                HOLDING     ACTIVE
     * ACTIVE   IDLE                   HOLDING     IDLE
     * IDLE     IDLE                   IDLE        IDLE
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.switchWaitingOrHoldingAndActiveResponse()
     *
     */
    oneway switchWaitingOrHoldingAndActive(int32_t serial);

    /**
     * Conference holding and active (like AT+CHLD=3)
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.conferenceResponse()
     *
     */
    oneway conference(int32_t serial);

    /**
     * Send UDUB (user determined user busy) to ringing or
     * waiting call answer)
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.rejectCallResponse()
     *
     */
    oneway rejectCall(int32_t serial);

    /**
     * Requests the failure cause code for the most recently terminated call.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getLastCallFailCauseResponse()
     *
     */
    oneway getLastCallFailCause(int32_t serial);

    /**
     * Requests current signal strength and associated information.
     * Must succeed if radio is on.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getSignalStrengthResponse()
     */
    oneway getSignalStrength(int32_t serial);

    /**
     * Request current voice registration state
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getVoiceRegistrationStateResponse()
     */
    oneway getVoiceRegistrationState(int32_t serial);

    /**
     * Request current data registration state
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getDataRegistrationStateResponse()
     */
    oneway getDataRegistrationState(int32_t serial);

    /**
     * Request current operator ONS or EONS
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getOperatorResponse()
     */
    oneway getOperator(int32_t serial);

    /**
     * Toggle radio on and off (for "airplane" mode)
     * If the radio is turned off/on the radio modem subsystem
     * is expected return to an initialized state. For instance,
     * any voice and data calls must be terminated and all associated
     * lists emptied.
     *
     * @param serial Serial number of request.
     * @param on To turn on radio -> on = true, to turn off radio -> on = false.
     *
     * Response function is IRadioResponse.setRadioPowerResponse()
     */
    oneway setRadioPower(int32_t serial, bool on);

    /**
     * Send a DTMF tone
     *
     * If the implementation is currently playing a tone requested via
     * startDtmf(), that tone must be cancelled and the new tone
     * must be played instead
     *
     * @param serial Serial number of request.
     * @param s string with single char having one of 12 values: 0-9, *, #
     *
     * Response function is IRadioResponse.sendDtmfResponse()
     */
    oneway sendDtmf(int32_t serial, string s);

    /**
     * Send an SMS message
     *
     * @param serial Serial number of request.
     * @param message GsmSmsMessage as defined in types.hal
     *
     * Response function is IRadioResponse.sendSmsResponse()
     *
     * Based on the return error, caller decides to resend if sending sms
     * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
     * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
     */
    oneway sendSms(int32_t serial, GsmSmsMessage message);

    /**
     * Send an SMS message. Identical to sendSms,
     * except that more messages are expected to be sent soon. If possible,
     * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
     *
     * @param serial Serial number of request.
     * @param message GsmSmsMessage as defined in types.hal
     *
     * Response function is IRadioResponse.sendSMSExpectMoreResponse()
     *
     * Based on the return error, caller decides to resend if sending sms
     * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
     * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
     */
    oneway sendSMSExpectMore(int32_t serial, GsmSmsMessage message);

    /**
     * Setup a packet data connection. If DataCallResponse.status
     * return DataCallFailCause:NONE it is added to the list of data calls and a
     * unsolDataCallListChanged() is sent. The call remains in the
     * list until deactivateDataCall() is issued or the
     * radio is powered off/on. This list is returned by getDataCallList()
     * and dataCallListChanged().
     *
     * The Radio is expected to:
     *  - Create one data call context.
     *  - Create and configure a dedicated interface for the context
     *  - The interface must be point to point.
     *  - The interface is configured with one or more addresses and
     *    is capable of sending and receiving packets. The prefix length
     *    of the addresses must be /32 for IPv4 and /128 for IPv6.
     *  - Must NOT change the linux routing table.
     *  - Support up to getDataRegistrationState response[5]
     *    number of simultaneous data call contexts.
     *
     * @param serial Serial number of request.
     * @param radioTechnology Radio technology to use.
     * @param dataProfileInfo data profile info.
     * @param modemCognitive Indicating this profile was sent to the modem through setDataProfile
     *                       earlier.
     * @param roamingAllowed Indicating data roaming is allowed or not by the user.
     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
     *                  RIL API must be filled accordingly based on the roaming condition.
     *                  Note this is for backward compatibility with the old radio modem. The modem
     *                  must not use this param for any other reason.
     *
     * Response function is IRadioResponse.setupDataCallResponse()
     */
    oneway setupDataCall(int32_t serial, RadioTechnology radioTechnology,
            DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
            bool isRoaming);

    /**
     * Request ICC I/O operation.
     * This is similar to the TS 27.007 "restricted SIM" operation
     * where it assumes all of the EF selection must be done by the
     * callee
     *
     * Arguments and responses that are unused for certain
     * values of "command" must be ignored or set to empty string
     *
     * @param serial Serial number of request.
     * @param iccIo IccIo
     *
     * Please note that IccIo has a "PIN2" field which may be empty string,
     * or may specify a PIN2 for operations that require a PIN2 (eg
     * updating FDN records)
     *
     * Response function is IRadioResponse.iccIOForAppResponse()
     */
    oneway iccIOForApp(int32_t serial, IccIo iccIo);

    /**
     * Send a USSD message.
     *
     * If a USSD session already exists, the message must be sent in the
     * context of that session. Otherwise, a new session must be created.
     *
     * The network reply must be reported via unsolOnUssd
     *
     * Only one USSD session must exist at a time, and the session is assumed
     * to exist until:
     * a) The android system invokes cancelUssd()
     * b) The implementation sends a unsolOnUssd() with a type code
     * of "0" (USSD-Notify/no further action) or "2" (session terminated)
     *
     * @param serial Serial number of request.
     * @param ussd string containing the USSD request in UTF-8 format
     *
     * Response function is IRadioResponse.sendUssdResponse()
     *
     * See also requestCancelUssd, unsolOnUssd
     */
    oneway sendUssd(int32_t serial, string ussd);

    /**
     * Cancel the current USSD session if one exists.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.cancelPendingUssdResponse()
     */
    oneway cancelPendingUssd(int32_t serial);

    /**
     * Gets current CLIR status
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getClirResponse()
     */
    oneway getClir(int32_t serial);

    /**
     * Set current CLIR status
     *
     * @param serial Serial number of request.
     * @param status "n" parameter from TS 27.007 7.7
     *
     * Response function is IRadioResponse.setClirResponse()
     */
    oneway setClir(int32_t serial, int32_t status);

    /**
     * Request call forward status.
     *
     * @param serial Serial number of request.
     * @param callInfo CallForwardInfo
     *
     * Response function is IRadioResponse.getCallForwardStatusResponse()
     */
    oneway getCallForwardStatus(int32_t serial,
            CallForwardInfo callInfo);

    /**
     * Configure call forward rule
     *
     * @param serial Serial number of request.
     * @param callInfo CallForwardInfo
     *
     * Response function is IRadioResponse.setCallForwardResponse()
     */
    oneway setCallForward(int32_t serial, CallForwardInfo callInfo);

    /**
     * Query current call waiting state
     *
     * @param serial Serial number of request.
     * @param serviceClass Service class is the TS 27.007 service class to query
     *
     * Response function is IRadioResponse.getCallWaitingResponse()
     */
    oneway getCallWaiting(int32_t serial, int32_t serviceClass);

    /**
     * Configure current call waiting state
     *
     * @param serial Serial number of request.
     * @param enable is false for "disabled" and true for "enabled"
     * @param serviceClass is the TS 27.007 service class bit vector of services to modify
     *
     * Response function is IRadioResponse.setCallWaitingResponse()
     */
    oneway setCallWaiting(int32_t serial, bool enable,
            int32_t serviceClass);

    /**
     * Acknowledge successful or failed receipt of SMS previously indicated
     * via unsolResponseNewSms
     *
     * @param serial Serial number of request.
     * @param success is true on successful receipt
     *        (basically, AT+CNMA=1 from TS 27.005 is 0 on failed receipt
     *        (basically, AT+CNMA=2 from TS 27.005)
     * @param cause: if success is false, this contains the failure cause as defined
     *        in TS 23.040, 9.2.3.22.
     *
     * Response function is IRadioResponse.acknowledgeLastIncomingGsmSmsResponse()
     */
    oneway acknowledgeLastIncomingGsmSms(int32_t serial, bool success,
            SmsAcknowledgeFailCause cause);

    /**
     * Answer incoming call
     * Must not be called for WAITING calls.
     * switchWaitingOrHoldingAndActive() must be used in this case
     * instead
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.acceptCallResponse()
     */
    oneway acceptCall(int32_t serial);

    /**
     * Deactivate packet data connection and remove from the
     * data call list if RadioError:NONE is returned. Any other return
     * values must also try to remove the call from the list. An
     * unsolDataCallListChanged must be
     * issued because of an deactivateDataCall.
     *
     * @param serial Serial number of request.
     * @param cid Indicates CID
     * @param reasonRadioShutDown Indicates Disconnect Reason
     *        false => No specific reason specified
     *        true => Radio shutdown requested
     *
     * Response function is IRadioResponse.deactivateDataCallResponse()
     */
    oneway deactivateDataCall(int32_t serial, int32_t cid,
            bool reasonRadioShutDown);

    /**
     * Query the status of a facility lock state
     *
     * @param serial Serial number of request.
     * @param facility is the facility string code from TS 27.007 7.4
     *        (eg "AO" for BAOC, "SC" for SIM lock)
     * @param password is the password, or "" if not required
     * @param serviceClass is the TS 27.007 service class bit vector of services to query
     * @param appId is AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *        This is only applicable in the case of Fixed Dialing Numbers (FDN) requests.
     *
     * Response function is IRadioResponse.getFacilityLockForAppResponse()
     */
    oneway getFacilityLockForApp(int32_t serial, string facility,
            string password, int32_t serviceClass, string appId);

    /**
     * Enable/disable one facility lock
     *
     * @param serial Serial number of request.
     * @param facility is the facility string code from TS 27.007 7.4 (eg "AO" for BAOC)
     * @param lockState false for "unlock" and true for "lock"
     * @param password is the password
     * @param serviceClass is string representation of decimal TS 27.007
     *        service class bit vector. Eg, the string
     *        "1" means "set this facility for voice services"
     * @param appId is AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value.
     *        This is only applicable in the case of Fixed Dialing Numbers (FDN) requests.
     *
     * Response function is IRadioResponse.setFacilityLockForAppResponse()
     */
    oneway setFacilityLockForApp(int32_t serial, string facility, bool lockState,
            string password, int32_t serviceClass, string appId);

    /**
     * Change call barring facility password
     *
     * @param serial Serial number of request.
     * @param facility facility string code from TS 27.007 7.4 (eg "AO" for BAOC)
     * @param oldPassword old password
     * @param newPassword new password
     *
     * Response function is IRadioResponse.setBarringPasswordResponse()
     */
    oneway setBarringPassword(int32_t serial, string facility,
            string oldPassword, string newPassword);

    /**
     * Query current network selection mode
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getNetworkSelectionModeResponse()
     */
    oneway getNetworkSelectionMode(int32_t serial);

    /**
     * Specify that the network must be selected automatically.
     * This request must not respond until the new operator is selected and registered.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.setNetworkSelectionModeAutomaticResponse()
     */
    oneway setNetworkSelectionModeAutomatic(int32_t serial);

    /**
     * Manually select a specified network.
     * This request must not respond until the new operator is selected and registered.
     *
     * @param serial Serial number of request.
     * @param operatorNumeric string specifying MCCMNC of network to select (eg "310170")
     *
     * Response function is IRadioResponse.setNetworkSelectionModeManualResponse()
     */
    oneway setNetworkSelectionModeManual(int32_t serial, string operatorNumeric);

    /**
     * Scans for available networks
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getAvailableNetworksResponse()
     */
    oneway getAvailableNetworks(int32_t serial);

    /**
     * Start playing a DTMF tone. Continue playing DTMF tone until
     * stopDtmf is received.
     * If a startDtmf() is received while a tone is currently playing,
     * it must cancel the previous tone and play the new one.
     *
     * @param serial Serial number of request.
     * @param s string having a single character with one of 12 values: 0-9,*,#
     *
     * Response function is IRadioResponse.startDtmfResponse()
     */
    oneway startDtmf(int32_t serial, string s);

    /**
     * Stop playing a currently playing DTMF tone.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.stopDtmfResponse()
     */
    oneway stopDtmf(int32_t serial);

    /**
     * Return string value indicating baseband version, eg response from AT+CGMR
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getBasebandVersionResponse()
     */
    oneway getBasebandVersion(int32_t serial);

    /**
     * Separate a party from a multiparty call placing the multiparty call
     * (less the specified party) on hold and leaving the specified party
     * as the only other member of the current (active) call
     *
     * Like AT+CHLD=2x
     *
     * See TS 22.084 1.3.8.2 (iii)
     * TS 22.030 6.5.5 "Entering "2X followed by send"
     * TS 27.007 "AT+CHLD=2x"
     *
     * @param serial Serial number of request.
     * @param gsmIndex contains Connection index (value of 'x' in CHLD above)
     *
     * Response function is IRadioResponse.separateConnectionResponse()
     */
    oneway separateConnection(int32_t serial, int32_t gsmIndex);

    /**
     * Turn on or off uplink (microphone) mute.
     * Must only be sent while voice call is active.
     * Must always be reset to "disable mute" when a new voice call is initiated
     *
     * @param serial Serial number of request.
     * @param enable true for "enable mute" and false for "disable mute"
     *
     * Response function is IRadioResponse.setMuteResponse()
     */
    oneway setMute(int32_t serial, bool enable);

    /**
     * Queries the current state of the uplink mute setting
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getMuteResponse()
     */
    oneway getMute(int32_t serial);

    /**
     * Queries the status of the CLIP supplementary service
     * (for MMI code "*#30#")
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getClipResponse()
     */
    oneway getClip(int32_t serial);

    /**
     * Returns the data call list. An entry is added when a
     * setupDataCall() is issued and removed on a
     * deactivateDataCall(). The list is emptied when
     * setRadioPower() off/on is issued.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getDataCallListResponse()
     */
    oneway getDataCallList(int32_t serial);

    /**
     * Enables/disables supplementary service related notifications from the network.
     * Notifications are reported via unsolSuppSvcNotification().
     *
     * @param serial Serial number of request.
     * @param enable true = notifications enabled, false = notifications disabled.
     *
     * Response function is IRadioResponse.setSuppServiceNotificationsResponse()
     */
    oneway setSuppServiceNotifications(int32_t serial, bool enable);

    /**
     * Stores a SMS message to SIM memory.
     *
     * @param serial Serial number of request.
     * @param smsWriteArgs SmsWriteArgs defined in types.hal
     *
     * Response function is IRadioResponse.writeSmsToSimResponse()
     */
    oneway writeSmsToSim(int32_t serial, SmsWriteArgs smsWriteArgs);

    /**
     * Deletes a SMS message from SIM memory.
     *
     * @param serial Serial number of request.
     * @param index Record index of the message to delete.
     *
     * Response function is IRadioResponse.deleteSmsOnSimResponse()
     */
    oneway deleteSmsOnSim(int32_t serial, int32_t index);

    /**
     * Assign a specified band for RF configuration.
     *
     * @param serial Serial number of request.
     * @param mode RadioBandMode defined in types.hal
     *
     * Response function is IRadioResponse.setBandModeResponse()
     */
    oneway setBandMode(int32_t serial, RadioBandMode mode);

    /**
     * Get the list of band modes supported by RF.
     *
     * @param serial Serial number of request.
     *
     * Response function is IRadioResponse.getAvailableBandModesResponse()
     */
    oneway getAvailableBandModes(int32_t serial);

    /**
     * Requests to send a SAT/USAT envelope command to SIM.
     * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
     *
     * @param serial Serial number of request.
     * @param command SAT/USAT command in hexadecimal format string starting with command tag
     *
     * Response function is IRadioResponse.sendEnvelopeResponse()
     */
    oneway sendEnvelope(int32_t serial, string command);

    /**
     * Requests to send a terminal response to SIM for a received proactive command
     *
     * @param serial Serial number of request.
     * @param commandResponse SAT/USAT response in hexadecimal format string starting with
     *        first byte of response data
     *
     * Response function is IRadioResponse.sendTerminalResponseResponseToSim()
     */
    oneway sendTerminalResponseToSim(int32_t serial, string commandResponse);

    /**
     * When STK application gets stkCallSetup(), the call actually has
     * been initialized by mobile device already. (We could see the call has been in the 'call
     * list') So, STK application needs to accept/reject the call according to user
     * operations.
     *
     * @param serial Serial number of request.
     * @param accept true = accept the call setup, false = reject the call setup
     *
     * Response callback is IRadioResponse.handleStkCallSetupRequestFromSimResponse()
     */
    oneway handleStkCallSetupRequestFromSim(int32_t serial,
            bool accept);

    /**
     * Connects the two calls and disconnects the subscriber from both calls.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.explicitCallTransferResponse()
     */
    oneway explicitCallTransfer(int32_t serial);

    /**
     * Requests to set the preferred network type for searching and registering
     * (CS/PS domain, RAT, and operation mode)
     *
     * @param serial Serial number of request.
     * @param nwType PreferredNetworkType defined in types.hal
     *
     * Response callback is IRadioResponse.setPreferredNetworkTypeResponse()
     */
    oneway setPreferredNetworkType(int32_t serial,
            PreferredNetworkType nwType);

    /**
     * Query the preferred network type (CS/PS domain, RAT, and operation mode)
     * for searching and registering
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getPreferredNetworkTypeResponse()
     */
    oneway getPreferredNetworkType(int32_t serial);

    /**
     * Request neighboring cell id in GSM network
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getNeighboringCidsResponse()
     */
    oneway getNeighboringCids(int32_t serial);

    /**
     * Enables/disables network state change notifications due to changes in
     * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
     * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
     * Note:  The Radio implementation must default to "updates enabled"
     * when the screen is on and "updates disabled" when the screen is off.
     *
     * @param serial Serial number of request.
     * @param enable true = updates enabled (+CREG=2), false = updates disabled (+CREG=1)
     *
     * Response callback is IRadioResponse.setLocationUpdatesResponse()
     */
    oneway setLocationUpdates(int32_t serial, bool enable);

    /**
     * Request to set the location where the CDMA subscription shall
     * be retrieved
     *
     * @param serial Serial number of request.
     * @param cdmaSub CdmaSubscriptionSource
     *
     * Response callback is IRadioResponse.setCdmaSubscriptionSourceResponse()
     */
    oneway setCdmaSubscriptionSource(int32_t serial,
            CdmaSubscriptionSource cdmaSub);

    /**
     * Request to set the roaming preferences in CDMA
     *
     * @param serial Serial number of request.
     * @param type CdmaRoamingType defined in types.hal
     *
     * Response callback is IRadioResponse.setCdmaRoamingPreferenceResponse()
     */
    oneway setCdmaRoamingPreference(int32_t serial,
            CdmaRoamingType type);

    /**
     * Request the actual setting of the roaming preferences in CDMA in the modem
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getCdmaRoamingPreferenceResponse()
     */
    oneway getCdmaRoamingPreference(int32_t serial);

    /**
     * Request to set the TTY mode
     *
     * @param serial Serial number of request.
     * @param mode TtyMode
     *
     * Response callback is IRadioResponse.setTTYModeResponse()
     */
    oneway setTTYMode(int32_t serial, TtyMode mode);

    /**
     * Request the setting of TTY mode
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getTTYModeResponse()
     */
    oneway getTTYMode(int32_t serial);

    /**
     * Request to set the preferred voice privacy mode used in voice scrambling.
     *
     * @param serial Serial number of request.
     * @param enable false for Standard Privacy Mode (Public Long Code Mask)
     *        true for Enhanced Privacy Mode (Private Long Code Mask)
     *
     * Response callback is IRadioResponse.setPreferredVoicePrivacyResponse()
     */
    oneway setPreferredVoicePrivacy(int32_t serial, bool enable);

    /**
     * Request the setting of preferred voice privacy mode.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getPreferredVoicePrivacyResponse()
     */
    oneway getPreferredVoicePrivacy(int32_t serial);

    /**
     * Send FLASH command
     *
     * @param serial Serial number of request.
     * @param featureCode String associated with Flash command
     *
     * Response callback is IRadioResponse.sendCDMAFeatureCodeResponse()
     */
    oneway sendCDMAFeatureCode(int32_t serial, string featureCode);

    /**
     * Send DTMF string
     *
     * @param serial Serial number of request.
     * @param dtmf DTMF string
     * @param on DTMF ON length in milliseconds, or 0 to use default
     * @param off is the DTMF OFF length in milliseconds, or 0 to use default
     *
     * Response callback is IRadioResponse.sendBurstDtmfResponse()
     */
    oneway sendBurstDtmf(int32_t serial, string dtmf, int32_t on, int32_t off);

    /**
     * Send a CDMA SMS message
     *
     * @param serial Serial number of request.
     * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
     *
     * Response callback is IRadioResponse.sendCdmaSmsResponse()
     */
    oneway sendCdmaSms(int32_t serial, CdmaSmsMessage sms);

    /**
     * Acknowledge the success or failure in the receipt of SMS
     * previously indicated via responseCdmaNewSms()
     *
     * @param serial Serial number of request.
     * @param smsAck Cdma Sms ack to be sent described by CdmaSmsAck in types.hal
     *
     * Response callback is IRadioResponse.acknowledgeLastIncomingCdmaSmsResponse()
     */
    oneway acknowledgeLastIncomingCdmaSms(int32_t serial, CdmaSmsAck smsAck);

    /**
     * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getGsmBroadcastConfigResponse()
     */
    oneway getGsmBroadcastConfig(int32_t serial);

    /**
     * Set GSM/WCDMA Cell Broadcast SMS config
     *
     * @param serial Serial number of request.
     * @param configInfo Setting of GSM/WCDMA Cell broadcast config
     *
     * Response callback is IRadioResponse.setGsmBroadcastConfigResponse()
     */
    oneway setGsmBroadcastConfig(int32_t serial, vec<GsmBroadcastSmsConfigInfo> configInfo);

    /**
     * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
     *
     * @param serial Serial number of request.
     * @param activate indicates to activate or turn off the reception of GSM/WCDMA
     *        Cell Broadcast SMS. true = activate, false = turn off
     *
     * Response callback is IRadioResponse.setGsmBroadcastActivationResponse()
     */
    oneway setGsmBroadcastActivation(int32_t serial, bool activate);

    /**
     * Request the setting of CDMA Broadcast SMS config
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getCdmaBroadcastConfigResponse()
     */
    oneway getCdmaBroadcastConfig(int32_t serial);

    /**
     * Set CDMA Broadcast SMS config
     *
     * @param serial Serial number of request.
     * @param configInfo CDMA Broadcast SMS config to be set.
     *
     * Response callback is IRadioResponse.setCdmaBroadcastConfigResponse()
     */
    oneway setCdmaBroadcastConfig(int32_t serial, vec<CdmaBroadcastSmsConfigInfo> configInfo);

    /**
     * Enable or disable the reception of CDMA Cell Broadcast SMS
     *
     * @param serial Serial number of request.
     * @param activate indicates to activate or turn off the reception of CDMA
     *        Cell Broadcast SMS. true = activate, false = turn off
     *
     * Response callback is IRadioResponse.setCdmaBroadcastActivationResponse()
     */
    oneway setCdmaBroadcastActivation(int32_t serial, bool activate);

    /**
     * Request the device MDN / H_SID / H_NID.
     * The request is only allowed when CDMA subscription is available. When CDMA
     * subscription is changed, application layer must re-issue the request to
     * update the subscription information.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getCDMASubscriptionResponse()
     */
    oneway getCDMASubscription(int32_t serial);

    /**
     * Stores a CDMA SMS message to RUIM memory.
     *
     * @param serial Serial number of request.
     * @param cdmaSms CDMA message as defined by CdmaSmsWriteArgs in types.hal
     *
     * Response callback is IRadioResponse.writeSmsToRuimResponse()
     */
    oneway writeSmsToRuim(int32_t serial, CdmaSmsWriteArgs cdmaSms);

    /**
     * Deletes a CDMA SMS message from RUIM memory.
     *
     * @param serial Serial number of request.
     * @param index record index of the message to delete
     *
     * Response callback is IRadioResponse.deleteSmsOnRuimResponse()
     */
    oneway deleteSmsOnRuim(int32_t serial, int32_t index);

    /**
     * Request the device ESN / MEID / IMEI / IMEISV.
     * The request is always allowed and contains GSM and CDMA device identity.
     * When CDMA subscription is changed the ESN/MEID changes. The application
     * layer must re-issue the request to update the device identity in this case.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getDeviceIdentityResponse()
     */
    oneway getDeviceIdentity(int32_t serial);

    /**
     * Request the radio's system selection module to exit emergency
     * callback mode. Radio must not respond with SUCCESS until the modem has
     * completely exited from Emergency Callback Mode.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.exitEmergencyCallbackModeResponse()
     */
    oneway exitEmergencyCallbackMode(int32_t serial);

    /**
     * Get the default Short Message Service Center address on the device.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getSmscAddressResponse()
     */
    oneway getSmscAddress(int32_t serial);

    /**
     * Set the default Short Message Service Center address on the device.
     *
     * @param serial Serial number of request.
     * @param smsc Short Message Service Center address to set
     *
     * Response callback is IRadioResponse.setSmscAddressResponse()
     */
    oneway setSmscAddress(int32_t serial, string smsc);

    /**
     * Indicates whether there is storage available for new SMS messages.
     *
     * @param serial Serial number of request.
     * @param available true if memory is available for storing new messages,
     *        false if memory capacity is exceeded
     *
     * Response callback is IRadioResponse.reportSmsMemoryStatusResponse()
     */
    oneway reportSmsMemoryStatus(int32_t serial, bool available);

    /**
     * Indicates that the StkService is running and is
     * ready to receive unsolicited stkXXXXX commands.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.reportStkServiceIsRunningResponse()
     */
    oneway reportStkServiceIsRunning(int32_t serial);

    /**
     * Request to query the location where the CDMA subscription shall be retrieved.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getCdmaSubscriptionSourceResponse()
     */
    oneway getCdmaSubscriptionSource(int32_t serial);

    /**
     * Request the ISIM application on the UICC to perform AKA
     * challenge/response algorithm for IMS authentication
     *
     * @param serial Serial number of request.
     * @param challenge challenge string in Base64 format
     *
     * Response callback is IRadioResponse.requestIsimAuthenticationResponse()
     */
    oneway requestIsimAuthentication(int32_t serial, string challenge);

    /**
     * Acknowledge successful or failed receipt of SMS previously indicated
     * via unsol responseNewSms(), including acknowledgement TPDU to send
     * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
     *
     * @param serial Serial number of request.
     * @param success true on successful receipt (send RP-ACK)
     *        false on failed receipt (send RP-ERROR)
     * @param ackPdu acknowledgement TPDU in hexadecimal format
     *
     * Response callback is IRadioResponse.acknowledgeIncomingGsmSmsWithPduResponse()
     */
    oneway acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success, string ackPdu);

    /**
     * Requests to send a SAT/USAT envelope command to SIM.
     * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
     *
     * This request has one difference from sendEnvelope():
     * the SW1 and SW2 status bytes from the UICC response are returned along with
     * the response data, using the same structure as iccIOForApp().
     *
     * The implementation must perform normal processing of a '91XX'
     * response in SW1/SW2 to retrieve the pending proactive command and send it
     * as an unsolicited response, as sendEnvelope() does.
     *
     * @param serial Serial number of request.
     * @param contents SAT/USAT command in hexadecimal format starting with command tag
     *
     * Response callback is IRadioResponse.sendEnvelopeWithStatusResponse()
     */
    oneway sendEnvelopeWithStatus(int32_t serial, string contents);

    /**
     * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
     * when radio state is not RADIO_STATE_UNAVAILABLE
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getVoiceRadioTechnologyResponse()
     */
    oneway getVoiceRadioTechnology(int32_t serial);

    /**
     * Request all of the current cell information known to the radio. The radio
     * must return list of all current cells, including the neighboring cells. If for a particular
     * cell information isn't known then the appropriate unknown value will be returned.
     * This does not cause or change the rate of unsolicited cellInfoList().
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getCellInfoListResponse()
     */
    oneway getCellInfoList(int32_t serial);

    /**
     * Sets the minimum time between when unsolicited cellInfoList() must be invoked.
     * A value of 0, means invoke cellInfoList() when any of the reported
     * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
     * a unsolicited cellInfoList().
     *
     * @param serial Serial number of request.
     * @param rate minimum time in milliseconds to indicate time between unsolicited cellInfoList()
     *
     * Response callback is IRadioResponse.setCellInfoListRateResponse()
     */
    oneway setCellInfoListRate(int32_t serial, int32_t rate);

    /**
     * Set an apn to initial attach network
     *
     * @param serial Serial number of request.
     * @param dataProfileInfo data profile containing APN settings
     * @param modemCognitive indicating the data profile was sent to the modem through
     *                       setDataProfile earlier.
     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
     *                  RIL_InitialAttachApn must be filled accordingly based on the roaming
     *                  condition. Note this is for backward compatibility with the old radio modem.
     *                  The modem must not use this param for any other reason.
     *
     * Response callback is IRadioResponse.setInitialAttachApnResponse()
     */
    oneway setInitialAttachApn(int32_t serial, DataProfileInfo dataProfileInfo,
            bool modemCognitive, bool isRoaming);

    /**
     * Request current IMS registration state
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getImsRegistrationStateResponse()
     */
    oneway getImsRegistrationState(int32_t serial);

    /**
     * Send a SMS message over IMS.
     * Based on the return error, caller decides to resend if sending sms
     * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
     * In case of retry, data is encoded based on Voice Technology available.
     *
     * @param serial Serial number of request.
     * @param message ImsSmsMessage as defined in types.hal to be sent
     *
     * Response callback is IRadioResponse.sendImsSmsResponse()
     */
    oneway sendImsSms(int32_t serial, ImsSmsMessage message);

    /**
     * Request APDU exchange on the basic channel. This command reflects TS 27.007
     * "generic SIM access" operation (+CSIM). The modem must ensure proper function
     * of GSM/CDMA, and filter commands appropriately. It must filter
     * channel management and SELECT by DF name commands.
     * "sessionid" field must be ignored.
     *
     * @param serial Serial number of request.
     * @param message SimApdu as defined in types.hal to be sent
     *
     * Response callback is IRadioResponse.iccTransmitApduBasicChannelResponse()
     */
    oneway iccTransmitApduBasicChannel(int32_t serial, SimApdu message);

    /**
     * Open a new logical channel and select the given application. This command
     * reflects TS 27.007 "open logical channel" operation (+CCHO).
     *
     * @param serial Serial number of request.
     * @param aid AID value, See ETSI 102.221 and 101.220.
     * @param p2 P2 value, described in ISO 7816-4. Ignore if equal to P2Constant:NO_P2
     *
     * Response callback is IRadioResponse.iccOpenLogicalChannelResponse()
     */
    oneway iccOpenLogicalChannel(int32_t serial, string aid, int32_t p2);

    /**
     * Close a previously opened logical channel. This command reflects TS 27.007
     * "close logical channel" operation (+CCHC).
     *
     * @param serial Serial number of request.
     * @param channelId session id of the logical channel (+CCHC).
     *
     * Response callback is IRadioResponse.iccCloseLogicalChannelResponse()
     */
    oneway iccCloseLogicalChannel(int32_t serial, int32_t channelId);

    /**
     * Exchange APDUs with a UICC over a previously opened logical channel. This
     * command reflects TS 27.007 "generic logical channel access" operation
     * (+CGLA). The modem must filter channel management and SELECT by DF name
     * commands.
     *
     * @param serial Serial number of request.
     * @param message SimApdu as defined in types.hal to be sent
     *
     * Response callback is IRadioResponse.iccTransmitApduLogicalChannelResponse()
     */
    oneway iccTransmitApduLogicalChannel(int32_t serial, SimApdu message);

    /**
     * Read one of the radio NV items.
     * This is used for device configuration by some CDMA operators.
     *
     * @param serial Serial number of request.
     * @param itemId NvItem is radio NV item as defined in types.hal
     *
     * Response callback is IRadioResponse.nvReadItemResponse()
     */
    oneway nvReadItem(int32_t serial, NvItem itemId);

    /**
     * Write one of the radio NV items.
     * This is used for device configuration by some CDMA operators.
     *
     * @param serial Serial number of request.
     * @param item NvWriteItem as defined in types.hal
     *
     * Response callback is IRadioResponse.nvWriteItemResponse()
     */
    oneway nvWriteItem(int32_t serial, NvWriteItem item);

    /**
     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
     * This is used for device configuration by some CDMA operators.
     *
     * @param serial Serial number of request.
     * @param prl PRL as a byte array
     *
     * Response callback is IRadioResponse.nvWriteCdmaPrlResponse()
     */
    oneway nvWriteCdmaPrl(int32_t serial, vec<uint8_t> prl);

    /**
     * Reset the radio NV configuration to the factory state.
     * This is used for device configuration by some CDMA operators.
     *
     * @param serial Serial number of request.
     * @param resetType ResetNvType as defined in types.hal
     *
     * Response callback is IRadioResponse.nvResetConfigResponse()
     */
    oneway nvResetConfig(int32_t serial, ResetNvType resetType);

    /**
     * Selection/de-selection of a subscription from a SIM card
     *
     * @param serial Serial number of request.
     * @param uiccSub SelectUiccSub as defined in types.hal
     *
     * Response callback is IRadioResponse.setUiccSubscriptionResponse()
     */
    oneway setUiccSubscription(int32_t serial, SelectUiccSub uiccSub);

    /**
     * Tells the modem whether data calls are allowed or not
     *
     * @param serial Serial number of request.
     * @param allow true to allow data calls, false to disallow data calls
     *
     * Response callback is IRadioResponse.setDataAllowedResponse()
     */
    oneway setDataAllowed(int32_t serial, bool allow);

    /**
     * Request all of the current hardware (modem and sim) associated with Radio.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getHardwareConfigResponse()
     */
    oneway getHardwareConfig(int32_t serial);

    /**
     * Returns the response of SIM Authentication through Radio challenge request.
     *
     * @param serial Serial number of request.
     * @param authContext P2 value of authentication command, see P2 parameter in
     *        3GPP TS 31.102 7.1.2
     * @param authData the challenge string in Base64 format, see 3GPP TS 31.102 7.1.2
     * @param aid AID value, See ETSI 102.221 8.1 and 101.220 4, empty string if no value
     *
     * Response callback is IRadioResponse.requestIccSimAuthenticationResponse()
     */
    oneway requestIccSimAuthentication(int32_t serial, int32_t authContext, string authData,
            string aid);

    /**
     * Set data profile in modem.
     * Modem must erase existed profiles from framework, and apply new profiles
     *
     * @param serial Serial number of request.
     * @param profiles Array of DataProfiles to set.
     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
     *                  RIL API RIL_DataProfileInfo must be filled accordingly based on the
     *                  roaming condition. Note this is for backward compatibility with the old
     *                  radio modem. The modem must not use this param for any other reason.
     *
     * Response callback is IRadioResponse.setDataProfileResponse()
     */
    oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles, bool isRoaming);

    /**
     * Device is shutting down. All further commands are ignored
     * and RADIO_NOT_AVAILABLE must be returned.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.requestShutdownResponse()
     */
    oneway requestShutdown(int32_t serial);

    /**
     * Used to get phone radio capability.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getRadioCapabilityResponse()
     */
    oneway getRadioCapability(int32_t serial);

    /**
     * Used to set the phones radio capability. Be VERY careful
     * using this request as it may cause some vendor modems to reset. Because
     * of the possible modem reset any radio commands after this one may not be
     * processed.
     *
     * @param serial Serial number of request.
     * @param rc RadioCapability structure to be set
     *
     * Response callback is IRadioResponse.setRadioCapabilityResponse()
     */
    oneway setRadioCapability(int32_t serial, RadioCapability rc);

    /**
     * Start Link Capacity Estimate (LCE) service if supported by the radio.
     *
     * @param serial Serial number of request.
     * @param reportInterval desired reporting interval (ms).
     * @param pullMode LCE service mode. true: PULL; false: PUSH.
     *
     * Response callback is IRadioResponse.startLceServiceResponse()
     */
    oneway startLceService(int32_t serial, int32_t reportInterval, bool pullMode);

    /**
     * Stop Link Capacity Estimate (LCE) service, the STOP operation must be
     * idempotent for the radio modem.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.stopLceServiceResponse()
     */
    oneway stopLceService(int32_t serial);

    /**
     * Pull LCE service for capacity information.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.pullLceDataResponse()
     */
    oneway pullLceData(int32_t serial);

    /**
     * Get modem activity information for power consumption estimation.
     * Request clear-on-read statistics information that is used for
     * estimating the per-millisecond power consumption of the cellular
     * modem.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getModemActivityInfoResponse()
     */
    oneway getModemActivityInfo(int32_t serial);

    /**
     * Set carrier restrictions. Expected modem behavior:
     *  If never receives this command
     *  - Must allow all carriers
     *  Receives this command with allAllowed true
     *  - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
     *    the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
     *  Receives this command with a list of carriers & allAllowed = false
     *  - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
     *    is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
     *    the allowed list, modem must detach from the registered network and only keep emergency
     *    service, and notify Android SIM refresh reset with new SIM state being
     *    CardState:RESTRICTED. Emergency service must be enabled.
     *
     * @param serial Serial number of request.
     * @param allAllowed true only when all carriers are allowed. Ignore "carriers" struct.
     *        If false, consider "carriers" struct
     * @param carriers CarrierRestrictions consisting allowed and excluded carriers as defined
     *        in types.hal
     *
     * Response callback is IRadioResponse.setAllowedCarriersResponse()
     */
    oneway setAllowedCarriers(int32_t serial, bool allAllowed, CarrierRestrictions carriers);

    /**
     * Get carrier restrictions.
     *
     * @param serial Serial number of request.
     *
     * Response callback is IRadioResponse.getAllowedCarriersResponse()
     */
    oneway getAllowedCarriers(int32_t serial);

    /**
     * Send the updated device state.
     * This is providing the device state information for the modem to perform power saving
     * strategies.
     *
     * @param serial Serial number of request.
     * @param deviceStateType The updated device state type.
     * @param state The updated state. See the definition of state at DeviceStateType.
     *
     * Response callback is IRadioResponse.sendDeviceStateResponse()
     */
    oneway sendDeviceState(int32_t serial, DeviceStateType deviceStateType, bool state);

    /**
     * Set the indication filter.
     * This is used to prevent unnecessary application processor wake up for power saving purposes
     * by suppressing the indications in certain scenarios.
     *
     * @param serial Serial number of request.
     * @param indicationFilter 32-bit bitmap of IndicationFilter. Bits set to 1 indicate the
     *        indications are enabled. See IndicationFilter for the definition of each bit.
     *
     * Response callback is IRadioResponse.setIndicationFilterResponse()
     */
    oneway setIndicationFilter(int32_t serial, bitfield<IndicationFilter> indicationFilter);

    /**
     * Set SIM card power state.
     * Request is equivalent to inserting or removing the card.
     *
     * The radio modem must generate IRadioIndication.simStatusChanged() as if the SIM had been
     * inserted or removed.
     *
     * @param serial Serial number of request
     * @param powerUp True if powering up the sim card
     *
     * Response callback is IRadioResponse.setSimCardPowerResponse()
     */
    oneway setSimCardPower(int32_t serial, bool powerUp);

    /**
     * When response type received from a radio indication or radio response is
     * RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
     * acknowledge the receipt of those messages by sending responseAcknowledgement().
     *
     */
    oneway responseAcknowledgement();
};