OSDN Git Service

Merge "supplicant(interface): Remove "wpa_supplicant""
[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     CDMA_ALPHA_INFO_BUFFER_LENGTH = 64,
21     CDMA_NUMBER_INFO_BUFFER_LENGTH = 81,
22     MAX_RILDS = 3,
23     MAX_SOCKET_NAME_LENGTH = 6,
24     MAX_CLIENT_ID_LENGTH = 2,
25     MAX_DEBUG_SOCKET_NAME_LENGTH = 12,
26     MAX_QEMU_PIPE_NAME_LENGTH = 11,
27     MAX_UUID_LENGTH = 64,
28     CARD_MAX_APPS = 8,
29     CDMA_MAX_NUMBER_OF_INFO_RECS = 10,
30     SS_INFO_MAX = 4,
31     NUM_SERVICE_CLASSES = 7,
32     NUM_TX_POWER_LEVELS = 5,
33 };
34
35 enum RadioCdmaSmsConst : int32_t {
36     ADDRESS_MAX = 36,
37     SUBADDRESS_MAX = 36,
38     BEARER_DATA_MAX = 255,
39     UDH_MAX_SND_SIZE = 128,
40     UDH_EO_DATA_SEGMENT_MAX = 131,
41     MAX_UD_HEADERS = 7,
42     USER_DATA_MAX = 229,
43     UDH_LARGE_PIC_SIZE = 128,
44     UDH_SMALL_PIC_SIZE = 32,
45     UDH_VAR_PIC_SIZE = 134,
46     UDH_ANIM_NUM_BITMAPS = 4,
47     UDH_LARGE_BITMAP_SIZE = 32,
48     UDH_SMALL_BITMAP_SIZE = 8,
49     UDH_OTHER_SIZE = 226,
50     IP_ADDRESS_SIZE = 4,
51 };
52
53 enum RadioError : int32_t {
54     NONE = 0,                             // Success
55     RADIO_NOT_AVAILABLE = 1,              // If radio did not start or is resetting
56     GENERIC_FAILURE = 2,
57     PASSWORD_INCORRECT = 3,               // for PIN/PIN2 methods only
58     SIM_PIN2 = 4,                         // Operation requires SIM PIN2 to be entered
59     SIM_PUK2 = 5,                         // Operation requires SIM PIN2 to be entered
60     REQUEST_NOT_SUPPORTED = 6,
61     CANCELLED = 7,
62     OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, // data ops are not allowed during voice
63                                           // call on a Class C GPRS device
64     OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9,  // data ops are not allowed before device
65                                           // registers in network
66     SMS_SEND_FAIL_RETRY = 10,             // fail to send sms and need retry
67     SIM_ABSENT = 11,                      // fail to set the location where CDMA subscription
68                                           // shall be retrieved because of SIM or RUIM
69                                           // card absent
70     SUBSCRIPTION_NOT_AVAILABLE = 12,      // fail to find CDMA subscription from specified
71                                           // location
72     MODE_NOT_SUPPORTED = 13,              // HW does not support preferred network type
73     FDN_CHECK_FAILURE = 14,               // command failed because recipient is not on FDN list
74     ILLEGAL_SIM_OR_ME = 15,               // network selection failed due to illegal SIM or ME
75     MISSING_RESOURCE = 16,                // no logical channel available
76     NO_SUCH_ELEMENT = 17,                 // application not found on SIM
77     DIAL_MODIFIED_TO_USSD = 18,           // DIAL request modified to USSD
78     DIAL_MODIFIED_TO_SS = 19,             // DIAL request modified to SS
79     DIAL_MODIFIED_TO_DIAL = 20,           // DIAL request modified to DIAL with different data
80     USSD_MODIFIED_TO_DIAL = 21,           // USSD request modified to DIAL
81     USSD_MODIFIED_TO_SS = 22,             // USSD request modified to SS
82     USSD_MODIFIED_TO_USSD = 23,           // USSD request modified to different USSD request
83     SS_MODIFIED_TO_DIAL = 24,             // SS request modified to DIAL
84     SS_MODIFIED_TO_USSD = 25,             // SS request modified to USSD
85     SUBSCRIPTION_NOT_SUPPORTED = 26,      // Subscription not supported by RIL
86     SS_MODIFIED_TO_SS = 27,               // SS request modified to different SS request
87     LCE_NOT_SUPPORTED = 36,               // LCE service not supported(36 in RILConstants.java)
88     NO_MEMORY = 37,                       // Not sufficient memory to process the request
89     INTERNAL_ERR = 38,                    // Hit unexpected vendor internal error scenario
90     SYSTEM_ERR = 39,                      // Hit platform or system error
91     MODEM_ERR = 40,                       // Hit unexpected modem error
92     INVALID_STATE = 41,                   // Unexpected request for the current state
93     NO_RESOURCES = 42,                    // Not sufficient resource to process the request
94     SIM_ERR = 43,                         // Received error from SIM card
95     INVALID_ARGUMENTS = 44,               // Received invalid arguments in request
96     INVALID_SIM_STATE = 45,               // Cannot process the request in current SIM state
97     INVALID_MODEM_STATE = 46,             // Cannot process the request in current Modem state
98     INVALID_CALL_ID = 47,                 // Received invalid call id in request
99     NO_SMS_TO_ACK = 48,                   // ACK received when there is no SMS to ack
100     NETWORK_ERR = 49,                     // Received error from network
101     REQUEST_RATE_LIMITED = 50,            // Operation denied due to overly-frequent requests
102     SIM_BUSY = 51,                        // SIM is busy
103     SIM_FULL = 52,                        // The target EF is full
104     NETWORK_REJECT = 53,                  // Request is rejected by network
105     OPERATION_NOT_ALLOWED = 54,           // Not allowed the request now
106     EMPTY_RECORD = 55,                    // The request record is empty
107     INVALID_SMS_FORMAT = 56,              // Invalid sms format
108     ENCODING_ERR = 57,                    // Message not encoded properly
109     INVALID_SMSC_ADDRESS = 58,            // SMSC address specified is invalid
110     NO_SUCH_ENTRY = 59,                   // No such entry present to perform the request
111     NETWORK_NOT_READY = 60,               // Network is not ready to perform the request
112     NOT_PROVISIONED = 61,                 // Device doesnot have this value provisioned
113     NO_SUBSCRIPTION = 62,                 // Device doesnot have subscription
114     NO_NETWORK_FOUND = 63,                // Network cannot be found
115     DEVICE_IN_USE = 64,                   // Operation cannot be performed because the device
116                                           // is currently in use
117     RIL_E_ABORTED = 65,                   // Operation aborted
118
119     // TODO(May be moved to vendor HAL extension)
120     // OEM specific error codes. To be used by OEM when they don't want to reveal
121     // specific error codes which would be replaced by Generic failure.
122     OEM_ERROR_1 = 501,
123     OEM_ERROR_2 = 502,
124     OEM_ERROR_3 = 503,
125     OEM_ERROR_4 = 504,
126     OEM_ERROR_5 = 505,
127     OEM_ERROR_6 = 506,
128     OEM_ERROR_7 = 507,
129     OEM_ERROR_8 = 508,
130     OEM_ERROR_9 = 509,
131     OEM_ERROR_10 = 510,
132     OEM_ERROR_11 = 511,
133     OEM_ERROR_12 = 512,
134     OEM_ERROR_13 = 513,
135     OEM_ERROR_14 = 514,
136     OEM_ERROR_15 = 515,
137     OEM_ERROR_16 = 516,
138     OEM_ERROR_17 = 517,
139     OEM_ERROR_18 = 518,
140     OEM_ERROR_19 = 519,
141     OEM_ERROR_20 = 520,
142     OEM_ERROR_21 = 521,
143     OEM_ERROR_22 = 522,
144     OEM_ERROR_23 = 523,
145     OEM_ERROR_24 = 524,
146     OEM_ERROR_25 = 525,
147 };
148
149 enum RadioResponseType : int32_t {
150     RESPONSE_SOLICITED,
151     RESPONSE_UNSOLICITED,
152     RESPONSE_SOLICITED_ACK,
153     RESPONSE_SOLICITED_ACK_EXP,
154     RESPONSE_UNSOLICITED_ACK_EXP,
155 };
156
157 enum RestrictedState : int32_t {
158     NONE = 0x00,
159     CS_EMERGENCY = 0x01,
160     CS_NORMAL = 0x02,
161     CS_ALL = 0x04,
162     PS_ALL = 0x10,
163 };
164
165 enum CardState : int32_t {
166     ABSENT,
167     PRESENT,
168     ERROR,
169     RESTRICTED,                           // card is present but not usable due to carrier
170                                           // restrictions
171 };
172
173 enum PinState : int32_t {
174     UNKNOWN,
175     ENABLED_NOT_VERIFIED,
176     ENABLED_VERIFIED,
177     DISABLED,
178     ENABLED_BLOCKED,
179     ENABLED_PERM_BLOCKED,
180 };
181
182 enum AppType : int32_t {
183     UNKNOWN,
184     SIM,
185     USIM,
186     RUIM,
187     CSIM,
188     ISIM,
189 };
190
191 enum AppState : int32_t {
192     UNKNOWN,
193     DETECTED,
194     PIN,                                  // If PIN1 or UPin is required
195     PUK,                                  // If PUK1 or Puk for UPin is required
196     SUBSCRIPTION_PERSO,                   // perso_substate must be look at when app_state is
197                                           // assigned to this value
198     READY,
199 };
200
201 enum PersoSubstate : int32_t {
202     UNKNOWN,                              // initial state
203     IN_PROGRESS,                          // in between each lock transition
204     READY,                                // when either SIM or RUIM Perso is finished since each
205                                           // app must only have 1 active perso involved
206     SIM_NETWORK,
207     SIM_NETWORK_SUBSET,
208     SIM_CORPORATE,
209     SIM_SERVICE_PROVIDER,
210     SIM_SIM,
211     SIM_NETWORK_PUK,                      // The corresponding perso lock is blocked
212     SIM_NETWORK_SUBSET_PUK,
213     SIM_CORPORATE_PUK,
214     SIM_SERVICE_PROVIDER_PUK,
215     SIM_SIM_PUK,
216     RUIM_NETWORK1,
217     RUIM_NETWORK2,
218     RUIM_HRPD,
219     RUIM_CORPORATE,
220     RUIM_SERVICE_PROVIDER,
221     RUIM_RUIM,
222     RUIM_NETWORK1_PUK,                   // The corresponding perso lock is blocked
223     RUIM_NETWORK2_PUK,
224     RUIM_HRPD_PUK,
225     RUIM_CORPORATE_PUK,
226     RUIM_SERVICE_PROVIDER_PUK,
227     RUIM_RUIM_PUK,
228 };
229
230 enum RadioState : int32_t {
231     OFF = 0,                              // Radio explictly powered off (eg CFUN=0)
232     UNAVAILABLE = 1,                      // Radio unavailable (eg, resetting or not booted)
233     ON = 10,                              // Radio is ON
234 };
235
236 enum SapConnectRsp : int32_t {
237     SUCCESS,
238     CONNECT_FAILURE,
239     MSG_SIZE_TOO_LARGE,
240     MSG_SIZE_TOO_SMALL,
241     CONNECT_OK_CALL_ONGOING
242 };
243
244 enum SapDisconnectType : int32_t {
245     GRACEFUL,
246     IMMEDIATE
247 };
248
249 enum SapApduType : int32_t {
250     APDU,
251     APDU7816
252 };
253
254 enum SapResultCode : int32_t {
255     SUCCESS,
256     GENERIC_FAILURE,
257     CARD_NOT_ACCESSSIBLE,
258     CARD_ALREADY_POWERED_OFF,
259     CARD_REMOVED,
260     CARD_ALREADY_POWERED_ON,
261     DATA_NOT_AVAILABLE,
262     NOT_SUPPORTED
263 };
264
265 enum SapStatus : int32_t {
266     UNKNOWN_ERROR,
267     CARD_RESET,
268     CARD_NOT_ACCESSIBLE,
269     CARD_REMOVED,
270     CARD_INSERTED,
271     RECOVERED
272 };
273
274 enum SapTransferProtocol : int32_t {
275     T0,
276     T1
277 };
278
279 enum CallState : int32_t {
280     ACTIVE,
281     HOLDING,
282     DIALING,                             // MO call only
283     ALERTING,                            // MO call only
284     INCOMING,                            // MT call only
285     WAITING,                             // MT call only
286 };
287
288 /*
289  * User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0
290  */
291 enum UusType : int32_t {
292     TYPE1_IMPLICIT,
293     TYPE1_REQUIRED,
294     TYPE1_NOT_REQUIRED,
295     TYPE2_REQUIRED,
296     TYPE2_NOT_REQUIRED,
297     TYPE3_REQUIRED,
298     TYPE3_NOT_REQUIRED,
299 };
300
301 /*
302  * User-to-User Signaling Information data coding schemes. Possible values for
303  * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
304  * specified in section 10.5.4.25 of 3GPP TS 24.008
305  */
306 enum UusDcs : int32_t {
307     USP,                                  // User specified protocol
308     OSIHLP,                               // OSI higher layer protocol
309     X244,                                 // X.244
310     RMCF,                                 // Reserved for system mangement convergence function
311     IA5C,                                 // IA5 characters
312 };
313
314 enum CallPresentation : int32_t {
315     ALLOWED,
316     RESTRICTED,
317     UNKNOWN,
318     PAYPHONE,
319 };
320
321 enum Clir : int32_t {
322     DEFAULT,                               // "use subscription default value"
323     INVOCATION,                            // restrict CLI presentation
324     SUPPRESSION,                           // allow CLI presentation
325 };
326
327 enum LastCallFailCause : int32_t {
328     UNOBTAINABLE_NUMBER = 1,
329     NO_ROUTE_TO_DESTINATION = 3,
330     CHANNEL_UNACCEPTABLE = 6,
331     OPERATOR_DETERMINED_BARRING = 8,
332     NORMAL = 16,
333     BUSY = 17,
334     NO_USER_RESPONDING = 18,
335     NO_ANSWER_FROM_USER = 19,
336     CALL_REJECTED = 21,
337     NUMBER_CHANGED = 22,
338     PREEMPTION = 25,
339     DESTINATION_OUT_OF_ORDER = 27,
340     INVALID_NUMBER_FORMAT = 28,
341     FACILITY_REJECTED = 29,
342     RESP_TO_STATUS_ENQUIRY = 30,
343     NORMAL_UNSPECIFIED = 31,
344     CONGESTION = 34,
345     NETWORK_OUT_OF_ORDER = 38,
346     TEMPORARY_FAILURE = 41,
347     SWITCHING_EQUIPMENT_CONGESTION = 42,
348     ACCESS_INFORMATION_DISCARDED = 43,
349     REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
350     RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
351     QOS_UNAVAILABLE = 49,
352     REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
353     INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
354     BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
355     BEARER_CAPABILITY_UNAVAILABLE = 58,
356     SERVICE_OPTION_NOT_AVAILABLE = 63,
357     BEARER_SERVICE_NOT_IMPLEMENTED = 65,
358     ACM_LIMIT_EXCEEDED = 68,
359     REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
360     ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
361     SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
362     INVALID_TRANSACTION_IDENTIFIER = 81,
363     USER_NOT_MEMBER_OF_CUG = 87,
364     INCOMPATIBLE_DESTINATION = 88,
365     INVALID_TRANSIT_NW_SELECTION = 91,
366     SEMANTICALLY_INCORRECT_MESSAGE = 95,
367     INVALID_MANDATORY_INFORMATION = 96,
368     MESSAGE_TYPE_NON_IMPLEMENTED = 97,
369     MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
370     INFORMATION_ELEMENT_NON_EXISTENT = 99,
371     CONDITIONAL_IE_ERROR = 100,
372     MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
373     RECOVERY_ON_TIMER_EXPIRED = 102,
374     PROTOCOL_ERROR_UNSPECIFIED = 111,
375     INTERWORKING_UNSPECIFIED = 127,
376     CALL_BARRED = 240,
377     FDN_BLOCKED = 241,
378     IMSI_UNKNOWN_IN_VLR = 242,
379     IMEI_NOT_ACCEPTED = 243,
380     DIAL_MODIFIED_TO_USSD = 244,          // STK Call Control
381     DIAL_MODIFIED_TO_SS = 245,
382     DIAL_MODIFIED_TO_DIAL = 246,
383     CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
384     CDMA_DROP = 1001,
385     CDMA_INTERCEPT = 1002,
386     CDMA_REORDER = 1003,
387     CDMA_SO_REJECT = 1004,
388     CDMA_RETRY_ORDER = 1005,
389     CDMA_ACCESS_FAILURE = 1006,
390     CDMA_PREEMPTED = 1007,
391     CDMA_NOT_EMERGENCY = 1008,            // For non-emergency number dialed during emergency
392                                           // callback mode
393     CDMA_ACCESS_BLOCKED = 1009,           // This error will be deprecated soon,
394                                           // vendor code must make sure to map error
395                                           // code to specific error
396     ERROR_UNSPECIFIED = 0xffff,
397 };
398
399 enum DataCallFailCause : int32_t {
400     NONE = 0,                             // an integer cause code defined in TS 24.008
401                                           // section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
402                                           // If the implementation does not have access to the exact
403                                           // cause codes, then it must return one of the
404                                           // following values, as the UI layer needs to distinguish
405                                           // these cases for error notification and potential
406                                           // retries.
407     OPERATOR_BARRED = 0x08,               // no retry
408     NAS_SIGNALLING = 0x0E,                // PDP_FAIL_LLC_SNDCP = 0x19,
409     INSUFFICIENT_RESOURCES = 0x1A,
410     MISSING_UKNOWN_APN = 0x1B,            // no retry
411     UNKNOWN_PDP_ADDRESS_TYPE = 0x1C,      // no retry
412     USER_AUTHENTICATION = 0x1D,           // no retry
413     ACTIVATION_REJECT_GGSN = 0x1E,        // no retry
414     ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
415     SERVICE_OPTION_NOT_SUPPORTED = 0x20,  // no retry
416     SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, // no retry
417     SERVICE_OPTION_OUT_OF_ORDER = 0x22,
418     NSAPI_IN_USE = 0x23,                  // no retry
419     REGULAR_DEACTIVATION = 0x24,          // possibly restart radio,
420                                           // based on framework config
421     QOS_NOT_ACCEPTED = 0x25,
422     NETWORK_FAILURE = 0x26,
423     UMTS_REACTIVATION_REQ = 0x27,
424     FEATURE_NOT_SUPP = 0x28,
425     TFT_SEMANTIC_ERROR = 0x29,
426     TFT_SYTAX_ERROR = 0x2A,
427     UNKNOWN_PDP_CONTEXT = 0x2B,
428     FILTER_SEMANTIC_ERROR = 0x2C,
429     FILTER_SYTAX_ERROR = 0x2D,
430     PDP_WITHOUT_ACTIVE_TFT = 0x2E,
431     ONLY_IPV4_ALLOWED = 0x32,             // no retry
432     ONLY_IPV6_ALLOWED = 0x33,             // no retry
433     ONLY_SINGLE_BEARER_ALLOWED = 0x34,
434     ESM_INFO_NOT_RECEIVED = 0x35,
435     PDN_CONN_DOES_NOT_EXIST = 0x36,
436     MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
437     MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
438     UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
439     INVALID_TRANSACTION_ID = 0x51,
440     MESSAGE_INCORRECT_SEMANTIC = 0x5F,
441     INVALID_MANDATORY_INFO = 0x60,
442     MESSAGE_TYPE_UNSUPPORTED = 0x61,
443     MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
444     UNKNOWN_INFO_ELEMENT = 0x63,
445     CONDITIONAL_IE_ERROR = 0x64,
446     MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
447     PROTOCOL_ERRORS = 0x6F,               // no retry
448     APN_TYPE_CONFLICT = 0x70,
449     INVALID_PCSCF_ADDR = 0x71,
450     INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
451     EMM_ACCESS_BARRED = 0x73,
452     EMERGENCY_IFACE_ONLY = 0x74,
453     IFACE_MISMATCH = 0x75,
454     COMPANION_IFACE_IN_USE = 0x76,
455     IP_ADDRESS_MISMATCH = 0x77,
456     IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
457     EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
458     AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
459     OEM_DCFAILCAUSE_1 = 0x1001,
460
461     // OEM specific error codes. To be used by OEMs when they don't want to
462     // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
463     // TODO(May be moved to vendor HAL extension)
464     OEM_DCFAILCAUSE_2 = 0x1002,
465     OEM_DCFAILCAUSE_3 = 0x1003,
466     OEM_DCFAILCAUSE_4 = 0x1004,
467     OEM_DCFAILCAUSE_5 = 0x1005,
468     OEM_DCFAILCAUSE_6 = 0x1006,
469     OEM_DCFAILCAUSE_7 = 0x1007,
470     OEM_DCFAILCAUSE_8 = 0x1008,
471     OEM_DCFAILCAUSE_9 = 0x1009,
472     OEM_DCFAILCAUSE_10 = 0x100A,
473     OEM_DCFAILCAUSE_11 = 0x100B,
474     OEM_DCFAILCAUSE_12 = 0x100C,
475     OEM_DCFAILCAUSE_13 = 0x100D,
476     OEM_DCFAILCAUSE_14 = 0x100E,
477     OEM_DCFAILCAUSE_15 = 0x100F,
478
479     // Not mentioned in the specification
480     VOICE_REGISTRATION_FAIL = -1,
481     DATA_REGISTRATION_FAIL = -2,
482
483     // reasons for data call drop - network/modem disconnect
484     SIGNAL_LOST = -3,
485     PREF_RADIO_TECH_CHANGED = -4,         // preferred technology has changed, must retry
486                                           // with parameters appropriate for new technology
487     RADIO_POWER_OFF = -5,                 // data call was disconnected because radio was resetting,
488                                           // powered off - no retry
489     TETHERED_CALL_ACTIVE = -6,            // data call was disconnected by modem because tethered
490                                           // mode was up on same APN/data profile - no retry until
491                                           // tethered call is off
492     ERROR_UNSPECIFIED = 0xffff,
493 };
494
495 /*
496  * Please note that registration state UNKNOWN is
497  * treated as "out of service" in the Android telephony.
498  * Registration state REG_DENIED must be returned if Location Update
499  * Reject (with cause 17 - Network Failure) is received
500  * repeatedly from the network, to facilitate
501  * "managed roaming"
502  */
503 enum RegState : int32_t {
504     NOT_REG_MT_NOT_SEARCHING_OP,          // Not registered, MT is not currently searching
505                                           // a new operator to register
506     REG_HOME,                             // Registered, home network
507     NOT_REG_MT_SEARCHING_OP,              // Not registered, but MT is currently searching
508                                           // a new operator to register
509     REG_DENIED,                           // Registration denied
510     UNKNOWN,                              // Unknown
511     REG_ROAMING,                          // Registered, roaming
512     NOT_REG_MT_NOT_SEARCHING_OP_EM,       // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that
513                                           // emergency calls are enabled.
514     NOT_REG_MT_SEARCHING_OP_EM,           // Same as NOT_REG_MT_SEARCHING_OP but indicates that
515                                           // emergency calls are enabled.
516     REG_DENIED_EM,                        // Same as REG_DENIED but indicates that
517                                           // emergency calls are enabled.
518     UNKNOWN_EM                            // Same as UNKNOWN but indicates that
519                                           // emergency calls are enabled.
520 };
521
522 enum RadioTechnology : int32_t {
523     UNKNOWN = 0,
524     GPRS = 1,
525     EDGE = 2,
526     UMTS = 3,
527     IS95A = 4,
528     IS95B = 5,
529     ONE_X_RTT = 6,
530     EVDO_0 = 7,
531     EVDO_A = 8,
532     HSDPA = 9,
533     HSUPA = 10,
534     HSPA = 11,
535     EVDO_B = 12,
536     EHRPD = 13,
537     LTE = 14,
538     HSPAP = 15,                            // HSPA+
539     GSM = 16,                              // Only supports voice
540     TD_SCDMA = 17,
541     IWLAN = 18,
542     LTE_CA = 19,
543 };
544
545 enum DataProfile : int32_t {
546     DEFAULT = 0,
547     TETHERED = 1,
548     IMS = 2,
549     FOTA = 3,
550     CBS = 4,
551     OEM_BASE = 1000,                      // Start of OEM-specific profiles
552     INVALID = 0xFFFFFFFF,
553 };
554
555 enum SmsAcknowledgeFailCause : int32_t {
556     MEMORY_CAPAPCITY_EXCEEDED = 0xD3,
557     UNSPECIFIED_ERROR = 0XFF,
558 };
559
560 enum CallForwardInfoStatus : int32_t {
561     ACTIVE,
562     INACTIVE,
563     DISABLE,
564     ENABLE,
565     INTERROGATE,
566     REGISTRATION,
567     ERASURE,
568 };
569
570 enum ClipStatus : int32_t {
571     CLIP_PROVISIONED,                     // CLIP provisioned
572     CLIP_UNPROVISIONED,                   // CLIP not provisioned
573     UNKOWN,                               // unknown, e.g. no network etc
574 };
575
576 enum SmsWriteArgsStatus : int32_t {
577     REC_UNREAD,
578     REC_READ,
579     STO_UNSENT,
580     STO_SENT,
581 };
582
583 enum RadioBandMode : int32_t  {
584     BAND_MODE_UNSPECIFIED,                // "unspecified" (selected by baseband automatically)
585     BAND_MODE_EURO,                       // "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
586     BAND_MODE_USA,                        // "US band"
587                                           // (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
588     BAND_MODE_JPN,                        // "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
589     BAND_MODE_AUS,                        // "AUS band"
590                                           // (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
591     BAND_MODE_AUS_2,                      // "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
592     BAND_MODE_CELL_800,                   // "Cellular" (800-MHz Band)
593     BAND_MODE_PCS,                        // "PCS" (1900-MHz Band)
594     BAND_MODE_JTACS,                      // "Band Class 3" (JTACS Band)
595     BAND_MODE_KOREA_PCS,                  // "Band Class 4" (Korean PCS Band)
596     BAND_MODE_5_450M,                     // "Band Class 5" (450-MHz Band)
597     BAND_MODE_IMT2000,                    // "Band Class 6" (2-GMHz IMT2000 Band)
598     BAND_MODE_7_700M_2,                   // "Band Class 7" (Upper 700-MHz Band)
599     BAND_MODE_8_1800M,                    // "Band Class 8" (1800-MHz Band)
600     BAND_MODE_9_900M,                     // "Band Class 9" (900-MHz Band)
601     BAND_MODE_10_800M_2,                  // "Band Class 10" (Secondary 800-MHz Band)
602     BAND_MODE_EURO_PAMR_400M,             // "Band Class 11" (400-MHz European PAMR Band)
603     BAND_MODE_AWS,                        // "Band Class 15" (AWS Band)
604     BAND_MODE_USA_2500M,                  // "Band Class 16" (US 2.5-GHz Band)
605 };
606
607 enum OperatorStatus : int32_t {
608     UNKNOWN,
609     AVAILABLE,
610     CURRENT,
611     FORBIDDEN,
612 };
613
614 enum PreferredNetworkType : int32_t {
615     GSM_WCDMA,                            // GSM/WCDMA (WCDMA preferred)
616     GSM_ONLY,                             // GSM only
617     WCDMA,                                // WCDMA
618     GSM_WCDMA_AUTO,                       // GSM/WCDMA (auto mode, according to PRL)
619     CDMA_EVDO_AUTO,                       // CDMA and EvDo (auto mode, according to PRL)
620     CDMA_ONLY,                            // CDMA only
621     EVDO_ONLY,                            // EvDo only
622     GSM_WCDMA_CDMA_EVDO_AUTO,             // GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
623     LTE_CDMA_EVDO,                        // LTE, CDMA and EvDo
624     LTE_GSM_WCDMA,                        // LTE, GSM/WCDMA
625     LTE_CMDA_EVDO_GSM_WCDMA,              // LTE, CDMA, EvDo, GSM/WCDMA
626     LTE_ONLY,                             // LTE only
627     LTE_WCDMA,                            // LTE/WCDMA
628     TD_SCDMA_ONLY,                        // TD-SCDMA only
629     TD_SCDMA_WCDMA,                       // TD-SCDMA and WCDMA
630     TD_SCDMA_LTE,                         // TD-SCDMA and LTE
631     TD_SCDMA_GSM,                         // TD-SCDMA and GSM
632     TD_SCDMA_GSM_LTE,                     // TD-SCDMA,GSM and LTE
633     TD_SCDMA_GSM_WCDMA,                   // TD-SCDMA, GSM/WCDMA
634     TD_SCDMA_WCDMA_LTE,                   // TD-SCDMA, WCDMA and LTE
635     TD_SCDMA_GSM_WCDMA_LTE,               // TD-SCDMA, GSM/WCDMA and LTE
636     TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO,    // TD-SCDMA, GSM/WCDMA, CDMA and EvDo
637     TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA,     // TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA
638 };
639
640 enum CdmaSubscriptionSource : int32_t {
641     RUIM_SIM,
642     NV,
643 };
644
645 enum CdmaRoamingType : int32_t {
646     HOME_NETWORK,
647     AFFILIATED_ROAM,
648     ANY_ROAM,
649 };
650
651 enum TtyMode : int32_t {
652     OFF,
653     FULL,
654     HCO,                                  // Hearing carryover
655     VCO,                                  // Voice carryover
656 };
657
658 enum NvItem : int32_t {
659     // CDMA radio and account information (items 1-10)
660     CDMA_MEID = 1,                       // CDMA MEID (hex)
661     CDMA_MIN = 2,                        // CDMA MIN (MSID)
662     CDMA_MDN = 3,                        // CDMA MDN
663     CDMA_ACCOLC = 4,                     // CDMA access overload control
664
665     // Carrier device provisioning (items 11-30)
666     DEVICE_MSL = 11,                     // device MSL
667     RTN_RECONDITIONED_STATUS = 12,       // RTN reconditioned status
668     RTN_ACTIVATION_DATE = 13,            // RTN activation date
669     RTN_LIFE_TIMER = 14,                 // RTN life timer
670     RTN_LIFE_CALLS = 15,                 // RTN life calls
671     RTN_LIFE_DATA_TX = 16,               // RTN life data TX
672     RTN_LIFE_DATA_RX = 17,               // RTN life data RX
673     OMADM_HFA_LEVEL = 18,                // HFA in progress
674
675     // Mobile IP profile information (items 31-50)
676     MIP_PROFILE_NAI = 31,                // NAI realm
677     MIP_PROFILE_HOME_ADDRESS = 32,       // MIP home address
678     MIP_PROFILE_AAA_AUTH = 33,           // AAA auth
679     MIP_PROFILE_HA_AUTH = 34,            // HA auth
680     MIP_PROFILE_PRI_HA_ADDR = 35,        // primary HA address
681     MIP_PROFILE_SEC_HA_ADDR = 36,        // secondary HA address
682     MIP_PROFILE_REV_TUN_PREF = 37,       // reverse TUN preference
683     MIP_PROFILE_HA_SPI = 38,             // HA SPI
684     MIP_PROFILE_AAA_SPI = 39,            // AAA SPI
685     MIP_PROFILE_MN_HA_SS = 40,           // HA shared secret
686     MIP_PROFILE_MN_AAA_SS = 41,          // AAA shared secret
687
688     // CDMA network and band config (items 51-70)
689     CDMA_PRL_VERSION = 51,               // CDMA PRL version
690     CDMA_BC10 = 52,                      // CDMA band class 10
691     CDMA_BC14 = 53,                      // CDMA band class 14
692     CDMA_SO68 = 54,                      // CDMA SO68
693     CDMA_SO73_COP0 = 55,                 // CDMA SO73 COP0
694     CDMA_SO73_COP1TO7 = 56,              // CDMA SO73 COP1-7
695     CDMA_1X_ADVANCED_ENABLED = 57,       // CDMA 1X Advanced enabled
696     CDMA_EHRPD_ENABLED = 58,             // CDMA eHRPD enabled
697     CDMA_EHRPD_FORCED = 59,              // CDMA eHRPD forced
698
699     // LTE network and band config (items 71-90)
700     LTE_BAND_ENABLE_25 = 71,             // LTE band 25 enable
701     LTE_BAND_ENABLE_26 = 72,             // LTE band 26 enable
702     LTE_BAND_ENABLE_41 = 73,             // LTE band 41 enable
703
704     LTE_SCAN_PRIORITY_25 = 74,           // LTE band 25 scan priority
705     LTE_SCAN_PRIORITY_26 = 75,           // LTE band 26 scan priority
706     LTE_SCAN_PRIORITY_41 = 76,           // LTE band 41 scan priority
707
708     LTE_HIDDEN_BAND_PRIORITY_25 = 77,    // LTE hidden band 25 priority
709     LTE_HIDDEN_BAND_PRIORITY_26 = 78,    // LTE hidden band 26 priority
710     LTE_HIDDEN_BAND_PRIORITY_41 = 79,    // LTE hidden band 41 priority
711 };
712
713 enum ResetNvType : int32_t {
714     RELOAD,                              // reload all NV items
715     ERASE,                               // erase NV reset (SCRTN)
716     FACORY_RESET,                        // factory reset (RTN)
717 };
718
719 enum HardwareConfigType : int32_t {
720     MODEM,
721     SIM,
722 };
723
724 enum HardwareConfigState : int32_t {
725     ENABLED,
726     STANDBY,
727     DISABLED,
728 };
729
730 enum LceStatus : int32_t {
731     NOT_SUPPORTED,
732     STOPPED,
733     ACTIVE
734 };
735
736 enum CarrierMatchType : int32_t {
737     ALL = 0,                               // Apply to all carriers with the same mcc/mnc
738     SPN = 1,                               // Use SPN and mcc/mnc to identify the carrier
739     IMSI_PREFIX = 2,                       // Use IMSI prefix and mcc/mnc to identify the carrier
740     GID1 = 3,                              // Use GID1 and mcc/mnc to identify the carrier
741     GID2 = 4,                              // Use GID2 and mcc/mnc to identify the carrier
742 };
743
744 struct NeighboringCell {
745     string cid;                           // Combination of LAC and Cell Id in 32 bits in GSM.
746                                           // Upper 16 bits is LAC and lower 16 bits
747                                           // is CID (as described in TS 27.005)
748                                           // Primary Scrambling Code (as described in TS 25.331)
749                                           // in 9 bits in UMTS
750                                           // Valid values are hexadecimal 0x0000 - 0xffffffff.
751     int32_t rssi;                         // Received RSSI in GSM,
752                                           // Level index of CPICH Received Signal Code Power in UMTS
753 };
754
755 enum CdmaSmsDigitMode : int32_t {
756     FOUR_BIT,                             // DTMF digits
757     EIGHT_BIT,
758 };
759
760 enum CdmaSmsNumberMode : int32_t {
761     NOT_DATA_NETWORK,
762     DATA_NETWORK,
763 };
764
765 enum CdmaSmsNumberType : int32_t {
766     UNKNOWN,
767     INTERNATIONAL_OR_DATA_IP,             // INTERNATIONAL is used when number mode is not data
768                                           // network
769                                           // address. DATA_IP is used when the number mode is data
770                                           // network address
771     NATIONAL_OR_INTERNET_MAIL,            // NATIONAL is used when the number mode is not data
772                                           // network address. INTERNET_MAIL is used when the number
773                                           // mode is data network address. For INTERNET_MAIL, in
774                                           // the address data "digits", each byte contains an ASCII
775                                           // character.
776                                           // Examples are "x@y.com,a@b.com - ref
777                                           // TIA/EIA-637A 3.4.3.3
778     NETWORK,
779     SUBSCRIBER,
780     ALPHANUMERIC,                         // GSM SMS: address value is GSM 7-bit chars
781     ABBREVIATED,
782     RESERVED_7,
783 };
784
785 enum CdmaSmsNumberPlan : int32_t {
786     UNKNOWN,
787     TELEPHONY,                            // CCITT E.164 and E.163, including ISDN plan
788     RESERVED_2,
789     DATA,                                 // CCITT X.121
790     TELEX,                                // CCITT F.69
791     RESERVED_5,
792     RESERVED_6,
793     RESERVED_7,
794     RESERVED_8,
795     PRIVATE,
796     RESERVED_10,
797     RESERVED_11,
798     RESERVED_12,
799     RESERVED_13,
800     RESERVED_14,
801     RESERVED_15,
802 };
803
804 enum CdmaSmsSubaddressType : int32_t {
805     NSAP,                                // CCITT X.213 or ISO 8348 AD2
806     USER_SPECIFIED,                      // e.g. X.25
807 };
808
809 enum CdmaSmsErrorClass : int32_t {
810     NO_ERROR,
811     ERROR,
812 };
813
814 enum CdmaSmsWriteArgsStatus : int32_t {
815     REC_UNREAD,
816     REC_READ,
817     STO_UNSENT,
818     STO_SENT
819 };
820
821 enum CellInfoType : int32_t {
822     GSM,
823     CDMA,
824     LTE,
825     WCDMA,
826     TD_SCDMA
827 };
828
829 enum TimeStampType : int32_t {
830     UNKNOWN,
831     ANTENNA,
832     MODEM,
833     OEM_RIL,
834     JAVA_RIL,
835 };
836
837 enum ApnAuthType : int32_t {
838     NO_PAP_NO_CHAP,                       // PAP and CHAP is never performed.
839     PAP_NO_CHAP,                          // PAP may be performed; CHAP is never performed.
840     NO_PAP_CHAP,                          // CHAP may be performed; PAP is never performed.
841     PAP_CHAP                              // PAP / CHAP may be performed - baseband dependent.
842 };
843
844 enum RadioTechnologyFamily : int32_t {
845     THREE_GPP,                            // 3GPP Technologies - GSM, WCDMA
846     THREE_GPP2                            // 3GPP2 Technologies - CDMA
847 };
848
849 enum UiccSubActStatus : int32_t {
850     DEACTIVATE,
851     ACTIVATE
852 };
853
854 enum SubscriptionType : int32_t {
855     SUBSCRIPTION_1,
856     SUBSCRIPTION_2,
857     SUBSCRIPTION_3
858 };
859
860 enum DataProfileInfoType : int32_t {
861     COMMON,
862     THREE_GPP,
863     THREE_GPP2
864 };
865
866 struct RadioResponseInfo {
867     RadioResponseType type;               // Response type
868     int32_t serial;                       // Serial number of the request
869     RadioError error;                     // Response error
870 };
871
872 struct AppStatus {
873     AppType appType;
874     AppState appState;
875     PersoSubstate persoSubstate;          // applicable only if app_state == SUBSCRIPTION_PERSO
876     string aidPtr;                        // e.g., from 0xA0, 0x00 -> 0x41,
877                                           // 0x30, 0x30, 0x30
878     string appLabelPtr;
879     int32_t pin1Replaced;                 // applicable to USIM, CSIM & ISIM
880     PinState pin1;
881     PinState pin2;
882 };
883
884 struct CardStatus {
885     CardState cardState;
886     PinState universalPinState;           // applicable to USIM and CSIM
887     int32_t gsmUmtsSubscriptionAppIndex;  // value < RadioConst:CARD_MAX_APPS, -1 if none
888     int32_t cdmaSubscriptionAppIndex;     // value < RadioConst:CARD_MAX_APPS, -1 if none
889     int32_t imsSubscriptionAppIndex;      // value < RadioConst:CARD_MAX_APPS, -1 if none
890     int32_t numApplications;              // value <= RadioConst:CARD_MAX_APPS
891     AppStatus[RadioConst:CARD_MAX_APPS] applications;
892 };
893
894 /*
895  * User-to-User Signaling Information defined in 3GPP 23.087 v8.0
896  */
897 struct UusInfo {
898     UusType uusType;                      // UUS Type
899     UusDcs uusDcs;                        // UUS Data Coding Scheme
900     string uusData;                       // UUS data
901 };
902
903 struct Call {
904     CallState state;
905     int32_t index;                        // Connection Index for use with, eg, AT+CHLD
906     int32_t toa;                          // type of address, eg 145 = intl
907     bool isMpty;                          // true if is mpty call
908     bool isMT;                            // true if call is mobile terminated
909     uint8_t als;                          // ALS line indicator if available (0 = line 1)
910     bool isVoice;                         // true if this is is a voice call
911     bool isVoicePrivacy;                  // true if CDMA voice privacy mode is active
912     string number;                        // Remote party number
913     CallPresentation numberPresentation;
914     string name;                          // Remote party name
915     CallPresentation namePresentation;
916     vec<UusInfo> uusInfo;                 // Vector of User-User Signaling Information
917 };
918
919 struct Dial {
920     string address;
921     Clir clir;
922     vec<UusInfo> uusInfo;                 // Vector of User-User Signaling Information
923 };
924
925 struct GsmSignalStrength {
926     uint32_t signalStrength;              // Valid values are (0-31, 99) as defined in
927                                           // TS 27.007 8.5
928     uint32_t bitErrorRate;                // bit error rate (0-7, 99) as defined in TS 27.007 8.5
929     int32_t timingAdvance;                // Timing Advance in bit periods. 1 bit period = 48/13 us.
930                                           // INT_MAX denotes invalid value
931 };
932
933 struct WcdmaSignalStrength{
934     int32_t signalStrength;               // Valid values are (0-31, 99) as defined in TS 27.007 8.5
935     int32_t bitErrorRate;                 // bit error rate (0-7, 99) as defined in TS 27.007 8.5
936 };
937
938 struct CdmaSignalStrength {
939     uint32_t dbm;                         // This value is the actual RSSI
940                                           // value multiplied by -1. Example: If the
941                                           // actual RSSI is -75, then this response value will
942                                           // be 75.
943     uint32_t ecio;                        // This value is the actual
944                                           // Ec/Io multiplied by -10. Example: If the
945                                           // actual Ec/Io is -12.5 dB, then this response value
946                                           // will be 125.
947 };
948
949 struct EvdoSignalStrength {
950     uint32_t dbm;                         // This value is the actual
951                                           // RSSI value multiplied by -1.
952                                           // Example: If the actual RSSI is -75,
953                                           // then this response value will be 75.
954     uint32_t ecio;                        // This value is the actual
955                                           // Ec/Io multiplied by -10. Example: If the
956                                           // actual Ec/Io is -12.5 dB, then this response value
957                                           // will be 125.
958     uint32_t signalNoiseRatio;            // Valid values are 0-8. 8 is the highest signal to
959                                           // noise ratio.
960 };
961
962 struct LteSignalStrength {
963     uint32_t signalStrength;              // Valid values are (0-31, 99) as defined in
964                                           // TS 27.007 8.5
965     uint32_t rsrp;                        // The current Reference Signal Receive Power in dBm
966                                           // multipled by -1.
967                                           // Range: 44 to 140 dBm
968                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
969                                           // Reference: 3GPP TS 36.133 9.1.4
970     uint32_t rsrq;                        // The current Reference Signal Receive Quality in dB
971                                           // multiplied by -1.
972                                           // Range: 20 to 3 dB.
973                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
974                                           // Reference: 3GPP TS 36.133 9.1.7
975     int32_t rssnr;                        // The current reference signal signal-to-noise ratio in
976                                           // 0.1 dB units.
977                                           // Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
978                                           // INT_MAX : 0x7FFFFFFF denotes invalid value.
979                                           // Reference: 3GPP TS 36.101 8.1.1
980     uint32_t cqi;                         // The current Channel Quality Indicator.
981                                           // Range: 0 to 15.
982                                           // INT_MAX : 0x7FFFFFFF denotes invalid value.
983                                           // Reference: 3GPP TS 36.101 9.2, 9.3, A.4
984     uint32_t timingAdvance;               // timing advance in micro seconds for a one way trip
985                                           // from cell to device.
986                                           // Approximate distance is calculated using
987                                           // 300m/us * timingAdvance.
988                                           // Range: 0 to 0x7FFFFFFE
989                                           // INT_MAX : 0x7FFFFFFF denotes invalid value.
990                                           // Reference: 3GPP 36.321 section 6.1.3.5
991                                           // also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html
992 };
993
994 struct TdScdmaSignalStrength {
995     uint32_t rscp;                        // The Received Signal Code Power in dBm multipled by -1.
996                                           // Range : 25 to 120
997                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
998                                           // Reference: 3GPP TS 25.123, section 9.1.1.1
999 };
1000
1001 struct SignalStrength {
1002     GsmSignalStrength gw;
1003     CdmaSignalStrength cdma;
1004     EvdoSignalStrength evdo;
1005     LteSignalStrength lte;
1006     TdScdmaSignalStrength tdScdma;
1007 };
1008
1009 struct SendSmsResult {
1010     int32_t messageRef;                   // TP-Message-Reference for GSM, and BearerData MessageId
1011                                           // for CDMA (See 3GPP2 C.S0015-B, v2.0, table 4.5-1)
1012     string ackPDU;                        // or empty string if n/a
1013     int32_t errorCode;                    // See 3GPP 27.005, 3.2.5 for GSM/UMTS,
1014                                           // 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
1015                                           // -1 if unknown or not applicable
1016 };
1017
1018 struct SetupDataCallResult {
1019     int32_t status;                       // A RadioDataCallFailCause, 0 which is
1020                                           // RadioDataCallFailCause:NONE if no error
1021     int32_t suggestedRetryTime;           // If status != 0, this fields indicates the suggested
1022                                           // retry back-off timer value RIL wants to override the
1023                                           // one pre-configured in FW.
1024                                           // The unit is miliseconds.
1025                                           // The value < 0 means no value is suggested.
1026                                           // The value 0 means retry must be done ASAP.
1027                                           // The value of INT_MAX(0x7fffffff) means no retry.
1028     int32_t cid;                          // Context ID, uniquely identifies this call
1029     int32_t active;                       // 0=inactive, 1=active/physical link down,
1030                                           // 2=active/physical link up */
1031     string type;                          // One of the PDP_type values in TS 27.007 section 10.1.1.
1032                                           // For example, "IP", "IPV6", "IPV4V6", or "PPP". If
1033                                           // status is
1034                                           // RadioDataCallFailCause:ONLY_SINGLE_BEARER_ALLOWED this
1035                                           // is the type supported such as "IP" or "IPV6"
1036     string ifname;                        // The network interface name
1037     string addresses;                     // A space-delimited list of addresses with optional "/"
1038                                           // prefix length, e.g., "192.0.1.3" or
1039                                           // "192.0.1.11/16 2001:db8::1/64".
1040                                           // Typically 1 IPv4 or 1 IPv6 or
1041                                           // one of each. If the prefix length is absent the
1042                                           // addresses are assumed to be point to point with IPv4
1043                                           // having a prefix length of 32 and IPv6 128.
1044     string dnses;                         // A space-delimited list of DNS server addresses,
1045                                           // e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
1046                                           // Empty if no dns server addresses returned.
1047     string gateways;                      // A space-delimited list of default gateway addresses,
1048                                           // e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
1049                                           // When empty, the addresses represent
1050                                           // point to point connections.
1051     string pcscf;                         // the Proxy Call State Control Function address
1052                                           // via PCO(Protocol Configuration Option) for IMS client.
1053     int32_t mtu;                          // MTU received from network
1054                                           // Value <= 0 means network has either not sent a
1055                                           // value or sent an invalid value
1056 };
1057
1058 struct IccIo {
1059     int32_t command;                      // one of the commands listed for TS 27.007 +CRSM
1060     int32_t fileid;                       // EF id
1061     string path;                          // "pathid" from TS 27.007 +CRSM command.
1062                                           // Path is in hex asciii format eg "7f205f70"
1063                                           // Path must always be provided.
1064     int32_t p1;                           // Values of p1, p2 & p3 defined as per 3GPP TS 51.011
1065     int32_t p2;
1066     int32_t p3;
1067     string data;                          // information to be written to the SIM
1068     string pin2;
1069     string aidPtr;                        // AID value, See ETSI 102.221 8.1 and 101.220 4, empty
1070                                           // string if no value.
1071 };
1072
1073 struct IccIoResult {
1074     int32_t sw1;
1075     int32_t sw2;
1076     string simResponse;                   // In hex string format ([a-fA-F0-9]*), except for
1077                                           // SIM_AUTHENTICATION response for which it is in
1078                                           // Base64 format, see 3GPP TS 31.102 7.1.2
1079 };
1080
1081 struct VoiceRegStateResult {
1082     RegState regState;
1083     int32_t lac;                          // LAC if registered on a GSM/WCDMA system or
1084                                           // -1 if not.Valid LAC are 0x0000 - 0xffff
1085     int32_t cid;                          // CID. if registered on a * GSM/WCDMA or -1 if not
1086                                           // Valid CID are 0x00000000 - 0xffffffff
1087                                           // In GSM, CID is Cell ID (see TS 27.007) in 16 bits
1088                                           // In UMTS, CID is UMTS Cell Identity (see TS 25.331)
1089                                           // in 28 bits
1090     int32_t rat;                          // indicates the available voice radio technology,
1091                                           // valid values as defined by RIL_RadioTechnology.
1092     int32_t baseStationId;                // Base Station ID. if registered on a CDMA
1093                                           // system or -1 if not. Base Station ID in decimal format
1094     int32_t baseStationLatitude;          // Base Station latitude. if registered on a
1095                                           // CDMA system or -1 if not. Base Station latitude is a
1096                                           // decimal number as specified in 3GPP2 C.S0005-A v6.0.
1097                                           // It is represented in units of 0.25 seconds and ranges
1098                                           // from -1296000 to 1296000, both values inclusive
1099                                           // (corresponding to a range of -90 to +90 degrees).
1100     int32_t baseStationLongitude;         // Base Station longitude. if registered on a
1101                                           // CDMA system or -1 if not. Base Station
1102                                           // longitude is a decimal number as specified in
1103                                           // 3GPP2 C.S0005-A v6.0. It is represented in
1104                                           // units of 0.25 seconds and ranges from -2592000
1105                                           // to 2592000, both values inclusive (corresponding
1106                                           // to a range of -180 to +180 degrees).
1107     bool cssSupported;                    // concurrent services support indicator. if
1108                                           // registered on a CDMA system.
1109                                           // false - Concurrent services not supported,
1110                                           // true - Concurrent services supported
1111     int32_t systemId;                     // System ID. if registered on a CDMA system or
1112                                           // -1 if not. Valid System ID are 0 - 32767
1113     int32_t networkId;                    // Network ID. if registered on a CDMA system or
1114                                           // -1 if not. Valid System ID are 0 - 65535
1115     int32_t roamingIndicator;             // TSB-58 Roaming Indicator if registered
1116                                           // on a CDMA or EVDO system or -1 if not.
1117                                           // Valid values are 0-255.
1118     int32_t systemIsInPrl;                // indicates whether the current system is in the
1119                                           // PRL if registered on a CDMA or EVDO system or -1 if
1120                                           // not. 0=not in the PRL, 1=in the PRL
1121     int32_t defaultRoamingIndicator;      // default Roaming Indicator from the PRL,
1122                                           // if registered on a CDMA or EVDO system or -1 if not.
1123                                           // Valid values are 0-255.
1124     int32_t reasonForDenial;              // reasonForDenial if registration state is 3
1125                                           // (Registration denied) this is an enumerated reason why
1126                                           // registration was denied. See 3GPP TS 24.008,
1127                                           // 10.5.3.6 and Annex G.
1128                                           // 0 - General
1129                                           // 1 - Authentication Failure
1130                                           // 2 - IMSI unknown in HLR
1131                                           // 3 - Illegal MS
1132                                           // 4 - Illegal ME
1133                                           // 5 - PLMN not allowed
1134                                           // 6 - Location area not allowed
1135                                           // 7 - Roaming not allowed
1136                                           // 8 - No Suitable Cells in this Location Area
1137                                           // 9 - Network failure
1138                                           // 10 - Persistent location update reject
1139                                           // 11 - PLMN not allowed
1140                                           // 12 - Location area not allowed
1141                                           // 13 - Roaming not allowed in this Location Area
1142                                           // 15 - No Suitable Cells in this Location Area
1143                                           // 17 - Network Failure
1144                                           // 20 - MAC Failure
1145                                           // 21 - Sync Failure
1146                                           // 22 - Congestion
1147                                           // 23 - GSM Authentication unacceptable
1148                                           // 25 - Not Authorized for this CSG
1149                                           // 32 - Service option not supported
1150                                           // 33 - Requested service option not subscribed
1151                                           // 34 - Service option temporarily out of order
1152                                           // 38 - Call cannot be identified
1153                                           // 48-63 - Retry upon entry into a new cell
1154                                           // 95 - Semantically incorrect message
1155                                           // 96 - Invalid mandatory information
1156                                           // 97 - Message type non-existent or not implemented
1157                                           // 98 - Message type not compatible with protocol state
1158                                           // 99 - Information element non-existent or not implemented
1159                                           // 100 - Conditional IE error
1160                                           // 101 - Message not compatible with protocol state
1161                                           // 111 - Protocol error, unspecified
1162     int32_t psc;                          // Primary Scrambling Code of the current
1163                                           // cell as described in TS 25.331, in hexadecimal
1164                                           // format, or -1 if unknown or not registered
1165                                           // to a UMTS network.
1166 };
1167
1168 struct DataRegStateResult {
1169     RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
1170                                           // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
1171                                           // UNKNOWN, REG_ROAMING defined in RegState
1172     int32_t lac;                          // LAC if registered or -1 if not
1173                                           // valid LAC are 0x0000 - 0xffff
1174     int32_t cid;                          // CID if registered or -1 if not
1175                                           // valid CID are 0x00000000 - 0x0fffffff
1176     int32_t rat;                          // indicates the available data radio technology,
1177                                           // valid values as defined by RIL_RadioTechnology.
1178     int32_t reasonDataDenied;             // if registration state is 3 (Registration
1179                                           // denied) this is an enumerated reason why
1180                                           // registration was denied. See 3GPP TS 24.008,
1181                                           // Annex G.6 "Additonal cause codes for GMM".
1182                                           // 7 == GPRS services not allowed
1183                                           // 8 == GPRS services and non-GPRS services not allowed
1184                                           // 9 == MS identity cannot be derived by the network
1185                                           // 10 == Implicitly detached
1186                                           // 14 == GPRS services not allowed in this PLMN
1187                                           // 16 == MSC temporarily not reachable
1188                                           // 40 == No PDP context activated
1189     int32_t maxDataCalls;                 // The maximum number of simultaneous Data Calls that
1190                                           // must be established using setupDataCall().
1191     // The values below are optional LTE location information in decimal.
1192     // If a value is unknown that value must be -1.
1193     int32_t tac;                          // a 16-bit Tracking Area Code.
1194     int32_t phyCid;                       // a 0-503 Physical Cell Identifier.
1195     int32_t eci;                          // a 28-bit E-UTRAN Cell Identifier.
1196     int32_t csgid;                        // a 27-bit Closed Subscriber Group Identity.
1197     int32_t tadv;                         // a 6-bit timing advance value.
1198 };
1199
1200 // See also com.android.internal.telephony.gsm.CallForwardInfo
1201 struct CallForwardInfo {
1202     CallForwardInfoStatus status;         // For queryCallForwardStatus()
1203                                           // status must be ACTIVE, INACTIVE
1204                                           // For setCallForward():
1205                                           // status must be
1206                                           // DISABLE, ENABLE, INTERROGATE, REGISTRATION, ERASURE
1207     int32_t reason;                       // from TS 27.007 7.11 "reason"
1208     int32_t serviceClass;                 // From 27.007 +CCFC/+CLCK "class"
1209                                           // See table for Android mapping from
1210                                           // MMI service code
1211                                           // 0 means user doesnt input class
1212     int32_t toa;                          // "type" from TS 27.007 7.11
1213     string number;                        // "number" from TS 27.007 7.11.
1214     int32_t timeSeconds;
1215 };
1216
1217 // Response struct used in responseQueryAvailableNetworks
1218 struct OperatorInfo {
1219     string alphaLong;                     // long alpha ONS or EONS
1220     string alphaShort;                    // short alpha ONS or EONS
1221     string operatorNumeric;               // 5 or 6 digit numeric code (MCC + MNC)
1222     OperatorStatus status;
1223 };
1224
1225 struct SmsWriteArgs {
1226     SmsWriteArgsStatus status;            // Status of message. See TS 27.005 3.1
1227     string pdu;                           // PDU of message to write, as an ASCII hex string less
1228                                           // the SMSC address, the TP-layer length is strlen(pdu)/2.
1229     string smsc;                          // SMSC address in GSM BCD format prefixed by a length
1230                                           // byte (as expected by TS 27.005) or NULL for default
1231                                           // SMSC
1232 };
1233
1234 struct CdmaSmsAddress {
1235     CdmaSmsDigitMode digitMode;          // CdmaSmsDigitMode is of two types : 4 bit & 8 bit.
1236                                          // For 4-bit type, only "digits" field defined below in
1237                                          // this struct is used.
1238     CdmaSmsNumberMode numberMode;        // Used only when digitMode is 8-bit
1239     CdmaSmsNumberType numberType;        // Used only when digitMode is 8-bit.
1240                                          // To specify an international address, use the following:
1241                                          // digitMode = CdmaSmsDigitMode:EIGHT_BIT:
1242                                          // numberMode = CdmaSmsNumberMode:NOT_DATA_NETWORK
1243                                          // numberType = CdmaSmsNumberType:INTERNATIONAL_OR_DATA_IP
1244                                          // numberPlan = CdmaSmsNumberPlan:TELEPHONY
1245                                          // numberOfDigits = number of digits
1246                                          // digits = ASCII digits, e.g. '1', '2', '3', '4', and '5'
1247     CdmaSmsNumberPlan numberPlan;        // Used only when digitMode is 8-bit
1248     vec<uint8_t> digits;                 // Each byte in this array represents a 4 bit or 8-bit digit
1249                                          // of address data
1250 };
1251
1252 struct CdmaSmsSubaddress {
1253     CdmaSmsSubaddressType subaddressType;
1254     bool odd;                            // true means the last byte's lower 4 bits must be ignored
1255     vec<uint8_t> digits;                 // Each byte respresents an 8-bit digit of subaddress data
1256 };
1257
1258 struct CdmaSmsMessage {
1259     int32_t teleserviceId;
1260     bool isServicePresent;
1261     int32_t serviceCategory;
1262     CdmaSmsAddress address;
1263     CdmaSmsSubaddress subAddress;
1264     vec<uint8_t> bearerData;             // 3GPP2 C.S0015-B, v2.0,
1265 };
1266
1267 struct CdmaSmsAck {
1268     CdmaSmsErrorClass errorClass;
1269     int32_t smsCauseCode;                // As defined in N.S00005, 6.5.2.125.
1270                                          // Currently, only 35 (resource shortage) and
1271                                          // 39 (other terminal problem) are reported.
1272 };
1273
1274 struct CdmaBroadcastSmsConfigInfo {
1275     int32_t serviceCategory;             // serviceCategory defines a Broadcast message identifier
1276                                          // whose value is 0x0000 - 0xFFFF as defined in
1277                                          // C.R1001G 9.3.1 and 9.3.2.
1278     int32_t language;                    // language code of Broadcast Message
1279                                          // whose value is 0x00 - 0x07 as defined in C.R1001G 9.2.
1280     bool selected;                       // selected false means message types specified in
1281                                          // serviceCategory are not accepted, while true means
1282                                          // accepted.
1283 };
1284
1285 struct CdmaSmsWriteArgs {
1286     CdmaSmsWriteArgsStatus status;       // Status of message.  See TS 27.005 3.1
1287     CdmaSmsMessage message;
1288 };
1289
1290
1291 /**
1292  * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1293  *
1294  * fromServiceID - uToServiceID defines a range of CBM message identifiers
1295  * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1296  * and 9.4.4.2.2 for UMTS. All other values must be treated as empty
1297  * CBM message ID.
1298  *
1299  * fromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1300  * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1301  * and 9.4.4.2.3 for UMTS.
1302  * All other values must be treated as empty CBM data coding scheme.
1303  *
1304  * selected false means message types specified in <fromServiceId, toServiceId>
1305  * and <fromCodeScheme, toCodeScheme>are not accepted, while true means accepted.
1306  */
1307 struct GsmBroadcastSmsConfigInfo {
1308     int32_t fromServiceId;
1309     int32_t toServiceId;
1310     int32_t fromCodeScheme;
1311     int32_t toCodeScheme;
1312     bool selected;
1313 };
1314
1315 struct CellIdentityGsm {
1316     string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
1317     string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
1318                                          // unknown
1319     int32_t lac;                         // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
1320     int32_t cid;                         // 16-bit GSM Cell Identity described in
1321                                          // TS 27.007, 0..65535, INT_MAX if unknown
1322     int32_t arfcn;                       // 16-bit GSM Absolute RF channel number, INT_MAX if
1323                                          // unknown
1324     uint8_t bsic;                        // 6-bit Base Station Identity Code, 0xFF if unknown
1325 };
1326
1327 struct CellIdentityWcdma {
1328     string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
1329     string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX
1330                                          // if unknown
1331     int32_t lac;                         // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
1332     int32_t cid;                         // 28-bit UMTS Cell Identity described in
1333                                          // TS 25.331, 0..268435455, INT_MAX if unknown
1334     int32_t psc;                         // 9-bit UMTS Primary Scrambling Code described in
1335                                          // TS 25.331, 0..511, INT_MAX if unknown
1336     int32_t uarfcn;                      // 16-bit UMTS Absolute RF Channel Number, INT_MAX if
1337                                          // unknown
1338 };
1339
1340 struct CellIdentityCdma {
1341     int32_t networkId;                   // Network Id 0..65535, INT_MAX if unknown
1342     int32_t systemId;                    // CDMA System Id 0..32767, INT_MAX if unknown
1343     int32_t basestationId;               // Base Station Id 0..65535, INT_MAX if unknown
1344     int32_t longitude;                   // Longitude is a decimal number as specified in
1345                                          // 3GPP2 C.S0005-A v6.0. It is represented in units of
1346                                          // 0.25 seconds and ranges from -2592000 to 2592000,
1347                                          // both values inclusive (corresponding to a range of -180
1348                                          // to +180 degrees). INT_MAX if unknown
1349     int32_t latitude;                    // Latitude is a decimal number as specified in
1350                                          // 3GPP2 C.S0005-A v6.0. It is represented in units of
1351                                          // 0.25 seconds and ranges from -1296000 to 1296000,
1352                                          // both values inclusive (corresponding to a range of -90
1353                                          // to +90 degrees). INT_MAX if unknown
1354 };
1355
1356 struct CellIdentityLte {
1357     string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
1358     string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
1359                                          // unknown
1360     int32_t ci;                          // 28-bit Cell Identity described in TS TS 27.007, INT_MAX
1361                                          // if unknown
1362     int32_t pci;                         // physical cell id 0..503, INT_MAX if unknown
1363     int32_t tac;                         // 16-bit tracking area code, INT_MAX if unknown
1364     int32_t earfcn;                      // 18-bit LTE Absolute RC Channel Number, INT_MAX if
1365                                          // unknown
1366 };
1367
1368 struct CellIdentityTdscdma {
1369     string mcc;                          // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
1370     string mnc;                          // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
1371                                          // unknown
1372     int32_t lac;                         // 16-bit Location Area Code, 0..65535, INT_MAX if
1373                                          // unknown
1374     int32_t cid;                         // 28-bit UMTS Cell Identity described in
1375                                          // TS 25.331, 0..268435455, INT_MAX if unknown
1376     int32_t cpid;                        // 8-bit Cell Parameters ID described in
1377                                          // TS 25.331, 0..127, INT_MAX if unknown
1378 };
1379
1380 struct CellInfoGsm {
1381     CellIdentityGsm cellIdentityGsm;
1382     GsmSignalStrength signalStrengthGsm;
1383 };
1384
1385 struct CellInfoWcdma {
1386     CellIdentityWcdma cellIdentityWcdma;
1387     WcdmaSignalStrength signalStrengthWcdma;
1388 };
1389
1390 struct CellInfoCdma {
1391     CellIdentityCdma cellIdentityCdma;
1392     CdmaSignalStrength signalStrengthCdma;
1393     EvdoSignalStrength signalStrengthEvdo;
1394 };
1395
1396 struct CellInfoLte {
1397     CellIdentityLte cellIdentityLte;
1398     LteSignalStrength signalStrengthLte;
1399 };
1400
1401 struct CellInfoTdscdma {
1402     CellIdentityTdscdma cellIdentityTdscdma;
1403     TdScdmaSignalStrength signalStrengthTdscdma;
1404 };
1405
1406 struct CellInfo {
1407     CellInfoType cellInfoType;           // cell type for selecting from union CellInfo
1408     bool registered;                     // true if this cell is registered false if not registered
1409     TimeStampType timeStampType;         // type of time stamp represented by timeStamp
1410     uint64_t timeStamp;                  // Time in nanos as returned by ril_nano_time
1411     // Only 1 of the below vectors must be of size 1 based on the CellInfoType & others must be
1412     // of size 0
1413     vec<CellInfoGsm> gsm;                // Valid only if type = gsm and size = 1 else must be empty
1414     vec<CellInfoCdma> cdma;              // Valid only if type = cdma and size = 1 else must be
1415                                          // empty
1416     vec<CellInfoLte> lte;                // Valid only if type = lte and size = 1 else must be
1417                                          // empty
1418     vec<CellInfoWcdma> wcdma;            // Valid only if type = wcdma and size = 1 else must be
1419                                          // empty
1420     vec<CellInfoTdscdma> tdscdma;        // Valid only if type = tdscdma and size = 1 else must be
1421                                          // empty
1422 };
1423
1424 struct GsmSmsMessage {
1425     string smscPdu;                      // SMSC address in GSM BCD format prefixed by a length
1426                                          // byte (as expected by TS 27.005) or empty string for
1427                                          // default SMSC
1428     string pdu;                          // SMS in PDU format as an ASCII hex string less the
1429                                          // SMSC address. TP-Layer-Length is be "strlen(pdu)/2
1430 };
1431
1432 struct ImsSmsMessage {
1433     RadioTechnologyFamily tech;
1434     bool retry;                          // false == not retry, true == retry */
1435     int32_t messageRef;                  // Valid field if retry is set to true.
1436                                          // Contains messageRef from SendSmsResult stuct
1437                                          // corresponding to failed MO SMS.
1438     // Only 1 of the below vectors must be of size 1 based on the RadioTechnologyFamily & others
1439     // must be of size 0
1440     vec<CdmaSmsMessage> cdmaMessage;     // Valid field if tech is 3GPP2 and size = 1 else must be
1441                                          // empty
1442     vec<GsmSmsMessage> gsmMessage;       // Valid field if tech is 3GPP and size = 1 else must be
1443                                          // empty
1444 };
1445
1446 struct SimApdu {
1447     int32_t sessionid;                   // "sessionid" from TS 27.007 +CGLA command. Must be
1448                                          // ignored for +CSIM command.
1449     // Following fields are used to derive the APDU ("command" and "length"
1450     // values in TS 27.007 +CSIM and +CGLA commands).
1451     int32_t cla;
1452     int32_t instruction;
1453     int32_t p1;
1454     int32_t p2;
1455     int32_t p3;                          // A negative P3 implies a 4 byte APDU.
1456     string data;                         // In hex string format ([a-fA-F0-9]*).
1457 };
1458
1459 struct NvWriteItem {
1460     NvItem itemID;
1461     string value;
1462 };
1463
1464 struct SelectUiccSub {
1465     int32_t slot;
1466     int32_t appIndex;                   // array subscriptor from
1467                                         // applications[RadioConst:CARD_MAX_APPS] in
1468                                         // getIccCardStatus()
1469     SubscriptionType subType;
1470     UiccSubActStatus actStatus;
1471 };
1472
1473 struct HardwareConfigModem {
1474     int32_t rilModel;
1475     uint32_t rat;                       // bitset - ref. RadioTechnology.
1476     int32_t maxVoice;
1477     int32_t maxData;
1478     int32_t maxStandby;
1479 };
1480
1481 struct HardwareConfigSim {
1482     string modemUuid;                   // RadioConst:MAX_UUID_LENGTH is max length of the
1483                                         // string
1484 };
1485
1486 struct HardwareConfig {
1487     HardwareConfigType type;
1488     string uuid;                         // RadioConst:MAX_UUID_LENGTH is max length of the
1489                                          // string
1490     HardwareConfigState state;
1491     // Only 1 of the below vectors must have size = 1 based on the HardwareConfigType and other
1492     // must have size = 0.
1493     vec<HardwareConfigModem> modem;      // Valid only if type is Modem and size = 1 else must be
1494                                          // empty
1495     vec<HardwareConfigSim> sim;          // Valid only if type is SIM or else emptyand size = 1
1496                                          // else must be empty
1497 };
1498
1499 struct DataProfileInfo {
1500     int32_t profileId;                   // id of the data profile
1501     string apn;                          // The APN to connect to
1502     string protocol;                     // One of the PDP_type values in TS 27.007 section 10.1.1.
1503                                          // For example, "IP", "IPV6", "IPV4V6", or "PPP".
1504     ApnAuthType authType;
1505     string user;                         // The username for APN, or empty string
1506     string password;                     // The password for APN, or empty string
1507     DataProfileInfoType type;
1508     int32_t maxConnsTime;                // The period in seconds to limit the maximum connections
1509     int32_t maxConns;                    // The maximum connections during maxConnsTime
1510     int32_t waitTime;                    // The required wait time in seconds after a successful UE
1511                                          // initiated disconnect of a given PDN connection before
1512                                          // the device can send a new PDN connection request for
1513                                          // that given PDN
1514     bool enabled;                        // True to enable the profile, false to disable
1515 };
1516
1517 enum RadioCapabilityPhase : int32_t {
1518     CONFIGURED = 0,                      // LM is configured is initial value and value after
1519                                          // FINISH completes
1520     START      = 1,                      // START is sent before Apply and indicates that an
1521                                          // APPLY will be
1522                                          // forthcoming with these same parameters
1523     APPLY      = 2,                      // APPLY is sent after all LM's receive START and returned
1524                                          // RadioCapability.status = 0, if any START's fail no
1525                                          // APPLY will be sent
1526     UNSOL_RSP  = 3,                      // UNSOL_RSP is sent with unsol radioCapability()
1527     FINISH     = 4                       // FINISH is sent after all commands have completed. If an
1528                                          // error occurs in any previous command the
1529                                          // RadioAccessesFamily and logicalModemUuid fields will be
1530                                          // the prior configuration thus restoring the configuration
1531                                          // to the previous value. An error returned by this command
1532                                          // will generally be ignored or may cause that logical
1533                                          // modem to be removed from service.
1534 };
1535
1536 enum RadioCapabilityStatus : int32_t {
1537     NONE       = 0,           // This parameter has no meaning with RC_PHASE_START,
1538                               // RadioCapabilityPhase:APPLY
1539     SUCCESS    = 1,           // Tell modem the action transaction of set radio
1540                               // capability was success with RadioCapabilityPhase:FINISH
1541     FAIL       = 2,           // Tell modem the action transaction of set radio
1542                               // capability is fail with RadioCapabilityPhase:FINISH.
1543 };
1544
1545 enum RadioAccessFamily : int32_t {
1546     UNKNOWN =  (1 <<  RadioTechnology:UNKNOWN),
1547     GPRS = (1 << RadioTechnology:GPRS),
1548     EDGE = (1 << RadioTechnology:EDGE),
1549     UMTS = (1 << RadioTechnology:UMTS),
1550     IS95A = (1 << RadioTechnology:IS95A),
1551     IS95B = (1 << RadioTechnology:IS95B),
1552     ONE_X_RTT = (1 << RadioTechnology:ONE_X_RTT),
1553     EVDO_0 = (1 << RadioTechnology:EVDO_0),
1554     EVDO_A = (1 << RadioTechnology:EVDO_A),
1555     HSDPA = (1 << RadioTechnology:HSDPA),
1556     HSUPA = (1 << RadioTechnology:HSUPA),
1557     HSPA = (1 << RadioTechnology:HSPA),
1558     EVDO_B = (1 << RadioTechnology:EVDO_B),
1559     EHRPD = (1 << RadioTechnology:EHRPD),
1560     LTE = (1 << RadioTechnology:LTE),
1561     HSPAP = (1 << RadioTechnology:HSPAP),
1562     GSM = (1 << RadioTechnology:GSM),
1563     TD_SCDMA = (1 << RadioTechnology:TD_SCDMA),
1564     LTE_CA = (1 << RadioTechnology:LTE_CA)
1565 };
1566
1567 struct RadioCapability {
1568     int32_t session;                     // Unique session value defined by framework returned in
1569                                          // all "responses/unsol"
1570     RadioCapabilityPhase phase;
1571     RadioAccessFamily raf;
1572     string logicalModemUuid;             // A UUID typically "com.xxxx.lmX where X is the logical
1573                                          // modem. RadioConst:MAX_UUID_LENGTH is the max
1574                                          // length
1575     RadioCapabilityStatus status;
1576 };
1577
1578 struct LceStatusInfo {
1579     LceStatus lceStatus;
1580     uint8_t actualIntervalMs;            // actual LCE reporting interval,
1581                                          // meaningful only if LceStatus = ACTIVE.
1582 };
1583
1584 struct LceDataInfo {
1585     uint32_t lastHopCapacityKbps;          // last-hop cellular capacity: kilobits/second.
1586     uint8_t confidenceLevel;               // capacity estimate confidence: 0-100
1587     bool lceSuspended;                     // LCE report going to be suspended? (e.g., radio
1588                                            // moves to inactive state or network type change)
1589                                            // true = suspended;
1590                                            // false = not suspended.
1591 };
1592
1593 struct ActivityStatsInfo {
1594     uint32_t sleepModeTimeMs;              // total time (in ms) when modem is in a low power or
1595                                            // sleep state
1596     uint32_t idleModeTimeMs;               // total time (in ms) when modem is awake but neither
1597                                            // the transmitter nor receiver are active/awake
1598     uint32_t[RadioConst:NUM_TX_POWER_LEVELS] txmModetimeMs;
1599                                            // Each index represent total time (in ms) during which
1600                                            // the transmitter is active/awake for a particular
1601                                            // power range as shown below.
1602                                            // index 0 = tx_power < 0dBm
1603                                            // index 1 = 0dBm < tx_power < 5dBm
1604                                            // index 2 = 5dBm < tx_power < 15dBm
1605                                            // index 3 = 15dBm < tx_power < 20dBm
1606                                            // index 4 = tx_power > 20dBm
1607     uint32_t rxModeTimeMs;                 // total time (in ms) for which receiver is
1608                                            // active/awake and the transmitter is inactive
1609 };
1610
1611 struct Carrier {
1612     string mcc;
1613     string mnc;
1614     CarrierMatchType matchType;            // Specify match type for the carrier.
1615                                            // If it’s ALL, matchData is empty string;
1616                                            // otherwise, matchData is the value for the match type.
1617     string matchData;
1618 };
1619
1620 struct CarrierRestrictions {
1621     vec<Carrier> allowedCarriers;          // whitelist for allowed carriers
1622     vec<Carrier> excludedCarriers;         // blacklist for explicitly excluded carriers
1623                                            // which match allowed_carriers. Eg. allowedCarriers
1624                                            // match mcc/mnc, excludedCarriers has same mcc/mnc and
1625                                            // gid1 is ABCD. It means except the carrier whose gid1
1626                                            // is ABCD, all carriers with the same mcc/mnc are
1627                                            // allowed.
1628 };