OSDN Git Service

Add OEM specific error code space which can by used to replace Generic errors.
[android-x86/hardware-ril.git] / include / telephony / ril.h
1 /*
2  * Copyright (C) 2006 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 #ifndef ANDROID_RIL_H
18 #define ANDROID_RIL_H 1
19
20 #include <stdlib.h>
21 #include <stdint.h>
22 #include <telephony/ril_cdma_sms.h>
23 #include <telephony/ril_nv_items.h>
24 #include <telephony/ril_msim.h>
25
26 #ifndef FEATURE_UNIT_TEST
27 #include <sys/time.h>
28 #endif /* !FEATURE_UNIT_TEST */
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34
35 #if defined(ANDROID_SIM_COUNT_2)
36 #define SIM_COUNT 2
37 #elif defined(ANDROID_SIM_COUNT_3)
38 #define SIM_COUNT 3
39 #elif defined(ANDROID_SIM_COUNT_4)
40 #define SIM_COUNT 4
41 #else
42 #define SIM_COUNT 1
43 #endif
44
45 #ifndef ANDROID_MULTI_SIM
46 #define SIM_COUNT 1
47 #endif
48
49 /*
50  * RIL version.
51  * Value of RIL_VERSION should not be changed in future. Here onwards,
52  * when a new change is supposed to be introduced  which could involve new
53  * schemes added like Wakelocks, data structures added/updated, etc, we would
54  * just document RIL version associated with that change below. When OEM updates its
55  * RIL with those changes, they would return that new RIL version during RIL_REGISTER.
56  * We should make use of the returned version by vendor to identify appropriate scheme
57  * or data structure version to use.
58  *
59  * Documentation of RIL version and associated changes
60  * RIL_VERSION = 12 : This version corresponds to updated data structures namely
61  *                    RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
62  *                    RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
63  *                    RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12
64  *                    RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12,
65  *                    RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
66  *
67  * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
68  *                    strongly versioned version it enforces structure use.
69  */
70 #define RIL_VERSION 12
71 #define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
72 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
73
74 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
75 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
76
77 #define MAX_RILDS 3
78 #define MAX_SOCKET_NAME_LENGTH 6
79 #define MAX_CLIENT_ID_LENGTH 2
80 #define MAX_DEBUG_SOCKET_NAME_LENGTH 12
81 #define MAX_QEMU_PIPE_NAME_LENGTH  11
82 #define MAX_UUID_LENGTH 64
83
84
85 typedef void * RIL_Token;
86
87 typedef enum {
88     RIL_SOCKET_1,
89 #if (SIM_COUNT >= 2)
90     RIL_SOCKET_2,
91 #if (SIM_COUNT >= 3)
92     RIL_SOCKET_3,
93 #endif
94 #if (SIM_COUNT >= 4)
95     RIL_SOCKET_4,
96 #endif
97 #endif
98     RIL_SOCKET_NUM
99 } RIL_SOCKET_ID;
100
101
102 typedef enum {
103     RIL_E_SUCCESS = 0,
104     RIL_E_RADIO_NOT_AVAILABLE = 1,     /* If radio did not start or is resetting */
105     RIL_E_GENERIC_FAILURE = 2,
106     RIL_E_PASSWORD_INCORRECT = 3,      /* for PIN/PIN2 methods only! */
107     RIL_E_SIM_PIN2 = 4,                /* Operation requires SIM PIN2 to be entered */
108     RIL_E_SIM_PUK2 = 5,                /* Operation requires SIM PIN2 to be entered */
109     RIL_E_REQUEST_NOT_SUPPORTED = 6,
110     RIL_E_CANCELLED = 7,
111     RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
112                                                    call on a Class C GPRS device */
113     RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9,  /* data ops are not allowed before device
114                                                    registers in network */
115     RIL_E_SMS_SEND_FAIL_RETRY = 10,             /* fail to send sms and need retry */
116     RIL_E_SIM_ABSENT = 11,                      /* fail to set the location where CDMA subscription
117                                                    shall be retrieved because of SIM or RUIM
118                                                    card absent */
119     RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12,      /* fail to find CDMA subscription from specified
120                                                    location */
121     RIL_E_MODE_NOT_SUPPORTED = 13,              /* HW does not support preferred network type */
122     RIL_E_FDN_CHECK_FAILURE = 14,               /* command failed because recipient is not on FDN list */
123     RIL_E_ILLEGAL_SIM_OR_ME = 15,               /* network selection failed due to
124                                                    illegal SIM or ME */
125     RIL_E_MISSING_RESOURCE = 16,                /* no logical channel available */
126     RIL_E_NO_SUCH_ELEMENT = 17,                  /* application not found on SIM */
127     RIL_E_DIAL_MODIFIED_TO_USSD = 18,           /* DIAL request modified to USSD */
128     RIL_E_DIAL_MODIFIED_TO_SS = 19,             /* DIAL request modified to SS */
129     RIL_E_DIAL_MODIFIED_TO_DIAL = 20,           /* DIAL request modified to DIAL with different
130                                                    data */
131     RIL_E_USSD_MODIFIED_TO_DIAL = 21,           /* USSD request modified to DIAL */
132     RIL_E_USSD_MODIFIED_TO_SS = 22,             /* USSD request modified to SS */
133     RIL_E_USSD_MODIFIED_TO_USSD = 23,           /* USSD request modified to different USSD
134                                                    request */
135     RIL_E_SS_MODIFIED_TO_DIAL = 24,             /* SS request modified to DIAL */
136     RIL_E_SS_MODIFIED_TO_USSD = 25,             /* SS request modified to USSD */
137     RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26,      /* Subscription not supported by RIL */
138     RIL_E_SS_MODIFIED_TO_SS = 27,               /* SS request modified to different SS request */
139     RIL_E_LCE_NOT_SUPPORTED = 36,               /* LCE service not supported(36 in RILConstants.java) */
140     RIL_E_NO_MEMORY = 37,                       /* Not sufficient memory to process the request */
141     RIL_E_INTERNAL_ERR = 38,                    /* Hit unexpected vendor internal error scenario */
142     RIL_E_SYSTEM_ERR = 39,                      /* Hit platform or system error */
143     RIL_E_MODEM_ERR = 40,                       /* Hit unexpected modem error */
144     RIL_E_INVALID_STATE = 41,                   /* Can not process the request as vendor RIL is in
145                                                    invalid state. */
146     RIL_E_NO_RESOURCES = 42,                    /* Not sufficient resource to process the request */
147     RIL_E_SIM_ERR = 43,                         /* Received error from SIM card */
148     RIL_E_INVALID_ARGUMENTS = 44,               /* Received invalid arguments in request */
149     RIL_E_INVALID_SIM_STATE = 45,               /* Can not process the request in current SIM state */
150     RIL_E_INVALID_MODEM_STATE = 46,             /* Can not process the request in current Modem state */
151     RIL_E_INVALID_CALL_ID = 47,                 /* Received invalid call id in request */
152     RIL_E_NO_SMS_TO_ACK = 48,                   /* ACK received when there is no SMS to ack */
153     RIL_E_NETWORK_ERR = 49,                     /* Received error from network */
154     RIL_E_REQUEST_RATE_LIMITED = 50,            /* Operation denied due to overly-frequent requests */
155     // OEM specific error codes. To be used by OEM when they don't want to reveal
156     // specific error codes which would be replaced by Generic failure.
157     RIL_E_OEM_ERROR_1 = 501,
158     RIL_E_OEM_ERROR_2 = 502,
159     RIL_E_OEM_ERROR_3 = 503,
160     RIL_E_OEM_ERROR_4 = 504,
161     RIL_E_OEM_ERROR_5 = 505,
162     RIL_E_OEM_ERROR_6 = 506,
163     RIL_E_OEM_ERROR_7 = 507,
164     RIL_E_OEM_ERROR_8 = 508,
165     RIL_E_OEM_ERROR_9 = 509,
166     RIL_E_OEM_ERROR_10 = 510,
167     RIL_E_OEM_ERROR_11 = 511,
168     RIL_E_OEM_ERROR_12 = 512,
169     RIL_E_OEM_ERROR_13 = 513,
170     RIL_E_OEM_ERROR_14 = 514,
171     RIL_E_OEM_ERROR_15 = 515,
172     RIL_E_OEM_ERROR_16 = 516,
173     RIL_E_OEM_ERROR_17 = 517,
174     RIL_E_OEM_ERROR_18 = 518,
175     RIL_E_OEM_ERROR_19 = 519,
176     RIL_E_OEM_ERROR_20 = 520,
177     RIL_E_OEM_ERROR_21 = 521,
178     RIL_E_OEM_ERROR_22 = 522,
179     RIL_E_OEM_ERROR_23 = 523,
180     RIL_E_OEM_ERROR_24 = 524,
181     RIL_E_OEM_ERROR_25 = 525
182 } RIL_Errno;
183
184 typedef enum {
185     RIL_CALL_ACTIVE = 0,
186     RIL_CALL_HOLDING = 1,
187     RIL_CALL_DIALING = 2,    /* MO call only */
188     RIL_CALL_ALERTING = 3,   /* MO call only */
189     RIL_CALL_INCOMING = 4,   /* MT call only */
190     RIL_CALL_WAITING = 5     /* MT call only */
191 } RIL_CallState;
192
193 typedef enum {
194     RADIO_STATE_OFF = 0,                   /* Radio explictly powered off (eg CFUN=0) */
195     RADIO_STATE_UNAVAILABLE = 1,           /* Radio unavailable (eg, resetting or not booted) */
196     /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
197     RADIO_STATE_SIM_NOT_READY = 2,         /* Radio is on, but the SIM interface is not ready */
198     RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3,  /* SIM PIN locked, PUK required, network
199                                               personalization locked, or SIM absent */
200     RADIO_STATE_SIM_READY = 4,             /* Radio is on and SIM interface is available */
201     RADIO_STATE_RUIM_NOT_READY = 5,        /* Radio is on, but the RUIM interface is not ready */
202     RADIO_STATE_RUIM_READY = 6,            /* Radio is on and the RUIM interface is available */
203     RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
204                                               personalization locked, or RUIM absent */
205     RADIO_STATE_NV_NOT_READY = 8,          /* Radio is on, but the NV interface is not available */
206     RADIO_STATE_NV_READY = 9,              /* Radio is on and the NV interface is available */
207     RADIO_STATE_ON = 10                    /* Radio is on */
208 } RIL_RadioState;
209
210 typedef enum {
211     RADIO_TECH_UNKNOWN = 0,
212     RADIO_TECH_GPRS = 1,
213     RADIO_TECH_EDGE = 2,
214     RADIO_TECH_UMTS = 3,
215     RADIO_TECH_IS95A = 4,
216     RADIO_TECH_IS95B = 5,
217     RADIO_TECH_1xRTT =  6,
218     RADIO_TECH_EVDO_0 = 7,
219     RADIO_TECH_EVDO_A = 8,
220     RADIO_TECH_HSDPA = 9,
221     RADIO_TECH_HSUPA = 10,
222     RADIO_TECH_HSPA = 11,
223     RADIO_TECH_EVDO_B = 12,
224     RADIO_TECH_EHRPD = 13,
225     RADIO_TECH_LTE = 14,
226     RADIO_TECH_HSPAP = 15, // HSPA+
227     RADIO_TECH_GSM = 16, // Only supports voice
228     RADIO_TECH_TD_SCDMA = 17,
229     RADIO_TECH_IWLAN = 18
230 } RIL_RadioTechnology;
231
232 typedef enum {
233     RAF_UNKNOWN =  (1 <<  RADIO_TECH_UNKNOWN),
234     RAF_GPRS = (1 << RADIO_TECH_GPRS),
235     RAF_EDGE = (1 << RADIO_TECH_EDGE),
236     RAF_UMTS = (1 << RADIO_TECH_UMTS),
237     RAF_IS95A = (1 << RADIO_TECH_IS95A),
238     RAF_IS95B = (1 << RADIO_TECH_IS95B),
239     RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
240     RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
241     RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
242     RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
243     RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
244     RAF_HSPA = (1 << RADIO_TECH_HSPA),
245     RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
246     RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
247     RAF_LTE = (1 << RADIO_TECH_LTE),
248     RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
249     RAF_GSM = (1 << RADIO_TECH_GSM),
250     RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
251 } RIL_RadioAccessFamily;
252
253 typedef enum {
254     RC_PHASE_CONFIGURED = 0,  // LM is configured is initial value and value after FINISH completes
255     RC_PHASE_START      = 1,  // START is sent before Apply and indicates that an APPLY will be
256                               // forthcoming with these same parameters
257     RC_PHASE_APPLY      = 2,  // APPLY is sent after all LM's receive START and returned
258                               // RIL_RadioCapability.status = 0, if any START's fail no
259                               // APPLY will be sent
260     RC_PHASE_UNSOL_RSP  = 3,  // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
261     RC_PHASE_FINISH     = 4   // FINISH is sent after all commands have completed. If an error
262                               // occurs in any previous command the RIL_RadioAccessesFamily and
263                               // logicalModemUuid fields will be the prior configuration thus
264                               // restoring the configuration to the previous value. An error
265                               // returned by this command will generally be ignored or may
266                               // cause that logical modem to be removed from service.
267 } RadioCapabilityPhase;
268
269 typedef enum {
270     RC_STATUS_NONE       = 0, // This parameter has no meaning with RC_PHASE_START,
271                               // RC_PHASE_APPLY
272     RC_STATUS_SUCCESS    = 1, // Tell modem the action transaction of set radio
273                               // capability was success with RC_PHASE_FINISH
274     RC_STATUS_FAIL       = 2, // Tell modem the action transaction of set radio
275                               // capability is fail with RC_PHASE_FINISH.
276 } RadioCapabilityStatus;
277
278 #define RIL_RADIO_CAPABILITY_VERSION 1
279 typedef struct {
280     int version;            // Version of structure, RIL_RADIO_CAPABILITY_VERSION
281     int session;            // Unique session value defined by framework returned in all "responses/unsol"
282     int phase;              // CONFIGURED, START, APPLY, FINISH
283     int rat;                // RIL_RadioAccessFamily for the radio
284     char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
285     int status;             // Return status and an input parameter for RC_PHASE_FINISH
286 } RIL_RadioCapability;
287
288 // Do we want to split Data from Voice and the use
289 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
290 typedef enum {
291     PREF_NET_TYPE_GSM_WCDMA                = 0, /* GSM/WCDMA (WCDMA preferred) */
292     PREF_NET_TYPE_GSM_ONLY                 = 1, /* GSM only */
293     PREF_NET_TYPE_WCDMA                    = 2, /* WCDMA  */
294     PREF_NET_TYPE_GSM_WCDMA_AUTO           = 3, /* GSM/WCDMA (auto mode, according to PRL) */
295     PREF_NET_TYPE_CDMA_EVDO_AUTO           = 4, /* CDMA and EvDo (auto mode, according to PRL) */
296     PREF_NET_TYPE_CDMA_ONLY                = 5, /* CDMA only */
297     PREF_NET_TYPE_EVDO_ONLY                = 6, /* EvDo only */
298     PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
299     PREF_NET_TYPE_LTE_CDMA_EVDO            = 8, /* LTE, CDMA and EvDo */
300     PREF_NET_TYPE_LTE_GSM_WCDMA            = 9, /* LTE, GSM/WCDMA */
301     PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA  = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
302     PREF_NET_TYPE_LTE_ONLY                 = 11, /* LTE only */
303     PREF_NET_TYPE_LTE_WCDMA                = 12  /* LTE/WCDMA */
304 } RIL_PreferredNetworkType;
305
306 /* Source for cdma subscription */
307 typedef enum {
308    CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
309    CDMA_SUBSCRIPTION_SOURCE_NV = 1
310 } RIL_CdmaSubscriptionSource;
311
312 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
313 typedef enum {
314     RIL_UUS_TYPE1_IMPLICIT = 0,
315     RIL_UUS_TYPE1_REQUIRED = 1,
316     RIL_UUS_TYPE1_NOT_REQUIRED = 2,
317     RIL_UUS_TYPE2_REQUIRED = 3,
318     RIL_UUS_TYPE2_NOT_REQUIRED = 4,
319     RIL_UUS_TYPE3_REQUIRED = 5,
320     RIL_UUS_TYPE3_NOT_REQUIRED = 6
321 } RIL_UUS_Type;
322
323 /* User-to-User Signaling Information data coding schemes. Possible values for
324  * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
325  * specified in section 10.5.4.25 of 3GPP TS 24.008 */
326 typedef enum {
327     RIL_UUS_DCS_USP = 0,          /* User specified protocol */
328     RIL_UUS_DCS_OSIHLP = 1,       /* OSI higher layer protocol */
329     RIL_UUS_DCS_X244 = 2,         /* X.244 */
330     RIL_UUS_DCS_RMCF = 3,         /* Reserved for system mangement
331                                      convergence function */
332     RIL_UUS_DCS_IA5c = 4          /* IA5 characters */
333 } RIL_UUS_DCS;
334
335 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
336  * This data is passed in RIL_ExtensionRecord and rec contains this
337  * structure when type is RIL_UUS_INFO_EXT_REC */
338 typedef struct {
339   RIL_UUS_Type    uusType;    /* UUS Type */
340   RIL_UUS_DCS     uusDcs;     /* UUS Data Coding Scheme */
341   int             uusLength;  /* Length of UUS Data */
342   char *          uusData;    /* UUS Data */
343 } RIL_UUS_Info;
344
345 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
346 typedef struct {
347   char isPresent;    /* non-zero if signal information record is present */
348   char signalType;   /* as defined 3.7.5.5-1 */
349   char alertPitch;   /* as defined 3.7.5.5-2 */
350   char signal;       /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
351 } RIL_CDMA_SignalInfoRecord;
352
353 typedef struct {
354     RIL_CallState   state;
355     int             index;      /* Connection Index for use with, eg, AT+CHLD */
356     int             toa;        /* type of address, eg 145 = intl */
357     char            isMpty;     /* nonzero if is mpty call */
358     char            isMT;       /* nonzero if call is mobile terminated */
359     char            als;        /* ALS line indicator if available
360                                    (0 = line 1) */
361     char            isVoice;    /* nonzero if this is is a voice call */
362     char            isVoicePrivacy;     /* nonzero if CDMA voice privacy mode is active */
363     char *          number;     /* Remote party number */
364     int             numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
365     char *          name;       /* Remote party name */
366     int             namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
367     RIL_UUS_Info *  uusInfo;    /* NULL or Pointer to User-User Signaling Information */
368 } RIL_Call;
369
370 /* Deprecated, use RIL_Data_Call_Response_v6 */
371 typedef struct {
372     int             cid;        /* Context ID, uniquely identifies this call */
373     int             active;     /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
374     char *          type;       /* One of the PDP_type values in TS 27.007 section 10.1.1.
375                                    For example, "IP", "IPV6", "IPV4V6", or "PPP". */
376     char *          apn;        /* ignored */
377     char *          address;    /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
378 } RIL_Data_Call_Response_v4;
379
380 /*
381  * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
382  * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
383  */
384 typedef struct {
385     int             status;     /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
386     int             suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
387                                            back-off timer value RIL wants to override the one
388                                            pre-configured in FW.
389                                            The unit is miliseconds.
390                                            The value < 0 means no value is suggested.
391                                            The value 0 means retry should be done ASAP.
392                                            The value of INT_MAX(0x7fffffff) means no retry. */
393     int             cid;        /* Context ID, uniquely identifies this call */
394     int             active;     /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
395     char *          type;       /* One of the PDP_type values in TS 27.007 section 10.1.1.
396                                    For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
397                                    PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
398                                    such as "IP" or "IPV6" */
399     char *          ifname;     /* The network interface name */
400     char *          addresses;  /* A space-delimited list of addresses with optional "/" prefix length,
401                                    e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
402                                    May not be empty, typically 1 IPv4 or 1 IPv6 or
403                                    one of each. If the prefix length is absent the addresses
404                                    are assumed to be point to point with IPv4 having a prefix
405                                    length of 32 and IPv6 128. */
406     char *          dnses;      /* A space-delimited list of DNS server addresses,
407                                    e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
408                                    May be empty. */
409     char *          gateways;   /* A space-delimited list of default gateway addresses,
410                                    e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
411                                    May be empty in which case the addresses represent point
412                                    to point connections. */
413 } RIL_Data_Call_Response_v6;
414
415 typedef struct {
416     int             status;     /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
417     int             suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
418                                            back-off timer value RIL wants to override the one
419                                            pre-configured in FW.
420                                            The unit is miliseconds.
421                                            The value < 0 means no value is suggested.
422                                            The value 0 means retry should be done ASAP.
423                                            The value of INT_MAX(0x7fffffff) means no retry. */
424     int             cid;        /* Context ID, uniquely identifies this call */
425     int             active;     /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
426     char *          type;       /* One of the PDP_type values in TS 27.007 section 10.1.1.
427                                    For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
428                                    PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
429                                    such as "IP" or "IPV6" */
430     char *          ifname;     /* The network interface name */
431     char *          addresses;  /* A space-delimited list of addresses with optional "/" prefix length,
432                                    e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
433                                    May not be empty, typically 1 IPv4 or 1 IPv6 or
434                                    one of each. If the prefix length is absent the addresses
435                                    are assumed to be point to point with IPv4 having a prefix
436                                    length of 32 and IPv6 128. */
437     char *          dnses;      /* A space-delimited list of DNS server addresses,
438                                    e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
439                                    May be empty. */
440     char *          gateways;   /* A space-delimited list of default gateway addresses,
441                                    e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
442                                    May be empty in which case the addresses represent point
443                                    to point connections. */
444     char *          pcscf;    /* the Proxy Call State Control Function address
445                                  via PCO(Protocol Configuration Option) for IMS client. */
446 } RIL_Data_Call_Response_v9;
447
448 typedef struct {
449     int             status;     /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
450     int             suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
451                                            back-off timer value RIL wants to override the one
452                                            pre-configured in FW.
453                                            The unit is miliseconds.
454                                            The value < 0 means no value is suggested.
455                                            The value 0 means retry should be done ASAP.
456                                            The value of INT_MAX(0x7fffffff) means no retry. */
457     int             cid;        /* Context ID, uniquely identifies this call */
458     int             active;     /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
459     char *          type;       /* One of the PDP_type values in TS 27.007 section 10.1.1.
460                                    For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
461                                    PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
462                                    such as "IP" or "IPV6" */
463     char *          ifname;     /* The network interface name */
464     char *          addresses;  /* A space-delimited list of addresses with optional "/" prefix length,
465                                    e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
466                                    May not be empty, typically 1 IPv4 or 1 IPv6 or
467                                    one of each. If the prefix length is absent the addresses
468                                    are assumed to be point to point with IPv4 having a prefix
469                                    length of 32 and IPv6 128. */
470     char *          dnses;      /* A space-delimited list of DNS server addresses,
471                                    e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
472                                    May be empty. */
473     char *          gateways;   /* A space-delimited list of default gateway addresses,
474                                    e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
475                                    May be empty in which case the addresses represent point
476                                    to point connections. */
477     char *          pcscf;    /* the Proxy Call State Control Function address
478                                  via PCO(Protocol Configuration Option) for IMS client. */
479     int             mtu;        /* MTU received from network
480                                    Value <= 0 means network has either not sent a value or
481                                    sent an invalid value */
482 } RIL_Data_Call_Response_v11;
483
484 typedef enum {
485     RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
486     RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
487 } RIL_RadioTechnologyFamily;
488
489 typedef struct {
490     RIL_RadioTechnologyFamily tech;
491     unsigned char             retry;       /* 0 == not retry, nonzero == retry */
492     int                       messageRef;  /* Valid field if retry is set to nonzero.
493                                               Contains messageRef from RIL_SMS_Response
494                                               corresponding to failed MO SMS.
495                                             */
496
497     union {
498         /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
499         RIL_CDMA_SMS_Message* cdmaMessage;
500
501         /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
502         char**                gsmMessage;
503     } message;
504 } RIL_IMS_SMS_Message;
505
506 typedef struct {
507     int messageRef;   /* TP-Message-Reference for GSM,
508                          and BearerData MessageId for CDMA
509                          (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
510     char *ackPDU;     /* or NULL if n/a */
511     int errorCode;    /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
512                          3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
513                          -1 if unknown or not applicable*/
514 } RIL_SMS_Response;
515
516 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
517 typedef struct {
518     int status;     /* Status of message.  See TS 27.005 3.1, "<stat>": */
519                     /*      0 = "REC UNREAD"    */
520                     /*      1 = "REC READ"      */
521                     /*      2 = "STO UNSENT"    */
522                     /*      3 = "STO SENT"      */
523     char * pdu;     /* PDU of message to write, as an ASCII hex string less the SMSC address,
524                        the TP-layer length is "strlen(pdu)/2". */
525     char * smsc;    /* SMSC address in GSM BCD format prefixed by a length byte
526                        (as expected by TS 27.005) or NULL for default SMSC */
527 } RIL_SMS_WriteArgs;
528
529 /** Used by RIL_REQUEST_DIAL */
530 typedef struct {
531     char * address;
532     int clir;
533             /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
534              * clir == 0 on "use subscription default value"
535              * clir == 1 on "CLIR invocation" (restrict CLI presentation)
536              * clir == 2 on "CLIR suppression" (allow CLI presentation)
537              */
538     RIL_UUS_Info *  uusInfo;    /* NULL or Pointer to User-User Signaling Information */
539 } RIL_Dial;
540
541 typedef struct {
542     int command;    /* one of the commands listed for TS 27.007 +CRSM*/
543     int fileid;     /* EF id */
544     char *path;     /* "pathid" from TS 27.007 +CRSM command.
545                        Path is in hex asciii format eg "7f205f70"
546                        Path must always be provided.
547                      */
548     int p1;
549     int p2;
550     int p3;
551     char *data;     /* May be NULL*/
552     char *pin2;     /* May be NULL*/
553 } RIL_SIM_IO_v5;
554
555 typedef struct {
556     int command;    /* one of the commands listed for TS 27.007 +CRSM*/
557     int fileid;     /* EF id */
558     char *path;     /* "pathid" from TS 27.007 +CRSM command.
559                        Path is in hex asciii format eg "7f205f70"
560                        Path must always be provided.
561                      */
562     int p1;
563     int p2;
564     int p3;
565     char *data;     /* May be NULL*/
566     char *pin2;     /* May be NULL*/
567     char *aidPtr;   /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
568 } RIL_SIM_IO_v6;
569
570 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
571  * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
572 typedef struct {
573     int sessionid;  /* "sessionid" from TS 27.007 +CGLA command. Should be
574                        ignored for +CSIM command. */
575
576     /* Following fields are used to derive the APDU ("command" and "length"
577        values in TS 27.007 +CSIM and +CGLA commands). */
578     int cla;
579     int instruction;
580     int p1;
581     int p2;
582     int p3;         /* A negative P3 implies a 4 byte APDU. */
583     char *data;     /* May be NULL. In hex string format. */
584 } RIL_SIM_APDU;
585
586 typedef struct {
587     int sw1;
588     int sw2;
589     char *simResponse;  /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
590                            response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
591 } RIL_SIM_IO_Response;
592
593 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
594
595 typedef struct {
596     int             status;     /*
597                                  * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
598                                  * status 1 = active, 0 = not active
599                                  *
600                                  * For RIL_REQUEST_SET_CALL_FORWARD:
601                                  * status is:
602                                  * 0 = disable
603                                  * 1 = enable
604                                  * 2 = interrogate
605                                  * 3 = registeration
606                                  * 4 = erasure
607                                  */
608
609     int             reason;      /* from TS 27.007 7.11 "reason" */
610     int             serviceClass;/* From 27.007 +CCFC/+CLCK "class"
611                                     See table for Android mapping from
612                                     MMI service code
613                                     0 means user doesn't input class */
614     int             toa;         /* "type" from TS 27.007 7.11 */
615     char *          number;      /* "number" from TS 27.007 7.11. May be NULL */
616     int             timeSeconds; /* for CF no reply only */
617 }RIL_CallForwardInfo;
618
619 typedef struct {
620    char * cid;         /* Combination of LAC and Cell Id in 32 bits in GSM.
621                         * Upper 16 bits is LAC and lower 16 bits
622                         * is CID (as described in TS 27.005)
623                         * Primary Scrambling Code (as described in TS 25.331)
624                         *         in 9 bits in UMTS
625                         * Valid values are hexadecimal 0x0000 - 0xffffffff.
626                         */
627    int    rssi;        /* Received RSSI in GSM,
628                         * Level index of CPICH Received Signal Code Power in UMTS
629                         */
630 } RIL_NeighboringCell;
631
632 typedef struct {
633   char lce_status;                 /* LCE service status:
634                                     * -1 = not supported;
635                                     * 0 = stopped;
636                                     * 1 = active.
637                                     */
638   unsigned int actual_interval_ms; /* actual LCE reporting interval,
639                                     * meaningful only if LCEStatus = 1.
640                                     */
641 } RIL_LceStatusInfo;
642
643 typedef struct {
644   unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
645   unsigned char confidence_level;      /* capacity estimate confidence: 0-100 */
646   unsigned char lce_suspended;         /* LCE report going to be suspended? (e.g., radio
647                                         * moves to inactive state or network type change)
648                                         * 1 = suspended;
649                                         * 0 = not suspended.
650                                         */
651 } RIL_LceDataInfo;
652
653 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
654 typedef enum {
655     CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
656     CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
657     CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
658     CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
659     CALL_FAIL_NORMAL = 16,
660     CALL_FAIL_BUSY = 17,
661     CALL_FAIL_NO_USER_RESPONDING = 18,
662     CALL_FAIL_NO_ANSWER_FROM_USER = 19,
663     CALL_FAIL_CALL_REJECTED = 21,
664     CALL_FAIL_NUMBER_CHANGED = 22,
665     CALL_FAIL_PREEMPTION = 25,
666     CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
667     CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
668     CALL_FAIL_FACILITY_REJECTED = 29,
669     CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
670     CALL_FAIL_NORMAL_UNSPECIFIED = 31,
671     CALL_FAIL_CONGESTION = 34,
672     CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
673     CALL_FAIL_TEMPORARY_FAILURE = 41,
674     CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
675     CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
676     CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
677     CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
678     CALL_FAIL_QOS_UNAVAILABLE = 49,
679     CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
680     CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
681     CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
682     CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
683     CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
684     CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
685     CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
686     CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
687     CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
688     CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
689     CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
690     CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
691     CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
692     CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
693     CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
694     CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
695     CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
696     CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
697     CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
698     CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
699     CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
700     CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
701     CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
702     CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
703     CALL_FAIL_CALL_BARRED = 240,
704     CALL_FAIL_FDN_BLOCKED = 241,
705     CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
706     CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
707     CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
708     CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
709     CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
710     CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
711     CALL_FAIL_CDMA_DROP = 1001,
712     CALL_FAIL_CDMA_INTERCEPT = 1002,
713     CALL_FAIL_CDMA_REORDER = 1003,
714     CALL_FAIL_CDMA_SO_REJECT = 1004,
715     CALL_FAIL_CDMA_RETRY_ORDER = 1005,
716     CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
717     CALL_FAIL_CDMA_PREEMPTED = 1007,
718     CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
719                                             during emergency callback mode */
720     CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
721     CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
722                                             vendor code should make sure to map error
723                                             code to specific error */
724 } RIL_LastCallFailCause;
725
726 typedef struct {
727   RIL_LastCallFailCause cause_code;
728   char *                vendor_cause;
729 } RIL_LastCallFailCauseInfo;
730
731 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
732 typedef enum {
733     PDP_FAIL_NONE = 0, /* No error, connection ok */
734
735     /* an integer cause code defined in TS 24.008
736        section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
737        If the implementation does not have access to the exact cause codes,
738        then it should return one of the following values,
739        as the UI layer needs to distinguish these
740        cases for error notification and potential retries. */
741     PDP_FAIL_OPERATOR_BARRED = 0x08,               /* no retry */
742     PDP_FAIL_NAS_SIGNALLING = 0x0E,
743     PDP_FAIL_LLC_SNDCP = 0x19,
744     PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
745     PDP_FAIL_MISSING_UKNOWN_APN = 0x1B,            /* no retry */
746     PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C,      /* no retry */
747     PDP_FAIL_USER_AUTHENTICATION = 0x1D,           /* no retry */
748     PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E,        /* no retry */
749     PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
750     PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20,  /* no retry */
751     PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
752     PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
753     PDP_FAIL_NSAPI_IN_USE = 0x23,                  /* no retry */
754     PDP_FAIL_REGULAR_DEACTIVATION = 0x24,          /* possibly restart radio,
755                                                       based on framework config */
756     PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
757     PDP_FAIL_NETWORK_FAILURE = 0x26,
758     PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
759     PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
760     PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
761     PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
762     PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
763     PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
764     PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
765     PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
766     PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32,             /* no retry */
767     PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33,             /* no retry */
768     PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
769     PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
770     PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
771     PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
772     PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
773     PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
774     PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
775     PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
776     PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
777     PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
778     PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
779     PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
780     PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
781     PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
782     PDP_FAIL_PROTOCOL_ERRORS = 0x6F,             /* no retry */
783     PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
784     PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
785     PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
786     PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
787     PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
788     PDP_FAIL_IFACE_MISMATCH = 0x75,
789     PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
790     PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
791     PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
792     PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
793     PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
794
795     // OEM specific error codes. To be used by OEMs when they don't want to
796     // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
797     PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
798     PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
799     PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
800     PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
801     PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
802     PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
803     PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
804     PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
805     PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
806     PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
807     PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
808     PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
809     PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
810     PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
811     PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
812
813     /* Not mentioned in the specification */
814     PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
815     PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
816
817    /* reasons for data call drop - network/modem disconnect */
818     PDP_FAIL_SIGNAL_LOST = -3,
819     PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
820                                              with parameters appropriate for new technology */
821     PDP_FAIL_RADIO_POWER_OFF = -5,        /* data call was disconnected because radio was resetting,
822                                              powered off - no retry */
823     PDP_FAIL_TETHERED_CALL_ACTIVE = -6,   /* data call was disconnected by modem because tethered
824                                              mode was up on same APN/data profile - no retry until
825                                              tethered call is off */
826
827     PDP_FAIL_ERROR_UNSPECIFIED = 0xffff,  /* retry silently. Will be deprecated soon as
828                                              new error codes are added making this unnecessary */
829 } RIL_DataCallFailCause;
830
831 /* See RIL_REQUEST_SETUP_DATA_CALL */
832 typedef enum {
833     RIL_DATA_PROFILE_DEFAULT    = 0,
834     RIL_DATA_PROFILE_TETHERED   = 1,
835     RIL_DATA_PROFILE_IMS        = 2,
836     RIL_DATA_PROFILE_FOTA       = 3,
837     RIL_DATA_PROFILE_CBS        = 4,
838     RIL_DATA_PROFILE_OEM_BASE   = 1000,    /* Start of OEM-specific profiles */
839     RIL_DATA_PROFILE_INVALID    = 0xFFFFFFFF
840 } RIL_DataProfile;
841
842 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
843 typedef struct {
844     int     notificationType;   /*
845                                  * 0 = MO intermediate result code
846                                  * 1 = MT unsolicited result code
847                                  */
848     int     code;               /* See 27.007 7.17
849                                    "code1" for MO
850                                    "code2" for MT. */
851     int     index;              /* CUG index. See 27.007 7.17. */
852     int     type;               /* "type" from 27.007 7.17 (MT only). */
853     char *  number;             /* "number" from 27.007 7.17
854                                    (MT only, may be NULL). */
855 } RIL_SuppSvcNotification;
856
857 #define RIL_CARD_MAX_APPS     8
858
859 typedef enum {
860     RIL_CARDSTATE_ABSENT   = 0,
861     RIL_CARDSTATE_PRESENT  = 1,
862     RIL_CARDSTATE_ERROR    = 2
863 } RIL_CardState;
864
865 typedef enum {
866     RIL_PERSOSUBSTATE_UNKNOWN                   = 0, /* initial state */
867     RIL_PERSOSUBSTATE_IN_PROGRESS               = 1, /* in between each lock transition */
868     RIL_PERSOSUBSTATE_READY                     = 2, /* when either SIM or RUIM Perso is finished
869                                                         since each app can only have 1 active perso
870                                                         involved */
871     RIL_PERSOSUBSTATE_SIM_NETWORK               = 3,
872     RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET        = 4,
873     RIL_PERSOSUBSTATE_SIM_CORPORATE             = 5,
874     RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER      = 6,
875     RIL_PERSOSUBSTATE_SIM_SIM                   = 7,
876     RIL_PERSOSUBSTATE_SIM_NETWORK_PUK           = 8, /* The corresponding perso lock is blocked */
877     RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK    = 9,
878     RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK         = 10,
879     RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK  = 11,
880     RIL_PERSOSUBSTATE_SIM_SIM_PUK               = 12,
881     RIL_PERSOSUBSTATE_RUIM_NETWORK1             = 13,
882     RIL_PERSOSUBSTATE_RUIM_NETWORK2             = 14,
883     RIL_PERSOSUBSTATE_RUIM_HRPD                 = 15,
884     RIL_PERSOSUBSTATE_RUIM_CORPORATE            = 16,
885     RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER     = 17,
886     RIL_PERSOSUBSTATE_RUIM_RUIM                 = 18,
887     RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK         = 19, /* The corresponding perso lock is blocked */
888     RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK         = 20,
889     RIL_PERSOSUBSTATE_RUIM_HRPD_PUK             = 21,
890     RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK        = 22,
891     RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
892     RIL_PERSOSUBSTATE_RUIM_RUIM_PUK             = 24
893 } RIL_PersoSubstate;
894
895 typedef enum {
896     RIL_APPSTATE_UNKNOWN               = 0,
897     RIL_APPSTATE_DETECTED              = 1,
898     RIL_APPSTATE_PIN                   = 2, /* If PIN1 or UPin is required */
899     RIL_APPSTATE_PUK                   = 3, /* If PUK1 or Puk for UPin is required */
900     RIL_APPSTATE_SUBSCRIPTION_PERSO    = 4, /* perso_substate should be look at
901                                                when app_state is assigned to this value */
902     RIL_APPSTATE_READY                 = 5
903 } RIL_AppState;
904
905 typedef enum {
906     RIL_PINSTATE_UNKNOWN              = 0,
907     RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
908     RIL_PINSTATE_ENABLED_VERIFIED     = 2,
909     RIL_PINSTATE_DISABLED             = 3,
910     RIL_PINSTATE_ENABLED_BLOCKED      = 4,
911     RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
912 } RIL_PinState;
913
914 typedef enum {
915   RIL_APPTYPE_UNKNOWN = 0,
916   RIL_APPTYPE_SIM     = 1,
917   RIL_APPTYPE_USIM    = 2,
918   RIL_APPTYPE_RUIM    = 3,
919   RIL_APPTYPE_CSIM    = 4,
920   RIL_APPTYPE_ISIM    = 5
921 } RIL_AppType;
922
923 typedef struct
924 {
925   RIL_AppType      app_type;
926   RIL_AppState     app_state;
927   RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
928                                        RIL_APPSTATE_SUBSCRIPTION_PERSO */
929   char             *aid_ptr;        /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
930                                        0x30, 0x30, 0x30 */
931   char             *app_label_ptr;  /* null terminated string */
932   int              pin1_replaced;   /* applicable to USIM, CSIM & ISIM */
933   RIL_PinState     pin1;
934   RIL_PinState     pin2;
935 } RIL_AppStatus;
936
937 /* Deprecated, use RIL_CardStatus_v6 */
938 typedef struct
939 {
940   RIL_CardState card_state;
941   RIL_PinState  universal_pin_state;             /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
942   int           gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
943   int           cdma_subscription_app_index;     /* value < RIL_CARD_MAX_APPS, -1 if none */
944   int           num_applications;                /* value <= RIL_CARD_MAX_APPS */
945   RIL_AppStatus applications[RIL_CARD_MAX_APPS];
946 } RIL_CardStatus_v5;
947
948 typedef struct
949 {
950   RIL_CardState card_state;
951   RIL_PinState  universal_pin_state;             /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
952   int           gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
953   int           cdma_subscription_app_index;     /* value < RIL_CARD_MAX_APPS, -1 if none */
954   int           ims_subscription_app_index;      /* value < RIL_CARD_MAX_APPS, -1 if none */
955   int           num_applications;                /* value <= RIL_CARD_MAX_APPS */
956   RIL_AppStatus applications[RIL_CARD_MAX_APPS];
957 } RIL_CardStatus_v6;
958
959 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
960  *      or as part of RIL_SimRefreshResponse_v7
961  */
962 typedef enum {
963     /* A file on SIM has been updated.  data[1] contains the EFID. */
964     SIM_FILE_UPDATE = 0,
965     /* SIM initialized.  All files should be re-read. */
966     SIM_INIT = 1,
967     /* SIM reset.  SIM power required, SIM may be locked and all files should be re-read. */
968     SIM_RESET = 2
969 } RIL_SimRefreshResult;
970
971 typedef struct {
972     RIL_SimRefreshResult result;
973     int                  ef_id; /* is the EFID of the updated file if the result is */
974                                 /* SIM_FILE_UPDATE or 0 for any other result. */
975     char *               aid;   /* is AID(application ID) of the card application */
976                                 /* See ETSI 102.221 8.1 and 101.220 4 */
977                                 /*     For SIM_FILE_UPDATE result it can be set to AID of */
978                                 /*         application in which updated EF resides or it can be */
979                                 /*         NULL if EF is outside of an application. */
980                                 /*     For SIM_INIT result this field is set to AID of */
981                                 /*         application that caused REFRESH */
982                                 /*     For SIM_RESET result it is NULL. */
983 } RIL_SimRefreshResponse_v7;
984
985 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
986 typedef struct {
987     char *          number;             /* Remote party number */
988     int             numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
989     char *          name;               /* Remote party name */
990     RIL_CDMA_SignalInfoRecord signalInfoRecord;
991 } RIL_CDMA_CallWaiting_v5;
992
993 typedef struct {
994     char *          number;             /* Remote party number */
995     int             numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
996     char *          name;               /* Remote party name */
997     RIL_CDMA_SignalInfoRecord signalInfoRecord;
998     /* Number type/Number plan required to support International Call Waiting */
999     int             number_type;        /* 0=Unknown, 1=International, 2=National,
1000                                            3=Network specific, 4=subscriber */
1001     int             number_plan;        /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1002 } RIL_CDMA_CallWaiting_v6;
1003
1004 /**
1005  * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1006  *
1007  * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1008  * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1009  * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1010  * CBM message ID.
1011  *
1012  * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1013  * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1014  * and 9.4.4.2.3 for UMTS.
1015  * All other values can be treated as empty CBM data coding scheme.
1016  *
1017  * selected 0 means message types specified in <fromServiceId, toServiceId>
1018  * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1019  *
1020  * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1021  * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1022  */
1023 typedef struct {
1024     int fromServiceId;
1025     int toServiceId;
1026     int fromCodeScheme;
1027     int toCodeScheme;
1028     unsigned char selected;
1029 } RIL_GSM_BroadcastSmsConfigInfo;
1030
1031 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1032 #define RIL_RESTRICTED_STATE_NONE           0x00
1033 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1034 #define RIL_RESTRICTED_STATE_CS_EMERGENCY   0x01
1035 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1036 #define RIL_RESTRICTED_STATE_CS_NORMAL      0x02
1037 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
1038 #define RIL_RESTRICTED_STATE_CS_ALL         0x04
1039 /* Block packet data access due to restriction. */
1040 #define RIL_RESTRICTED_STATE_PS_ALL         0x10
1041
1042 /* The status for an OTASP/OTAPA session */
1043 typedef enum {
1044     CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1045     CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1046     CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1047     CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1048     CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1049     CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1050     CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1051     CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1052     CDMA_OTA_PROVISION_STATUS_COMMITTED,
1053     CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1054     CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1055     CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1056 } RIL_CDMA_OTA_ProvisionStatus;
1057
1058 typedef struct {
1059     int signalStrength;  /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1060     int bitErrorRate;    /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1061 } RIL_GW_SignalStrength;
1062
1063 typedef struct {
1064     int signalStrength;  /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1065     int bitErrorRate;    /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1066     int timingAdvance;   /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1067                           * INT_MAX denotes invalid value */
1068 } RIL_GSM_SignalStrength_v12;
1069
1070 typedef struct {
1071     int signalStrength;  /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1072     int bitErrorRate;    /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1073 } RIL_SignalStrengthWcdma;
1074
1075 typedef struct {
1076     int dbm;  /* Valid values are positive integers.  This value is the actual RSSI value
1077                * multiplied by -1.  Example: If the actual RSSI is -75, then this response
1078                * value will be 75.
1079                */
1080     int ecio; /* Valid values are positive integers.  This value is the actual Ec/Io multiplied
1081                * by -10.  Example: If the actual Ec/Io is -12.5 dB, then this response value
1082                * will be 125.
1083                */
1084 } RIL_CDMA_SignalStrength;
1085
1086
1087 typedef struct {
1088     int dbm;  /* Valid values are positive integers.  This value is the actual RSSI value
1089                * multiplied by -1.  Example: If the actual RSSI is -75, then this response
1090                * value will be 75.
1091                */
1092     int ecio; /* Valid values are positive integers.  This value is the actual Ec/Io multiplied
1093                * by -10.  Example: If the actual Ec/Io is -12.5 dB, then this response value
1094                * will be 125.
1095                */
1096     int signalNoiseRatio; /* Valid values are 0-8.  8 is the highest signal to noise ratio. */
1097 } RIL_EVDO_SignalStrength;
1098
1099 typedef struct {
1100     int signalStrength;  /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1101     int rsrp;            /* The current Reference Signal Receive Power in dBm multipled by -1.
1102                           * Range: 44 to 140 dBm
1103                           * INT_MAX: 0x7FFFFFFF denotes invalid value.
1104                           * Reference: 3GPP TS 36.133 9.1.4 */
1105     int rsrq;            /* The current Reference Signal Receive Quality in dB multiplied by -1.
1106                           * Range: 20 to 3 dB.
1107                           * INT_MAX: 0x7FFFFFFF denotes invalid value.
1108                           * Reference: 3GPP TS 36.133 9.1.7 */
1109     int rssnr;           /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1110                           * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1111                           * INT_MAX : 0x7FFFFFFF denotes invalid value.
1112                           * Reference: 3GPP TS 36.101 8.1.1 */
1113     int cqi;             /* The current Channel Quality Indicator.
1114                           * Range: 0 to 15.
1115                           * INT_MAX : 0x7FFFFFFF denotes invalid value.
1116                           * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1117 } RIL_LTE_SignalStrength;
1118
1119 typedef struct {
1120     int signalStrength;  /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1121     int rsrp;            /* The current Reference Signal Receive Power in dBm multipled by -1.
1122                           * Range: 44 to 140 dBm
1123                           * INT_MAX: 0x7FFFFFFF denotes invalid value.
1124                           * Reference: 3GPP TS 36.133 9.1.4 */
1125     int rsrq;            /* The current Reference Signal Receive Quality in dB multiplied by -1.
1126                           * Range: 20 to 3 dB.
1127                           * INT_MAX: 0x7FFFFFFF denotes invalid value.
1128                           * Reference: 3GPP TS 36.133 9.1.7 */
1129     int rssnr;           /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1130                           * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1131                           * INT_MAX : 0x7FFFFFFF denotes invalid value.
1132                           * Reference: 3GPP TS 36.101 8.1.1 */
1133     int cqi;             /* The current Channel Quality Indicator.
1134                           * Range: 0 to 15.
1135                           * INT_MAX : 0x7FFFFFFF denotes invalid value.
1136                           * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1137     int timingAdvance;   /* timing advance in micro seconds for a one way trip from cell to device.
1138                           * Approximate distance can be calculated using 300m/us * timingAdvance.
1139                           * Range: 0 to 0x7FFFFFFE
1140                           * INT_MAX : 0x7FFFFFFF denotes invalid value.
1141                           * Reference: 3GPP 36.321 section 6.1.3.5
1142                           * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1143 } RIL_LTE_SignalStrength_v8;
1144
1145 typedef struct {
1146     int rscp;    /* The Received Signal Code Power in dBm multipled by -1.
1147                   * Range : 25 to 120
1148                   * INT_MAX: 0x7FFFFFFF denotes invalid value.
1149                   * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1150 } RIL_TD_SCDMA_SignalStrength;
1151
1152 /* Deprecated, use RIL_SignalStrength_v6 */
1153 typedef struct {
1154     RIL_GW_SignalStrength   GW_SignalStrength;
1155     RIL_CDMA_SignalStrength CDMA_SignalStrength;
1156     RIL_EVDO_SignalStrength EVDO_SignalStrength;
1157 } RIL_SignalStrength_v5;
1158
1159 typedef struct {
1160     RIL_GW_SignalStrength   GW_SignalStrength;
1161     RIL_CDMA_SignalStrength CDMA_SignalStrength;
1162     RIL_EVDO_SignalStrength EVDO_SignalStrength;
1163     RIL_LTE_SignalStrength  LTE_SignalStrength;
1164 } RIL_SignalStrength_v6;
1165
1166 typedef struct {
1167     RIL_GW_SignalStrength       GW_SignalStrength;
1168     RIL_CDMA_SignalStrength     CDMA_SignalStrength;
1169     RIL_EVDO_SignalStrength     EVDO_SignalStrength;
1170     RIL_LTE_SignalStrength_v8   LTE_SignalStrength;
1171 } RIL_SignalStrength_v8;
1172
1173 typedef struct {
1174     RIL_GW_SignalStrength       GW_SignalStrength;
1175     RIL_CDMA_SignalStrength     CDMA_SignalStrength;
1176     RIL_EVDO_SignalStrength     EVDO_SignalStrength;
1177     RIL_LTE_SignalStrength_v8   LTE_SignalStrength;
1178     RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1179 } RIL_SignalStrength_v10;
1180
1181 typedef struct {
1182     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1183     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1184     int lac;    /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown  */
1185     int cid;    /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown  */
1186 } RIL_CellIdentityGsm;
1187
1188 typedef struct {
1189     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1190     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1191     int lac;    /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown  */
1192     int cid;    /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown  */
1193     int arfcn;  /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
1194     uint8_t bsic;/* 6-bit Base Station Identity Code */
1195 } RIL_CellIdentityGsm_v12;
1196
1197 typedef struct {
1198     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown  */
1199     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown  */
1200     int lac;    /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown  */
1201     int cid;    /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown  */
1202     int psc;    /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1203 } RIL_CellIdentityWcdma;
1204
1205 typedef struct {
1206     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown  */
1207     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown  */
1208     int lac;    /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown  */
1209     int cid;    /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown  */
1210     int psc;    /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1211     int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1212 } RIL_CellIdentityWcdma_v12;
1213
1214 typedef struct {
1215     int networkId;      /* Network Id 0..65535, INT_MAX if unknown */
1216     int systemId;       /* CDMA System Id 0..32767, INT_MAX if unknown  */
1217     int basestationId;  /* Base Station Id 0..65535, INT_MAX if unknown  */
1218     int longitude;      /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1219                          * It is represented in units of 0.25 seconds and ranges from -2592000
1220                          * to 2592000, both values inclusive (corresponding to a range of -180
1221                          * to +180 degrees). INT_MAX if unknown */
1222
1223     int latitude;       /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1224                          * It is represented in units of 0.25 seconds and ranges from -1296000
1225                          * to 1296000, both values inclusive (corresponding to a range of -90
1226                          * to +90 degrees). INT_MAX if unknown */
1227 } RIL_CellIdentityCdma;
1228
1229 typedef struct {
1230     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown  */
1231     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown  */
1232     int ci;     /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1233     int pci;    /* physical cell id 0..503, INT_MAX if unknown  */
1234     int tac;    /* 16-bit tracking area code, INT_MAX if unknown  */
1235 } RIL_CellIdentityLte;
1236
1237 typedef struct {
1238     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown  */
1239     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown  */
1240     int ci;     /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1241     int pci;    /* physical cell id 0..503, INT_MAX if unknown  */
1242     int tac;    /* 16-bit tracking area code, INT_MAX if unknown  */
1243     int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1244 } RIL_CellIdentityLte_v12;
1245
1246 typedef struct {
1247     int mcc;    /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown  */
1248     int mnc;    /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown  */
1249     int lac;    /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown  */
1250     int cid;    /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown  */
1251     int cpid;    /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1252 } RIL_CellIdentityTdscdma;
1253
1254 typedef struct {
1255   RIL_CellIdentityGsm   cellIdentityGsm;
1256   RIL_GW_SignalStrength signalStrengthGsm;
1257 } RIL_CellInfoGsm;
1258
1259 typedef struct {
1260   RIL_CellIdentityGsm_v12   cellIdentityGsm;
1261   RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1262 } RIL_CellInfoGsm_v12;
1263
1264 typedef struct {
1265   RIL_CellIdentityWcdma cellIdentityWcdma;
1266   RIL_SignalStrengthWcdma signalStrengthWcdma;
1267 } RIL_CellInfoWcdma;
1268
1269 typedef struct {
1270   RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1271   RIL_SignalStrengthWcdma signalStrengthWcdma;
1272 } RIL_CellInfoWcdma_v12;
1273
1274 typedef struct {
1275   RIL_CellIdentityCdma      cellIdentityCdma;
1276   RIL_CDMA_SignalStrength   signalStrengthCdma;
1277   RIL_EVDO_SignalStrength   signalStrengthEvdo;
1278 } RIL_CellInfoCdma;
1279
1280 typedef struct {
1281   RIL_CellIdentityLte        cellIdentityLte;
1282   RIL_LTE_SignalStrength_v8  signalStrengthLte;
1283 } RIL_CellInfoLte;
1284
1285 typedef struct {
1286   RIL_CellIdentityLte_v12    cellIdentityLte;
1287   RIL_LTE_SignalStrength_v8  signalStrengthLte;
1288 } RIL_CellInfoLte_v12;
1289
1290 typedef struct {
1291   RIL_CellIdentityTdscdma cellIdentityTdscdma;
1292   RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1293 } RIL_CellInfoTdscdma;
1294
1295 // Must be the same as CellInfo.TYPE_XXX
1296 typedef enum {
1297   RIL_CELL_INFO_TYPE_GSM    = 1,
1298   RIL_CELL_INFO_TYPE_CDMA   = 2,
1299   RIL_CELL_INFO_TYPE_LTE    = 3,
1300   RIL_CELL_INFO_TYPE_WCDMA  = 4,
1301   RIL_CELL_INFO_TYPE_TD_SCDMA  = 5
1302 } RIL_CellInfoType;
1303
1304 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1305 typedef enum {
1306     RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1307     RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1308     RIL_TIMESTAMP_TYPE_MODEM = 2,
1309     RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1310     RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1311 } RIL_TimeStampType;
1312
1313 typedef struct {
1314   RIL_CellInfoType  cellInfoType;   /* cell type for selecting from union CellInfo */
1315   int               registered;     /* !0 if this cell is registered 0 if not registered */
1316   RIL_TimeStampType timeStampType;  /* type of time stamp represented by timeStamp */
1317   uint64_t          timeStamp;      /* Time in nanos as returned by ril_nano_time */
1318   union {
1319     RIL_CellInfoGsm     gsm;
1320     RIL_CellInfoCdma    cdma;
1321     RIL_CellInfoLte     lte;
1322     RIL_CellInfoWcdma   wcdma;
1323     RIL_CellInfoTdscdma tdscdma;
1324   } CellInfo;
1325 } RIL_CellInfo;
1326
1327 typedef struct {
1328   RIL_CellInfoType  cellInfoType;   /* cell type for selecting from union CellInfo */
1329   int               registered;     /* !0 if this cell is registered 0 if not registered */
1330   RIL_TimeStampType timeStampType;  /* type of time stamp represented by timeStamp */
1331   uint64_t          timeStamp;      /* Time in nanos as returned by ril_nano_time */
1332   union {
1333     RIL_CellInfoGsm_v12     gsm;
1334     RIL_CellInfoCdma        cdma;
1335     RIL_CellInfoLte_v12     lte;
1336     RIL_CellInfoWcdma_v12   wcdma;
1337     RIL_CellInfoTdscdma     tdscdma;
1338   } CellInfo;
1339 } RIL_CellInfo_v12;
1340
1341 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
1342 typedef enum {
1343   RIL_CDMA_DISPLAY_INFO_REC,
1344   RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1345   RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1346   RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1347   RIL_CDMA_SIGNAL_INFO_REC,
1348   RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1349   RIL_CDMA_LINE_CONTROL_INFO_REC,
1350   RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1351   RIL_CDMA_T53_CLIR_INFO_REC,
1352   RIL_CDMA_T53_RELEASE_INFO_REC,
1353   RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1354 } RIL_CDMA_InfoRecName;
1355
1356 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
1357    Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1358    Note: the Extended Display info rec contains multiple records of the
1359    form: display_tag, display_len, and display_len occurrences of the
1360    chari field if the display_tag is not 10000000 or 10000001.
1361    To save space, the records are stored consecutively in a byte buffer.
1362    The display_tag, display_len and chari fields are all 1 byte.
1363 */
1364
1365 typedef struct {
1366   char alpha_len;
1367   char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
1368 } RIL_CDMA_DisplayInfoRecord;
1369
1370 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1371    Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1372    Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1373 */
1374
1375 typedef struct {
1376   char len;
1377   char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
1378   char number_type;
1379   char number_plan;
1380   char pi;
1381   char si;
1382 } RIL_CDMA_NumberInfoRecord;
1383
1384 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1385 typedef enum {
1386   RIL_REDIRECTING_REASON_UNKNOWN = 0,
1387   RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1388   RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1389   RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1390   RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1391   RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1392   RIL_REDIRECTING_REASON_RESERVED
1393 } RIL_CDMA_RedirectingReason;
1394
1395 typedef struct {
1396   RIL_CDMA_NumberInfoRecord redirectingNumber;
1397   /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1398   RIL_CDMA_RedirectingReason redirectingReason;
1399 } RIL_CDMA_RedirectingNumberInfoRecord;
1400
1401 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1402 typedef struct {
1403   char lineCtrlPolarityIncluded;
1404   char lineCtrlToggle;
1405   char lineCtrlReverse;
1406   char lineCtrlPowerDenial;
1407 } RIL_CDMA_LineControlInfoRecord;
1408
1409 /* T53 CLIR Information Record */
1410 typedef struct {
1411   char cause;
1412 } RIL_CDMA_T53_CLIRInfoRecord;
1413
1414 /* T53 Audio Control Information Record */
1415 typedef struct {
1416   char upLink;
1417   char downLink;
1418 } RIL_CDMA_T53_AudioControlInfoRecord;
1419
1420 typedef struct {
1421
1422   RIL_CDMA_InfoRecName name;
1423
1424   union {
1425     /* Display and Extended Display Info Rec */
1426     RIL_CDMA_DisplayInfoRecord           display;
1427
1428     /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1429     RIL_CDMA_NumberInfoRecord            number;
1430
1431     /* Signal Info Rec */
1432     RIL_CDMA_SignalInfoRecord            signal;
1433
1434     /* Redirecting Number Info Rec */
1435     RIL_CDMA_RedirectingNumberInfoRecord redir;
1436
1437     /* Line Control Info Rec */
1438     RIL_CDMA_LineControlInfoRecord       lineCtrl;
1439
1440     /* T53 CLIR Info Rec */
1441     RIL_CDMA_T53_CLIRInfoRecord          clir;
1442
1443     /* T53 Audio Control Info Rec */
1444     RIL_CDMA_T53_AudioControlInfoRecord  audioCtrl;
1445   } rec;
1446 } RIL_CDMA_InformationRecord;
1447
1448 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1449
1450 typedef struct {
1451   char numberOfInfoRecs;
1452   RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1453 } RIL_CDMA_InformationRecords;
1454
1455 /* See RIL_REQUEST_NV_READ_ITEM */
1456 typedef struct {
1457   RIL_NV_Item itemID;
1458 } RIL_NV_ReadItem;
1459
1460 /* See RIL_REQUEST_NV_WRITE_ITEM */
1461 typedef struct {
1462   RIL_NV_Item   itemID;
1463   char *        value;
1464 } RIL_NV_WriteItem;
1465
1466 typedef enum {
1467     HANDOVER_STARTED = 0,
1468     HANDOVER_COMPLETED = 1,
1469     HANDOVER_FAILED = 2,
1470     HANDOVER_CANCELED = 3
1471 } RIL_SrvccState;
1472
1473 /* hardware configuration reported to RILJ. */
1474 typedef enum {
1475    RIL_HARDWARE_CONFIG_MODEM = 0,
1476    RIL_HARDWARE_CONFIG_SIM = 1,
1477 } RIL_HardwareConfig_Type;
1478
1479 typedef enum {
1480    RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1481    RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1482    RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1483 } RIL_HardwareConfig_State;
1484
1485 typedef struct {
1486    int rilModel;
1487    uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1488    int maxVoice;
1489    int maxData;
1490    int maxStandby;
1491 } RIL_HardwareConfig_Modem;
1492
1493 typedef struct {
1494    char modemUuid[MAX_UUID_LENGTH];
1495 } RIL_HardwareConfig_Sim;
1496
1497 typedef struct {
1498   RIL_HardwareConfig_Type type;
1499   char uuid[MAX_UUID_LENGTH];
1500   RIL_HardwareConfig_State state;
1501   union {
1502      RIL_HardwareConfig_Modem modem;
1503      RIL_HardwareConfig_Sim sim;
1504   } cfg;
1505 } RIL_HardwareConfig;
1506
1507 typedef enum {
1508   SS_CFU,
1509   SS_CF_BUSY,
1510   SS_CF_NO_REPLY,
1511   SS_CF_NOT_REACHABLE,
1512   SS_CF_ALL,
1513   SS_CF_ALL_CONDITIONAL,
1514   SS_CLIP,
1515   SS_CLIR,
1516   SS_COLP,
1517   SS_COLR,
1518   SS_WAIT,
1519   SS_BAOC,
1520   SS_BAOIC,
1521   SS_BAOIC_EXC_HOME,
1522   SS_BAIC,
1523   SS_BAIC_ROAMING,
1524   SS_ALL_BARRING,
1525   SS_OUTGOING_BARRING,
1526   SS_INCOMING_BARRING
1527 } RIL_SsServiceType;
1528
1529 typedef enum {
1530   SS_ACTIVATION,
1531   SS_DEACTIVATION,
1532   SS_INTERROGATION,
1533   SS_REGISTRATION,
1534   SS_ERASURE
1535 } RIL_SsRequestType;
1536
1537 typedef enum {
1538   SS_ALL_TELE_AND_BEARER_SERVICES,
1539   SS_ALL_TELESEVICES,
1540   SS_TELEPHONY,
1541   SS_ALL_DATA_TELESERVICES,
1542   SS_SMS_SERVICES,
1543   SS_ALL_TELESERVICES_EXCEPT_SMS
1544 } RIL_SsTeleserviceType;
1545
1546 #define SS_INFO_MAX 4
1547 #define NUM_SERVICE_CLASSES 7
1548
1549 typedef struct {
1550   int numValidIndexes; /* This gives the number of valid values in cfInfo.
1551                        For example if voice is forwarded to one number and data
1552                        is forwarded to a different one then numValidIndexes will be
1553                        2 indicating total number of valid values in cfInfo.
1554                        Similarly if all the services are forwarded to the same
1555                        number then the value of numValidIndexes will be 1. */
1556
1557   RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1558                                                       for SS request to query call
1559                                                       forward status. see
1560                                                       RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1561 } RIL_CfData;
1562
1563 typedef struct {
1564   RIL_SsServiceType serviceType;
1565   RIL_SsRequestType requestType;
1566   RIL_SsTeleserviceType teleserviceType;
1567   int serviceClass;
1568   RIL_Errno result;
1569
1570   union {
1571     int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1572                                 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1573                                 two ints, so first two values of ssInfo[] will be
1574                                 used for response if serviceType is SS_CLIR and
1575                                 requestType is SS_INTERROGATION */
1576
1577     RIL_CfData cfData;
1578   };
1579 } RIL_StkCcUnsolSsResponse;
1580
1581 /**
1582  * Data connection power state
1583  */
1584 typedef enum {
1585     RIL_DC_POWER_STATE_LOW      = 1,        // Low power state
1586     RIL_DC_POWER_STATE_MEDIUM   = 2,        // Medium power state
1587     RIL_DC_POWER_STATE_HIGH     = 3,        // High power state
1588     RIL_DC_POWER_STATE_UNKNOWN  = INT32_MAX // Unknown state
1589 } RIL_DcPowerStates;
1590
1591 /**
1592  * Data connection real time info
1593  */
1594 typedef struct {
1595     uint64_t                    time;       // Time in nanos as returned by ril_nano_time
1596     RIL_DcPowerStates           powerState; // Current power state
1597 } RIL_DcRtInfo;
1598
1599 /**
1600  * Data profile to modem
1601  */
1602 typedef struct {
1603     /* id of the data profile */
1604     int profileId;
1605     /* the APN to connect to */
1606     char* apn;
1607     /** one of the PDP_type values in TS 27.007 section 10.1.1.
1608      * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1609      */
1610     char* protocol;
1611     /** authentication protocol used for this PDP context
1612      * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1613      */
1614     int authType;
1615     /* the username for APN, or NULL */
1616     char* user;
1617     /* the password for APN, or NULL */
1618     char* password;
1619     /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1620     int type;
1621     /* the period in seconds to limit the maximum connections */
1622     int maxConnsTime;
1623     /* the maximum connections during maxConnsTime */
1624     int maxConns;
1625     /** the required wait time in seconds after a successful UE initiated
1626      * disconnect of a given PDN connection before the device can send
1627      * a new PDN connection request for that given PDN
1628      */
1629     int waitTime;
1630     /* true to enable the profile, 0 to disable, 1 to enable */
1631     int enabled;
1632 } RIL_DataProfileInfo;
1633
1634 /* Tx Power Levels */
1635 #define RIL_NUM_TX_POWER_LEVELS     5
1636
1637 typedef struct {
1638
1639   /* period (in ms) when modem is power collapsed */
1640   uint32_t sleep_mode_time_ms;
1641
1642   /* period (in ms) when modem is awake and in idle mode*/
1643   uint32_t idle_mode_time_ms;
1644
1645   /* period (in ms) for which Tx is active */
1646   uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
1647
1648   /* period (in ms) for which Rx is active */
1649   uint32_t rx_mode_time_ms;
1650 } RIL_ActivityStatsInfo;
1651
1652 /**
1653  * RIL_REQUEST_GET_SIM_STATUS
1654  *
1655  * Requests status of the SIM interface and the SIM card
1656  *
1657  * "data" is NULL
1658  *
1659  * "response" is const RIL_CardStatus_v6 *
1660  *
1661  * Valid errors:
1662  *  Must never fail
1663  */
1664 #define RIL_REQUEST_GET_SIM_STATUS 1
1665
1666 /**
1667  * RIL_REQUEST_ENTER_SIM_PIN
1668  *
1669  * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
1670  *
1671  * "data" is const char **
1672  * ((const char **)data)[0] is PIN value
1673  * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1674  *
1675  * "response" is int *
1676  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1677  *
1678  * Valid errors:
1679  *
1680  * SUCCESS
1681  * RADIO_NOT_AVAILABLE (radio resetting)
1682  * GENERIC_FAILURE
1683  * PASSWORD_INCORRECT
1684  */
1685
1686 #define RIL_REQUEST_ENTER_SIM_PIN 2
1687
1688 /**
1689  * RIL_REQUEST_ENTER_SIM_PUK
1690  *
1691  * Supplies SIM PUK and new PIN.
1692  *
1693  * "data" is const char **
1694  * ((const char **)data)[0] is PUK value
1695  * ((const char **)data)[1] is new PIN value
1696  * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1697  *
1698  * "response" is int *
1699  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1700  *
1701  * Valid errors:
1702  *
1703  *  SUCCESS
1704  *  RADIO_NOT_AVAILABLE (radio resetting)
1705  *  GENERIC_FAILURE
1706  *  PASSWORD_INCORRECT
1707  *     (PUK is invalid)
1708  */
1709
1710 #define RIL_REQUEST_ENTER_SIM_PUK 3
1711
1712 /**
1713  * RIL_REQUEST_ENTER_SIM_PIN2
1714  *
1715  * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1716  * returned as a a failure from a previous operation.
1717  *
1718  * "data" is const char **
1719  * ((const char **)data)[0] is PIN2 value
1720  * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1721  *
1722  * "response" is int *
1723  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1724  *
1725  * Valid errors:
1726  *
1727  *  SUCCESS
1728  *  RADIO_NOT_AVAILABLE (radio resetting)
1729  *  GENERIC_FAILURE
1730  *  PASSWORD_INCORRECT
1731  */
1732
1733 #define RIL_REQUEST_ENTER_SIM_PIN2 4
1734
1735 /**
1736  * RIL_REQUEST_ENTER_SIM_PUK2
1737  *
1738  * Supplies SIM PUK2 and new PIN2.
1739  *
1740  * "data" is const char **
1741  * ((const char **)data)[0] is PUK2 value
1742  * ((const char **)data)[1] is new PIN2 value
1743  * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1744  *
1745  * "response" is int *
1746  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1747  *
1748  * Valid errors:
1749  *
1750  *  SUCCESS
1751  *  RADIO_NOT_AVAILABLE (radio resetting)
1752  *  GENERIC_FAILURE
1753  *  PASSWORD_INCORRECT
1754  *     (PUK2 is invalid)
1755  */
1756
1757 #define RIL_REQUEST_ENTER_SIM_PUK2 5
1758
1759 /**
1760  * RIL_REQUEST_CHANGE_SIM_PIN
1761  *
1762  * Supplies old SIM PIN and new PIN.
1763  *
1764  * "data" is const char **
1765  * ((const char **)data)[0] is old PIN value
1766  * ((const char **)data)[1] is new PIN value
1767  * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1768  *
1769  * "response" is int *
1770  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1771  *
1772  * Valid errors:
1773  *
1774  *  SUCCESS
1775  *  RADIO_NOT_AVAILABLE (radio resetting)
1776  *  GENERIC_FAILURE
1777  *  PASSWORD_INCORRECT
1778  *     (old PIN is invalid)
1779  *
1780  */
1781
1782 #define RIL_REQUEST_CHANGE_SIM_PIN 6
1783
1784
1785 /**
1786  * RIL_REQUEST_CHANGE_SIM_PIN2
1787  *
1788  * Supplies old SIM PIN2 and new PIN2.
1789  *
1790  * "data" is const char **
1791  * ((const char **)data)[0] is old PIN2 value
1792  * ((const char **)data)[1] is new PIN2 value
1793  * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1794  *
1795  * "response" is int *
1796  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1797  *
1798  * Valid errors:
1799  *
1800  *  SUCCESS
1801  *  RADIO_NOT_AVAILABLE (radio resetting)
1802  *  GENERIC_FAILURE
1803  *  PASSWORD_INCORRECT
1804  *     (old PIN2 is invalid)
1805  *
1806  */
1807
1808 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
1809
1810 /**
1811  * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1812  *
1813  * Requests that network personlization be deactivated
1814  *
1815  * "data" is const char **
1816  * ((const char **)(data))[0]] is network depersonlization code
1817  *
1818  * "response" is int *
1819  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1820  *
1821  * Valid errors:
1822  *
1823  *  SUCCESS
1824  *  RADIO_NOT_AVAILABLE (radio resetting)
1825  *  GENERIC_FAILURE
1826  *  PASSWORD_INCORRECT
1827  *     (code is invalid)
1828  */
1829
1830 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1831
1832 /**
1833  * RIL_REQUEST_GET_CURRENT_CALLS
1834  *
1835  * Requests current call list
1836  *
1837  * "data" is NULL
1838  *
1839  * "response" must be a "const RIL_Call **"
1840  *
1841  * Valid errors:
1842  *
1843  *  SUCCESS
1844  *  RADIO_NOT_AVAILABLE (radio resetting)
1845  *  GENERIC_FAILURE
1846  *      (request will be made again in a few hundred msec)
1847  */
1848
1849 #define RIL_REQUEST_GET_CURRENT_CALLS 9
1850
1851
1852 /**
1853  * RIL_REQUEST_DIAL
1854  *
1855  * Initiate voice call
1856  *
1857  * "data" is const RIL_Dial *
1858  * "response" is NULL
1859  *
1860  * This method is never used for supplementary service codes
1861  *
1862  * Valid errors:
1863  *  SUCCESS
1864  *  RADIO_NOT_AVAILABLE (radio resetting)
1865  *  DIAL_MODIFIED_TO_USSD
1866  *  DIAL_MODIFIED_TO_SS
1867  *  DIAL_MODIFIED_TO_DIAL
1868  *  GENERIC_FAILURE
1869  */
1870 #define RIL_REQUEST_DIAL 10
1871
1872 /**
1873  * RIL_REQUEST_GET_IMSI
1874  *
1875  * Get the SIM IMSI
1876  *
1877  * Only valid when radio state is "RADIO_STATE_ON"
1878  *
1879  * "data" is const char **
1880  * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1881  * "response" is a const char * containing the IMSI
1882  *
1883  * Valid errors:
1884  *  SUCCESS
1885  *  RADIO_NOT_AVAILABLE (radio resetting)
1886  *  GENERIC_FAILURE
1887  */
1888
1889 #define RIL_REQUEST_GET_IMSI 11
1890
1891 /**
1892  * RIL_REQUEST_HANGUP
1893  *
1894  * Hang up a specific line (like AT+CHLD=1x)
1895  *
1896  * After this HANGUP request returns, RIL should show the connection is NOT
1897  * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1898  *
1899  * "data" is an int *
1900  * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1901  *
1902  * "response" is NULL
1903  *
1904  * Valid errors:
1905  *  SUCCESS
1906  *  RADIO_NOT_AVAILABLE (radio resetting)
1907  *  GENERIC_FAILURE
1908  */
1909
1910 #define RIL_REQUEST_HANGUP 12
1911
1912 /**
1913  * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1914  *
1915  * Hang up waiting or held (like AT+CHLD=0)
1916  *
1917  * After this HANGUP request returns, RIL should show the connection is NOT
1918  * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1919  *
1920  * "data" is NULL
1921  * "response" is NULL
1922  *
1923  * Valid errors:
1924  *  SUCCESS
1925  *  RADIO_NOT_AVAILABLE (radio resetting)
1926  *  GENERIC_FAILURE
1927  */
1928
1929 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1930
1931 /**
1932  * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1933  *
1934  * Hang up waiting or held (like AT+CHLD=1)
1935  *
1936  * After this HANGUP request returns, RIL should show the connection is NOT
1937  * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1938  *
1939  * "data" is NULL
1940  * "response" is NULL
1941  *
1942  * Valid errors:
1943  *  SUCCESS
1944  *  RADIO_NOT_AVAILABLE (radio resetting)
1945  *  GENERIC_FAILURE
1946  */
1947
1948 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1949
1950 /**
1951  * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1952  *
1953  * Switch waiting or holding call and active call (like AT+CHLD=2)
1954  *
1955  * State transitions should be is follows:
1956  *
1957  * If call 1 is waiting and call 2 is active, then if this re
1958  *
1959  *   BEFORE                               AFTER
1960  * Call 1   Call 2                 Call 1       Call 2
1961  * ACTIVE   HOLDING                HOLDING     ACTIVE
1962  * ACTIVE   WAITING                HOLDING     ACTIVE
1963  * HOLDING  WAITING                HOLDING     ACTIVE
1964  * ACTIVE   IDLE                   HOLDING     IDLE
1965  * IDLE     IDLE                   IDLE        IDLE
1966  *
1967  * "data" is NULL
1968  * "response" is NULL
1969  *
1970  * Valid errors:
1971  *  SUCCESS
1972  *  RADIO_NOT_AVAILABLE (radio resetting)
1973  *  GENERIC_FAILURE
1974  */
1975
1976 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1977 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1978
1979 /**
1980  * RIL_REQUEST_CONFERENCE
1981  *
1982  * Conference holding and active (like AT+CHLD=3)
1983
1984  * "data" is NULL
1985  * "response" is NULL
1986  *
1987  * Valid errors:
1988  *  SUCCESS
1989  *  RADIO_NOT_AVAILABLE (radio resetting)
1990  *  GENERIC_FAILURE
1991  */
1992 #define RIL_REQUEST_CONFERENCE 16
1993
1994 /**
1995  * RIL_REQUEST_UDUB
1996  *
1997  * Send UDUB (user determined used busy) to ringing or
1998  * waiting call answer)(RIL_BasicRequest r);
1999  *
2000  * "data" is NULL
2001  * "response" is NULL
2002  *
2003  * Valid errors:
2004  *  SUCCESS
2005  *  RADIO_NOT_AVAILABLE (radio resetting)
2006  *  GENERIC_FAILURE
2007  */
2008 #define RIL_REQUEST_UDUB 17
2009
2010 /**
2011  * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2012  *
2013  * Requests the failure cause code for the most recently terminated call
2014  *
2015  * "data" is NULL
2016  * "response" is a "int *"
2017  * ((int *)response)[0] is RIL_LastCallFailCause.  GSM failure reasons are
2018  * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2019  * failure reasons are derived from the possible call failure scenarios
2020  * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2021  *
2022  * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2023  * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2024  *
2025  * If the implementation does not have access to the exact cause codes,
2026  * then it should return one of the values listed in RIL_LastCallFailCause,
2027  * as the UI layer needs to distinguish these cases for tone generation or
2028  * error notification.
2029  *
2030  * Valid errors:
2031  *  SUCCESS
2032  *  RADIO_NOT_AVAILABLE
2033  *  GENERIC_FAILURE
2034  *
2035  * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
2036  */
2037 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2038
2039 /**
2040  * RIL_REQUEST_SIGNAL_STRENGTH
2041  *
2042  * Requests current signal strength and associated information
2043  *
2044  * Must succeed if radio is on.
2045  *
2046  * "data" is NULL
2047  *
2048  * "response" is a const RIL_SignalStrength *
2049  *
2050  * Valid errors:
2051  *  SUCCESS
2052  *  RADIO_NOT_AVAILABLE
2053  */
2054 #define RIL_REQUEST_SIGNAL_STRENGTH 19
2055
2056 /**
2057  * RIL_REQUEST_VOICE_REGISTRATION_STATE
2058  *
2059  * Request current registration state
2060  *
2061  * "data" is NULL
2062  * "response" is a "char **"
2063  * ((const char **)response)[0] is registration state 0-6,
2064  *              0 - Not registered, MT is not currently searching
2065  *                  a new operator to register
2066  *              1 - Registered, home network
2067  *              2 - Not registered, but MT is currently searching
2068  *                  a new operator to register
2069  *              3 - Registration denied
2070  *              4 - Unknown
2071  *              5 - Registered, roaming
2072  *             10 - Same as 0, but indicates that emergency calls
2073  *                  are enabled.
2074  *             12 - Same as 2, but indicates that emergency calls
2075  *                  are enabled.
2076  *             13 - Same as 3, but indicates that emergency calls
2077  *                  are enabled.
2078  *             14 - Same as 4, but indicates that emergency calls
2079  *                  are enabled.
2080  *
2081  * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2082  *                              NULL if not.Valid LAC are 0x0000 - 0xffff
2083  * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2084  *                              NULL if not.
2085  *                                 Valid CID are 0x00000000 - 0xffffffff
2086  *                                    In GSM, CID is Cell ID (see TS 27.007)
2087  *                                            in 16 bits
2088  *                                    In UMTS, CID is UMTS Cell Identity
2089  *                                             (see TS 25.331) in 28 bits
2090  * ((const char **)response)[3] indicates the available voice radio technology,
2091  *                              valid values as defined by RIL_RadioTechnology.
2092  * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2093  *                              system or NULL if not.  Base Station ID in
2094  *                              decimal format
2095  * ((const char **)response)[5] is Base Station latitude if registered on a
2096  *                              CDMA system or NULL if not. Base Station
2097  *                              latitude is a decimal number as specified in
2098  *                              3GPP2 C.S0005-A v6.0. It is represented in
2099  *                              units of 0.25 seconds and ranges from -1296000
2100  *                              to 1296000, both values inclusive (corresponding
2101  *                              to a range of -90 to +90 degrees).
2102  * ((const char **)response)[6] is Base Station longitude if registered on a
2103  *                              CDMA system or NULL if not. Base Station
2104  *                              longitude is a decimal number as specified in
2105  *                              3GPP2 C.S0005-A v6.0. It is represented in
2106  *                              units of 0.25 seconds and ranges from -2592000
2107  *                              to 2592000, both values inclusive (corresponding
2108  *                              to a range of -180 to +180 degrees).
2109  * ((const char **)response)[7] is concurrent services support indicator if
2110  *                              registered on a CDMA system 0-1.
2111  *                                   0 - Concurrent services not supported,
2112  *                                   1 - Concurrent services supported
2113  * ((const char **)response)[8] is System ID if registered on a CDMA system or
2114  *                              NULL if not. Valid System ID are 0 - 32767
2115  * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2116  *                              NULL if not. Valid System ID are 0 - 65535
2117  * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
2118  *                               on a CDMA or EVDO system or NULL if not. Valid values
2119  *                               are 0-255.
2120  * ((const char **)response)[11] indicates whether the current system is in the
2121  *                               PRL if registered on a CDMA or EVDO system or NULL if
2122  *                               not. 0=not in the PRL, 1=in the PRL
2123  * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
2124  *                               if registered on a CDMA or EVDO system or NULL if not.
2125  *                               Valid values are 0-255.
2126  * ((const char **)response)[13] if registration state is 3 (Registration
2127  *                               denied) this is an enumerated reason why
2128  *                               registration was denied.  See 3GPP TS 24.008,
2129  *                               10.5.3.6 and Annex G.
2130  *                                 0 - General
2131  *                                 1 - Authentication Failure
2132  *                                 2 - IMSI unknown in HLR
2133  *                                 3 - Illegal MS
2134  *                                 4 - Illegal ME
2135  *                                 5 - PLMN not allowed
2136  *                                 6 - Location area not allowed
2137  *                                 7 - Roaming not allowed
2138  *                                 8 - No Suitable Cells in this Location Area
2139  *                                 9 - Network failure
2140  *                                10 - Persistent location update reject
2141  *                                11 - PLMN not allowed
2142  *                                12 - Location area not allowed
2143  *                                13 - Roaming not allowed in this Location Area
2144  *                                15 - No Suitable Cells in this Location Area
2145  *                                17 - Network Failure
2146  *                                20 - MAC Failure
2147  *                                21 - Sync Failure
2148  *                                22 - Congestion
2149  *                                23 - GSM Authentication unacceptable
2150  *                                25 - Not Authorized for this CSG
2151  *                                32 - Service option not supported
2152  *                                33 - Requested service option not subscribed
2153  *                                34 - Service option temporarily out of order
2154  *                                38 - Call cannot be identified
2155  *                                48-63 - Retry upon entry into a new cell
2156  *                                95 - Semantically incorrect message
2157  *                                96 - Invalid mandatory information
2158  *                                97 - Message type non-existent or not implemented
2159  *                                98 - Message not compatible with protocol state
2160  *                                99 - Information element non-existent or not implemented
2161  *                               100 - Conditional IE error
2162  *                               101 - Message not compatible with protocol state
2163  *                               111 - Protocol error, unspecified
2164  * ((const char **)response)[14] is the Primary Scrambling Code of the current
2165  *                               cell as described in TS 25.331, in hexadecimal
2166  *                               format, or NULL if unknown or not registered
2167  *                               to a UMTS network.
2168  *
2169  * Please note that registration state 4 ("unknown") is treated
2170  * as "out of service" in the Android telephony system
2171  *
2172  * Registration state 3 can be returned if Location Update Reject
2173  * (with cause 17 - Network Failure) is received repeatedly from the network,
2174  * to facilitate "managed roaming"
2175  *
2176  * Valid errors:
2177  *  SUCCESS
2178  *  RADIO_NOT_AVAILABLE
2179  *  GENERIC_FAILURE
2180  */
2181 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
2182
2183 /**
2184  * RIL_REQUEST_DATA_REGISTRATION_STATE
2185  *
2186  * Request current DATA registration state
2187  *
2188  * "data" is NULL
2189  * "response" is a "char **"
2190  * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
2191  * ((const char **)response)[1] is LAC if registered or NULL if not
2192  * ((const char **)response)[2] is CID if registered or NULL if not
2193  * ((const char **)response)[3] indicates the available data radio technology,
2194  *                              valid values as defined by RIL_RadioTechnology.
2195  * ((const char **)response)[4] if registration state is 3 (Registration
2196  *                               denied) this is an enumerated reason why
2197  *                               registration was denied.  See 3GPP TS 24.008,
2198  *                               Annex G.6 "Additonal cause codes for GMM".
2199  *      7 == GPRS services not allowed
2200  *      8 == GPRS services and non-GPRS services not allowed
2201  *      9 == MS identity cannot be derived by the network
2202  *      10 == Implicitly detached
2203  *      14 == GPRS services not allowed in this PLMN
2204  *      16 == MSC temporarily not reachable
2205  *      40 == No PDP context activated
2206  * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2207  *                              established using RIL_REQUEST_SETUP_DATA_CALL.
2208  *
2209  * The values at offsets 6..10 are optional LTE location information in decimal.
2210  * If a value is unknown that value may be NULL. If all values are NULL,
2211  * none need to be present.
2212  *  ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2213  *  ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2214  *  ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2215  *  ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2216  *  ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2217  *
2218  * LAC and CID are in hexadecimal format.
2219  * valid LAC are 0x0000 - 0xffff
2220  * valid CID are 0x00000000 - 0x0fffffff
2221  *
2222  * Please note that registration state 4 ("unknown") is treated
2223  * as "out of service" in the Android telephony system
2224  *
2225  * Valid errors:
2226  *  SUCCESS
2227  *  RADIO_NOT_AVAILABLE
2228  *  GENERIC_FAILURE
2229  */
2230 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
2231
2232 /**
2233  * RIL_REQUEST_OPERATOR
2234  *
2235  * Request current operator ONS or EONS
2236  *
2237  * "data" is NULL
2238  * "response" is a "const char **"
2239  * ((const char **)response)[0] is long alpha ONS or EONS
2240  *                                  or NULL if unregistered
2241  *
2242  * ((const char **)response)[1] is short alpha ONS or EONS
2243  *                                  or NULL if unregistered
2244  * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2245  *                                  or NULL if unregistered
2246  *
2247  * Valid errors:
2248  *  SUCCESS
2249  *  RADIO_NOT_AVAILABLE
2250  *  GENERIC_FAILURE
2251  */
2252 #define RIL_REQUEST_OPERATOR 22
2253
2254 /**
2255  * RIL_REQUEST_RADIO_POWER
2256  *
2257  * Toggle radio on and off (for "airplane" mode)
2258  * If the radio is is turned off/on the radio modem subsystem
2259  * is expected return to an initialized state. For instance,
2260  * any voice and data calls will be terminated and all associated
2261  * lists emptied.
2262  *
2263  * "data" is int *
2264  * ((int *)data)[0] is > 0 for "Radio On"
2265  * ((int *)data)[0] is == 0 for "Radio Off"
2266  *
2267  * "response" is NULL
2268  *
2269  * Turn radio on if "on" > 0
2270  * Turn radio off if "on" == 0
2271  *
2272  * Valid errors:
2273  *  SUCCESS
2274  *  RADIO_NOT_AVAILABLE
2275  *  GENERIC_FAILURE
2276  */
2277 #define RIL_REQUEST_RADIO_POWER 23
2278
2279 /**
2280  * RIL_REQUEST_DTMF
2281  *
2282  * Send a DTMF tone
2283  *
2284  * If the implementation is currently playing a tone requested via
2285  * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2286  * should be played instead
2287  *
2288  * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
2289  * "response" is NULL
2290  *
2291  * FIXME should this block/mute microphone?
2292  * How does this interact with local DTMF feedback?
2293  *
2294  * Valid errors:
2295  *  SUCCESS
2296  *  RADIO_NOT_AVAILABLE
2297  *  GENERIC_FAILURE
2298  *
2299  * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2300  *
2301  */
2302 #define RIL_REQUEST_DTMF 24
2303
2304 /**
2305  * RIL_REQUEST_SEND_SMS
2306  *
2307  * Send an SMS message
2308  *
2309  * "data" is const char **
2310  * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2311  *      by a length byte (as expected by TS 27.005) or NULL for default SMSC
2312  * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2313  *      less the SMSC address
2314  *      TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2315  *
2316  * "response" is a const RIL_SMS_Response *
2317  *
2318  * Based on the return error, caller decides to resend if sending sms
2319  * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
2320  * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2321  *
2322  * Valid errors:
2323  *  SUCCESS
2324  *  RADIO_NOT_AVAILABLE
2325  *  SMS_SEND_FAIL_RETRY
2326  *  FDN_CHECK_FAILURE
2327  *  GENERIC_FAILURE
2328  *
2329  * FIXME how do we specify TP-Message-Reference if we need to resend?
2330  */
2331 #define RIL_REQUEST_SEND_SMS 25
2332
2333
2334 /**
2335  * RIL_REQUEST_SEND_SMS_EXPECT_MORE
2336  *
2337  * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2338  * except that more messages are expected to be sent soon. If possible,
2339  * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2340  *
2341  * "data" is const char **
2342  * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2343  *      by a length byte (as expected by TS 27.005) or NULL for default SMSC
2344  * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2345  *      less the SMSC address
2346  *      TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2347  *
2348  * "response" is a const RIL_SMS_Response *
2349  *
2350  * Based on the return error, caller decides to resend if sending sms
2351  * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
2352  * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2353  *
2354  * Valid errors:
2355  *  SUCCESS
2356  *  RADIO_NOT_AVAILABLE
2357  *  SMS_SEND_FAIL_RETRY
2358  *  GENERIC_FAILURE
2359  *
2360  */
2361 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2362
2363
2364 /**
2365  * RIL_REQUEST_SETUP_DATA_CALL
2366  *
2367  * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2368  * return success it is added to the list of data calls and a
2369  * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2370  * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2371  * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2372  * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
2373  *
2374  * The RIL is expected to:
2375  *  - Create one data call context.
2376  *  - Create and configure a dedicated interface for the context
2377  *  - The interface must be point to point.
2378  *  - The interface is configured with one or more addresses and
2379  *    is capable of sending and receiving packets. The prefix length
2380  *    of the addresses must be /32 for IPv4 and /128 for IPv6.
2381  *  - Must NOT change the linux routing table.
2382  *  - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
2383  *    number of simultaneous data call contexts.
2384  *
2385  * "data" is a const char **
2386  * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2387  *                          for values above 2 this is RIL_RadioTechnology + 2.
2388  * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
2389  * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
2390  *                          override the one in the profile. NULL indicates no APN overrride.
2391  * ((const char **)data)[3] is the username for APN, or NULL
2392  * ((const char **)data)[4] is the password for APN, or NULL
2393  * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2394  *                          0 => PAP and CHAP is never performed.
2395  *                          1 => PAP may be performed; CHAP is never performed.
2396  *                          2 => CHAP may be performed; PAP is never performed.
2397  *                          3 => PAP / CHAP may be performed - baseband dependent.
2398  * ((const char **)data)[6] is the connection type to request must be one of the
2399  *                          PDP_type values in TS 27.007 section 10.1.1.
2400  *                          For example, "IP", "IPV6", "IPV4V6", or "PPP".
2401  * ((const char **)data)[7] Optional connection property parameters, format to be defined.
2402  *
2403  * "response" is a RIL_Data_Call_Response_v11
2404  *
2405  * FIXME may need way to configure QoS settings
2406  *
2407  * Valid errors:
2408  *  SUCCESS should be returned on both success and failure of setup with
2409  *  the RIL_Data_Call_Response_v6.status containing the actual status.
2410  *  For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
2411  *
2412  *  Other errors could include:
2413  *    RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2414  *    OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
2415  *
2416  * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
2417  */
2418 #define RIL_REQUEST_SETUP_DATA_CALL 27
2419
2420
2421 /**
2422  * RIL_REQUEST_SIM_IO
2423  *
2424  * Request SIM I/O operation.
2425  * This is similar to the TS 27.007 "restricted SIM" operation
2426  * where it assumes all of the EF selection will be done by the
2427  * callee.
2428  *
2429  * "data" is a const RIL_SIM_IO_v6 *
2430  * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2431  * or may specify a PIN2 for operations that require a PIN2 (eg
2432  * updating FDN records)
2433  *
2434  * "response" is a const RIL_SIM_IO_Response *
2435  *
2436  * Arguments and responses that are unused for certain
2437  * values of "command" should be ignored or set to NULL
2438  *
2439  * Valid errors:
2440  *  SUCCESS
2441  *  RADIO_NOT_AVAILABLE
2442  *  GENERIC_FAILURE
2443  *  SIM_PIN2
2444  *  SIM_PUK2
2445  */
2446 #define RIL_REQUEST_SIM_IO 28
2447
2448 /**
2449  * RIL_REQUEST_SEND_USSD
2450  *
2451  * Send a USSD message
2452  *
2453  * If a USSD session already exists, the message should be sent in the
2454  * context of that session. Otherwise, a new session should be created.
2455  *
2456  * The network reply should be reported via RIL_UNSOL_ON_USSD
2457  *
2458  * Only one USSD session may exist at a time, and the session is assumed
2459  * to exist until:
2460  *   a) The android system invokes RIL_REQUEST_CANCEL_USSD
2461  *   b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2462  *      of "0" (USSD-Notify/no further action) or "2" (session terminated)
2463  *
2464  * "data" is a const char * containing the USSD request in UTF-8 format
2465  * "response" is NULL
2466  *
2467  * Valid errors:
2468  *  SUCCESS
2469  *  RADIO_NOT_AVAILABLE
2470  *  FDN_CHECK_FAILURE
2471  *  USSD_MODIFIED_TO_DIAL
2472  *  USSD_MODIFIED_TO_SS
2473  *  USSD_MODIFIED_TO_USSD
2474  *  GENERIC_FAILURE
2475  *
2476  * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2477  */
2478
2479 #define RIL_REQUEST_SEND_USSD 29
2480
2481 /**
2482  * RIL_REQUEST_CANCEL_USSD
2483  *
2484  * Cancel the current USSD session if one exists
2485  *
2486  * "data" is null
2487  * "response" is NULL
2488  *
2489  * Valid errors:
2490  *  SUCCESS
2491  *  RADIO_NOT_AVAILABLE
2492  *  GENERIC_FAILURE
2493  */
2494
2495 #define RIL_REQUEST_CANCEL_USSD 30
2496
2497 /**
2498  * RIL_REQUEST_GET_CLIR
2499  *
2500  * Gets current CLIR status
2501  * "data" is NULL
2502  * "response" is int *
2503  * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2504  * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2505  *
2506  * Valid errors:
2507  *  SUCCESS
2508  *  RADIO_NOT_AVAILABLE
2509  *  SS_MODIFIED_TO_DIAL
2510  *  SS_MODIFIED_TO_USSD
2511  *  SS_MODIFIED_TO_SS
2512  *  GENERIC_FAILURE
2513  */
2514 #define RIL_REQUEST_GET_CLIR 31
2515
2516 /**
2517  * RIL_REQUEST_SET_CLIR
2518  *
2519  * "data" is int *
2520  * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2521  *
2522  * "response" is NULL
2523  *
2524  * Valid errors:
2525  *  SUCCESS
2526  *  RADIO_NOT_AVAILABLE
2527  *  SS_MODIFIED_TO_DIAL
2528  *  SS_MODIFIED_TO_USSD
2529  *  SS_MODIFIED_TO_SS
2530  *  GENERIC_FAILURE
2531  */
2532 #define RIL_REQUEST_SET_CLIR 32
2533
2534 /**
2535  * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2536  *
2537  * "data" is const RIL_CallForwardInfo *
2538  *
2539  * "response" is const RIL_CallForwardInfo **
2540  * "response" points to an array of RIL_CallForwardInfo *'s, one for
2541  * each distinct registered phone number.
2542  *
2543  * For example, if data is forwarded to +18005551212 and voice is forwarded
2544  * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
2545  *
2546  * If, however, both data and voice are forwarded to +18005551212, then
2547  * a single RIL_CallForwardInfo can be returned with the service class
2548  * set to "data + voice = 3")
2549  *
2550  * Valid errors:
2551  *  SUCCESS
2552  *  RADIO_NOT_AVAILABLE
2553  *  SS_MODIFIED_TO_DIAL
2554  *  SS_MODIFIED_TO_USSD
2555  *  SS_MODIFIED_TO_SS
2556  *  GENERIC_FAILURE
2557  */
2558 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2559
2560
2561 /**
2562  * RIL_REQUEST_SET_CALL_FORWARD
2563  *
2564  * Configure call forward rule
2565  *
2566  * "data" is const RIL_CallForwardInfo *
2567  * "response" is NULL
2568  *
2569  * Valid errors:
2570  *  SUCCESS
2571  *  RADIO_NOT_AVAILABLE
2572  *  SS_MODIFIED_TO_DIAL
2573  *  SS_MODIFIED_TO_USSD
2574  *  SS_MODIFIED_TO_SS
2575  *  GENERIC_FAILURE
2576  */
2577 #define RIL_REQUEST_SET_CALL_FORWARD 34
2578
2579
2580 /**
2581  * RIL_REQUEST_QUERY_CALL_WAITING
2582  *
2583  * Query current call waiting state
2584  *
2585  * "data" is const int *
2586  * ((const int *)data)[0] is the TS 27.007 service class to query.
2587  * "response" is a const int *
2588  * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2589  *
2590  * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2591  * must follow, with the TS 27.007 service class bit vector of services
2592  * for which call waiting is enabled.
2593  *
2594  * For example, if ((const int *)response)[0]  is 1 and
2595  * ((const int *)response)[1] is 3, then call waiting is enabled for data
2596  * and voice and disabled for everything else
2597  *
2598  * Valid errors:
2599  *  SUCCESS
2600  *  RADIO_NOT_AVAILABLE
2601  *  SS_MODIFIED_TO_DIAL
2602  *  SS_MODIFIED_TO_USSD
2603  *  SS_MODIFIED_TO_SS
2604  *  GENERIC_FAILURE
2605  */
2606 #define RIL_REQUEST_QUERY_CALL_WAITING 35
2607
2608
2609 /**
2610  * RIL_REQUEST_SET_CALL_WAITING
2611  *
2612  * Configure current call waiting state
2613  *
2614  * "data" is const int *
2615  * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2616  * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2617  *                           services to modify
2618  * "response" is NULL
2619  *
2620  * Valid errors:
2621  *  SUCCESS
2622  *  RADIO_NOT_AVAILABLE
2623  *  SS_MODIFIED_TO_DIAL
2624  *  SS_MODIFIED_TO_USSD
2625  *  SS_MODIFIED_TO_SS
2626  *  GENERIC_FAILURE
2627  */
2628 #define RIL_REQUEST_SET_CALL_WAITING 36
2629
2630 /**
2631  * RIL_REQUEST_SMS_ACKNOWLEDGE
2632  *
2633  * Acknowledge successful or failed receipt of SMS previously indicated
2634  * via RIL_UNSOL_RESPONSE_NEW_SMS
2635  *
2636  * "data" is int *
2637  * ((int *)data)[0] is 1 on successful receipt
2638  *                  (basically, AT+CNMA=1 from TS 27.005
2639  *                  is 0 on failed receipt
2640  *                  (basically, AT+CNMA=2 from TS 27.005)
2641  * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2642  *                  in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2643  *                  capacity exceeded) and 0xFF (unspecified error) are
2644  *                  reported.
2645  *
2646  * "response" is NULL
2647  *
2648  * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2649  *
2650  * Valid errors:
2651  *  SUCCESS
2652  *  RADIO_NOT_AVAILABLE
2653  *  GENERIC_FAILURE
2654  */
2655 #define RIL_REQUEST_SMS_ACKNOWLEDGE  37
2656
2657 /**
2658  * RIL_REQUEST_GET_IMEI - DEPRECATED
2659  *
2660  * Get the device IMEI, including check digit
2661  *
2662  * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2663  * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2664  *
2665  * "data" is NULL
2666  * "response" is a const char * containing the IMEI
2667  *
2668  * Valid errors:
2669  *  SUCCESS
2670  *  RADIO_NOT_AVAILABLE (radio resetting)
2671  *  GENERIC_FAILURE
2672  */
2673
2674 #define RIL_REQUEST_GET_IMEI 38
2675
2676 /**
2677  * RIL_REQUEST_GET_IMEISV - DEPRECATED
2678  *
2679  * Get the device IMEISV, which should be two decimal digits
2680  *
2681  * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2682  * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2683  *
2684  * "data" is NULL
2685  * "response" is a const char * containing the IMEISV
2686  *
2687  * Valid errors:
2688  *  SUCCESS
2689  *  RADIO_NOT_AVAILABLE (radio resetting)
2690  *  GENERIC_FAILURE
2691  */
2692
2693 #define RIL_REQUEST_GET_IMEISV 39
2694
2695
2696 /**
2697  * RIL_REQUEST_ANSWER
2698  *
2699  * Answer incoming call
2700  *
2701  * Will not be called for WAITING calls.
2702  * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2703  * instead
2704  *
2705  * "data" is NULL
2706  * "response" is NULL
2707  *
2708  * Valid errors:
2709  *  SUCCESS
2710  *  RADIO_NOT_AVAILABLE (radio resetting)
2711  *  GENERIC_FAILURE
2712  */
2713
2714 #define RIL_REQUEST_ANSWER 40
2715
2716 /**
2717  * RIL_REQUEST_DEACTIVATE_DATA_CALL
2718  *
2719  * Deactivate packet data connection and remove from the
2720  * data call list if SUCCESS is returned. Any other return
2721  * values should also try to remove the call from the list,
2722  * but that may not be possible. In any event a
2723  * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2724  * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2725  * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
2726  *
2727  * "data" is const char **
2728  * ((char**)data)[0] indicating CID
2729  * ((char**)data)[1] indicating Disconnect Reason
2730  *                   0 => No specific reason specified
2731  *                   1 => Radio shutdown requested
2732  *
2733  * "response" is NULL
2734  *
2735  * Valid errors:
2736  *  SUCCESS
2737  *  RADIO_NOT_AVAILABLE
2738  *  GENERIC_FAILURE
2739  *
2740  * See also: RIL_REQUEST_SETUP_DATA_CALL
2741  */
2742 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
2743
2744 /**
2745  * RIL_REQUEST_QUERY_FACILITY_LOCK
2746  *
2747  * Query the status of a facility lock state
2748  *
2749  * "data" is const char **
2750  * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
2751  *                      (eg "AO" for BAOC, "SC" for SIM lock)
2752  * ((const char **)data)[1] is the password, or "" if not required
2753  * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2754  *                           services to query
2755  * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2756  *                            This is only applicable in the case of Fixed Dialing Numbers
2757  *                            (FDN) requests.
2758  *
2759  * "response" is an int *
2760  * ((const int *)response) 0 is the TS 27.007 service class bit vector of
2761  *                           services for which the specified barring facility
2762  *                           is active. "0" means "disabled for all"
2763  *
2764  *
2765  * Valid errors:
2766  *  SUCCESS
2767  *  RADIO_NOT_AVAILABLE
2768  *  SS_MODIFIED_TO_DIAL
2769  *  SS_MODIFIED_TO_USSD
2770  *  SS_MODIFIED_TO_SS
2771  *  GENERIC_FAILURE
2772  *
2773  */
2774 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2775
2776 /**
2777  * RIL_REQUEST_SET_FACILITY_LOCK
2778  *
2779  * Enable/disable one facility lock
2780  *
2781  * "data" is const char **
2782  *
2783  * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2784  * (eg "AO" for BAOC)
2785  * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2786  * ((const char **)data)[2] = password
2787  * ((const char **)data)[3] = string representation of decimal TS 27.007
2788  *                            service class bit vector. Eg, the string
2789  *                            "1" means "set this facility for voice services"
2790  * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2791  *                            This is only applicable in the case of Fixed Dialing Numbers
2792  *                            (FDN) requests.
2793  *
2794  * "response" is int *
2795  * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2796  *
2797  * Valid errors:
2798  *  SUCCESS
2799  *  RADIO_NOT_AVAILABLE
2800  *  SS_MODIFIED_TO_DIAL
2801  *  SS_MODIFIED_TO_USSD
2802  *  SS_MODIFIED_TO_SS
2803  *  GENERIC_FAILURE
2804  *
2805  */
2806 #define RIL_REQUEST_SET_FACILITY_LOCK 43
2807
2808 /**
2809  * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2810  *
2811  * Change call barring facility password
2812  *
2813  * "data" is const char **
2814  *
2815  * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2816  * (eg "AO" for BAOC)
2817  * ((const char **)data)[1] = old password
2818  * ((const char **)data)[2] = new password
2819  *
2820  * "response" is NULL
2821  *
2822  * Valid errors:
2823  *  SUCCESS
2824  *  RADIO_NOT_AVAILABLE
2825  *  SS_MODIFIED_TO_DIAL
2826  *  SS_MODIFIED_TO_USSD
2827  *  SS_MODIFIED_TO_SS
2828  *  GENERIC_FAILURE
2829  *
2830  */
2831 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2832
2833 /**
2834  * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2835  *
2836  * Query current network selectin mode
2837  *
2838  * "data" is NULL
2839  *
2840  * "response" is int *
2841  * ((const int *)response)[0] is
2842  *     0 for automatic selection
2843  *     1 for manual selection
2844  *
2845  * Valid errors:
2846  *  SUCCESS
2847  *  RADIO_NOT_AVAILABLE
2848  *  GENERIC_FAILURE
2849  *
2850  */
2851 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2852
2853 /**
2854  * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2855  *
2856  * Specify that the network should be selected automatically
2857  *
2858  * "data" is NULL
2859  * "response" is NULL
2860  *
2861  * This request must not respond until the new operator is selected
2862  * and registered
2863  *
2864  * Valid errors:
2865  *  SUCCESS
2866  *  RADIO_NOT_AVAILABLE
2867  *  ILLEGAL_SIM_OR_ME
2868  *  GENERIC_FAILURE
2869  *
2870  * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2871  *       no retries needed, such as illegal SIM or ME.
2872  *       Returns GENERIC_FAILURE for all other causes that might be
2873  *       fixed by retries.
2874  *
2875  */
2876 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2877
2878 /**
2879  * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2880  *
2881  * Manually select a specified network.
2882  *
2883  * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2884  * "response" is NULL
2885  *
2886  * This request must not respond until the new operator is selected
2887  * and registered
2888  *
2889  * Valid errors:
2890  *  SUCCESS
2891  *  RADIO_NOT_AVAILABLE
2892  *  ILLEGAL_SIM_OR_ME
2893  *  GENERIC_FAILURE
2894  *
2895  * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2896  *       no retries needed, such as illegal SIM or ME.
2897  *       Returns GENERIC_FAILURE for all other causes that might be
2898  *       fixed by retries.
2899  *
2900  */
2901 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2902
2903 /**
2904  * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2905  *
2906  * Scans for available networks
2907  *
2908  * "data" is NULL
2909  * "response" is const char ** that should be an array of n*4 strings, where
2910  *    n is the number of available networks
2911  * For each available network:
2912  *
2913  * ((const char **)response)[n+0] is long alpha ONS or EONS
2914  * ((const char **)response)[n+1] is short alpha ONS or EONS
2915  * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2916  * ((const char **)response)[n+3] is a string value of the status:
2917  *           "unknown"
2918  *           "available"
2919  *           "current"
2920  *           "forbidden"
2921  *
2922  * This request must not respond until the new operator is selected
2923  * and registered
2924  *
2925  * Valid errors:
2926  *  SUCCESS
2927  *  RADIO_NOT_AVAILABLE
2928  *  GENERIC_FAILURE
2929  *
2930  */
2931 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2932
2933 /**
2934  * RIL_REQUEST_DTMF_START
2935  *
2936  * Start playing a DTMF tone. Continue playing DTMF tone until
2937  * RIL_REQUEST_DTMF_STOP is received
2938  *
2939  * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2940  * it should cancel the previous tone and play the new one.
2941  *
2942  * "data" is a char *
2943  * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2944  * "response" is NULL
2945  *
2946  * Valid errors:
2947  *  SUCCESS
2948  *  RADIO_NOT_AVAILABLE
2949  *  GENERIC_FAILURE
2950  *
2951  * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2952  */
2953 #define RIL_REQUEST_DTMF_START 49
2954
2955 /**
2956  * RIL_REQUEST_DTMF_STOP
2957  *
2958  * Stop playing a currently playing DTMF tone.
2959  *
2960  * "data" is NULL
2961  * "response" is NULL
2962  *
2963  * Valid errors:
2964  *  SUCCESS
2965  *  RADIO_NOT_AVAILABLE
2966  *  GENERIC_FAILURE
2967  *
2968  * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2969  */
2970 #define RIL_REQUEST_DTMF_STOP 50
2971
2972 /**
2973  * RIL_REQUEST_BASEBAND_VERSION
2974  *
2975  * Return string value indicating baseband version, eg
2976  * response from AT+CGMR
2977  *
2978  * "data" is NULL
2979  * "response" is const char * containing version string for log reporting
2980  *
2981  * Valid errors:
2982  *  SUCCESS
2983  *  RADIO_NOT_AVAILABLE
2984  *  GENERIC_FAILURE
2985  *
2986  */
2987 #define RIL_REQUEST_BASEBAND_VERSION 51
2988
2989 /**
2990  * RIL_REQUEST_SEPARATE_CONNECTION
2991  *
2992  * Separate a party from a multiparty call placing the multiparty call
2993  * (less the specified party) on hold and leaving the specified party
2994  * as the only other member of the current (active) call
2995  *
2996  * Like AT+CHLD=2x
2997  *
2998  * See TS 22.084 1.3.8.2 (iii)
2999  * TS 22.030 6.5.5 "Entering "2X followed by send"
3000  * TS 27.007 "AT+CHLD=2x"
3001  *
3002  * "data" is an int *
3003  * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3004  *
3005  * "response" is NULL
3006  *
3007  * Valid errors:
3008  *  SUCCESS
3009  *  RADIO_NOT_AVAILABLE (radio resetting)
3010  *  GENERIC_FAILURE
3011  */
3012 #define RIL_REQUEST_SEPARATE_CONNECTION 52
3013
3014
3015 /**
3016  * RIL_REQUEST_SET_MUTE
3017  *
3018  * Turn on or off uplink (microphone) mute.
3019  *
3020  * Will only be sent while voice call is active.
3021  * Will always be reset to "disable mute" when a new voice call is initiated
3022  *
3023  * "data" is an int *
3024  * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3025  *
3026  * "response" is NULL
3027  *
3028  * Valid errors:
3029  *  SUCCESS
3030  *  RADIO_NOT_AVAILABLE (radio resetting)
3031  *  GENERIC_FAILURE
3032  */
3033
3034 #define RIL_REQUEST_SET_MUTE 53
3035
3036 /**
3037  * RIL_REQUEST_GET_MUTE
3038  *
3039  * Queries the current state of the uplink mute setting
3040  *
3041  * "data" is NULL
3042  * "response" is an int *
3043  * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3044  *
3045  * Valid errors:
3046  *  SUCCESS
3047  *  RADIO_NOT_AVAILABLE (radio resetting)
3048  *  SS_MODIFIED_TO_DIAL
3049  *  SS_MODIFIED_TO_USSD
3050  *  SS_MODIFIED_TO_SS
3051  *  GENERIC_FAILURE
3052  */
3053
3054 #define RIL_REQUEST_GET_MUTE 54
3055
3056 /**
3057  * RIL_REQUEST_QUERY_CLIP
3058  *
3059  * Queries the status of the CLIP supplementary service
3060  *
3061  * (for MMI code "*#30#")
3062  *
3063  * "data" is NULL
3064  * "response" is an int *
3065  * (int *)response)[0] is 1 for "CLIP provisioned"
3066  *                           and 0 for "CLIP not provisioned"
3067  *                           and 2 for "unknown, e.g. no network etc"
3068  *
3069  * Valid errors:
3070  *  SUCCESS
3071  *  RADIO_NOT_AVAILABLE (radio resetting)
3072  *  GENERIC_FAILURE
3073  */
3074
3075 #define RIL_REQUEST_QUERY_CLIP 55
3076
3077 /**
3078  * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3079  * field in RIL_Data_Call_Response_v6.
3080  *
3081  * Requests the failure cause code for the most recently failed PDP
3082  * context or CDMA data connection active
3083  * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
3084  *
3085  * "data" is NULL
3086  *
3087  * "response" is a "int *"
3088  * ((int *)response)[0] is an integer cause code defined in TS 24.008
3089  *   section 6.1.3.1.3 or close approximation
3090  *
3091  * If the implementation does not have access to the exact cause codes,
3092  * then it should return one of the values listed in
3093  * RIL_DataCallFailCause, as the UI layer needs to distinguish these
3094  * cases for error notification
3095  * and potential retries.
3096  *
3097  * Valid errors:
3098  *  SUCCESS
3099  *  RADIO_NOT_AVAILABLE
3100  *  GENERIC_FAILURE
3101  *
3102  * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
3103  *
3104  * Deprecated use the status field in RIL_Data_Call_Response_v6.
3105  */
3106
3107 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
3108
3109 /**
3110  * RIL_REQUEST_DATA_CALL_LIST
3111  *
3112  * Returns the data call list. An entry is added when a
3113  * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3114  * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3115  * when RIL_REQUEST_RADIO_POWER off/on is issued.
3116  *
3117  * "data" is NULL
3118  * "response" is an array of RIL_Data_Call_Response_v6
3119  *
3120  * Valid errors:
3121  *  SUCCESS
3122  *  RADIO_NOT_AVAILABLE (radio resetting)
3123  *  GENERIC_FAILURE
3124  *
3125  * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
3126  */
3127
3128 #define RIL_REQUEST_DATA_CALL_LIST 57
3129
3130 /**
3131  * RIL_REQUEST_RESET_RADIO - DEPRECATED
3132  *
3133  * Request a radio reset. The RIL implementation may postpone
3134  * the reset until after this request is responded to if the baseband
3135  * is presently busy.
3136  *
3137  * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3138  *
3139  * "data" is NULL
3140  * "response" is NULL
3141  *
3142  * Valid errors:
3143  *  SUCCESS
3144  *  RADIO_NOT_AVAILABLE (radio resetting)
3145  *  GENERIC_FAILURE
3146  *  REQUEST_NOT_SUPPORTED
3147  */
3148
3149 #define RIL_REQUEST_RESET_RADIO 58
3150
3151 /**
3152  * RIL_REQUEST_OEM_HOOK_RAW
3153  *
3154  * This request reserved for OEM-specific uses. It passes raw byte arrays
3155  * back and forth.
3156  *
3157  * It can be invoked on the Java side from
3158  * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3159  *
3160  * "data" is a char * of bytes copied from the byte[] data argument in java
3161  * "response" is a char * of bytes that will returned via the
3162  * caller's "response" Message here:
3163  * (byte[])(((AsyncResult)response.obj).result)
3164  *
3165  * An error response here will result in
3166  * (((AsyncResult)response.obj).result) == null and
3167  * (((AsyncResult)response.obj).exception) being an instance of
3168  * com.android.internal.telephony.gsm.CommandException
3169  *
3170  * Valid errors:
3171  *  All
3172  */
3173
3174 #define RIL_REQUEST_OEM_HOOK_RAW 59
3175
3176 /**
3177  * RIL_REQUEST_OEM_HOOK_STRINGS
3178  *
3179  * This request reserved for OEM-specific uses. It passes strings
3180  * back and forth.
3181  *
3182  * It can be invoked on the Java side from
3183  * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3184  *
3185  * "data" is a const char **, representing an array of null-terminated UTF-8
3186  * strings copied from the "String[] strings" argument to
3187  * invokeOemRilRequestStrings()
3188  *
3189  * "response" is a const char **, representing an array of null-terminated UTF-8
3190  * stings that will be returned via the caller's response message here:
3191  *
3192  * (String[])(((AsyncResult)response.obj).result)
3193  *
3194  * An error response here will result in
3195  * (((AsyncResult)response.obj).result) == null and
3196  * (((AsyncResult)response.obj).exception) being an instance of
3197  * com.android.internal.telephony.gsm.CommandException
3198  *
3199  * Valid errors:
3200  *  All
3201  */
3202
3203 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
3204
3205 /**
3206  * RIL_REQUEST_SCREEN_STATE
3207  *
3208  * Indicates the current state of the screen.  When the screen is off, the
3209  * RIL should notify the baseband to suppress certain notifications (eg,
3210  * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3211  * in an effort to conserve power.  These notifications should resume when the
3212  * screen is on.
3213  *
3214  * "data" is int *
3215  * ((int *)data)[0] is == 1 for "Screen On"
3216  * ((int *)data)[0] is == 0 for "Screen Off"
3217  *
3218  * "response" is NULL
3219  *
3220  * Valid errors:
3221  *  SUCCESS
3222  *  GENERIC_FAILURE
3223  */
3224 #define RIL_REQUEST_SCREEN_STATE 61
3225
3226
3227 /**
3228  * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3229  *
3230  * Enables/disables supplementary service related notifications
3231  * from the network.
3232  *
3233  * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3234  *
3235  * "data" is int *
3236  * ((int *)data)[0] is == 1 for notifications enabled
3237  * ((int *)data)[0] is == 0 for notifications disabled
3238  *
3239  * "response" is NULL
3240  *
3241  * Valid errors:
3242  *  SUCCESS
3243  *  RADIO_NOT_AVAILABLE
3244  *  GENERIC_FAILURE
3245  *
3246  * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3247  */
3248 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3249
3250 /**
3251  * RIL_REQUEST_WRITE_SMS_TO_SIM
3252  *
3253  * Stores a SMS message to SIM memory.
3254  *
3255  * "data" is RIL_SMS_WriteArgs *
3256  *
3257  * "response" is int *
3258  * ((const int *)response)[0] is the record index where the message is stored.
3259  *
3260  * Valid errors:
3261  *  SUCCESS
3262  *  GENERIC_FAILURE
3263  *
3264  */
3265 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3266
3267 /**
3268  * RIL_REQUEST_DELETE_SMS_ON_SIM
3269  *
3270  * Deletes a SMS message from SIM memory.
3271  *
3272  * "data" is int  *
3273  * ((int *)data)[0] is the record index of the message to delete.
3274  *
3275  * "response" is NULL
3276  *
3277  * Valid errors:
3278  *  SUCCESS
3279  *  GENERIC_FAILURE
3280  *
3281  */
3282 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3283
3284 /**
3285  * RIL_REQUEST_SET_BAND_MODE
3286  *
3287  * Assign a specified band for RF configuration.
3288  *
3289  * "data" is int *
3290  * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
3291  * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3292  * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3293  * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3294  * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3295  * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
3296  * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
3297  * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
3298  * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
3299  * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
3300  * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
3301  * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3302  * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
3303  * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
3304  * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
3305  * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
3306  * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
3307  * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
3308  * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
3309  *
3310  * "response" is NULL
3311  *
3312  * Valid errors:
3313  *  SUCCESS
3314  *  RADIO_NOT_AVAILABLE
3315  *  GENERIC_FAILURE
3316  */
3317 #define RIL_REQUEST_SET_BAND_MODE 65
3318
3319 /**
3320  * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3321  *
3322  * Query the list of band mode supported by RF.
3323  *
3324  * "data" is NULL
3325  *
3326  * "response" is int *
3327  * "response" points to an array of int's, the int[0] is the size of array, reset is one for
3328  * each available band mode.
3329  *
3330  *  0 for "unspecified" (selected by baseband automatically)
3331  *  1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3332  *  2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3333  *  3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3334  *  4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3335  *  5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
3336  *  6 for "Cellular (800-MHz Band)"
3337  *  7 for "PCS (1900-MHz Band)"
3338  *  8 for "Band Class 3 (JTACS Band)"
3339  *  9 for "Band Class 4 (Korean PCS Band)"
3340  *  10 for "Band Class 5 (450-MHz Band)"
3341  *  11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3342  *  12 for "Band Class 7 (Upper 700-MHz Band)"
3343  *  13 for "Band Class 8 (1800-MHz Band)"
3344  *  14 for "Band Class 9 (900-MHz Band)"
3345  *  15 for "Band Class 10 (Secondary 800-MHz Band)"
3346  *  16 for "Band Class 11 (400-MHz European PAMR Band)"
3347  *  17 for "Band Class 15 (AWS Band)"
3348  *  18 for "Band Class 16 (US 2.5-GHz Band)"
3349  *
3350  * Valid errors:
3351  *  SUCCESS
3352  *  RADIO_NOT_AVAILABLE
3353  *  GENERIC_FAILURE
3354  *
3355  * See also: RIL_REQUEST_SET_BAND_MODE
3356  */
3357 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3358
3359 /**
3360  * RIL_REQUEST_STK_GET_PROFILE
3361  *
3362  * Requests the profile of SIM tool kit.
3363  * The profile indicates the SAT/USAT features supported by ME.
3364  * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3365  *
3366  * "data" is NULL
3367  *
3368  * "response" is a const char * containing SAT/USAT profile
3369  * in hexadecimal format string starting with first byte of terminal profile
3370  *
3371  * Valid errors:
3372  *  RIL_E_SUCCESS
3373  *  RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3374  *  RIL_E_GENERIC_FAILURE
3375  */
3376 #define RIL_REQUEST_STK_GET_PROFILE 67
3377
3378 /**
3379  * RIL_REQUEST_STK_SET_PROFILE
3380  *
3381  * Download the STK terminal profile as part of SIM initialization
3382  * procedure
3383  *
3384  * "data" is a const char * containing SAT/USAT profile
3385  * in hexadecimal format string starting with first byte of terminal profile
3386  *
3387  * "response" is NULL
3388  *
3389  * Valid errors:
3390  *  RIL_E_SUCCESS
3391  *  RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3392  *  RIL_E_GENERIC_FAILURE
3393  */
3394 #define RIL_REQUEST_STK_SET_PROFILE 68
3395
3396 /**
3397  * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3398  *
3399  * Requests to send a SAT/USAT envelope command to SIM.
3400  * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3401  *
3402  * "data" is a const char * containing SAT/USAT command
3403  * in hexadecimal format string starting with command tag
3404  *
3405  * "response" is a const char * containing SAT/USAT response
3406  * in hexadecimal format string starting with first byte of response
3407  * (May be NULL)
3408  *
3409  * Valid errors:
3410  *  RIL_E_SUCCESS
3411  *  RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3412  *  RIL_E_GENERIC_FAILURE
3413  */
3414 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3415
3416 /**
3417  * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3418  *
3419  * Requests to send a terminal response to SIM for a received
3420  * proactive command
3421  *
3422  * "data" is a const char * containing SAT/USAT response
3423  * in hexadecimal format string starting with first byte of response data
3424  *
3425  * "response" is NULL
3426  *
3427  * Valid errors:
3428  *  RIL_E_SUCCESS
3429  *  RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3430  *  RIL_E_GENERIC_FAILURE
3431  */
3432 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3433
3434 /**
3435  * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3436  *
3437  * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3438  * been initialized by ME already. (We could see the call has been in the 'call
3439  * list') So, STK application needs to accept/reject the call according as user
3440  * operations.
3441  *
3442  * "data" is int *
3443  * ((int *)data)[0] is > 0 for "accept" the call setup
3444  * ((int *)data)[0] is == 0 for "reject" the call setup
3445  *
3446  * "response" is NULL
3447  *
3448  * Valid errors:
3449  *  RIL_E_SUCCESS
3450  *  RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3451  *  RIL_E_GENERIC_FAILURE
3452  */
3453 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3454
3455 /**
3456  * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3457  *
3458  * Connects the two calls and disconnects the subscriber from both calls.
3459  *
3460  * "data" is NULL
3461  * "response" is NULL
3462  *
3463  * Valid errors:
3464  *  SUCCESS
3465  *  RADIO_NOT_AVAILABLE (radio resetting)
3466  *  GENERIC_FAILURE
3467  */
3468 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3469
3470 /**
3471  * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3472  *
3473  * Requests to set the preferred network type for searching and registering
3474  * (CS/PS domain, RAT, and operation mode)
3475  *
3476  * "data" is int * which is RIL_PreferredNetworkType
3477  *
3478  * "response" is NULL
3479  *
3480  * Valid errors:
3481  *  SUCCESS
3482  *  RADIO_NOT_AVAILABLE (radio resetting)
3483  *  GENERIC_FAILURE
3484  *  MODE_NOT_SUPPORTED
3485  */
3486 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3487
3488 /**
3489  * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3490  *
3491  * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3492  * for searching and registering
3493  *
3494  * "data" is NULL
3495  *
3496  * "response" is int *
3497  * ((int *)reponse)[0] is == RIL_PreferredNetworkType
3498  *
3499  * Valid errors:
3500  *  SUCCESS
3501  *  RADIO_NOT_AVAILABLE
3502  *  GENERIC_FAILURE
3503  *
3504  * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3505  */
3506 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3507
3508 /**
3509  * RIL_REQUEST_NEIGHBORING_CELL_IDS
3510  *
3511  * Request neighboring cell id in GSM network
3512  *
3513  * "data" is NULL
3514  * "response" must be a " const RIL_NeighboringCell** "
3515  *
3516  * Valid errors:
3517  *  SUCCESS
3518  *  RADIO_NOT_AVAILABLE
3519  *  GENERIC_FAILURE
3520  */
3521 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3522
3523 /**
3524  * RIL_REQUEST_SET_LOCATION_UPDATES
3525  *
3526  * Enables/disables network state change notifications due to changes in
3527  * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3528  * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
3529  *
3530  * Note:  The RIL implementation should default to "updates enabled"
3531  * when the screen is on and "updates disabled" when the screen is off.
3532  *
3533  * "data" is int *
3534  * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3535  * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3536  *
3537  * "response" is NULL
3538  *
3539  * Valid errors:
3540  *  SUCCESS
3541  *  RADIO_NOT_AVAILABLE
3542  *  GENERIC_FAILURE
3543  *
3544  * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3545  */
3546 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
3547
3548 /**
3549  * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3550  *
3551  * Request to set the location where the CDMA subscription shall
3552  * be retrieved
3553  *
3554  * "data" is int *
3555  * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3556  *
3557  * "response" is NULL
3558  *
3559  * Valid errors:
3560  *  SUCCESS
3561  *  RADIO_NOT_AVAILABLE
3562  *  GENERIC_FAILURE
3563  *  SIM_ABSENT
3564  *  SUBSCRIPTION_NOT_AVAILABLE
3565  *
3566  * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3567  */
3568 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
3569
3570 /**
3571  * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
3572  *
3573  * Request to set the roaming preferences in CDMA
3574  *
3575  * "data" is int *
3576  * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3577  * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3578  * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3579  *
3580  * "response" is NULL
3581  *
3582  * Valid errors:
3583  *  SUCCESS
3584  *  RADIO_NOT_AVAILABLE
3585  *  GENERIC_FAILURE
3586  */
3587 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3588
3589 /**
3590  * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
3591  *
3592  * Request the actual setting of the roaming preferences in CDMA in the modem
3593  *
3594  * "data" is NULL
3595  *
3596  * "response" is int *
3597  * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3598  * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3599  * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3600  *
3601  * "response" is NULL
3602  *
3603  * Valid errors:
3604  *  SUCCESS
3605  *  RADIO_NOT_AVAILABLE
3606  *  GENERIC_FAILURE
3607  */
3608 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3609
3610 /**
3611  * RIL_REQUEST_SET_TTY_MODE
3612  *
3613  * Request to set the TTY mode
3614  *
3615  * "data" is int *
3616  * ((int *)data)[0] is == 0 for TTY off
3617  * ((int *)data)[0] is == 1 for TTY Full
3618  * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3619  * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
3620  *
3621  * "response" is NULL
3622  *
3623  * Valid errors:
3624  *  SUCCESS
3625  *  RADIO_NOT_AVAILABLE
3626  *  GENERIC_FAILURE
3627  */
3628 #define RIL_REQUEST_SET_TTY_MODE 80
3629
3630 /**
3631  * RIL_REQUEST_QUERY_TTY_MODE
3632  *
3633  * Request the setting of TTY mode
3634  *
3635  * "data" is NULL
3636  *
3637  * "response" is int *
3638  * ((int *)response)[0] is == 0 for TTY off
3639  * ((int *)response)[0] is == 1 for TTY Full
3640  * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3641  * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
3642  *
3643  * "response" is NULL
3644  *
3645  * Valid errors:
3646  *  SUCCESS
3647  *  RADIO_NOT_AVAILABLE
3648  *  GENERIC_FAILURE
3649  */
3650 #define RIL_REQUEST_QUERY_TTY_MODE 81
3651
3652 /**
3653  * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3654  *
3655  * Request to set the preferred voice privacy mode used in voice
3656  * scrambling
3657  *
3658  * "data" is int *
3659  * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3660  * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3661  *
3662  * "response" is NULL
3663  *
3664  * Valid errors:
3665  *  SUCCESS
3666  *  RADIO_NOT_AVAILABLE
3667  *  GENERIC_FAILURE
3668  */
3669 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3670
3671 /**
3672  * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
3673  *
3674  * Request the setting of preferred voice privacy mode
3675  *
3676  * "data" is NULL
3677  *
3678  * "response" is int *
3679  * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3680  * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3681  *
3682  * "response" is NULL
3683  *
3684  * Valid errors:
3685  *  SUCCESS
3686  *  RADIO_NOT_AVAILABLE
3687  *  GENERIC_FAILURE
3688  */
3689 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3690
3691 /**
3692  * RIL_REQUEST_CDMA_FLASH
3693  *
3694  * Send FLASH
3695  *
3696  * "data" is const char *
3697  * ((const char *)data)[0] is a FLASH string
3698  *
3699  * "response" is NULL
3700  *
3701  * Valid errors:
3702  *  SUCCESS
3703  *  RADIO_NOT_AVAILABLE
3704  *  GENERIC_FAILURE
3705  *
3706  */
3707 #define RIL_REQUEST_CDMA_FLASH 84
3708
3709 /**
3710  * RIL_REQUEST_CDMA_BURST_DTMF
3711  *
3712  * Send DTMF string
3713  *
3714  * "data" is const char **
3715  * ((const char **)data)[0] is a DTMF string
3716  * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3717  *                          default
3718  * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3719  *                          default
3720  *
3721  * "response" is NULL
3722  *
3723  * Valid errors:
3724  *  SUCCESS
3725  *  RADIO_NOT_AVAILABLE
3726  *  GENERIC_FAILURE
3727  *
3728  */
3729 #define RIL_REQUEST_CDMA_BURST_DTMF 85
3730
3731 /**
3732  * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
3733  *
3734  * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3735  * If the checksum is valid the 20 digit AKEY is written to NV,
3736  * replacing the existing AKEY no matter what it was before.
3737  *
3738  * "data" is const char *
3739  * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3740  *                         where the last 6 digits are a checksum of the
3741  *                         first 20, as specified in TR45.AHAG
3742  *                         "Common Cryptographic Algorithms, Revision D.1
3743  *                         Section 2.2"
3744  *
3745  * "response" is NULL
3746  *
3747  * Valid errors:
3748  *  SUCCESS
3749  *  RADIO_NOT_AVAILABLE
3750  *  GENERIC_FAILURE
3751  *
3752  */
3753 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
3754
3755 /**
3756  * RIL_REQUEST_CDMA_SEND_SMS
3757  *
3758  * Send a CDMA SMS message
3759  *
3760  * "data" is const RIL_CDMA_SMS_Message *
3761  *
3762  * "response" is a const RIL_SMS_Response *
3763  *
3764  * Based on the return error, caller decides to resend if sending sms
3765  * fails. The CDMA error class is derived as follows,
3766  * SUCCESS is error class 0 (no error)
3767  * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3768  * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3769  *
3770  * Valid errors:
3771  *  SUCCESS
3772  *  RADIO_NOT_AVAILABLE
3773  *  SMS_SEND_FAIL_RETRY
3774  *  GENERIC_FAILURE
3775  *
3776  */
3777 #define RIL_REQUEST_CDMA_SEND_SMS 87
3778
3779 /**
3780  * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3781  *
3782  * Acknowledge the success or failure in the receipt of SMS
3783  * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3784  *
3785  * "data" is const RIL_CDMA_SMS_Ack *
3786  *
3787  * "response" is NULL
3788  *
3789  * Valid errors:
3790  *  SUCCESS
3791  *  RADIO_NOT_AVAILABLE
3792  *  GENERIC_FAILURE
3793  *
3794  */
3795 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3796
3797 /**
3798  * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
3799  *
3800  * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3801  *
3802  * "data" is NULL
3803  *
3804  * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3805  * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3806  *
3807  * Valid errors:
3808  *  SUCCESS
3809  *  RADIO_NOT_AVAILABLE
3810  *  GENERIC_FAILURE
3811  *
3812  */
3813 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
3814
3815 /**
3816  * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
3817  *
3818  * Set GSM/WCDMA Cell Broadcast SMS config
3819  *
3820  * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3821  * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3822  *
3823  * "response" is NULL
3824  *
3825  * Valid errors:
3826  *  SUCCESS
3827  *  RADIO_NOT_AVAILABLE
3828  *  GENERIC_FAILURE
3829  *
3830  */
3831 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
3832
3833 /**
3834  * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
3835  *
3836 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
3837  *
3838  * "data" is const int *
3839  * (const int *)data[0] indicates to activate or turn off the
3840  * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3841  *                       0 - Activate, 1 - Turn off
3842  *
3843  * "response" is NULL
3844  *
3845  * Valid errors:
3846  *  SUCCESS
3847  *  RADIO_NOT_AVAILABLE
3848  *  GENERIC_FAILURE
3849  *
3850  */
3851 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
3852
3853 /**
3854  * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
3855  *
3856  * Request the setting of CDMA Broadcast SMS config
3857  *
3858  * "data" is NULL
3859  *
3860  * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3861  * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3862  *
3863  * Valid errors:
3864  *  SUCCESS
3865  *  RADIO_NOT_AVAILABLE
3866  *  GENERIC_FAILURE
3867  *
3868  */
3869 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
3870
3871 /**
3872  * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
3873  *
3874  * Set CDMA Broadcast SMS config
3875  *
3876  * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3877  * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3878  *
3879  * "response" is NULL
3880  *
3881  * Valid errors:
3882  *  SUCCESS
3883  *  RADIO_NOT_AVAILABLE
3884  *  GENERIC_FAILURE
3885  *
3886  */
3887 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
3888
3889 /**
3890  * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
3891  *
3892  * Enable or disable the reception of CDMA Broadcast SMS
3893  *
3894  * "data" is const int *
3895  * (const int *)data[0] indicates to activate or turn off the
3896  * reception of CDMA Broadcast SMS, 0-1,
3897  *                       0 - Activate, 1 - Turn off
3898  *
3899  * "response" is NULL
3900  *
3901  * Valid errors:
3902  *  SUCCESS
3903  *  RADIO_NOT_AVAILABLE
3904  *  GENERIC_FAILURE
3905  *
3906  */
3907 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
3908
3909 /**
3910  * RIL_REQUEST_CDMA_SUBSCRIPTION
3911  *
3912  * Request the device MDN / H_SID / H_NID.
3913  *
3914  * The request is only allowed when CDMA subscription is available.  When CDMA
3915  * subscription is changed, application layer should re-issue the request to
3916  * update the subscription information.
3917  *
3918  * If a NULL value is returned for any of the device id, it means that error
3919  * accessing the device.
3920  *
3921  * "response" is const char **
3922  * ((const char **)response)[0] is MDN if CDMA subscription is available
3923  * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3924  *                              CDMA subscription is available, in decimal format
3925  * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3926  *                              CDMA subscription is available, in decimal format
3927  * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3928  * ((const char **)response)[4] is PRL version if CDMA subscription is available
3929  *
3930  * Valid errors:
3931  *  SUCCESS
3932  *  RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3933  */
3934
3935 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3936
3937 /**
3938  * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3939  *
3940  * Stores a CDMA SMS message to RUIM memory.
3941  *
3942  * "data" is RIL_CDMA_SMS_WriteArgs *
3943  *
3944  * "response" is int *
3945  * ((const int *)response)[0] is the record index where the message is stored.
3946  *
3947  * Valid errors:
3948  *  SUCCESS
3949  *  RADIO_NOT_AVAILABLE
3950  *  GENERIC_FAILURE
3951  *
3952  */
3953 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3954
3955 /**
3956  * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3957  *
3958  * Deletes a CDMA SMS message from RUIM memory.
3959  *
3960  * "data" is int  *
3961  * ((int *)data)[0] is the record index of the message to delete.
3962  *
3963  * "response" is NULL
3964  *
3965  * Valid errors:
3966  *  SUCCESS
3967  *  RADIO_NOT_AVAILABLE
3968  *  GENERIC_FAILURE
3969  *
3970  */
3971 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3972
3973 /**
3974  * RIL_REQUEST_DEVICE_IDENTITY
3975  *
3976  * Request the device ESN / MEID / IMEI / IMEISV.
3977  *
3978  * The request is always allowed and contains GSM and CDMA device identity;
3979  * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3980  * RIL_REQUEST_GET_IMEISV.
3981  *
3982  * If a NULL value is returned for any of the device id, it means that error
3983  * accessing the device.
3984  *
3985  * When CDMA subscription is changed the ESN/MEID may change.  The application
3986  * layer should re-issue the request to update the device identity in this case.
3987  *
3988  * "response" is const char **
3989  * ((const char **)response)[0] is IMEI if GSM subscription is available
3990  * ((const char **)response)[1] is IMEISV if GSM subscription is available
3991  * ((const char **)response)[2] is ESN if CDMA subscription is available
3992  * ((const char **)response)[3] is MEID if CDMA subscription is available
3993  *
3994  * Valid errors:
3995  *  SUCCESS
3996  *  RADIO_NOT_AVAILABLE
3997  *  GENERIC_FAILURE
3998  */
3999 #define RIL_REQUEST_DEVICE_IDENTITY 98
4000
4001 /**
4002  * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4003  *
4004  * Request the radio's system selection module to exit emergency
4005  * callback mode.  RIL will not respond with SUCCESS until the modem has
4006  * completely exited from Emergency Callback Mode.
4007  *
4008  * "data" is NULL
4009  *
4010  * "response" is NULL
4011  *
4012  * Valid errors:
4013  *  SUCCESS
4014  *  RADIO_NOT_AVAILABLE
4015  *  GENERIC_FAILURE
4016  *
4017  */
4018 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
4019
4020 /**
4021  * RIL_REQUEST_GET_SMSC_ADDRESS
4022  *
4023  * Queries the default Short Message Service Center address on the device.
4024  *
4025  * "data" is NULL
4026  *
4027  * "response" is const char * containing the SMSC address.
4028  *
4029  * Valid errors:
4030  *  SUCCESS
4031  *  RADIO_NOT_AVAILABLE
4032  *  GENERIC_FAILURE
4033  *
4034  */
4035 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
4036
4037 /**
4038  * RIL_REQUEST_SET_SMSC_ADDRESS
4039  *
4040  * Sets the default Short Message Service Center address on the device.
4041  *
4042  * "data" is const char * containing the SMSC address.
4043  *
4044  * "response" is NULL
4045  *
4046  * Valid errors:
4047  *  SUCCESS
4048  *  RADIO_NOT_AVAILABLE
4049  *  GENERIC_FAILURE
4050  *
4051  */
4052 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
4053
4054 /**
4055  * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4056  *
4057  * Indicates whether there is storage available for new SMS messages.
4058  *
4059  * "data" is int *
4060  * ((int *)data)[0] is 1 if memory is available for storing new messages
4061  *                  is 0 if memory capacity is exceeded
4062  *
4063  * "response" is NULL
4064  *
4065  * Valid errors:
4066  *  SUCCESS
4067  *  RADIO_NOT_AVAILABLE
4068  *  GENERIC_FAILURE
4069  *
4070  */
4071 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4072
4073 /**
4074  * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4075  *
4076  * Indicates that the StkSerivce is running and is
4077  * ready to receive RIL_UNSOL_STK_XXXXX commands.
4078  *
4079  * "data" is NULL
4080  * "response" is NULL
4081  *
4082  * Valid errors:
4083  *  SUCCESS
4084  *  RADIO_NOT_AVAILABLE
4085  *  GENERIC_FAILURE
4086  *
4087  */
4088 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4089
4090 /**
4091  * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4092  *
4093  * Request to query the location where the CDMA subscription shall
4094  * be retrieved
4095  *
4096  * "data" is NULL
4097  *
4098  * "response" is int *
4099  * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4100  *
4101  * Valid errors:
4102  *  SUCCESS
4103  *  RADIO_NOT_AVAILABLE
4104  *  GENERIC_FAILURE
4105  *  SUBSCRIPTION_NOT_AVAILABLE
4106  *
4107  * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4108  */
4109 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4110
4111 /**
4112  * RIL_REQUEST_ISIM_AUTHENTICATION
4113  *
4114  * Request the ISIM application on the UICC to perform AKA
4115  * challenge/response algorithm for IMS authentication
4116  *
4117  * "data" is a const char * containing the challenge string in Base64 format
4118  * "response" is a const char * containing the response in Base64 format
4119  *
4120  * Valid errors:
4121  *  SUCCESS
4122  *  RADIO_NOT_AVAILABLE
4123  *  GENERIC_FAILURE
4124  */
4125 #define RIL_REQUEST_ISIM_AUTHENTICATION 105
4126
4127 /**
4128  * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4129  *
4130  * Acknowledge successful or failed receipt of SMS previously indicated
4131  * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4132  * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4133  *
4134  * "data" is const char **
4135  * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4136  *                          is "0" on failed receipt (send RP-ERROR)
4137  * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4138  *
4139  * "response" is NULL
4140  *
4141  * Valid errors:
4142  *  SUCCESS
4143  *  RADIO_NOT_AVAILABLE
4144  *  GENERIC_FAILURE
4145  */
4146 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4147
4148 /**
4149  * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4150  *
4151  * Requests to send a SAT/USAT envelope command to SIM.
4152  * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4153  *
4154  * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4155  * the SW1 and SW2 status bytes from the UICC response are returned along with
4156  * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4157  *
4158  * The RIL implementation shall perform the normal processing of a '91XX'
4159  * response in SW1/SW2 to retrieve the pending proactive command and send it
4160  * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4161  *
4162  * "data" is a const char * containing the SAT/USAT command
4163  * in hexadecimal format starting with command tag
4164  *
4165  * "response" is a const RIL_SIM_IO_Response *
4166  *
4167  * Valid errors:
4168  *  RIL_E_SUCCESS
4169  *  RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4170  *  RIL_E_GENERIC_FAILURE
4171  */
4172 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4173
4174 /**
4175  * RIL_REQUEST_VOICE_RADIO_TECH
4176  *
4177  * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4178  * when radio state is RADIO_STATE_ON
4179  *
4180  * "data" is NULL
4181  * "response" is int *
4182  * ((int *) response)[0] is of type const RIL_RadioTechnology
4183  *
4184  * Valid errors:
4185  *  SUCCESS
4186  *  RADIO_NOT_AVAILABLE
4187  *  GENERIC_FAILURE
4188  */
4189 #define RIL_REQUEST_VOICE_RADIO_TECH 108
4190
4191 /**
4192  * RIL_REQUEST_GET_CELL_INFO_LIST
4193  *
4194  * Request all of the current cell information known to the radio. The radio
4195  * must a list of all current cells, including the neighboring cells. If for a particular
4196  * cell information isn't known then the appropriate unknown value will be returned.
4197  * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4198  *
4199  * "data" is NULL
4200  *
4201  * "response" is an array of  RIL_CellInfo_v12.
4202  */
4203 #define RIL_REQUEST_GET_CELL_INFO_LIST 109
4204
4205 /**
4206  * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4207  *
4208  * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
4209  * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
4210  * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4211  * a RIL_UNSOL_CELL_INFO_LIST.
4212  *
4213  * "data" is int *
4214  * ((int *)data)[0] is minimum time in milliseconds
4215  *
4216  * "response" is NULL
4217  *
4218  * Valid errors:
4219  *  SUCCESS
4220  *  RADIO_NOT_AVAILABLE
4221  *  GENERIC_FAILURE
4222  */
4223 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
4224
4225 /**
4226  * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4227  *
4228  * Set an apn to initial attach network
4229  * "response" is NULL
4230  *
4231  * Valid errors:
4232  *  SUCCESS
4233  *  RADIO_NOT_AVAILABLE (radio resetting)
4234  *  GENERIC_FAILURE
4235  *  SUBSCRIPTION_NOT_AVAILABLE
4236  */
4237 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4238
4239 /**
4240  * RIL_REQUEST_IMS_REGISTRATION_STATE
4241  *
4242  * Request current IMS registration state
4243  *
4244  * "data" is NULL
4245  *
4246  * "response" is int *
4247  * ((int *)response)[0] is registration state:
4248  *              0 - Not registered
4249  *              1 - Registered
4250  *
4251  * If ((int*)response)[0] is = 1, then ((int *) response)[1]
4252  * must follow with IMS SMS format:
4253  *
4254  * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4255  *
4256  * Valid errors:
4257  *  SUCCESS
4258  *  RADIO_NOT_AVAILABLE
4259  *  GENERIC_FAILURE
4260  */
4261 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4262
4263 /**
4264  * RIL_REQUEST_IMS_SEND_SMS
4265  *
4266  * Send a SMS message over IMS
4267  *
4268  * "data" is const RIL_IMS_SMS_Message *
4269  *
4270  * "response" is a const RIL_SMS_Response *
4271  *
4272  * Based on the return error, caller decides to resend if sending sms
4273  * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4274  * In case of retry, data is encoded based on Voice Technology available.
4275  *
4276  * Valid errors:
4277  *  SUCCESS
4278  *  RADIO_NOT_AVAILABLE
4279  *  SMS_SEND_FAIL_RETRY
4280  *  FDN_CHECK_FAILURE
4281  *  GENERIC_FAILURE
4282  *
4283  */
4284 #define RIL_REQUEST_IMS_SEND_SMS 113
4285
4286 /**
4287  * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4288  *
4289  * Request APDU exchange on the basic channel. This command reflects TS 27.007
4290  * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4291  * of GSM/CDMA, and filter commands appropriately. It should filter
4292  * channel management and SELECT by DF name commands.
4293  *
4294  * "data" is a const RIL_SIM_APDU *
4295  * "sessionid" field should be ignored.
4296  *
4297  * "response" is a const RIL_SIM_IO_Response *
4298  *
4299  * Valid errors:
4300  *  SUCCESS
4301  *  RADIO_NOT_AVAILABLE
4302  *  GENERIC_FAILURE
4303  */
4304 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4305
4306 /**
4307  * RIL_REQUEST_SIM_OPEN_CHANNEL
4308  *
4309  * Open a new logical channel and select the given application. This command
4310  * reflects TS 27.007 "open logical channel" operation (+CCHO).
4311  *
4312  * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4313  *
4314  * "response" is int *
4315  * ((int *)data)[0] contains the session id of the logical channel.
4316  * ((int *)data)[1] onwards may optionally contain the select response for the
4317  *     open channel command with one byte per integer.
4318  *
4319  * Valid errors:
4320  *  SUCCESS
4321  *  RADIO_NOT_AVAILABLE
4322  *  GENERIC_FAILURE
4323  *  MISSING_RESOURCE
4324  *  NO_SUCH_ELEMENT
4325  */
4326 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4327
4328 /**
4329  * RIL_REQUEST_SIM_CLOSE_CHANNEL
4330  *
4331  * Close a previously opened logical channel. This command reflects TS 27.007
4332  * "close logical channel" operation (+CCHC).
4333  *
4334  * "data" is int *
4335  * ((int *)data)[0] is the session id of logical the channel to close.
4336  *
4337  * "response" is NULL
4338  *
4339  * Valid errors:
4340  *  SUCCESS
4341  *  RADIO_NOT_AVAILABLE
4342  *  GENERIC_FAILURE
4343  */
4344 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4345
4346 /**
4347  * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4348  *
4349  * Exchange APDUs with a UICC over a previously opened logical channel. This
4350  * command reflects TS 27.007 "generic logical channel access" operation
4351  * (+CGLA). The modem should filter channel management and SELECT by DF name
4352  * commands.
4353  *
4354  * "data" is a const RIL_SIM_APDU*
4355  *
4356  * "response" is a const RIL_SIM_IO_Response *
4357  *
4358  * Valid errors:
4359  *  SUCCESS
4360  *  RADIO_NOT_AVAILABLE
4361  *  GENERIC_FAILURE
4362  */
4363 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4364
4365 /**
4366  * RIL_REQUEST_NV_READ_ITEM
4367  *
4368  * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4369  * This is used for device configuration by some CDMA operators.
4370  *
4371  * "data" is a const RIL_NV_ReadItem *
4372  *
4373  * "response" is const char * containing the contents of the NV item
4374  *
4375  * Valid errors:
4376  *  SUCCESS
4377  *  RADIO_NOT_AVAILABLE
4378  *  GENERIC_FAILURE
4379  */
4380 #define RIL_REQUEST_NV_READ_ITEM 118
4381
4382 /**
4383  * RIL_REQUEST_NV_WRITE_ITEM
4384  *
4385  * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4386  * This is used for device configuration by some CDMA operators.
4387  *
4388  * "data" is a const RIL_NV_WriteItem *
4389  *
4390  * "response" is NULL
4391  *
4392  * Valid errors:
4393  *  SUCCESS
4394  *  RADIO_NOT_AVAILABLE
4395  *  GENERIC_FAILURE
4396  */
4397 #define RIL_REQUEST_NV_WRITE_ITEM 119
4398
4399 /**
4400  * RIL_REQUEST_NV_WRITE_CDMA_PRL
4401  *
4402  * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4403  * This is used for device configuration by some CDMA operators.
4404  *
4405  * "data" is a const char * containing the PRL as a byte array
4406  *
4407  * "response" is NULL
4408  *
4409  * Valid errors:
4410  *  SUCCESS
4411  *  RADIO_NOT_AVAILABLE
4412  *  GENERIC_FAILURE
4413  */
4414 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4415
4416 /**
4417  * RIL_REQUEST_NV_RESET_CONFIG
4418  *
4419  * Reset the radio NV configuration to the factory state.
4420  * This is used for device configuration by some CDMA operators.
4421  *
4422  * "data" is int *
4423  * ((int *)data)[0] is 1 to reload all NV items
4424  * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4425  * ((int *)data)[0] is 3 for factory reset (RTN)
4426  *
4427  * "response" is NULL
4428  *
4429  * Valid errors:
4430  *  SUCCESS
4431  *  RADIO_NOT_AVAILABLE
4432  *  GENERIC_FAILURE
4433  */
4434 #define RIL_REQUEST_NV_RESET_CONFIG 121
4435
4436  /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4437  * FIXME This API needs to have more documentation.
4438  *
4439  * Selection/de-selection of a subscription from a SIM card
4440  * "data" is const  RIL_SelectUiccSub*
4441
4442  *
4443  * "response" is NULL
4444  *
4445  *  Valid errors:
4446  *  SUCCESS
4447  *  RADIO_NOT_AVAILABLE (radio resetting)
4448  *  GENERIC_FAILURE
4449  *  SUBSCRIPTION_NOT_SUPPORTED
4450  *
4451  */
4452 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION  122
4453
4454 /**
4455  *  RIL_REQUEST_ALLOW_DATA
4456  *
4457  *  Tells the modem whether data calls are allowed or not
4458  *
4459  * "data" is int *
4460  * FIXME slotId and aid will be added.
4461  * ((int *)data)[0] is == 0 to allow data calls
4462  * ((int *)data)[0] is == 1 to disallow data calls
4463  *
4464  * "response" is NULL
4465  *
4466  *  Valid errors:
4467  *
4468  *  SUCCESS
4469  *  RADIO_NOT_AVAILABLE (radio resetting)
4470  *  GENERIC_FAILURE
4471  *
4472  */
4473 #define RIL_REQUEST_ALLOW_DATA  123
4474
4475 /**
4476  * RIL_REQUEST_GET_HARDWARE_CONFIG
4477  *
4478  * Request all of the current hardware (modem and sim) associated
4479  * with the RIL.
4480  *
4481  * "data" is NULL
4482  *
4483  * "response" is an array of  RIL_HardwareConfig.
4484  */
4485 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4486
4487 /**
4488  * RIL_REQUEST_SIM_AUTHENTICATION
4489  *
4490  * Returns the response of SIM Authentication through RIL to a
4491  * challenge request.
4492  *
4493  * "data" Base64 encoded string containing challenge:
4494  *      int   authContext;          P2 value of authentication command, see P2 parameter in
4495  *                                  3GPP TS 31.102 7.1.2
4496  *      char *authData;             the challenge string in Base64 format, see 3GPP
4497  *                                  TS 31.102 7.1.2
4498  *      char *aid;                  AID value, See ETSI 102.221 8.1 and 101.220 4,
4499  *                                  NULL if no value
4500  *
4501  * "response" Base64 encoded strings containing response:
4502  *      int   sw1;                  Status bytes per 3GPP TS 31.102 section 7.3
4503  *      int   sw2;
4504  *      char *simResponse;          Response in Base64 format, see 3GPP TS 31.102 7.1.2
4505  */
4506 #define RIL_REQUEST_SIM_AUTHENTICATION 125
4507
4508 /**
4509  * RIL_REQUEST_GET_DC_RT_INFO
4510  *
4511  * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
4512  * Requests the Data Connection Real Time Info
4513  *
4514  * "data" is NULL
4515  *
4516  * "response" is the most recent RIL_DcRtInfo
4517  *
4518  * Valid errors:
4519  *  SUCCESS
4520  *  RADIO_NOT_AVAILABLE
4521  *  GENERIC_FAILURE
4522  *
4523  * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4524  */
4525 #define RIL_REQUEST_GET_DC_RT_INFO 126
4526
4527 /**
4528  * RIL_REQUEST_SET_DC_RT_INFO_RATE
4529  *
4530  * The request is DEPRECATED
4531  * This is the minimum number of milliseconds between successive
4532  * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4533  * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4534  * 0 means send as fast as possible.
4535  *
4536  * "data" The number of milliseconds as an int
4537  *
4538  * "response" is null
4539  *
4540  * Valid errors:
4541  *  SUCCESS must not fail
4542  */
4543 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4544
4545 /**
4546  * RIL_REQUEST_SET_DATA_PROFILE
4547  *
4548  * Set data profile in modem
4549  * Modem should erase existed profiles from framework, and apply new profiles
4550  * "data" is an const RIL_DataProfileInfo **
4551  * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4552  * "response" is NULL
4553  *
4554  * Valid errors:
4555  *  SUCCESS
4556  *  RADIO_NOT_AVAILABLE (radio resetting)
4557  *  GENERIC_FAILURE
4558  *  SUBSCRIPTION_NOT_AVAILABLE
4559  */
4560 #define RIL_REQUEST_SET_DATA_PROFILE 128
4561
4562 /**
4563  * RIL_REQUEST_SHUTDOWN
4564  *
4565  * Device is shutting down. All further commands are ignored
4566  * and RADIO_NOT_AVAILABLE must be returned.
4567  *
4568  * "data" is null
4569  * "response" is NULL
4570  *
4571  * Valid errors:
4572  *  SUCCESS
4573  *  RADIO_NOT_AVAILABLE
4574  *  GENERIC_FAILURE
4575  */
4576 #define RIL_REQUEST_SHUTDOWN 129
4577
4578 /**
4579  * RIL_REQUEST_GET_RADIO_CAPABILITY
4580  *
4581  * Used to get phone radio capablility.
4582  *
4583  * "data" is the RIL_RadioCapability structure
4584  *
4585  * Valid errors:
4586  *  SUCCESS
4587  *  RADIO_NOT_AVAILABLE
4588  *  GENERIC_FAILURE
4589  */
4590 #define RIL_REQUEST_GET_RADIO_CAPABILITY 130
4591
4592 /**
4593  * RIL_REQUEST_SET_RADIO_CAPABILITY
4594  *
4595  * Used to set the phones radio capability. Be VERY careful
4596  * using this request as it may cause some vendor modems to reset. Because
4597  * of the possible modem reset any RIL commands after this one may not be
4598  * processed.
4599  *
4600  * "data" is the RIL_RadioCapability structure
4601  *
4602  * "response" is the RIL_RadioCapability structure, used to feedback return status
4603  *
4604  * Valid errors:
4605  *  SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
4606  *  RADIO_NOT_AVAILABLE
4607  *  GENERIC_FAILURE
4608  */
4609 #define RIL_REQUEST_SET_RADIO_CAPABILITY 131
4610
4611 /**
4612  * RIL_REQUEST_START_LCE
4613  *
4614  * Start Link Capacity Estimate (LCE) service if supported by the radio.
4615  *
4616  * "data" is const int *
4617  * ((const int*)data)[0] specifies the desired reporting interval (ms).
4618  * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
4619  *
4620  * "response" is the RIL_LceStatusInfo.
4621  *
4622  * Valid errors:
4623  * SUCCESS
4624  * RADIO_NOT_AVAILABLE
4625  * LCE_NOT_SUPPORTED
4626  */
4627 #define RIL_REQUEST_START_LCE 132
4628
4629 /**
4630  * RIL_REQUEST_STOP_LCE
4631  *
4632  * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
4633  * idempotent for the radio modem.
4634  *
4635  * "response" is the RIL_LceStatusInfo.
4636  *
4637  * Valid errors:
4638  * SUCCESS
4639  * RADIO_NOT_AVAILABLE
4640  * LCE_NOT_SUPPORTED
4641  */
4642 #define RIL_REQUEST_STOP_LCE 133
4643
4644 /**
4645  * RIL_REQUEST_PULL_LCEDATA
4646  *
4647  * Pull LCE service for capacity information.
4648  *
4649  * "response" is the RIL_LceDataInfo.
4650  *
4651  * Valid errors:
4652  * SUCCESS
4653  * RADIO_NOT_AVAILABLE
4654  * LCE_NOT_SUPPORTED
4655  */
4656 #define RIL_REQUEST_PULL_LCEDATA 134
4657
4658 /**
4659  * RIL_REQUEST_GET_ACTIVITY_INFO
4660  *
4661  * Get modem activity statisitics info.
4662  *
4663  * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
4664  * Once the response for the request is sent modem will clear
4665  * current statistics information.
4666  *
4667  * "data" is null
4668  * "response" is const RIL_ActivityStatsInfo *
4669  *
4670  * Valid errors:
4671  *
4672  * SUCCESS
4673  * RADIO_NOT_AVAILABLE (radio resetting)
4674  * GENERIC_FAILURE
4675  */
4676 #define RIL_REQUEST_GET_ACTIVITY_INFO 135
4677
4678 /***********************************************************************/
4679
4680 /**
4681  * RIL_RESPONSE_ACKNOWLEDGEMENT
4682  *
4683  * This is used by Asynchronous solicited messages and Unsolicited messages
4684  * to acknowledge the receipt of those messages in RIL.java so that the ack
4685  * can be used to let ril.cpp to release wakelock.
4686  *
4687  * Valid errors
4688  * SUCCESS
4689  * RADIO_NOT_AVAILABLE
4690  */
4691
4692 #define RIL_RESPONSE_ACKNOWLEDGEMENT 800
4693
4694 /***********************************************************************/
4695
4696
4697 #define RIL_UNSOL_RESPONSE_BASE 1000
4698
4699 /**
4700  * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
4701  *
4702  * Indicate when value of RIL_RadioState has changed.
4703  *
4704  * Callee will invoke RIL_RadioStateRequest method on main thread
4705  *
4706  * "data" is NULL
4707  */
4708
4709 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
4710
4711
4712 /**
4713  * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
4714  *
4715  * Indicate when call state has changed
4716  *
4717  * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
4718  *
4719  * "data" is NULL
4720  *
4721  * Response should be invoked on, for example,
4722  * "RING", "BUSY", "NO CARRIER", and also call state
4723  * transitions (DIALING->ALERTING ALERTING->ACTIVE)
4724  *
4725  * Redundent or extraneous invocations are tolerated
4726  */
4727 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4728
4729
4730 /**
4731  * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
4732  *
4733  * Called when the voice network state changed
4734  *
4735  * Callee will invoke the following requests on main thread:
4736  *
4737  * RIL_REQUEST_VOICE_REGISTRATION_STATE
4738  * RIL_REQUEST_OPERATOR
4739  *
4740  * "data" is NULL
4741  *
4742  * FIXME should this happen when SIM records are loaded? (eg, for
4743  * EONS)
4744  */
4745 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
4746
4747 /**
4748  * RIL_UNSOL_RESPONSE_NEW_SMS
4749  *
4750  * Called when new SMS is received.
4751  *
4752  * "data" is const char *
4753  * This is a pointer to a string containing the PDU of an SMS-DELIVER
4754  * as an ascii string of hex digits. The PDU starts with the SMSC address
4755  * per TS 27.005 (+CMT:)
4756  *
4757  * Callee will subsequently confirm the receipt of thei SMS with a
4758  * RIL_REQUEST_SMS_ACKNOWLEDGE
4759  *
4760  * No new RIL_UNSOL_RESPONSE_NEW_SMS
4761  * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4762  * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4763  */
4764
4765 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4766
4767 /**
4768  * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4769  *
4770  * Called when new SMS Status Report is received.
4771  *
4772  * "data" is const char *
4773  * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4774  * as an ascii string of hex digits. The PDU starts with the SMSC address
4775  * per TS 27.005 (+CDS:).
4776  *
4777  * Callee will subsequently confirm the receipt of the SMS with a
4778  * RIL_REQUEST_SMS_ACKNOWLEDGE
4779  *
4780  * No new RIL_UNSOL_RESPONSE_NEW_SMS
4781  * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4782  * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4783  */
4784
4785 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4786
4787 /**
4788  * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4789  *
4790  * Called when new SMS has been stored on SIM card
4791  *
4792  * "data" is const int *
4793  * ((const int *)data)[0] contains the slot index on the SIM that contains
4794  * the new message
4795  */
4796
4797 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4798
4799 /**
4800  * RIL_UNSOL_ON_USSD
4801  *
4802  * Called when a new USSD message is received.
4803  *
4804  * "data" is const char **
4805  * ((const char **)data)[0] points to a type code, which is
4806  *  one of these string values:
4807  *      "0"   USSD-Notify -- text in ((const char **)data)[1]
4808  *      "1"   USSD-Request -- text in ((const char **)data)[1]
4809  *      "2"   Session terminated by network
4810  *      "3"   other local client (eg, SIM Toolkit) has responded
4811  *      "4"   Operation not supported
4812  *      "5"   Network timeout
4813  *
4814  * The USSD session is assumed to persist if the type code is "1", otherwise
4815  * the current session (if any) is assumed to have terminated.
4816  *
4817  * ((const char **)data)[1] points to a message string if applicable, which
4818  * should always be in UTF-8.
4819  */
4820 #define RIL_UNSOL_ON_USSD 1006
4821 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006   */
4822
4823 /**
4824  * RIL_UNSOL_ON_USSD_REQUEST
4825  *
4826  * Obsolete. Send via RIL_UNSOL_ON_USSD
4827  */
4828 #define RIL_UNSOL_ON_USSD_REQUEST 1007
4829
4830 /**
4831  * RIL_UNSOL_NITZ_TIME_RECEIVED
4832  *
4833  * Called when radio has received a NITZ time message
4834  *
4835  * "data" is const char * pointing to NITZ time string
4836  * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4837  */
4838 #define RIL_UNSOL_NITZ_TIME_RECEIVED  1008
4839
4840 /**
4841  * RIL_UNSOL_SIGNAL_STRENGTH
4842  *
4843  * Radio may report signal strength rather han have it polled.
4844  *
4845  * "data" is a const RIL_SignalStrength *
4846  */
4847 #define RIL_UNSOL_SIGNAL_STRENGTH  1009
4848
4849
4850 /**
4851  * RIL_UNSOL_DATA_CALL_LIST_CHANGED
4852  *
4853  * "data" is an array of RIL_Data_Call_Response_v6 identical to that
4854  * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4855  * of current data contexts including new contexts that have been
4856  * activated. A data call is only removed from this list when the
4857  * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4858  * is powered off/on.
4859  *
4860  * See also: RIL_REQUEST_DATA_CALL_LIST
4861  */
4862
4863 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
4864
4865 /**
4866  * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4867  *
4868  * Reports supplementary service related notification from the network.
4869  *
4870  * "data" is a const RIL_SuppSvcNotification *
4871  *
4872  */
4873
4874 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4875
4876 /**
4877  * RIL_UNSOL_STK_SESSION_END
4878  *
4879  * Indicate when STK session is terminated by SIM.
4880  *
4881  * "data" is NULL
4882  */
4883 #define RIL_UNSOL_STK_SESSION_END 1012
4884
4885 /**
4886  * RIL_UNSOL_STK_PROACTIVE_COMMAND
4887  *
4888  * Indicate when SIM issue a STK proactive command to applications
4889  *
4890  * "data" is a const char * containing SAT/USAT proactive command
4891  * in hexadecimal format string starting with command tag
4892  *
4893  */
4894 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4895
4896 /**
4897  * RIL_UNSOL_STK_EVENT_NOTIFY
4898  *
4899  * Indicate when SIM notifies applcations some event happens.
4900  * Generally, application does not need to have any feedback to
4901  * SIM but shall be able to indicate appropriate messages to users.
4902  *
4903  * "data" is a const char * containing SAT/USAT commands or responses
4904  * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4905  * starting with first byte of response data or command tag
4906  *
4907  */
4908 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4909
4910 /**
4911  * RIL_UNSOL_STK_CALL_SETUP
4912  *
4913  * Indicate when SIM wants application to setup a voice call.
4914  *
4915  * "data" is const int *
4916  * ((const int *)data)[0] contains timeout value (in milliseconds)
4917  */
4918 #define RIL_UNSOL_STK_CALL_SETUP 1015
4919
4920 /**
4921  * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4922  *
4923  * Indicates that SMS storage on the SIM is full.  Sent when the network
4924  * attempts to deliver a new SMS message.  Messages cannot be saved on the
4925  * SIM until space is freed.  In particular, incoming Class 2 messages
4926  * cannot be stored.
4927  *
4928  * "data" is null
4929  *
4930  */
4931 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4932
4933 /**
4934  * RIL_UNSOL_SIM_REFRESH
4935  *
4936  * Indicates that file(s) on the SIM have been updated, or the SIM
4937  * has been reinitialized.
4938  *
4939  * In the case where RIL is version 6 or older:
4940  * "data" is an int *
4941  * ((int *)data)[0] is a RIL_SimRefreshResult.
4942  * ((int *)data)[1] is the EFID of the updated file if the result is
4943  * SIM_FILE_UPDATE or NULL for any other result.
4944  *
4945  * In the case where RIL is version 7:
4946  * "data" is a RIL_SimRefreshResponse_v7 *
4947  *
4948  * Note: If the SIM state changes as a result of the SIM refresh (eg,
4949  * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4950  * should be sent.
4951  */
4952 #define RIL_UNSOL_SIM_REFRESH 1017
4953
4954 /**
4955  * RIL_UNSOL_CALL_RING
4956  *
4957  * Ring indication for an incoming call (eg, RING or CRING event).
4958  * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4959  * of a call and sending multiple is optional. If the system property
4960  * ro.telephony.call_ring.multiple is false then the upper layers
4961  * will generate the multiple events internally. Otherwise the vendor
4962  * ril must generate multiple RIL_UNSOL_CALL_RING if
4963  * ro.telephony.call_ring.multiple is true or if it is absent.
4964  *
4965  * The rate of these events is controlled by ro.telephony.call_ring.delay
4966  * and has a default value of 3000 (3 seconds) if absent.
4967  *
4968  * "data" is null for GSM
4969  * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
4970  */
4971 #define RIL_UNSOL_CALL_RING 1018
4972
4973 /**
4974  * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4975  *
4976  * Indicates that SIM state changes.
4977  *
4978  * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
4979
4980  * "data" is null
4981  */
4982 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4983
4984 /**
4985  * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4986  *
4987  * Called when new CDMA SMS is received
4988  *
4989  * "data" is const RIL_CDMA_SMS_Message *
4990  *
4991  * Callee will subsequently confirm the receipt of the SMS with
4992  * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4993  *
4994  * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4995  * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
4996  *
4997  */
4998 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4999
5000 /**
5001  * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5002  *
5003  * Called when new Broadcast SMS is received
5004  *
5005  * "data" can be one of the following:
5006  * If received from GSM network, "data" is const char of 88 bytes
5007  * which indicates each page of a CBS Message sent to the MS by the
5008  * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5009  * If received from UMTS network, "data" is const char of 90 up to 1252
5010  * bytes which contain between 1 and 15 CBS Message pages sent as one
5011  * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
5012  *
5013  */
5014 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
5015
5016 /**
5017  * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5018  *
5019  * Indicates that SMS storage on the RUIM is full.  Messages
5020  * cannot be saved on the RUIM until space is freed.
5021  *
5022  * "data" is null
5023  *
5024  */
5025 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5026
5027 /**
5028  * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5029  *
5030  * Indicates a restricted state change (eg, for Domain Specific Access Control).
5031  *
5032  * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5033  *
5034  * "data" is an int *
5035  * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5036  */
5037 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5038
5039 /**
5040  * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5041  *
5042  * Indicates that the radio system selection module has
5043  * autonomously entered emergency callback mode.
5044  *
5045  * "data" is null
5046  *
5047  */
5048 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
5049
5050 /**
5051  * RIL_UNSOL_CDMA_CALL_WAITING
5052  *
5053  * Called when CDMA radio receives a call waiting indication.
5054  *
5055  * "data" is const RIL_CDMA_CallWaiting *
5056  *
5057  */
5058 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
5059
5060 /**
5061  * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5062  *
5063  * Called when CDMA radio receives an update of the progress of an
5064  * OTASP/OTAPA call.
5065  *
5066  * "data" is const int *
5067  *  For CDMA this is an integer OTASP/OTAPA status listed in
5068  *  RIL_CDMA_OTA_ProvisionStatus.
5069  *
5070  */
5071 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5072
5073 /**
5074  * RIL_UNSOL_CDMA_INFO_REC
5075  *
5076  * Called when CDMA radio receives one or more info recs.
5077  *
5078  * "data" is const RIL_CDMA_InformationRecords *
5079  *
5080  */
5081 #define RIL_UNSOL_CDMA_INFO_REC 1027
5082
5083 /**
5084  * RIL_UNSOL_OEM_HOOK_RAW
5085  *
5086  * This is for OEM specific use.
5087  *
5088  * "data" is a byte[]
5089  */
5090 #define RIL_UNSOL_OEM_HOOK_RAW 1028
5091
5092 /**
5093  * RIL_UNSOL_RINGBACK_TONE
5094  *
5095  * Indicates that nework doesn't have in-band information,  need to
5096  * play out-band tone.
5097  *
5098  * "data" is an int *
5099  * ((int *)data)[0] == 0 for stop play ringback tone.
5100  * ((int *)data)[0] == 1 for start play ringback tone.
5101  */
5102 #define RIL_UNSOL_RINGBACK_TONE 1029
5103
5104 /**
5105  * RIL_UNSOL_RESEND_INCALL_MUTE
5106  *
5107  * Indicates that framework/application need reset the uplink mute state.
5108  *
5109  * There may be situations where the mute state becomes out of sync
5110  * between the application and device in some GSM infrastructures.
5111  *
5112  * "data" is null
5113  */
5114 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
5115
5116 /**
5117  * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5118  *
5119  * Called when CDMA subscription source changed.
5120  *
5121  * "data" is int *
5122  * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5123  */
5124 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
5125
5126 /**
5127  * RIL_UNSOL_CDMA_PRL_CHANGED
5128  *
5129  * Called when PRL (preferred roaming list) changes.
5130  *
5131  * "data" is int *
5132  * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5133  */
5134 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5135
5136 /**
5137  * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5138  *
5139  * Called when Emergency Callback Mode Ends
5140  *
5141  * Indicates that the radio system selection module has
5142  * proactively exited emergency callback mode.
5143  *
5144  * "data" is NULL
5145  *
5146  */
5147 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5148
5149 /**
5150  * RIL_UNSOL_RIL_CONNECTED
5151  *
5152  * Called the ril connects and returns the version
5153  *
5154  * "data" is int *
5155  * ((int *)data)[0] is RIL_VERSION
5156  */
5157 #define RIL_UNSOL_RIL_CONNECTED 1034
5158
5159 /**
5160  * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5161  *
5162  * Indicates that voice technology has changed. Contains new radio technology
5163  * as a data in the message.
5164  *
5165  * "data" is int *
5166  * ((int *)data)[0] is of type const RIL_RadioTechnology
5167  *
5168  */
5169 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5170
5171 /**
5172  * RIL_UNSOL_CELL_INFO_LIST
5173  *
5174  * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5175  * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5176  *
5177  * "data" is NULL
5178  *
5179  * "response" is an array of RIL_CellInfo_v12.
5180  */
5181 #define RIL_UNSOL_CELL_INFO_LIST 1036
5182
5183 /**
5184  * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5185  *
5186  * Called when IMS registration state has changed
5187  *
5188  * To get IMS registration state and IMS SMS format, callee needs to invoke the
5189  * following request on main thread:
5190  *
5191  * RIL_REQUEST_IMS_REGISTRATION_STATE
5192  *
5193  * "data" is NULL
5194  *
5195  */
5196 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5197
5198 /**
5199  * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5200  *
5201  * Indicated when there is a change in subscription status.
5202  * This event will be sent in the following scenarios
5203  *  - subscription readiness at modem, which was selected by telephony layer
5204  *  - when subscription is deactivated by modem due to UICC card removal
5205  *  - When network invalidates the subscription i.e. attach reject due to authentication reject
5206  *
5207  * "data" is const int *
5208  * ((const int *)data)[0] == 0 for Subscription Deactivated
5209  * ((const int *)data)[0] == 1 for Subscription Activated
5210  *
5211  */
5212 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5213
5214 /**
5215  * RIL_UNSOL_SRVCC_STATE_NOTIFY
5216  *
5217  * Called when Single Radio Voice Call Continuity(SRVCC)
5218  * progress state has changed
5219  *
5220  * "data" is int *
5221  * ((int *)data)[0] is of type const RIL_SrvccState
5222  *
5223  */
5224
5225 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5226
5227 /**
5228  * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5229  *
5230  * Called when the hardware configuration associated with the RILd changes
5231  *
5232  * "data" is an array of RIL_HardwareConfig
5233  *
5234  */
5235 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5236
5237 /**
5238  * RIL_UNSOL_DC_RT_INFO_CHANGED
5239  *
5240  * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
5241  * Sent when the DC_RT_STATE changes but the time
5242  * between these messages must not be less than the
5243  * value set by RIL_REQUEST_SET_DC_RT_RATE.
5244  *
5245  * "data" is the most recent RIL_DcRtInfo
5246  *
5247  */
5248 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5249
5250 /**
5251  * RIL_UNSOL_RADIO_CAPABILITY
5252  *
5253  * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5254  * Returns the phone radio capability exactly as
5255  * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5256  * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5257  *
5258  * "data" is the RIL_RadioCapability structure
5259  */
5260 #define RIL_UNSOL_RADIO_CAPABILITY 1042
5261
5262 /*
5263  * RIL_UNSOL_ON_SS
5264  *
5265  * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5266  * call control.
5267  *
5268  * "data" is const RIL_StkCcUnsolSsResponse *
5269  *
5270  */
5271 #define RIL_UNSOL_ON_SS 1043
5272
5273 /**
5274  * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5275  *
5276  * Called when there is an ALPHA from UICC during Call Control.
5277  *
5278  * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5279  *
5280  */
5281 #define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5282
5283 /**
5284  * RIL_UNSOL_LCEDATA_RECV
5285  *
5286  * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5287  *
5288  * "data" is the RIL_LceDataInfo structure.
5289  *
5290  */
5291 #define RIL_UNSOL_LCEDATA_RECV 1045
5292
5293 /***********************************************************************/
5294
5295
5296 #if defined(ANDROID_MULTI_SIM)
5297 /**
5298  * RIL_Request Function pointer
5299  *
5300  * @param request is one of RIL_REQUEST_*
5301  * @param data is pointer to data defined for that RIL_REQUEST_*
5302  *        data is owned by caller, and should not be modified or freed by callee
5303  * @param t should be used in subsequent call to RIL_onResponse
5304  * @param datalen the length of data
5305  *
5306  */
5307 typedef void (*RIL_RequestFunc) (int request, void *data,
5308                                     size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5309
5310 /**
5311  * This function should return the current radio state synchronously
5312  */
5313 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5314
5315 #else
5316 /* Backward compatible */
5317
5318 /**
5319  * RIL_Request Function pointer
5320  *
5321  * @param request is one of RIL_REQUEST_*
5322  * @param data is pointer to data defined for that RIL_REQUEST_*
5323  *        data is owned by caller, and should not be modified or freed by callee
5324  * @param t should be used in subsequent call to RIL_onResponse
5325  * @param datalen the length of data
5326  *
5327  */
5328 typedef void (*RIL_RequestFunc) (int request, void *data,
5329                                     size_t datalen, RIL_Token t);
5330
5331 /**
5332  * This function should return the current radio state synchronously
5333  */
5334 typedef RIL_RadioState (*RIL_RadioStateRequest)();
5335
5336 #endif
5337
5338
5339 /**
5340  * This function returns "1" if the specified RIL_REQUEST code is
5341  * supported and 0 if it is not
5342  *
5343  * @param requestCode is one of RIL_REQUEST codes
5344  */
5345
5346 typedef int (*RIL_Supports)(int requestCode);
5347
5348 /**
5349  * This function is called from a separate thread--not the
5350  * thread that calls RIL_RequestFunc--and indicates that a pending
5351  * request should be cancelled.
5352  *
5353  * On cancel, the callee should do its best to abandon the request and
5354  * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5355  *
5356  * Subsequent calls to  RIL_onRequestComplete for this request with
5357  * other results will be tolerated but ignored. (That is, it is valid
5358  * to ignore the cancellation request)
5359  *
5360  * RIL_Cancel calls should return immediately, and not wait for cancellation
5361  *
5362  * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
5363  * interface
5364  *
5365  * @param t token wants to be canceled
5366  */
5367
5368 typedef void (*RIL_Cancel)(RIL_Token t);
5369
5370 typedef void (*RIL_TimedCallback) (void *param);
5371
5372 /**
5373  * Return a version string for your RIL implementation
5374  */
5375 typedef const char * (*RIL_GetVersion) (void);
5376
5377 typedef struct {
5378     int version;        /* set to RIL_VERSION */
5379     RIL_RequestFunc onRequest;
5380     RIL_RadioStateRequest onStateRequest;
5381     RIL_Supports supports;
5382     RIL_Cancel onCancel;
5383     RIL_GetVersion getVersion;
5384 } RIL_RadioFunctions;
5385
5386 typedef struct {
5387     char *apn;
5388     char *protocol;
5389     int authtype;
5390     char *username;
5391     char *password;
5392 } RIL_InitialAttachApn;
5393
5394 typedef struct {
5395     int authContext;            /* P2 value of authentication command, see P2 parameter in
5396                                    3GPP TS 31.102 7.1.2 */
5397     char *authData;             /* the challenge string in Base64 format, see 3GPP
5398                                    TS 31.102 7.1.2 */
5399     char *aid;                  /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5400                                    NULL if no value. */
5401 } RIL_SimAuthentication;
5402
5403 #ifdef RIL_SHLIB
5404 struct RIL_Env {
5405     /**
5406      * "t" is parameter passed in on previous call to RIL_Notification
5407      * routine.
5408      *
5409      * If "e" != SUCCESS, then response can be null/is ignored
5410      *
5411      * "response" is owned by caller, and should not be modified or
5412      * freed by callee
5413      *
5414      * RIL_onRequestComplete will return as soon as possible
5415      */
5416     void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
5417                            void *response, size_t responselen);
5418
5419 #if defined(ANDROID_MULTI_SIM)
5420     /**
5421      * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5422      * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5423      *
5424      * "data" is owned by caller, and should not be modified or freed by callee
5425      */
5426     void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5427 #else
5428     /**
5429      * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5430      * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5431      *
5432      * "data" is owned by caller, and should not be modified or freed by callee
5433      */
5434     void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5435 #endif
5436     /**
5437      * Call user-specifed "callback" function on on the same thread that
5438      * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5439      * a relative time value at which the callback is invoked. If relativeTime is
5440      * NULL or points to a 0-filled structure, the callback will be invoked as
5441      * soon as possible
5442      */
5443
5444     void (*RequestTimedCallback) (RIL_TimedCallback callback,
5445                                    void *param, const struct timeval *relativeTime);
5446    /**
5447     * "t" is parameter passed in on previous call RIL_Notification routine
5448     *
5449     * RIL_onRequestAck will be called by vendor when an Async RIL request was received
5450     * by them and an ack needs to be sent back to java ril.
5451     */
5452     void (*OnRequestAck) (RIL_Token t);
5453 };
5454
5455
5456 /**
5457  *  RIL implementations must defined RIL_Init
5458  *  argc and argv will be command line arguments intended for the RIL implementation
5459  *  Return NULL on error
5460  *
5461  * @param env is environment point defined as RIL_Env
5462  * @param argc number of arguments
5463  * @param argv list fo arguments
5464  *
5465  */
5466 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5467
5468 #else /* RIL_SHLIB */
5469
5470 /**
5471  * Call this once at startup to register notification routine
5472  *
5473  * @param callbacks user-specifed callback function
5474  */
5475 void RIL_register (const RIL_RadioFunctions *callbacks);
5476
5477
5478 /**
5479  *
5480  * RIL_onRequestComplete will return as soon as possible
5481  *
5482  * @param t is parameter passed in on previous call to RIL_Notification
5483  *          routine.
5484  * @param e error code
5485  *          if "e" != SUCCESS, then response can be null/is ignored
5486  * @param response is owned by caller, and should not be modified or
5487  *                 freed by callee
5488  * @param responselen the length of response in byte
5489  */
5490 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
5491                            void *response, size_t responselen);
5492
5493 /**
5494  * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
5495  * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
5496  * results, just that the command was received and will take a while. After sending this Ack
5497  * its vendor's responsibility to make sure that AP is up whenever needed while command is
5498  * being processed.
5499  *
5500  * @param t is parameter passed in on previous call to RIL_Notification
5501  *          routine.
5502  */
5503 void RIL_onRequestAck(RIL_Token t);
5504
5505 #if defined(ANDROID_MULTI_SIM)
5506 /**
5507  * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5508  * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5509  *     "data" is owned by caller, and should not be modified or freed by callee
5510  * @param datalen the length of data in byte
5511  */
5512
5513 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5514                                 size_t datalen, RIL_SOCKET_ID socket_id);
5515 #else
5516 /**
5517  * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5518  * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5519  *     "data" is owned by caller, and should not be modified or freed by callee
5520  * @param datalen the length of data in byte
5521  */
5522
5523 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5524                                 size_t datalen);
5525 #endif
5526
5527 /**
5528  * Call user-specifed "callback" function on on the same thread that
5529  * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5530  * a relative time value at which the callback is invoked. If relativeTime is
5531  * NULL or points to a 0-filled structure, the callback will be invoked as
5532  * soon as possible
5533  *
5534  * @param callback user-specifed callback function
5535  * @param param parameter list
5536  * @param relativeTime a relative time value at which the callback is invoked
5537  */
5538
5539 void RIL_requestTimedCallback (RIL_TimedCallback callback,
5540                                void *param, const struct timeval *relativeTime);
5541
5542
5543 #endif /* RIL_SHLIB */
5544
5545 #ifdef __cplusplus
5546 }
5547 #endif
5548
5549 #endif /*ANDROID_RIL_H*/