blob: 22d27d4563080297b76a84b3c1e674d3a80dc1d7 [file] [log] [blame]
pkanwarde1ac792017-03-19 10:49:01 -07001/*
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
17package android.hardware.radio@1.1;
18
19import IRadioResponse;
20import @1.0::IRadio;
21
22/**
23 * This interface is used by telephony and telecom to talk to cellular radio.
24 * All the functions have minimum one parameter:
25 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
26 * duration of a method call. If clients provide colliding serials (including passing the same
27 * serial to different methods), multiple responses (one for each method call) must still be served.
28 * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
29 */
30interface IRadio extends @1.0::IRadio {
31 /**
32 * Provide Carrier specific information to the modem that must be used to
33 * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
34 * switch and everytime the framework receives a new certificate.
35 *
36 * @param serial Serial number of request.
pkanwar1076d5b2017-05-21 10:22:02 -070037 * @param message ImsiEncryptionInfo as defined in types.hal.
38 *
pkanwarde1ac792017-03-19 10:49:01 -070039 *
40 * Response callback is
41 * IRadioResponse.setCarrierInfoForImsiEncryptionResponse()
42 */
pkanwar1076d5b2017-05-21 10:22:02 -070043 oneway setCarrierInfoForImsiEncryption(int32_t serial, ImsiEncryptionInfo imsiEncryptionInfo);
Grace Chen91865c22017-04-25 18:41:20 -070044
45 /**
46 * Set SIM card power state.
47 * Request is equivalent to inserting or removing the card.
48 *
49 * The radio modem must generate IRadioIndication.simStatusChanged() as if the SIM had been
50 * inserted or removed.
51 *
52 * @param serial Serial number of request
53 * @param powerUp POWER_DOWN if powering down the SIM card,
54 * POWER_UP if powering up the SIM card,
55 * POWER_UP_PASS_THROUGH if powering up the SIM card in pass through mode.
56 * When SIM card is in POWER_UP_PASS_THROUGH, the modem does not send any command to it
57 * (for example SELECT of MF, or TERMINAL CAPABILITY), and the SIM card is controlled
58 * completely by Telephony sending APDUs directly. The SIM card state must be
59 * RIL_CARDSTATE_PRESENT and the number of card apps will be 0.
60 * No new error code is generated. Emergency calls are supported in the same way as if the
61 * SIM card is absent.
62 * POWER_UP_PASS_THROUGH mode is valid only for the specific card session where it is activated,
63 * and normal behavior occurs at the next SIM initialization, unless POWER_UP_PASS_THROUGH mode
64 * is requested again.
65 * The device is required to power down the SIM card before it can switch the mode between
66 * POWER_UP and POWER_UP_PASS_THROUGH.
67 * At device power up, the SIM interface is powered up automatically. Each subsequent request
68 * to this method is processed only after the completion of the previous one.
69 *
70 * Response callback is IRadioResponse.setSimCardPowerResponse_1_1()
71 */
72 oneway setSimCardPower_1_1(int32_t serial, CardPowerState powerUp);
73
yinxu872518a2017-04-21 15:04:15 -070074 /**
75 * Starts a network scan
76 *
77 * @param serial Serial number of request.
78 * @param request Defines the radio networks/bands/channels which need to be scanned.
79 *
80 * Response function is IRadioResponse.startNetworkScanResponse()
81 */
82 oneway startNetworkScan(int32_t serial, NetworkScanRequest request);
83
84 /**
85 * Stops ongoing network scan
86 *
87 * @param serial Serial number of request.
88 *
89 * Response function is IRadioResponse.stopNetworkScanResponse()
90 */
91 oneway stopNetworkScan(int32_t serial);
Nathan Harold4e2541e2017-05-24 19:42:40 -070092
93 /**
94 * Start a Keepalive session (for IPsec)
95 *
96 * @param serial Serial number of request.
97 * @param keepalive A request structure containing all necessary info to describe a keepalive
98 *
99 * Response function is IRadioResponse.startKeepaliveResponse()
100 */
101 oneway startKeepalive(int32_t serial, KeepaliveRequest keepalive);
102
103 /**
104 * Stop an ongoing Keepalive session (for IPsec)
105 *
106 * @param serial Serial number of request.
107 * @param sessionHandle The handle that was provided by IRadioResponse.startKeepaliveResponse
108 *
109 * Response function is IRadioResponse.stopKeepaliveResponse()
110 */
111 oneway stopKeepalive(int32_t serial, int32_t sessionHandle);
pkanwarde1ac792017-03-19 10:49:01 -0700112};