blob: 084c156f30f9617bc48b16582110ec41aecdc56f [file] [log] [blame]
pkanwar8b675882017-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.
37 * @param carrierKey Carrier specific key to be used for encryption. It must
38 * be opaque to the framework. This is the byte-stream representation
39 * of the key. This is an external encoded form for the key used when
40 * a standard representation of the key is needed outside the Java
41 * Virtual Machine, as when transmitting the key to some other party.
42 * The key is encoded according to a standard format
43 * (such as X.509 SubjectPublicKeyInfo or PKCS#8), and is returned using
44 * the getEncoded method.
45 * @param keyIdentifier This is an opaque value we're given by the carrier
46 * and is returned to the carrier. This is used by the server to
47 * help it locate the private key to decrypt the permanent identity.
48 *
49 * Response callback is
50 * IRadioResponse.setCarrierInfoForImsiEncryptionResponse()
51 */
52 oneway setCarrierInfoForImsiEncryption(int32_t serial, vec<uint8_t> carrierKey,
53 string keyIdentifier);
Grace Chen916cb362017-04-25 18:41:20 -070054
55 /**
56 * Set SIM card power state.
57 * Request is equivalent to inserting or removing the card.
58 *
59 * The radio modem must generate IRadioIndication.simStatusChanged() as if the SIM had been
60 * inserted or removed.
61 *
62 * @param serial Serial number of request
63 * @param powerUp POWER_DOWN if powering down the SIM card,
64 * POWER_UP if powering up the SIM card,
65 * POWER_UP_PASS_THROUGH if powering up the SIM card in pass through mode.
66 * When SIM card is in POWER_UP_PASS_THROUGH, the modem does not send any command to it
67 * (for example SELECT of MF, or TERMINAL CAPABILITY), and the SIM card is controlled
68 * completely by Telephony sending APDUs directly. The SIM card state must be
69 * RIL_CARDSTATE_PRESENT and the number of card apps will be 0.
70 * No new error code is generated. Emergency calls are supported in the same way as if the
71 * SIM card is absent.
72 * POWER_UP_PASS_THROUGH mode is valid only for the specific card session where it is activated,
73 * and normal behavior occurs at the next SIM initialization, unless POWER_UP_PASS_THROUGH mode
74 * is requested again.
75 * The device is required to power down the SIM card before it can switch the mode between
76 * POWER_UP and POWER_UP_PASS_THROUGH.
77 * At device power up, the SIM interface is powered up automatically. Each subsequent request
78 * to this method is processed only after the completion of the previous one.
79 *
80 * Response callback is IRadioResponse.setSimCardPowerResponse_1_1()
81 */
82 oneway setSimCardPower_1_1(int32_t serial, CardPowerState powerUp);
83
yinxub187e9f2017-04-21 15:04:15 -070084 /**
85 * Starts a network scan
86 *
87 * @param serial Serial number of request.
88 * @param request Defines the radio networks/bands/channels which need to be scanned.
89 *
90 * Response function is IRadioResponse.startNetworkScanResponse()
91 */
92 oneway startNetworkScan(int32_t serial, NetworkScanRequest request);
93
94 /**
95 * Stops ongoing network scan
96 *
97 * @param serial Serial number of request.
98 *
99 * Response function is IRadioResponse.stopNetworkScanResponse()
100 */
101 oneway stopNetworkScan(int32_t serial);
Nathan Harold77e3c452017-05-24 19:42:40 -0700102
103 /**
104 * Start a Keepalive session (for IPsec)
105 *
106 * @param serial Serial number of request.
107 * @param keepalive A request structure containing all necessary info to describe a keepalive
108 *
109 * Response function is IRadioResponse.startKeepaliveResponse()
110 */
111 oneway startKeepalive(int32_t serial, KeepaliveRequest keepalive);
112
113 /**
114 * Stop an ongoing Keepalive session (for IPsec)
115 *
116 * @param serial Serial number of request.
117 * @param sessionHandle The handle that was provided by IRadioResponse.startKeepaliveResponse
118 *
119 * Response function is IRadioResponse.stopKeepaliveResponse()
120 */
121 oneway stopKeepalive(int32_t serial, int32_t sessionHandle);
pkanwar8b675882017-03-19 10:49:01 -0700122};