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