OSDN Git Service

Merge "Initial version of radio hal" am: 2078f22513
[android-x86/hardware-interfaces.git] / radio / 1.0 / types.hal
1 /*
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
17 package android.hardware.radio@1.0;
18
19 enum RadioConst : int32_t {
20     RADIO_VERSION = 12,
21     RADIO_LAST_IMPRECISE_RIL_VERSION = 12,
22     RADIO_VERSION_MIN = 6,
23     RADIO_CDMA_ALPHA_INFO_BUFFER_LENGTH = 64,
24     RADIO_CDMA_NUMBER_INFO_BUFFER_LENGTH = 81,
25     RADIO_MAX_RILDS = 3,
26     RADIO_MAX_SOCKET_NAME_LENGTH = 6,
27     RADIO_MAX_CLIENT_ID_LENGTH = 2,
28     RADIO_MAX_DEBUG_SOCKET_NAME_LENGTH = 12,
29     RADIO_MAX_QEMU_PIPE_NAME_LENGTH = 11,
30     RADIO_MAX_UUID_LENGTH = 64,
31     RADIO_RADIO_CAPABILITY_VERSION = 1,
32     RADIO_CARD_MAX_APPS = 8,
33     RADIO_CDMA_MAX_NUMBER_OF_INFO_RECS = 10,
34     RADIO_SS_INFO_MAX = 4,
35     RADIO_NUM_SERVICE_CLASSES = 7,
36     RADIO_NUM_TX_POWER_LEVELS = 5,
37 };
38
39 enum RadioCdmaSmsConst : int32_t {
40     ADDRESS_MAX = 36,
41     SUBADDRESS_MAX = 36,
42     BEARER_DATA_MAX = 255,
43     UDH_MAX_SND_SIZE = 128,
44     UDH_EO_DATA_SEGMENT_MAX = 131,
45     MAX_UD_HEADERS = 7,
46     USER_DATA_MAX = 229,
47     UDH_LARGE_PIC_SIZE = 128,
48     UDH_SMALL_PIC_SIZE = 32,
49     UDH_VAR_PIC_SIZE = 134,
50     UDH_ANIM_NUM_BITMAPS = 4,
51     UDH_LARGE_BITMAP_SIZE = 32,
52     UDH_SMALL_BITMAP_SIZE = 8,
53     UDH_OTHER_SIZE = 226,
54     IP_ADDRESS_SIZE = 4,
55 };
56
57 enum RadioRestrictedState : int32_t {
58     NONE = 0x00,
59     CS_EMERGENCY = 0x01,
60     CS_NORMAL = 0x02,
61     CS_ALL = 0x04,
62     PS_ALL = 0x10,
63 };
64
65 enum RadioCardState : int32_t {
66     ABSENT = 0,
67     PRESENT = 1,
68     ERROR = 2,
69     /* card is present but not usable due to carrier restrictions.*/
70     RESTRICTED = 3,
71 };
72
73 enum RadioPinState : int32_t {
74     UNKNOWN = 0,
75     ENABLED_NOT_VERIFIED = 1,
76     ENABLED_VERIFIED = 2,
77     DISABLED = 3,
78     ENABLED_BLOCKED = 4,
79     ENABLED_PERM_BLOCKED = 5,
80 };
81
82 enum RadioAppType : int32_t {
83     UNKNOWN = 0,
84     SIM = 1,
85     USIM = 2,
86     RUIM = 3,
87     CSIM = 4,
88     ISIM = 5,
89 };
90
91 enum RadioAppState : int32_t {
92     UNKNOWN = 0,
93     DETECTED = 1,
94     PIN = 2,
95     /* If PIN1 or UPin is required */
96     PUK = 3,
97     /* If PUK1 or Puk for UPin is required */
98     SUBSCRIPTION_PERSO = 4,
99     /* perso_substate should be look at when app_state is assigned to this value */
100     READY = 5,
101 };
102
103 enum RadioPersoSubstate : int32_t {
104     UNKNOWN = 0,
105     /* initial state */
106     IN_PROGRESS = 1,
107     /* in between each lock transition */
108     READY = 2,
109     /* when either SIM or RUIM Perso is finished since each app can only have 1 active perso
110     involved */
111     SIM_NETWORK = 3,
112     SIM_NETWORK_SUBSET = 4,
113     SIM_CORPORATE = 5,
114     SIM_SERVICE_PROVIDER = 6,
115     SIM_SIM = 7,
116     SIM_NETWORK_PUK = 8,
117     /* The corresponding perso lock is blocked */
118     SIM_NETWORK_SUBSET_PUK = 9,
119     SIM_CORPORATE_PUK = 10,
120     SIM_SERVICE_PROVIDER_PUK = 11,
121     SIM_SIM_PUK = 12,
122     RUIM_NETWORK1 = 13,
123     RUIM_NETWORK2 = 14,
124     RUIM_HRPD = 15,
125     RUIM_CORPORATE = 16,
126     RUIM_SERVICE_PROVIDER = 17,
127     RUIM_RUIM = 18,
128     RUIM_NETWORK1_PUK = 19,
129     /* The corresponding perso lock is blocked */
130     RUIM_NETWORK2_PUK = 20,
131     RUIM_HRPD_PUK = 21,
132     RUIM_CORPORATE_PUK = 22,
133     RUIM_SERVICE_PROVIDER_PUK = 23,
134     RUIM_RUIM_PUK = 24,
135 };
136
137 enum RadioState : int32_t  {
138   OFF = 0,
139   /* Radio explictly powered off (eg CFUN=0) */
140   UNAVAILABLE = 1,
141   /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
142   SIM_NOT_READY = 2,
143   /* Radio is on, but the SIM interface is not ready */
144   SIM_LOCKED_OR_ABSENT = 3,
145   /* SIM PIN locked, PUK required, network
146    personalization locked, or SIM absent */
147   SIM_READY = 4,
148   /* Radio is on and SIM interface is available */
149   RUIM_NOT_READY = 5,
150   /* Radio is on, but the RUIM interface is not ready */
151   RUIM_READY = 6,
152   /* Radio is on and the RUIM interface is available */
153   RUIM_LOCKED_OR_ABSENT = 7,
154   /* RUIM PIN locked, PUK required, network
155    personalization locked, or RUIM absent */
156   NV_NOT_READY = 8,
157   /* Radio is on, but the NV interface is not available */
158   NV_READY = 9,
159   /* Radio is on */
160   ON = 10,
161 };
162
163 struct RadioAppStatus {
164     RadioAppType appType;
165     RadioAppState appState;
166     RadioPersoSubstate persoSubstate;
167     /* applicable only if app_state == SUBSCRIPTION_PERSO */
168     string aidPtr;
169     /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 0x30, 0x30, 0x30 */
170     string appLabelPtr;
171     /* null terminated string */
172     int32_t pin1Replaced;
173     /* applicable to USIM, CSIM & ISIM */
174     RadioPinState pin1;
175     RadioPinState pin2;
176 };
177
178 struct RadioCardStatus {
179     RadioCardState cardState;
180     RadioPinState universalPinState;
181     /* applicable to USIM and CSIM */
182     int32_t gsmUmtsSubscriptionAppIndex;
183     /* value < RADIO_CARD_MAX_APPS, -1 if none */
184     int32_t cdmaSubscriptionAppIndex;
185     /* value < RADIO_CARD_MAX_APPS, -1 if none */
186     int32_t imsSubscriptionAppIndex;
187     /* value < RADIO_CARD_MAX_APPS, -1 if none */
188     int32_t numApplications;
189     /* value <= RADIO_CARD_MAX_APPS */
190     RadioAppStatus[RadioConst:RADIO_CARD_MAX_APPS] applications;
191 };