blob: 73f1024ce7b47418c817dc7b346946b3b1836f65 [file] [log] [blame]
Sooraj Sasindran55092ae2017-07-20 02:28:44 -07001/*
2 * Copyright (C) 2017 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.2;
18
19import @1.1::IRadio;
20
21/**
22 * This interface is used by telephony and telecom to talk to cellular radio.
23 * All the functions have minimum one parameter:
24 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
25 * duration of a method call. If clients provide colliding serials (including passing the same
26 * serial to different methods), multiple responses (one for each method call) must still be served.
27 * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
28 */
29interface IRadio extends @1.1::IRadio {
30
31 /**
32 * Starts a network scan
33 *
34 * @param serial Serial number of request.
35 * @param request Defines the radio networks/bands/channels which need to be scanned.
36 *
37 * Response function is IRadioResponse.startNetworkScanResponse()
38 */
39 oneway startNetworkScan_1_2(int32_t serial, NetworkScanRequest request);
Sandeep Gutta4a4d8cc2017-12-12 17:38:15 +053040
41 /**
42 * Get SIM Slot status.
43 *
44 * Request provides the slot status of all active and inactive SIM slots and whether card is
45 * present in the slots or not.
46 *
47 * @param serial Serial number of request.
48 *
49 * Response callback is IRadioResponse.getSimSlotsStatusResponse()
50 */
51 oneway getSimSlotsStatus(int32_t serial);
52
53 /**
54 * Set SIM Slot mapping.
55
56 * Maps the logical slots to the physical slots. Logical slot is the slot that is seen by modem.
57 * Physical slot is the actual physical slot. Request maps the physical slot to logical slot.
58 * Logical slots that are already mapped to the requested physical slot are not impacted.
59 *
60 * Example no. of logical slots 1 and physical slots 2:
61 * The only logical slot (index 0) can be mapped to first physical slot (value 0) or second
62 * physical slot(value 1), while the other physical slot remains unmapped and inactive.
63 * slotMap[0] = 1 or slotMap[0] = 0
64 *
65 * Example no. of logical slots 2 and physical slots 2:
66 * First logical slot (index 0) can be mapped to physical slot 1 or 2 and other logical slot
67 * can be mapped to other physical slot. Each logical slot must be mapped to a physical slot.
68 * slotMap[0] = 0 and slotMap[1] = 1 or slotMap[0] = 1 and slotMap[1] = 0
69 *
70 * @param serial Serial number of request
71 * @param slotMap Logical to physical slot mapping, size == no. of radio instances. Index is
72 * mapping to logical slot and value to physical slot, need to provide all the slots
73 * mapping when sending request in case of multi slot device.
74 * EX: uint32_t slotMap[logical slot] = physical slot
75 * index 0 is the first logical_slot number of logical slots is equal to number of Radio
76 * instances and number of physical slots is equal to size of slotStatus in
77 * getSimSlotsStatusResponse
78 *
79 * Response callback is IRadioResponse.setSimSlotsMappingResponse()
80 */
81 oneway setSimSlotsMapping(int32_t serial, vec<uint32_t> slotMap);
Sooraj Sasindran55092ae2017-07-20 02:28:44 -070082};