From 7f8568086f2ea14885b0091c793e14c2656f0da2 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Tue, 9 Jun 2009 10:23:37 -0700 Subject: [PATCH] Cleanup whitespace. --- include/telephony/ril.h | 378 ++++++++++++++++---------------- include/telephony/ril_cdma_sms.h | 62 +++--- libril/Android.mk | 4 +- libril/ril.cpp | 196 ++++++++--------- libril/ril_commands.h | 22 +- libril/ril_event.h | 16 +- libril/ril_unsol_commands.h | 16 +- reference-cdma-sms/Android.mk | 45 ++-- reference-cdma-sms/reference-cdma-sms.c | 4 +- reference-cdma-sms/reference-cdma-sms.h | 4 +- reference-ril/Android.mk | 10 +- reference-ril/at_tok.c | 24 +- reference-ril/at_tok.h | 16 +- reference-ril/misc.c | 16 +- reference-ril/misc.h | 16 +- reference-ril/reference-ril.c | 2 +- rild/radiooptions.c | 16 +- 17 files changed, 423 insertions(+), 424 deletions(-) diff --git a/include/telephony/ril.h b/include/telephony/ril.h index b3f7a69..6b912f6 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -24,11 +24,11 @@ * * Supp Service Notification (+CSSN) * GPRS PDP context deactivate notification - * + * */ -#ifndef ANDROID_RIL_H +#ifndef ANDROID_RIL_H #define ANDROID_RIL_H 1 #include @@ -82,12 +82,12 @@ typedef enum { RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */ - RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network + RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network personalization locked, or SIM absent */ RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */ - RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network + RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network personalization locked, or RUIM absent */ RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */ @@ -203,7 +203,7 @@ typedef struct { typedef struct { char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM * Primary Scrambling Code (as described in TS 25.331) - * in 9 bits in UMTS + * in 9 bits in UMTS * Valid values are hexadecimal 0x0000 - 0xffff. */ int rssi; /* Received RSSI in 2G, @@ -259,7 +259,7 @@ typedef struct { #define RIL_SIM_ABSENT 0 #define RIL_SIM_NOT_READY 1 -/* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY. +/* 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 */ @@ -281,8 +281,8 @@ typedef enum { typedef enum { RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ - RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished - since each app can only have 1 active perso + RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished + since each app can only have 1 active perso involved */ RIL_PERSOSUBSTATE_SIM_NETWORK = 3, RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, @@ -313,7 +313,7 @@ typedef enum { RIL_APPSTATE_DETECTED = 1, RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ - RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at + RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at when app_state is assigned to this value */ RIL_APPSTATE_READY = 5 } RIL_AppState; @@ -337,21 +337,21 @@ typedef enum { typedef struct { - RIL_AppType app_type; - RIL_AppState app_state; - RIL_PersoSubstate perso_substate; /* applicable only if app_state == + RIL_AppType app_type; + RIL_AppState app_state; + RIL_PersoSubstate perso_substate; /* applicable only if app_state == RIL_APPSTATE_SUBSCRIPTION_PERSO */ - char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, + char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 0x30, 0x30, 0x30 */ char *app_label_ptr; /* null terminated string */ int pin1_replaced; /* applicable to USIM and CSIM */ - RIL_PinState pin1; - RIL_PinState pin2; + RIL_PinState pin1; + RIL_PinState pin2; } RIL_AppStatus; typedef struct { - RIL_CardState card_state; + RIL_CardState card_state; RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */ int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */ @@ -581,20 +581,20 @@ typedef struct { RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; } RIL_CDMA_InformationRecords; -/** +/** * RIL_REQUEST_GET_SIM_STATUS * * Requests status of the SIM interface and the SIM card - * + * * "data" is NULL * * "response" is const RIL_CardStatus * * - * If the radio is off or unavailable, return RIL_SIM_NOT_READY + * If the radio is off or unavailable, return RIL_SIM_NOT_READY * - * Please note: RIL_SIM_READY means that the radio state - * is RADIO_STATE_SIM_READY. This is more than "+CPIN: READY". + * Please note: 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 * * Valid errors: @@ -613,8 +613,8 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT @@ -626,7 +626,7 @@ typedef struct { /** * RIL_REQUEST_ENTER_SIM_PUK * - * Supplies SIM PUK and new PIN. + * Supplies SIM PUK and new PIN. * * "data" is const char ** * ((const char **)data)[0] is PUK value @@ -635,8 +635,8 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT @@ -657,8 +657,8 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT @@ -669,7 +669,7 @@ typedef struct { /** * RIL_REQUEST_ENTER_SIM_PUK2 * - * Supplies SIM PUK2 and new PIN2. + * Supplies SIM PUK2 and new PIN2. * * "data" is const char ** * ((const char **)data)[0] is PUK2 value @@ -678,8 +678,8 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT @@ -691,7 +691,7 @@ typedef struct { /** * RIL_REQUEST_CHANGE_SIM_PIN * - * Supplies old SIM PIN and new PIN. + * Supplies old SIM PIN and new PIN. * * "data" is const char ** * ((const char **)data)[0] is old PIN value @@ -700,13 +700,13 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT * (old PIN is invalid) - * + * */ #define RIL_REQUEST_CHANGE_SIM_PIN 6 @@ -715,7 +715,7 @@ typedef struct { /** * RIL_REQUEST_CHANGE_SIM_PIN2 * - * Supplies old SIM PIN2 and new PIN2. + * Supplies old SIM PIN2 and new PIN2. * * "data" is const char ** * ((const char **)data)[0] is old PIN2 value @@ -724,13 +724,13 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT * (old PIN2 is invalid) - * + * */ #define RIL_REQUEST_CHANGE_SIM_PIN2 7 @@ -746,8 +746,8 @@ typedef struct { * "response" must be NULL * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * PASSWORD_INCORRECT @@ -757,17 +757,17 @@ typedef struct { #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 /** - * RIL_REQUEST_GET_CURRENT_CALLS + * RIL_REQUEST_GET_CURRENT_CALLS * * Requests current call list * * "data" is NULL * * "response" must be a "const RIL_Call **" - * + * * Valid errors: - * - * SUCCESS + * + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * (request will be made again in a few hundred msec) @@ -776,18 +776,18 @@ typedef struct { #define RIL_REQUEST_GET_CURRENT_CALLS 9 -/** +/** * RIL_REQUEST_DIAL * * Initiate voice call * * "data" is const RIL_Dial * * "response" is NULL - * + * * This method is never used for supplementary service codes * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -804,7 +804,7 @@ typedef struct { * "response" is a const char * containing the IMSI * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -816,13 +816,13 @@ typedef struct { * * Hang up a specific line (like AT+CHLD=1x) * - * "data" is an int * + * "data" is an int * * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) * * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -838,7 +838,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -854,7 +854,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -882,7 +882,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -899,7 +899,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -908,14 +908,14 @@ typedef struct { /** * RIL_REQUEST_UDUB * - * Send UDUB (user determined used busy) to ringing or + * Send UDUB (user determined used busy) to ringing or * waiting call answer)(RIL_BasicRequest r); * * "data" is NULL * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1058,8 +1058,8 @@ typedef struct { * LAC and CID are in hexadecimal format. * valid LAC are 0x0000 - 0xffff * valid CID are 0x00000000 - 0x0fffffff - * - * Please note that registration state 4 ("unknown") is treated + * + * Please note that registration state 4 ("unknown") is treated * as "out of service" in the Android telephony system * * Valid errors: @@ -1076,14 +1076,14 @@ typedef struct { * * "data" is NULL * "response" is a "const char **" - * ((const char **)response)[0] is long alpha ONS or EONS + * ((const char **)response)[0] is long alpha ONS or EONS * or NULL if unregistered * - * ((const char **)response)[1] is short alpha ONS or EONS + * ((const char **)response)[1] is short alpha ONS or EONS * or NULL if unregistered * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) * or NULL if unregistered - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -1126,7 +1126,7 @@ typedef struct { * 'S' -- tone should be played for a short time * 'L' -- tone should be played for a long time * "response" is NULL - * + * * FIXME should this block/mute microphone? * How does this interact with local DTMF feedback? * @@ -1142,7 +1142,7 @@ typedef struct { /** * RIL_REQUEST_SEND_SMS - * + * * Send an SMS message * * "data" is const char ** @@ -1155,7 +1155,7 @@ typedef struct { * "response" is a const RIL_SMS_Response * * * Based on the return error, caller decides to resend if sending sms - * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) + * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) * and GENERIC_FAILURE means no retry (i.e. error cause is 500) * * Valid errors: @@ -1171,7 +1171,7 @@ typedef struct { /** * RIL_REQUEST_SEND_SMS_EXPECT_MORE - * + * * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, * except that more messages are expected to be sent soon. If possible, * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) @@ -1186,7 +1186,7 @@ typedef struct { * "response" is a const RIL_SMS_Response * * * Based on the return error, caller decides to resend if sending sms - * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) + * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) * and GENERIC_FAILURE means no retry (i.e. error cause is 500) * * Valid errors: @@ -1205,20 +1205,20 @@ typedef struct { * Setup a packet data connection * * "data" is a const char ** - * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA + * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS - * + * * ((const char **)data)[1] Profile Number or NULL to indicate default profile - * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will + * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will * override the one in the profile. NULL indicates no APN overrride. * ((const char **)data)[3] is the username for APN, or NULL * ((const char **)data)[4] is the password for APN, or NULL * * "response" is a char ** - * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is + * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is * used in GSM/UMTS and CDMA * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA - * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS + * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS * and NULL for CDMA * * FIXME may need way to configure QoS settings @@ -1294,7 +1294,7 @@ typedef struct { /** * RIL_REQUEST_CANCEL_USSD - * + * * Cancel the current USSD session if one exists * * "data" is null @@ -1303,12 +1303,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE + * GENERIC_FAILURE */ #define RIL_REQUEST_CANCEL_USSD 30 -/** +/** * RIL_REQUEST_GET_CLIR * * Gets current CLIR status @@ -1350,7 +1350,7 @@ typedef struct { * * For example, if data is forwarded to +18005551212 and voice is forwarded * to +18005559999, then two separate RIL_CallForwardInfo's should be returned - * + * * If, however, both data and voice are forwarded to +18005551212, then * a single RIL_CallForwardInfo can be returned with the service class * set to "data + voice = 3") @@ -1370,7 +1370,7 @@ typedef struct { * * "data" is const RIL_CallForwardInfo * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -1393,7 +1393,7 @@ typedef struct { * must follow, with the TS 27.007 service class bit vector of services * for which call waiting is enabled. * - * For example, if ((const int *)response)[0] is 1 and + * For example, if ((const int *)response)[0] is 1 and * ((const int *)response)[1] is 3, then call waiting is enabled for data * and voice and disabled for everything else * @@ -1427,7 +1427,7 @@ typedef struct { * RIL_REQUEST_SMS_ACKNOWLEDGE * * Acknowledge successful or failed receipt of SMS previously indicated - * via RIL_UNSOL_RESPONSE_NEW_SMS + * via RIL_UNSOL_RESPONSE_NEW_SMS * * "data" is int * * ((int *)data)[0] is 1 on successful receipt @@ -1462,7 +1462,7 @@ typedef struct { * "response" is a const char * containing the IMEI * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1481,7 +1481,7 @@ typedef struct { * "response" is a const char * containing the IMEISV * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1502,7 +1502,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1517,7 +1517,7 @@ typedef struct { * * "data" is const char ** * ((char**)data)[0] indicating CID - * + * * "response" is NULL * * Valid errors: @@ -1535,7 +1535,7 @@ typedef struct { * Query the status of a facility lock state * * "data" is const char ** - * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 + * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 * (eg "AO" for BAOC, "SC" for SIM lock) * ((const char **)data)[1] is the password, or "" if not required * ((const char **)data)[2] is the TS 27.007 service class bit vector of @@ -1543,9 +1543,9 @@ typedef struct { * * "response" is an int * * ((const int *)response) 0 is the TS 27.007 service class bit vector of - * services for which the specified barring facility + * services for which the specified barring facility * is active. "0" means "disabled for all" - * + * * * Valid errors: * SUCCESS @@ -1570,7 +1570,7 @@ typedef struct { * service class bit vector. Eg, the string * "1" means "set this facility for voice services" * - * "response" is NULL + * "response" is NULL * * Valid errors: * SUCCESS @@ -1592,7 +1592,7 @@ typedef struct { * ((const char **)data)[1] = old password * ((const char **)data)[2] = new password * - * "response" is NULL + * "response" is NULL * * Valid errors: * SUCCESS @@ -1630,7 +1630,7 @@ typedef struct { * "data" is NULL * "response" is NULL * - * This request must not respond until the new operator is selected + * This request must not respond until the new operator is selected * and registered * * Valid errors: @@ -1646,14 +1646,14 @@ typedef struct { * * Manually select a specified network. * - * The radio baseband/RIL implementation is expected to fall back to + * The radio baseband/RIL implementation is expected to fall back to * automatic selection mode if the manually selected network should go * out of range in the future. * * "data" is const char * specifying MCCMNC of network to select (eg "310170") * "response" is NULL * - * This request must not respond until the new operator is selected + * This request must not respond until the new operator is selected * and registered * * Valid errors: @@ -1674,8 +1674,8 @@ typedef struct { * n is the number of available networks * For each available network: * - * ((const char **)response)[n+0] is long alpha ONS or EONS - * ((const char **)response)[n+1] is short alpha ONS or EONS + * ((const char **)response)[n+0] is long alpha ONS or EONS + * ((const char **)response)[n+1] is short alpha ONS or EONS * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) * ((const char **)response)[n+3] is a string value of the status: * "unknown" @@ -1683,7 +1683,7 @@ typedef struct { * "current" * "forbidden" * - * This request must not respond until the new operator is selected + * This request must not respond until the new operator is selected * and registered * * Valid errors: @@ -1697,16 +1697,16 @@ typedef struct { /** * RIL_REQUEST_DTMF_START * - * Start playing a DTMF tone. Continue playing DTMF tone until - * RIL_REQUEST_DTMF_STOP is received + * Start playing a DTMF tone. Continue playing DTMF tone until + * RIL_REQUEST_DTMF_STOP is received * * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, * it should cancel the previous tone and play the new one. - * + * * "data" is a char * * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -1720,10 +1720,10 @@ typedef struct { * RIL_REQUEST_DTMF_STOP * * Stop playing a currently playing DTMF tone. - * + * * "data" is NULL * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -1738,10 +1738,10 @@ typedef struct { * * Return string value indicating baseband version, eg * response from AT+CGMR - * + * * "data" is NULL * "response" is const char * containing version string for log reporting - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -1754,7 +1754,7 @@ typedef struct { * RIL_REQUEST_SEPARATE_CONNECTION * * Separate a party from a multiparty call placing the multiparty call - * (less the specified party) on hold and leaving the specified party + * (less the specified party) on hold and leaving the specified party * as the only other member of the current (active) call * * Like AT+CHLD=2x @@ -1762,14 +1762,14 @@ typedef struct { * See TS 22.084 1.3.8.2 (iii) * TS 22.030 6.5.5 "Entering "2X followed by send" * TS 27.007 "AT+CHLD=2x" - * - * "data" is an int * + * + * "data" is an int * * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL * * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1790,7 +1790,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1807,7 +1807,7 @@ typedef struct { * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1823,12 +1823,12 @@ typedef struct { * * "data" is NULL * "response" is an int * - * (int *)response)[0] is 1 for "CLIP provisioned" + * (int *)response)[0] is 1 for "CLIP provisioned" * and 0 for "CLIP not provisioned" - * and 2 for "unknown, e.g. no network etc" + * and 2 for "unknown, e.g. no network etc" * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1837,8 +1837,8 @@ typedef struct { /** * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - * - * Requests the failure cause code for the most recently failed PDP + * + * Requests the failure cause code for the most recently failed PDP * context or CDMA data connection active * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE * @@ -1849,8 +1849,8 @@ typedef struct { * section 6.1.3.1.3 or close approximation * * If the implementation does not have access to the exact cause codes, - * then it should return one of the values listed in - * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these + * then it should return one of the values listed in + * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these * cases for error notification * and potential retries. * @@ -1860,8 +1860,8 @@ typedef struct { * GENERIC_FAILURE * * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE - * - */ + * + */ #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 @@ -1877,7 +1877,7 @@ typedef struct { * "response" is an array of RIL_Data_Call_Response * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -1897,7 +1897,7 @@ typedef struct { * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE * REQUEST_NOT_SUPPORTED @@ -1911,16 +1911,16 @@ typedef struct { * This request reserved for OEM-specific uses. It passes raw byte arrays * back and forth. * - * It can be invoked on the Java side from + * It can be invoked on the Java side from * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() * * "data" is a char * of bytes copied from the byte[] data argument in java * "response" is a char * of bytes that will returned via the - * caller's "response" Message here: + * caller's "response" Message here: * (byte[])(((AsyncResult)response.obj).result) * - * An error response here will result in - * (((AsyncResult)response.obj).result) == null and + * An error response here will result in + * (((AsyncResult)response.obj).result) == null and * (((AsyncResult)response.obj).exception) being an instance of * com.android.internal.telephony.gsm.CommandException * @@ -1936,7 +1936,7 @@ typedef struct { * This request reserved for OEM-specific uses. It passes strings * back and forth. * - * It can be invoked on the Java side from + * It can be invoked on the Java side from * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() * * "data" is a const char **, representing an array of null-terminated UTF-8 @@ -1948,8 +1948,8 @@ typedef struct { * * (String[])(((AsyncResult)response.obj).result) * - * An error response here will result in - * (((AsyncResult)response.obj).result) == null and + * An error response here will result in + * (((AsyncResult)response.obj).result) == null and * (((AsyncResult)response.obj).exception) being an instance of * com.android.internal.telephony.gsm.CommandException * @@ -2212,12 +2212,12 @@ typedef struct { * RIL_REQUEST_EXPLICIT_CALL_TRANSFER * * Connects the two calls and disconnects the subscriber from both calls. - * + * * "data" is NULL * "response" is NULL * * Valid errors: - * SUCCESS + * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * GENERIC_FAILURE */ @@ -2230,7 +2230,7 @@ typedef struct { * (CS/PS domain, RAT, and operation mode) * * "data" is int * - * + * * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred) * ((int *)data)[0] is == 1 for GSM only * ((int *)data)[0] is == 2 for WCDMA only @@ -2296,7 +2296,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). + * LAC and/or CID (basically, +CREG=2 vs. +CREG=1). * * Note: The RIL implementation should default to "updates enabled" * when the screen is on and "updates disabled" when the screen is off. @@ -2318,7 +2318,7 @@ typedef struct { /** * RIL_REQUEST_CDMA_SET_SUBSCRIPTION - * + * * Request to set the location where the CDMA subscription shall * be retrieved * @@ -2339,16 +2339,16 @@ typedef struct { /** * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE - * + * * Request to set the roaming preferences in CDMA * * "data" is int * * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2358,18 +2358,18 @@ typedef struct { /** * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE - * + * * Request the actual setting of the roaming preferences in CDMA in the modem * * "data" is NULL - * + * * "response" is int * * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2379,7 +2379,7 @@ typedef struct { /** * RIL_REQUEST_SET_TTY_MODE - * + * * Request to set the TTY mode * * "data" is int * @@ -2387,9 +2387,9 @@ typedef struct { * ((int *)data)[0] is == 1 for TTY Full * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2399,11 +2399,11 @@ typedef struct { /** * RIL_REQUEST_QUERY_TTY_MODE - * + * * Request the setting of TTY mode * * "data" is NULL - * + * * "response" is int * * ((int *)response)[0] is == 0 for TTY off * ((int *)response)[0] is == 1 for TTY Full @@ -2411,7 +2411,7 @@ typedef struct { * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2428,9 +2428,9 @@ typedef struct { * "data" is int * * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2440,17 +2440,17 @@ typedef struct { /** * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE - * + * * Request the setting of preferred voice privacy mode * * "data" is NULL - * + * * "response" is int * * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2465,9 +2465,9 @@ typedef struct { * * "data" is const char * * ((const char *)data)[0] is a FLASH string - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2483,9 +2483,9 @@ typedef struct { * * "data" is const char * * ((const char *)data)[0] is a DTMF string - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2501,9 +2501,9 @@ typedef struct { * * "data" is const char * * ((const char *)data)[0] is a AKey string - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2518,9 +2518,9 @@ typedef struct { * Send a CDMA SMS message * * "data" is const RIL_CDMA_SMS_Message * - * + * * "response" is a const RIL_SMS_Response * - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2537,9 +2537,9 @@ typedef struct { * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS * * "data" is const RIL_CDMA_SMS_Ack * - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2758,9 +2758,9 @@ typedef struct { * completely exited from Emergency Callback Mode. * * "data" is NULL - * + * * "response" is NULL - * + * * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE @@ -2867,7 +2867,7 @@ typedef struct { * * "data" is NULL * - * Response should be invoked on, for example, + * Response should be invoked on, for example, * "RING", "BUSY", "NO CARRIER", and also call state * transitions (DIALING->ALERTING ALERTING->ACTIVE) * @@ -2877,7 +2877,7 @@ typedef struct { /** - * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED + * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED * * Called when network state, operator name, or GPRS state has changed * Basically on, +CREG and +CGREG @@ -2899,7 +2899,7 @@ typedef struct { * RIL_UNSOL_RESPONSE_NEW_SMS * * Called when new SMS is received. - * + * * "data" is const char * * This is a pointer to a string containing the PDU of an SMS-DELIVER * as an ascii string of hex digits. The PDU starts with the SMSC address @@ -2908,7 +2908,7 @@ typedef struct { * Callee will subsequently confirm the receipt of thei SMS with a * RIL_REQUEST_SMS_ACKNOWLEDGE * - * No new RIL_UNSOL_RESPONSE_NEW_SMS + * No new RIL_UNSOL_RESPONSE_NEW_SMS * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a * RIL_REQUEST_SMS_ACKNOWLEDGE has been received */ @@ -2919,7 +2919,7 @@ typedef struct { * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT * * Called when new SMS Status Report is received. - * + * * "data" is const char * * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT * as an ascii string of hex digits. The PDU starts with the SMSC address @@ -2928,7 +2928,7 @@ typedef struct { * Callee will subsequently confirm the receipt of the SMS with a * RIL_REQUEST_SMS_ACKNOWLEDGE * - * No new RIL_UNSOL_RESPONSE_NEW_SMS + * No new RIL_UNSOL_RESPONSE_NEW_SMS * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a * RIL_REQUEST_SMS_ACKNOWLEDGE has been received */ @@ -2939,7 +2939,7 @@ typedef struct { * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM * * Called when new SMS has been stored on SIM card - * + * * "data" is const int * * ((const int *)data)[0] contains the slot index on the SIM that contains * the new message @@ -2953,7 +2953,7 @@ typedef struct { * Called when a new USSD message is received. * * "data" is const char ** - * ((const char **)data)[0] points to a type code, which is + * ((const char **)data)[0] points to a type code, which is * one of these string values: * "0" USSD-Notify -- text in ((const char **)data)[1] * "1" USSD-Request -- text in ((const char **)data)[1] @@ -2976,7 +2976,7 @@ typedef struct { * * Obsolete. Send via RIL_UNSOL_ON_USSD */ -#define RIL_UNSOL_ON_USSD_REQUEST 1007 +#define RIL_UNSOL_ON_USSD_REQUEST 1007 /** @@ -3140,7 +3140,7 @@ typedef struct { * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS * * Called when new Broadcast SMS is received - * + * * "data" is const char * of 88 bytes which indicates each page * of a CBS Message sent to the MS by the BTS as coded in 3GPP * 23.041 Section 9.4.1.1 @@ -3188,7 +3188,7 @@ typedef struct { * Called when CDMA radio receives a call waiting indication. * * "data" is const RIL_CDMA_CallWaiting * - * + * */ #define RIL_UNSOL_CDMA_CALL_WAITING 1025 @@ -3237,7 +3237,7 @@ typedef struct { * @param datalen the length of data * */ -typedef void (*RIL_RequestFunc) (int request, void *data, +typedef void (*RIL_RequestFunc) (int request, void *data, size_t datalen, RIL_Token t); /** @@ -3255,10 +3255,10 @@ typedef RIL_RadioState (*RIL_RadioStateRequest)(); typedef int (*RIL_Supports)(int requestCode); /** - * This function is called from a separate thread--not the + * This function is called from a separate thread--not the * thread that calls RIL_RequestFunc--and indicates that a pending * request should be cancelled. - * + * * On cancel, the callee should do its best to abandon the request and * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. * @@ -3268,7 +3268,7 @@ typedef int (*RIL_Supports)(int requestCode); * * RIL_Cancel calls should return immediately, and not wait for cancellation * - * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 + * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 * interface * * @param t token wants to be canceled @@ -3300,12 +3300,12 @@ struct RIL_Env { * * If "e" != SUCCESS, then response can be null/is ignored * - * "response" is owned by caller, and should not be modified or + * "response" is owned by caller, and should not be modified or * freed by callee * * RIL_onRequestComplete will return as soon as possible */ - void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, + void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, void *response, size_t responselen); /** @@ -3315,24 +3315,24 @@ struct RIL_Env { * "data" is owned by caller, and should not be modified or freed by callee */ - void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, + void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen); /** - * Call user-specifed "callback" function on on the same thread that + * Call user-specifed "callback" function on on the same thread that * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies * a relative time value at which the callback is invoked. If relativeTime is * NULL or points to a 0-filled structure, the callback will be invoked as * soon as possible */ - void (*RequestTimedCallback) (RIL_TimedCallback callback, - void *param, const struct timeval *relativeTime); + void (*RequestTimedCallback) (RIL_TimedCallback callback, + void *param, const struct timeval *relativeTime); }; -/** - * RIL implementations must defined RIL_Init +/** + * RIL implementations must defined RIL_Init * argc and argv will be command line arguments intended for the RIL implementation * Return NULL on error * @@ -3365,7 +3365,7 @@ void RIL_register (const RIL_RadioFunctions *callbacks); * freed by callee * @param responselen the length of response in byte */ -void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, +void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responselen); /** @@ -3375,12 +3375,12 @@ void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, * @param datalen the length of data in byte */ -void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, +void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, size_t datalen); /** - * Call user-specifed "callback" function on on the same thread that + * Call user-specifed "callback" function on on the same thread that * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies * a relative time value at which the callback is invoked. If relativeTime is * NULL or points to a 0-filled structure, the callback will be invoked as @@ -3391,7 +3391,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, * @param relativeTime a relative time value at which the callback is invoked */ -void RIL_requestTimedCallback (RIL_TimedCallback callback, +void RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, const struct timeval *relativeTime); diff --git a/include/telephony/ril_cdma_sms.h b/include/telephony/ril_cdma_sms.h index 1554fe1..bcf6b30 100644 --- a/include/telephony/ril_cdma_sms.h +++ b/include/telephony/ril_cdma_sms.h @@ -22,11 +22,11 @@ /** * TODO * - * + * */ -#ifndef ANDROID_RIL_CDMA_SMS_H +#ifndef ANDROID_RIL_CDMA_SMS_H #define ANDROID_RIL_CDMA_SMS_H 1 #include @@ -57,13 +57,13 @@ typedef enum { RIL_CDMA_SMS_NUMBER_TYPE_UNKNOWN = 0, RIL_CDMA_SMS_NUMBER_TYPE_INTERNATIONAL_OR_DATA_IP = 1, /* INTERNATIONAL is used when number mode is not data network address. - * DATA_IP is used when the number mode is data network address + * DATA_IP is used when the number mode is data network address */ RIL_CDMA_SMS_NUMBER_TYPE_NATIONAL_OR_INTERNET_MAIL = 2, /* NATIONAL is used when the number mode is not data network address. - * INTERNET_MAIL is used when the number mode is data network address. - * For INTERNET_MAIL, in the address data "digits", each byte contains - * an ASCII character. Examples are "x@y.com,a@b.com - ref TIA/EIA-637A 3.4.3.3 + * INTERNET_MAIL is used when the number mode is data network address. + * For INTERNET_MAIL, in the address data "digits", each byte contains + * an ASCII character. Examples are "x@y.com,a@b.com - ref TIA/EIA-637A 3.4.3.3 */ RIL_CDMA_SMS_NUMBER_TYPE_NETWORK = 3, RIL_CDMA_SMS_NUMBER_TYPE_SUBSCRIBER = 4, @@ -77,20 +77,20 @@ typedef enum { typedef enum { RIL_CDMA_SMS_NUMBER_PLAN_UNKNOWN = 0, RIL_CDMA_SMS_NUMBER_PLAN_TELEPHONY = 1, /* CCITT E.164 and E.163, including ISDN plan */ - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_2 = 2, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_2 = 2, RIL_CDMA_SMS_NUMBER_PLAN_DATA = 3, /* CCITT X.121 */ RIL_CDMA_SMS_NUMBER_PLAN_TELEX = 4, /* CCITT F.69 */ - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_5 = 5, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_6 = 6, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_7 = 7, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_8 = 8, - RIL_CDMA_SMS_NUMBER_PLAN_PRIVATE = 9, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_10 = 10, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_11 = 11, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_12 = 12, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_13 = 13, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_14 = 14, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_15 = 15, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_5 = 5, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_6 = 6, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_7 = 7, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_8 = 8, + RIL_CDMA_SMS_NUMBER_PLAN_PRIVATE = 9, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_10 = 10, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_11 = 11, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_12 = 12, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_13 = 13, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_14 = 14, + RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_15 = 15, RIL_CDMA_SMS_NUMBER_PLAN_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ } RIL_CDMA_SMS_NumberPlan; @@ -101,7 +101,7 @@ typedef struct { /* Used only when digitMode is 8-bit */ RIL_CDMA_SMS_NumberType number_type; /* Used only when digitMode is 8-bit. - * To specify an international address, use the following: + * To specify an international address, use the following: * digitMode = RIL_CDMA_SMS_DIGIT_MODE_8_BIT * numberMode = RIL_CDMA_SMS_NOT_DATA_NETWORK * numberType = RIL_CDMA_SMS_NUMBER_TYPE_INTERNATIONAL_OR_DATA_IP @@ -113,7 +113,7 @@ typedef struct { /* Used only when digitMode is 8-bit */ unsigned char number_of_digits; unsigned char digits[ RIL_CDMA_SMS_ADDRESS_MAX ]; - /* Each byte in this array represnts a 40bit or 8-bit digit of address data */ + /* Each byte in this array represnts a 40bit or 8-bit digit of address data */ } RIL_CDMA_SMS_Address; typedef enum { @@ -180,7 +180,7 @@ typedef struct { /* Used by RIL_REQUEST_ENCODE_CDMA_SMS and RIL_REQUEST_DECODE_CDMA_SMS*/ -#define RIL_CDMA_SMS_UDH_MAX_SND_SIZE 128 +#define RIL_CDMA_SMS_UDH_MAX_SND_SIZE 128 #define RIL_CDMA_SMS_UDH_EO_DATA_SEGMENT_MAX 131 /* 140 - 3 - 6 */ #define RIL_CDMA_SMS_MAX_UD_HEADERS 7 #define RIL_CDMA_SMS_USER_DATA_MAX 229 @@ -242,16 +242,16 @@ typedef struct { unsigned char msg_ref; /*indicates the total number of short messages within the concatenated short message. - The value shall start at 1 and remain constant for every + The value shall start at 1 and remain constant for every short message which makes up the concatenated short message. if it is 0 then the receiving entity shall ignore the whole Information Element*/ unsigned char total_sm; - /* - * it indicates the sequence number of a particular short message within the concatenated short - * message. The value shall start at 1 and increment by one for every short message sent - * within the concatenated short message. If the value is zero or the value is - * greater than the value in octet 2 then the receiving + /* + * it indicates the sequence number of a particular short message within the concatenated short + * message. The value shall start at 1 and increment by one for every short message sent + * within the concatenated short message. If the value is zero or the value is + * greater than the value in octet 2 then the receiving * entity shall ignore the whole Information Element. */ unsigned char seq_num; @@ -489,7 +489,7 @@ typedef struct { union { RIL_CDMA_SMS_UdhConcat8 concat_8; // 00 - + RIL_CDMA_SMS_UdhSpecialSM special_sm; // 01 RIL_CDMA_SMS_UdhWap8 wap_8; // 04 RIL_CDMA_SMS_UdhWap16 wap_16; // 05 @@ -503,14 +503,14 @@ typedef struct { RIL_CDMA_SMS_UdhLargePictureData large_picture; // 10 RIL_CDMA_SMS_UdhSmallPictureData small_picture; // 11 RIL_CDMA_SMS_UdhVarPicture var_picture; // 12 - + RIL_CDMA_SMS_UdhUserPrompt user_prompt; // 13 RIL_CDMA_SMS_UdhEo eo; // 14 - + RIL_CDMA_SMS_UdhRfc822 rfc822; // 20 RIL_CDMA_SMS_UdhOther other; - }u; + }u; } RIL_CDMA_SMS_Udh; /* ----------------------------- */ diff --git a/libril/Android.mk b/libril/Android.mk index 9416f24..ce3efff 100644 --- a/libril/Android.mk +++ b/libril/Android.mk @@ -12,7 +12,7 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libhardware_legacy -LOCAL_CFLAGS := +LOCAL_CFLAGS := LOCAL_MODULE:= libril @@ -33,7 +33,7 @@ LOCAL_STATIC_LIBRARIES := \ libutils_static \ libcutils -LOCAL_CFLAGS := +LOCAL_CFLAGS := LOCAL_MODULE:= libril_static diff --git a/libril/ril.cpp b/libril/ril.cpp index 7baad99..fae17ca 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ @@ -128,7 +128,7 @@ typedef struct { } UnsolResponseInfo; typedef struct RequestInfo { - int32_t token; //this is not RIL_Token + int32_t token; //this is not RIL_Token CommandInfo *pCI; struct RequestInfo *p_next; char cancelled; @@ -235,12 +235,12 @@ extern "C" const char * callStateToString(RIL_CallState); extern "C" const char * radioStateToString(RIL_RadioState); #ifdef RIL_SHLIB -extern "C" void RIL_onUnsolicitedResponse(int unsolResponse, void *data, +extern "C" void RIL_onUnsolicitedResponse(int unsolResponse, void *data, size_t datalen); #endif -static UserCallbackInfo * internalRequestTimedCallback - (RIL_TimedCallback callback, void *param, +static UserCallbackInfo * internalRequestTimedCallback + (RIL_TimedCallback callback, void *param, const struct timeval *relativeTime); /** Index == requestNumber */ @@ -257,9 +257,9 @@ static char * strdupReadString(Parcel &p) { size_t stringlen; const char16_t *s16; - + s16 = p.readString16Inplace(&stringlen); - + return strndup16to8(s16, stringlen); } @@ -285,10 +285,10 @@ void nullParcelReleaseFunction (const uint8_t* data, size_t dataSize, // do nothing -- the data reference lives longer than the Parcel object } -/** +/** * To be called from dispatch thread * Issue a single local request, ensuring that the response - * is not sent back up to the command process + * is not sent back up to the command process */ static void issueLocalRequest(int request, void *data, int len) { @@ -360,19 +360,19 @@ processCommandBuffer(void *buffer, size_t buflen) { /* sLastDispatchedToken = token; */ - pRI->pCI->dispatchFunction(p, pRI); + pRI->pCI->dispatchFunction(p, pRI); return 0; } static void invalidCommandBlock (RequestInfo *pRI) { - LOGE("invalid command block for token %d request %s", + LOGE("invalid command block for token %d request %s", pRI->token, requestToString(pRI->pCI->requestNumber)); } /** Callee expects NULL */ -static void +static void dispatchVoid (Parcel& p, RequestInfo *pRI) { clearPrintBuf; printRequest(pRI->token, pRI->pCI->requestNumber); @@ -432,7 +432,7 @@ dispatchStrings (Parcel &p, RequestInfo *pRI) { datalen = 0; } else { datalen = sizeof(char *) * countStrings; - + pStrings = (char **)alloca(datalen); for (int i = 0 ; i < countStrings ; i++) { @@ -458,7 +458,7 @@ dispatchStrings (Parcel &p, RequestInfo *pRI) { memset(pStrings, 0, datalen); #endif } - + return; invalid: invalidCommandBlock(pRI); @@ -498,7 +498,7 @@ dispatchInts (Parcel &p, RequestInfo *pRI) { closeRequest; printRequest(pRI->token, pRI->pCI->requestNumber); - s_callbacks.onRequest(pRI->pCI->requestNumber, const_cast(pInts), + s_callbacks.onRequest(pRI->pCI->requestNumber, const_cast(pInts), datalen, pRI); #ifdef MEMSET_FREED @@ -512,8 +512,8 @@ invalid: } -/** - * Callee expects const RIL_SMS_WriteArgs * +/** + * Callee expects const RIL_SMS_WriteArgs * * Payload is: * int32_t status * String pdu @@ -542,7 +542,7 @@ dispatchSmsWrite (Parcel &p, RequestInfo *pRI) { (char*)args.pdu, (char*)args.smsc); closeRequest; printRequest(pRI->token, pRI->pCI->requestNumber); - + s_callbacks.onRequest(pRI->pCI->requestNumber, &args, sizeof(args), pRI); #ifdef MEMSET_FREED @@ -550,7 +550,7 @@ dispatchSmsWrite (Parcel &p, RequestInfo *pRI) { #endif free (args.pdu); - + #ifdef MEMSET_FREED memset(&args, 0, sizeof(args)); #endif @@ -561,8 +561,8 @@ invalid: return; } -/** - * Callee expects const RIL_Dial * +/** + * Callee expects const RIL_Dial * * Payload is: * String address * int32_t clir @@ -596,7 +596,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { #endif free (dial.address); - + #ifdef MEMSET_FREED memset(&dial, 0, sizeof(dial)); #endif @@ -607,15 +607,15 @@ invalid: return; } -/** - * Callee expects const RIL_SIM_IO * +/** + * Callee expects const RIL_SIM_IO * * Payload is: * int32_t command * int32_t fileid * String path * int32_t p1, p2, p3 - * String data - * String pin2 + * String data + * String pin2 */ static void dispatchSIM_IO (Parcel &p, RequestInfo *pRI) { @@ -625,8 +625,8 @@ dispatchSIM_IO (Parcel &p, RequestInfo *pRI) { memset (&simIO, 0, sizeof(simIO)); - // note we only check status at the end - + // note we only check status at the end + status = p.readInt32(&t); simIO.command = (int)t; @@ -654,7 +654,7 @@ dispatchSIM_IO (Parcel &p, RequestInfo *pRI) { (char*)simIO.data, (char*)simIO.pin2); closeRequest; printRequest(pRI->token, pRI->pCI->requestNumber); - + if (status != NO_ERROR) { goto invalid; } @@ -670,7 +670,7 @@ dispatchSIM_IO (Parcel &p, RequestInfo *pRI) { free (simIO.path); free (simIO.data); free (simIO.pin2); - + #ifdef MEMSET_FREED memset(&simIO, 0, sizeof(simIO)); #endif @@ -691,7 +691,7 @@ invalid: * String number (0 length -> null) * int32_t timeSeconds */ -static void +static void dispatchCallForward(Parcel &p, RequestInfo *pRI) { RIL_CallForwardInfo cff; int32_t t; @@ -699,11 +699,11 @@ dispatchCallForward(Parcel &p, RequestInfo *pRI) { memset (&cff, 0, sizeof(cff)); - // note we only check status at the end + // note we only check status at the end status = p.readInt32(&t); cff.status = (int)t; - + status = p.readInt32(&t); cff.reason = (int)t; @@ -754,7 +754,7 @@ invalid: } -static void +static void dispatchRaw(Parcel &p, RequestInfo *pRI) { int32_t len; status_t status; @@ -770,7 +770,7 @@ dispatchRaw(Parcel &p, RequestInfo *pRI) { if (((int)len) == -1) { data = NULL; len = 0; - } + } data = p.readInplace(len); @@ -787,7 +787,7 @@ invalid: return; } -static void +static void dispatchCdmaSms(Parcel &p, RequestInfo *pRI) { RIL_CDMA_SMS_Message rcsm; int32_t t; @@ -795,7 +795,7 @@ dispatchCdmaSms(Parcel &p, RequestInfo *pRI) { status_t status; int32_t digitCount; int digitLimit; - + memset(&rcsm, 0, sizeof(rcsm)); status = p.readInt32(&t); @@ -828,27 +828,27 @@ dispatchCdmaSms(Parcel &p, RequestInfo *pRI) { rcsm.sAddress.digits[digitCount] = (uint8_t) ut; } - status = p.readInt32(&t); + status = p.readInt32(&t); rcsm.sSubAddress.subaddressType = (RIL_CDMA_SMS_SubaddressType) t; - status = p.read(&ut,sizeof(ut)); + status = p.read(&ut,sizeof(ut)); rcsm.sSubAddress.odd = (uint8_t) ut; status = p.read(&ut,sizeof(ut)); rcsm.sSubAddress.number_of_digits = (uint8_t) ut; digitLimit= MIN((rcsm.sSubAddress.number_of_digits), RIL_CDMA_SMS_SUBADDRESS_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - status = p.read(&ut,sizeof(ut)); + for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { + status = p.read(&ut,sizeof(ut)); rcsm.sSubAddress.digits[digitCount] = (uint8_t) ut; } - status = p.readInt32(&t); + status = p.readInt32(&t); rcsm.uBearerDataLen = (int) t; digitLimit= MIN((rcsm.uBearerDataLen), RIL_CDMA_SMS_BEARER_DATA_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - status = p.read(&ut, sizeof(ut)); + for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { + status = p.read(&ut, sizeof(ut)); rcsm.aBearerData[digitCount] = (uint8_t) ut; } @@ -862,7 +862,7 @@ dispatchCdmaSms(Parcel &p, RequestInfo *pRI) { printBuf, rcsm.uTeleserviceID,rcsm.bIsServicePresent,rcsm.uServicecategory, rcsm.sAddress.digit_mode, rcsm.sAddress.number_mode,rcsm.sAddress.number_type); closeRequest; - + printRequest(pRI->token, pRI->pCI->requestNumber); s_callbacks.onRequest(pRI->pCI->requestNumber, &rcsm, sizeof(rcsm),pRI); @@ -878,7 +878,7 @@ invalid: return; } -static void +static void dispatchCdmaSmsAck(Parcel &p, RequestInfo *pRI) { RIL_CDMA_SMS_Ack rcsa; int32_t t; @@ -1130,7 +1130,7 @@ invalid: static int blockingWrite(int fd, const void *buffer, size_t len) { - size_t writeOffset = 0; + size_t writeOffset = 0; const uint8_t *toWrite; toWrite = (const uint8_t *)buffer; @@ -1170,7 +1170,7 @@ sendResponseRaw (const void *data, size_t dataSize) { return -1; } - + // FIXME is blocking here ok? issue #550970 @@ -1202,8 +1202,8 @@ sendResponse (Parcel &p) { } /** response is an int* pointing to an array of ints*/ - -static int + +static int responseInts(Parcel &p, void *response, size_t responselen) { int numInts; @@ -1212,7 +1212,7 @@ responseInts(Parcel &p, void *response, size_t responselen) { return RIL_ERRNO_INVALID_RESPONSE; } if (responselen % sizeof(int) != 0) { - LOGE("invalid response length %d expected multiple of %d\n", + LOGE("invalid response length %d expected multiple of %d\n", (int)responselen, (int)sizeof(int)); return RIL_ERRNO_INVALID_RESPONSE; } @@ -1237,13 +1237,13 @@ responseInts(Parcel &p, void *response, size_t responselen) { /** response is a char **, pointing to an array of char *'s */ static int responseStrings(Parcel &p, void *response, size_t responselen) { int numStrings; - + if (response == NULL && responselen != 0) { LOGE("invalid response: NULL"); return RIL_ERRNO_INVALID_RESPONSE; } if (responselen % sizeof(char *) != 0) { - LOGE("invalid response length %d expected multiple of %d\n", + LOGE("invalid response length %d expected multiple of %d\n", (int)responselen, (int)sizeof(char *)); return RIL_ERRNO_INVALID_RESPONSE; } @@ -1270,7 +1270,7 @@ static int responseStrings(Parcel &p, void *response, size_t responselen) { /** - * NULL strings are accepted + * NULL strings are accepted * FIXME currently ignores responselen */ static int responseString(Parcel &p, void *response, size_t responselen) { @@ -1356,7 +1356,7 @@ static int responseSMS(Parcel &p, void *response, size_t responselen) { } if (responselen != sizeof (RIL_SMS_Response) ) { - LOGE("invalid response length %d expected %d", + LOGE("invalid response length %d expected %d", (int)responselen, (int)sizeof (RIL_SMS_Response)); return RIL_ERRNO_INVALID_RESPONSE; } @@ -1382,7 +1382,7 @@ static int responseDataCallList(Parcel &p, void *response, size_t responselen) } if (responselen % sizeof(RIL_Data_Call_Response) != 0) { - LOGE("invalid response length %d expected multiple of %d", + LOGE("invalid response length %d expected multiple of %d", (int)responselen, (int)sizeof(RIL_Data_Call_Response)); return RIL_ERRNO_INVALID_RESPONSE; } @@ -1420,7 +1420,7 @@ static int responseRaw(Parcel &p, void *response, size_t responselen) { // The java code reads -1 size as null byte array if (response == NULL) { - p.writeInt32(-1); + p.writeInt32(-1); } else { p.writeInt32(responselen); p.write(response, responselen); @@ -1458,14 +1458,14 @@ static int responseSIM_IO(Parcel &p, void *response, size_t responselen) { static int responseCallForwards(Parcel &p, void *response, size_t responselen) { int num; - + if (response == NULL && responselen != 0) { LOGE("invalid response: NULL"); return RIL_ERRNO_INVALID_RESPONSE; } if (responselen % sizeof(RIL_CallForwardInfo *) != 0) { - LOGE("invalid response length %d expected multiple of %d", + LOGE("invalid response length %d expected multiple of %d", (int)responselen, (int)sizeof(RIL_CallForwardInfo *)); return RIL_ERRNO_INVALID_RESPONSE; } @@ -1492,7 +1492,7 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) { } removeLastChar; closeResponse; - + return 0; } @@ -2055,7 +2055,7 @@ static void processWakeupCallback(int fd, short flags, void *param) { /* empty our wakeup socket out */ do { ret = read(s_fdWakeupRead, &buff, sizeof(buff)); - } while (ret > 0 || (ret < 0 && errno == EINTR)); + } while (ret > 0 || (ret < 0 && errno == EINTR)); } static void onCommandsSocketClosed() { @@ -2069,7 +2069,7 @@ static void onCommandsSocketClosed() { p_cur = s_pendingRequests; - for (p_cur = s_pendingRequests + for (p_cur = s_pendingRequests ; p_cur != NULL ; p_cur = p_cur->p_next ) { @@ -2111,7 +2111,7 @@ static void processCommandsCallback(int fd, short flags, void *param) { } else { LOGW("EOS. Closing command socket."); } - + close(s_fdCommand); s_fdCommand = -1; @@ -2145,7 +2145,7 @@ static void onNewCommandConnect() { const char *version; version = s_callbacks.getVersion(); LOGI("RIL Daemon version: %s\n", version); - + property_set(PROPERTY_RIL_IMPL, version); } else { LOGI("RIL Daemon version: unavailable\n"); @@ -2170,7 +2170,7 @@ static void listenCallback (int fd, short flags, void *param) { assert (s_fdCommand < 0); assert (fd == s_fdListen); - + s_fdCommand = accept(s_fdListen, (sockaddr *) &peeraddr, &socklen); if (s_fdCommand < 0 ) { @@ -2182,7 +2182,7 @@ static void listenCallback (int fd, short flags, void *param) { /* check the credential of the other side and only accept socket from * phone process - */ + */ errno = 0; is_phone_socket = 0; @@ -2206,7 +2206,7 @@ static void listenCallback (int fd, short flags, void *param) { if ( !is_phone_socket ) { LOGE("RILD must accept socket from %s", PHONE_PROCESS); - + close(s_fdCommand); s_fdCommand = -1; @@ -2228,7 +2228,7 @@ static void listenCallback (int fd, short flags, void *param) { p_rs = record_stream_new(s_fdCommand, MAX_COMMAND_BYTES); - ril_event_set (&s_commands_event, s_fdCommand, 1, + ril_event_set (&s_commands_event, s_fdCommand, 1, processCommandsCallback, p_rs); rilEventAddWakeup (&s_commands_event); @@ -2280,7 +2280,7 @@ static void debugCallback (int fd, short flags, void *param) { } // +1 for null-term args[i] = (char *) malloc((sizeof(char) * len) + 1); - if (recv(acceptFD, args[i], sizeof(char) * len, 0) + if (recv(acceptFD, args[i], sizeof(char) * len, 0) != (int)sizeof(char) * len) { LOGE ("error reading on socket: Args[%d] \n", i); freeDebugCallbackArgs(i, args); @@ -2316,7 +2316,7 @@ static void debugCallback (int fd, short flags, void *param) { qxdm_data[3] = 32; qxdm_data[4] = 0; qxdm_data[4] = 8; - issueLocalRequest(RIL_REQUEST_OEM_HOOK_RAW, qxdm_data, + issueLocalRequest(RIL_REQUEST_OEM_HOOK_RAW, qxdm_data, 6 * sizeof(int)); break; case 4: @@ -2341,12 +2341,12 @@ static void debugCallback (int fd, short flags, void *param) { case 6: LOGI("Debug port: Setup Data Call, Apn :%s\n", args[1]); actData[0] = args[1]; - issueLocalRequest(RIL_REQUEST_SETUP_DATA_CALL, &actData, + issueLocalRequest(RIL_REQUEST_SETUP_DATA_CALL, &actData, sizeof(actData)); break; case 7: LOGI("Debug port: Deactivate Data Call"); - issueLocalRequest(RIL_REQUEST_DEACTIVATE_DATA_CALL, &deactData, + issueLocalRequest(RIL_REQUEST_DEACTIVATE_DATA_CALL, &deactData, sizeof(deactData)); break; case 8: @@ -2361,7 +2361,7 @@ static void debugCallback (int fd, short flags, void *param) { break; case 10: LOGI("Debug port: End Call"); - issueLocalRequest(RIL_REQUEST_HANGUP, &hangupData, + issueLocalRequest(RIL_REQUEST_HANGUP, &hangupData, sizeof(hangupData)); break; default: @@ -2428,17 +2428,17 @@ eventLoop(void *param) { return NULL; } -extern "C" void +extern "C" void RIL_startEventLoop(void) { int ret; pthread_attr_t attr; - + /* spin up eventLoop thread and wait for it to get started */ s_started = 0; pthread_mutex_lock(&s_startupMutex); pthread_attr_init (&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); ret = pthread_create(&s_tid_dispatch, &attr, eventLoop, NULL); while (s_started == 0) { @@ -2458,12 +2458,12 @@ extern "C" void RIL_setcallbacks (const RIL_RadioFunctions *callbacks) { memcpy(&s_callbacks, callbacks, sizeof (RIL_RadioFunctions)); } -extern "C" void +extern "C" void RIL_register (const RIL_RadioFunctions *callbacks) { int ret; int flags; - if (callbacks == NULL + if (callbacks == NULL || ! (callbacks->version == RIL_VERSION || callbacks->version == 1) ) { LOGE( @@ -2489,7 +2489,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) { } for (int i = 0; i < (int)NUM_ELEMS(s_unsolResponses); i++) { - assert(i + RIL_UNSOL_RESPONSE_BASE + assert(i + RIL_UNSOL_RESPONSE_BASE == s_unsolResponses[i].requestNumber); } @@ -2503,7 +2503,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) { // start listen socket #if 0 - ret = socket_local_server (SOCKET_NAME_RIL, + ret = socket_local_server (SOCKET_NAME_RIL, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM); if (ret < 0) { @@ -2530,7 +2530,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) { /* note: non-persistent so we can accept only one connection at a time */ - ril_event_set (&s_listen_event, s_fdListen, false, + ril_event_set (&s_listen_event, s_fdListen, false, listenCallback, NULL); rilEventAddWakeup (&s_listen_event); @@ -2563,15 +2563,15 @@ RIL_register (const RIL_RadioFunctions *callbacks) { static int checkAndDequeueRequestInfo(struct RequestInfo *pRI) { int ret = 0; - + if (pRI == NULL) { return 0; } pthread_mutex_lock(&s_pendingRequestsMutex); - for(RequestInfo **ppCur = &s_pendingRequests - ; *ppCur != NULL + for(RequestInfo **ppCur = &s_pendingRequests + ; *ppCur != NULL ; ppCur = &((*ppCur)->p_next) ) { if (pRI == *ppCur) { @@ -2686,7 +2686,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data, LOGW("RIL_onUnsolicitedResponse called before RIL_register"); return; } - + unsolResponseIndex = unsolResponse - RIL_UNSOL_RESPONSE_BASE; if ((unsolResponseIndex < 0) @@ -2793,11 +2793,11 @@ error_exit: } } -/** FIXME generalize this if you track UserCAllbackInfo, clear it - when the callback occurs +/** FIXME generalize this if you track UserCAllbackInfo, clear it + when the callback occurs */ static UserCallbackInfo * -internalRequestTimedCallback (RIL_TimedCallback callback, void *param, +internalRequestTimedCallback (RIL_TimedCallback callback, void *param, const struct timeval *relativeTime) { struct timeval myRelativeTime; @@ -2805,7 +2805,7 @@ internalRequestTimedCallback (RIL_TimedCallback callback, void *param, p_info = (UserCallbackInfo *) malloc (sizeof(UserCallbackInfo)); - p_info->p_callback = callback; + p_info->p_callback = callback; p_info->userParam = param; if (relativeTime == NULL) { @@ -2826,7 +2826,7 @@ internalRequestTimedCallback (RIL_TimedCallback callback, void *param, extern "C" void -RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, +RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, const struct timeval *relativeTime) { internalRequestTimedCallback (callback, param, relativeTime); } @@ -2846,7 +2846,7 @@ failCauseToString(RIL_Errno e) { case RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW: return "E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW"; case RIL_E_SMS_SEND_FAIL_RETRY: return "E_SMS_SEND_FAIL_RETRY"; case RIL_E_SIM_ABSENT:return "E_SIM_ABSENT"; -#ifdef FEATURE_MULTIMODE_ANDROID +#ifdef FEATURE_MULTIMODE_ANDROID case RIL_E_SUBSCRIPTION_NOT_AVAILABLE:return "E_SUBSCRIPTION_NOT_AVAILABLE"; case RIL_E_MODE_NOT_SUPPORTED:return "E_MODE_NOT_SUPPORTED"; #endif diff --git a/libril/ril_commands.h b/libril/ril_commands.h index 9bd95df..1786c8d 100644 --- a/libril/ril_commands.h +++ b/libril/ril_commands.h @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ {0, NULL, NULL}, //none @@ -24,7 +24,7 @@ {RIL_REQUEST_CHANGE_SIM_PIN2, dispatchStrings, responseVoid}, {RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION, dispatchStrings, responseVoid}, {RIL_REQUEST_GET_CURRENT_CALLS, dispatchVoid, responseCallList}, - {RIL_REQUEST_DIAL, dispatchDial, responseVoid}, + {RIL_REQUEST_DIAL, dispatchDial, responseVoid}, {RIL_REQUEST_GET_IMSI, dispatchVoid, responseString}, {RIL_REQUEST_HANGUP, dispatchInts, responseVoid}, {RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND, dispatchVoid, responseVoid}, @@ -56,7 +56,7 @@ {RIL_REQUEST_GET_IMEISV, dispatchVoid, responseString}, {RIL_REQUEST_ANSWER,dispatchVoid, responseVoid}, {RIL_REQUEST_DEACTIVATE_DATA_CALL, dispatchStrings, responseVoid}, - {RIL_REQUEST_QUERY_FACILITY_LOCK, dispatchStrings, responseInts}, + {RIL_REQUEST_QUERY_FACILITY_LOCK, dispatchStrings, responseInts}, {RIL_REQUEST_SET_FACILITY_LOCK, dispatchStrings, responseVoid}, {RIL_REQUEST_CHANGE_BARRING_PASSWORD, dispatchStrings, responseVoid}, {RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE, dispatchVoid, responseInts}, @@ -71,7 +71,7 @@ {RIL_REQUEST_GET_MUTE, dispatchVoid, responseInts}, {RIL_REQUEST_QUERY_CLIP, dispatchVoid, responseInts}, {RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE, dispatchVoid, responseInts}, - {RIL_REQUEST_DATA_CALL_LIST, dispatchVoid, responseDataCallList}, + {RIL_REQUEST_DATA_CALL_LIST, dispatchVoid, responseDataCallList}, {RIL_REQUEST_RESET_RADIO, dispatchVoid, responseVoid}, {RIL_REQUEST_OEM_HOOK_RAW, dispatchRaw, responseRaw}, {RIL_REQUEST_OEM_HOOK_STRINGS, dispatchStrings, responseStrings}, diff --git a/libril/ril_event.h b/libril/ril_event.h index 420dbc0..7ba231b 100644 --- a/libril/ril_event.h +++ b/libril/ril_event.h @@ -2,16 +2,16 @@ ** ** Copyright 2008, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ diff --git a/libril/ril_unsol_commands.h b/libril/ril_unsol_commands.h index 7eff708..ef2dcdb 100644 --- a/libril/ril_unsol_commands.h +++ b/libril/ril_unsol_commands.h @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ {RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, responseVoid, WAKE_PARTIAL}, diff --git a/reference-cdma-sms/Android.mk b/reference-cdma-sms/Android.mk index d0fd586..10d0540 100644 --- a/reference-cdma-sms/Android.mk +++ b/reference-cdma-sms/Android.mk @@ -1,23 +1,22 @@ -# Copyright 2008 The Android Open Source Project - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - reference-cdma-sms.c - -LOCAL_SHARED_LIBRARIES := \ - libcutils libutils libril - - # for asprinf -LOCAL_CFLAGS := -D_GNU_SOURCE - -LOCAL_C_INCLUDES := $(KERNEL_HEADERS) - -LOCAL_SHARED_LIBRARIES += \ - libcutils libutils -LOCAL_LDLIBS += -lpthread -LOCAL_MODULE:= libreference-cdma-sms -LOCAL_PRELINK_MODULE := false -include $(BUILD_SHARED_LIBRARY) - +# Copyright 2008 The Android Open Source Project + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= \ + reference-cdma-sms.c + +LOCAL_SHARED_LIBRARIES := \ + libcutils libutils libril + +# for asprinf +LOCAL_CFLAGS := -D_GNU_SOURCE + +LOCAL_C_INCLUDES := $(KERNEL_HEADERS) + +LOCAL_SHARED_LIBRARIES += \ + libcutils libutils +LOCAL_LDLIBS += -lpthread +LOCAL_MODULE:= libreference-cdma-sms +LOCAL_PRELINK_MODULE := false +include $(BUILD_SHARED_LIBRARY) diff --git a/reference-cdma-sms/reference-cdma-sms.c b/reference-cdma-sms/reference-cdma-sms.c index 8777ded..89b2774 100644 --- a/reference-cdma-sms/reference-cdma-sms.c +++ b/reference-cdma-sms/reference-cdma-sms.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,7 +27,7 @@ RIL_Errno wmsts_ril_cdma_decode_sms( RIL_CDMA_Encoded_SMS * encoded_sms, return RIL_E_GENERIC_FAILURE; } -RIL_Errno wmsts_ril_cdma_encode_sms(RIL_CDMA_SMS_ClientBd * client_bd, +RIL_Errno wmsts_ril_cdma_encode_sms(RIL_CDMA_SMS_ClientBd * client_bd, RIL_CDMA_Encoded_SMS * encoded_sms) { LOGE("ril_cdma_encode_sms function not implemented\n"); diff --git a/reference-cdma-sms/reference-cdma-sms.h b/reference-cdma-sms/reference-cdma-sms.h index a82f6eb..443ddf5 100644 --- a/reference-cdma-sms/reference-cdma-sms.h +++ b/reference-cdma-sms/reference-cdma-sms.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +14,7 @@ * limitations under the License. */ -#ifndef REFERENCE_CDMA_SMS_H +#ifndef REFERENCE_CDMA_SMS_H #define REFERENCE_CDMA_SMS_H 1 #include diff --git a/reference-ril/Android.mk b/reference-ril/Android.mk index 7ec1f97..ec2692e 100644 --- a/reference-ril/Android.mk +++ b/reference-ril/Android.mk @@ -12,15 +12,15 @@ LOCAL_SRC_FILES:= \ at_tok.c LOCAL_SHARED_LIBRARIES := \ - libcutils libutils libril + libcutils libutils libril - # for asprinf +# for asprinf LOCAL_CFLAGS := -D_GNU_SOURCE LOCAL_C_INCLUDES := $(KERNEL_HEADERS) ifeq ($(TARGET_DEVICE),sooner) - LOCAL_CFLAGS += -DOMAP_CSMI_POWER_CONTROL -DUSE_TI_COMMANDS + LOCAL_CFLAGS += -DOMAP_CSMI_POWER_CONTROL -DUSE_TI_COMMANDS endif ifeq ($(TARGET_DEVICE),surf) @@ -34,7 +34,7 @@ endif ifeq (foo,foo) #build shared library LOCAL_SHARED_LIBRARIES += \ - libcutils libutils + libcutils libutils LOCAL_LDLIBS += -lpthread LOCAL_CFLAGS += -DRIL_SHLIB LOCAL_MODULE:= libreference-ril @@ -42,7 +42,7 @@ ifeq (foo,foo) else #build executable LOCAL_SHARED_LIBRARIES += \ - libril + libril LOCAL_MODULE:= reference-ril include $(BUILD_EXECUTABLE) endif diff --git a/reference-ril/at_tok.c b/reference-ril/at_tok.c index 11e0cba..204a69e 100644 --- a/reference-ril/at_tok.c +++ b/reference-ril/at_tok.c @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ @@ -64,7 +64,7 @@ static void skipNextComma(char **p_cur) if (**p_cur == ',') { (*p_cur)++; - } + } } static char * nextTok(char **p_cur) @@ -97,7 +97,7 @@ static char * nextTok(char **p_cur) static int at_tok_nextint_base(char **p_cur, int *p_out, int base, int uns) { char *ret; - + if (*p_cur == NULL) { return -1; } @@ -126,7 +126,7 @@ static int at_tok_nextint_base(char **p_cur, int *p_out, int base, int uns) } /** - * Parses the next base 10 integer in the AT response line + * Parses the next base 10 integer in the AT response line * and places it in *p_out * returns 0 on success and -1 on fail * updates *p_cur @@ -137,7 +137,7 @@ int at_tok_nextint(char **p_cur, int *p_out) } /** - * Parses the next base 16 integer in the AT response line + * Parses the next base 16 integer in the AT response line * and places it in *p_out * returns 0 on success and -1 on fail * updates *p_cur diff --git a/reference-ril/at_tok.h b/reference-ril/at_tok.h index 42bb4c9..a85ea63 100644 --- a/reference-ril/at_tok.h +++ b/reference-ril/at_tok.h @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ diff --git a/reference-ril/misc.c b/reference-ril/misc.c index 7945e75..e4b8d72 100644 --- a/reference-ril/misc.c +++ b/reference-ril/misc.c @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ diff --git a/reference-ril/misc.h b/reference-ril/misc.h index bafe7df..7044a07 100644 --- a/reference-ril/misc.h +++ b/reference-ril/misc.h @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c index 0719efa..d6bd09d 100644 --- a/reference-ril/reference-ril.c +++ b/reference-ril/reference-ril.c @@ -1926,7 +1926,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu) RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED, NULL, 0); #ifdef WORKAROUND_FAKE_CGEV - RIL_requestTimedCallback (onDataCallListChanged, NULL, NULL); + RIL_requestTimedCallback (onDataCallListChanged, NULL, NULL); #endif /* WORKAROUND_FAKE_CGEV */ } else if (strStartsWith(s, "+CMT:")) { RIL_onUnsolicitedResponse ( diff --git a/rild/radiooptions.c b/rild/radiooptions.c index ec32f40..1a4ec11 100644 --- a/rild/radiooptions.c +++ b/rild/radiooptions.c @@ -2,16 +2,16 @@ ** ** Copyright 2006, The Android Open Source Project ** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at ** -** http://www.apache.org/licenses/LICENSE-2.0 +** http://www.apache.org/licenses/LICENSE-2.0 ** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and ** limitations under the License. */ -- 2.11.0