From b60444ef2fe63b372e13f3d38ebf8448d6c127f5 Mon Sep 17 00:00:00 2001 From: jsh Date: Fri, 29 May 2009 11:09:17 -0700 Subject: [PATCH] Support for SMS error reporting to the network. - Update RIL_REQUEST_SMS_ACKNOWLDGE to report fail cause. - Update comments for RIL_CMDA_SMS_Ack. - Add RIL_REQUEST_REPORT_SMS_MEMORY_STATUS. --- include/telephony/ril.h | 27 +++++++++++++++++++++++++-- include/telephony/ril_cdma_sms.h | 4 +++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/include/telephony/ril.h b/include/telephony/ril.h index 654d8dc..3db0ac6 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -1430,10 +1430,14 @@ typedef struct { * via RIL_UNSOL_RESPONSE_NEW_SMS * * "data" is int * - * ((int *)data)[0] is "1" on successful receipt + * ((int *)data)[0] is 1 on successful receipt * (basically, AT+CNMA=1 from TS 27.005 - * ((int *)data)[0] is "0" on failed receipt + * is 0 on failed receipt * (basically, AT+CNMA=2 from TS 27.005) + * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined + * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory + * capacity exceeded) and 0xFF (unspecified error) are + * reported. * * "response" is NULL * @@ -2798,6 +2802,25 @@ typedef struct { */ #define RIL_REQUEST_SET_SMSC_ADDRESS 101 +/** + * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS + * + * Indicates whether there is storage available for new SMS messages. + * + * "data" is int * + * ((int *)data)[0] is 1 if memory is available for storing new messages + * is 0 if memory capacity is exceeded + * + * "response" is NULL + * + * Valid errors: + * SUCCESS + * RADIO_NOT_AVAILABLE + * GENERIC_FAILURE + * + */ +#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 + /***********************************************************************/ diff --git a/include/telephony/ril_cdma_sms.h b/include/telephony/ril_cdma_sms.h index 8fb459f..1554fe1 100644 --- a/include/telephony/ril_cdma_sms.h +++ b/include/telephony/ril_cdma_sms.h @@ -151,7 +151,9 @@ typedef enum { typedef struct { RIL_CDMA_SMS_ErrorClass uErrorClass; - int uSMSCauseCode; + int uSMSCauseCode; /* As defined in N.S00005, 6.5.2.125. + Currently, only 35 (resource shortage) and + 39 (other terminal problem) are reported. */ } RIL_CDMA_SMS_Ack; /* Used by RIL_REQUEST_CDMA_SMS_GET_BROADCAST_CONFIG and -- 2.11.0