Commit 3d54e74b authored by Wink Saville's avatar Wink Saville
Browse files

Teleca 2b changes.

parent f8bc1675
......@@ -57,15 +57,13 @@ typedef enum {
call on a Class C GPRS device */
RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
registers in network */
RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
shall be retrieved because of SIM or RUIM
RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
shall be retrieved because of SIM or RUIM
card absent */
#ifdef FEATURE_MULTIMODE_ANDROID
RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
location */
RIL_E_MODE_NOT_SUPPORTED = 13 /* HW does not support preferred network type */
#endif
} RIL_Errno;
typedef enum {
......@@ -206,14 +204,14 @@ typedef struct {
* 4 = erasure
*/
int reason; /* from TS 27.007 7.11 "reason" */
int serviceClass; /* From 27.007 +CCFC/+CLCK "class"
See table for Android mapping from
MMI service code
0 means user doesn't input class */
int toa; /* "type" from TS 27.007 7.11 */
char * number; /* "number" from TS 27.007 7.11. May be NULL */
int timeSeconds; /* for CF no reply only */
int reason; /* from TS 27.007 7.11 "reason" */
int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
See table for Android mapping from
MMI service code
0 means user doesn't input class */
int toa; /* "type" from TS 27.007 7.11 */
char * number; /* "number" from TS 27.007 7.11. May be NULL */
int timeSeconds; /* for CF no reply only */
}RIL_CallForwardInfo;
typedef struct {
......@@ -273,15 +271,15 @@ typedef struct {
(MT only, may be NULL). */
} RIL_SuppSvcNotification;
#define RIL_SIM_ABSENT 0
#define RIL_SIM_NOT_READY 1
#define RIL_SIM_ABSENT 0
#define RIL_SIM_NOT_READY 1
/* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY.
* This is more
* than "+CPIN: READY". It also means the radio is ready for SIM I/O
*/
#define RIL_SIM_READY 2
#define RIL_SIM_PIN 3
#define RIL_SIM_PUK 4
#define RIL_SIM_READY 2
#define RIL_SIM_PIN 3
#define RIL_SIM_PUK 4
#define RIL_SIM_NETWORK_PERSONALIZATION 5
/* see RIL_REQUEST_GET_SIM_STATUS */
......@@ -389,7 +387,7 @@ typedef struct {
char * number; /* Remote party number */
int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
char * name; /* Remote party name */
RIL_CDMA_SignalInfoRecord * signalInfoRecord;
RIL_CDMA_SignalInfoRecord signalInfoRecord;
} RIL_CDMA_CallWaiting;
/* Used by RIL_REQUEST_GET_BROADCAST_CONFIG and RIL_REQUEST_SET_BROADCAST_CONFIG */
......@@ -405,7 +403,6 @@ typedef struct {
RIL_BroadcastServiceInfo *entries;
} RIL_BroadcastSMSConfig;
/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
#define RIL_RESTRICTED_STATE_NONE 0x00
/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
......@@ -966,8 +963,8 @@ typedef struct {
* SUCCESS
* RADIO_NOT_AVAILABLE
*/
#define RIL_REQUEST_SIGNAL_STRENGTH 19
/**
* RIL_REQUEST_REGISTRATION_STATE
*
......@@ -1225,7 +1222,7 @@ typedef struct {
* and NULL for CDMA
*
* FIXME may need way to configure QoS settings
*
*
* replaces RIL_REQUEST_SETUP_DEFAULT_PDP
*
* Valid errors:
......@@ -2293,7 +2290,7 @@ typedef struct {
/**
* RIL_REQUEST_SET_LOCATION_UPDATES
*
*
* Enables/disables network state change notifications due to changes in
* LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
*
......@@ -2305,7 +2302,7 @@ typedef struct {
* ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
*
* "response" is NULL
*
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
......@@ -3062,7 +3059,8 @@ typedef struct {
*
* Ring indication for an incoming call (eg, RING or CRING event).
*
* "data" is const RIL_CDMA_SignalInfoRecord *
* "data" is null for GSM
* "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
*/
#define RIL_UNSOL_CALL_RING 1018
......@@ -3070,7 +3068,7 @@ typedef struct {
* RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
*
* Indicates that SIM state changes.
*
*
* Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
* "data" is null
......@@ -3081,15 +3079,15 @@ typedef struct {
* RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
*
* Called when new CDMA SMS is received
*
*
* "data" is const RIL_CDMA_SMS_Message *
*
*
* Callee will subsequently confirm the receipt of the SMS with
* a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
*
*
* No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
* RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
*
*
*/
#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
......@@ -3315,7 +3313,7 @@ void RIL_register (const RIL_RadioFunctions *callbacks);
* RIL_onRequestComplete will return as soon as possible
*
* @param t is parameter passed in on previous call to RIL_Notification
* routine.
* routine.
* @param e error code
* if "e" != SUCCESS, then response can be null/is ignored
* @param response is owned by caller, and should not be modified or
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
{RIL_UNSOL_ON_USSD, responseStrings, WAKE_PARTIAL},
{RIL_UNSOL_ON_USSD_REQUEST, responseVoid, DONT_WAKE},
{RIL_UNSOL_NITZ_TIME_RECEIVED, responseString, WAKE_PARTIAL},
{RIL_UNSOL_SIGNAL_STRENGTH, responseInts, DONT_WAKE},
{RIL_UNSOL_SIGNAL_STRENGTH, responseRilSignalStrength, DONT_WAKE},
{RIL_UNSOL_DATA_CALL_LIST_CHANGED, responseDataCallList, WAKE_PARTIAL},
{RIL_UNSOL_SUPP_SVC_NOTIFICATION, responseSsn, WAKE_PARTIAL},
{RIL_UNSOL_STK_SESSION_END, responseVoid, WAKE_PARTIAL},
......@@ -32,16 +32,14 @@
{RIL_UNSOL_STK_CALL_SETUP, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_SIM_SMS_STORAGE_FULL, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_SIM_REFRESH, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_CALL_RING, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_CALL_RING, responseCallRing, WAKE_PARTIAL},
{RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, responseCdmaSms, WAKE_PARTIAL},
{RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, responseString, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_RESTRICTED_STATE_CHANGED, responseInts, WAKE_PARTIAL},
// TODO(): Need to update the response func for the following 4 commands,
// once they've been implemented.
{RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_CALL_WAITING, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_CALL_WAITING, responseCdmaCallWaiting, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_INFO_REC, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_INFO_REC, responseCdmaInformationRecords, WAKE_PARTIAL},
{RIL_UNSOL_OEM_HOOK_RAW, responseRaw, WAKE_PARTIAL}
......@@ -141,7 +141,11 @@ static int clccStateToRILState(int state, RIL_CallState *p_state)
* Note: directly modified line and has *p_call point directly into
* modified line
*/
#if NEWRIL
static int callFromCLCCLine(char *line, RIL_Call *p_call)
#else
static int callFromCLCCLine(char *line, RIL_CallOld *p_call)
#endif
{
//+CLCC: 1,0,2,0,0,\"+18005551212\",145
// index,isMT,state,mode,isMpty(,number,TOA)?
......@@ -470,8 +474,13 @@ static void requestGetCurrentCalls(void *data, size_t datalen, RIL_Token t)
ATLine *p_cur;
int countCalls;
int countValidCalls;
#if NEWRIL
RIL_Call *p_calls;
RIL_Call **pp_calls;
#else
RIL_CallOld *p_calls;
RIL_CallOld **pp_calls;
#endif
int i;
int needRepoll = 0;
......@@ -499,9 +508,15 @@ static void requestGetCurrentCalls(void *data, size_t datalen, RIL_Token t)
/* yes, there's an array of pointers and then an array of structures */
#if NEWRIL
pp_calls = (RIL_Call **)alloca(countCalls * sizeof(RIL_Call *));
p_calls = (RIL_Call *)alloca(countCalls * sizeof(RIL_Call));
memset (p_calls, 0, countCalls * sizeof(RIL_Call));
#else
pp_calls = (RIL_CallOld **)alloca(countCalls * sizeof(RIL_CallOld *));
p_calls = (RIL_CallOld *)alloca(countCalls * sizeof(RIL_CallOld));
memset (p_calls, 0, countCalls * sizeof(RIL_CallOld));
#endif
/* init the pointer array */
for(i = 0; i < countCalls ; i++) {
......@@ -566,8 +581,13 @@ static void requestGetCurrentCalls(void *data, size_t datalen, RIL_Token t)
s_repollCallsCount = 0;
#endif /*WORKAROUND_ERRONEOUS_ANSWER*/
#if NEWRIL
RIL_onRequestComplete(t, RIL_E_SUCCESS, pp_calls,
countValidCalls * sizeof (RIL_Call *));
#else
RIL_onRequestComplete(t, RIL_E_SUCCESS, pp_calls,
countValidCalls * sizeof (RIL_CallOld *));
#endif
at_response_free(p_response);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment