yinxu | 7fd46a3 | 2018-01-03 16:36:59 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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.config@1.0; |
| 18 | |
| 19 | import IRadioConfigResponse; |
| 20 | import IRadioConfigIndication; |
| 21 | |
| 22 | /** |
| 23 | * This interface is used by telephony and telecom to talk to cellular radio for the purpose of |
| 24 | * radio configuration, and it is not associated with any specific modem or slot. |
| 25 | * All the functions have minimum one parameter: |
| 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 IRadioConfig { |
| 31 | |
| 32 | /** |
| 33 | * Set response functions for radio config requests & radio config indications. |
| 34 | * |
| 35 | * @param radioConfigResponse Object containing radio config response functions |
| 36 | * @param radioConfigIndication Object containing radio config indications |
| 37 | */ |
| 38 | setResponseFunctions(IRadioConfigResponse radioConfigResponse, |
| 39 | IRadioConfigIndication radioConfigIndication); |
| 40 | |
| 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 IRadioConfigResponse.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 IRadioConfigResponse.setSimSlotsMappingResponse() |
| 80 | */ |
| 81 | oneway setSimSlotsMapping(int32_t serial, vec<uint32_t> slotMap); |
| 82 | }; |