diff options
author | Sukanya Rajkhowa <srajkh@codeaurora.org> | 2013-09-10 12:30:13 -0700 |
---|---|---|
committer | Ed Tam <etam@google.com> | 2013-10-10 16:18:58 -0700 |
commit | a18b9d1e1a014290691d63a7f335085dadc83e46 (patch) | |
tree | 17be8f206b5f98913c00e107fbb22a8ff8bb6bb2 /include | |
parent | 3492c6e5917828645feb3dba4618629929a43ab1 (diff) | |
download | android_hardware_ril-a18b9d1e1a014290691d63a7f335085dadc83e46.tar.gz android_hardware_ril-a18b9d1e1a014290691d63a7f335085dadc83e46.tar.bz2 android_hardware_ril-a18b9d1e1a014290691d63a7f335085dadc83e46.zip |
RIL: Support SMS over IMS
RIL_REQUEST_IMS_REGISTRATION_STATE is used to aquire IMS registration state.
RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED is called when IMS registration
state has changed.
RIL_REQUEST_IMS_SEND_SMS is used to send MO SMS over IMS. However, if retry
field is set in case of failure, RIL_REQUEST_IMS_SEND_SMS sets messageRef from
RIL_SMS_RESPONSE of corresponding failed MO SMS, and sets retry field to
non-zero. If voice is available, sends RIL_REQUEST_IMS_SEND_SMS retries with
data encoded based on voice tech available.
Bug: 9626411
Change-Id: If0ecc9fa47661f6560171e472f3c464713e97968
Diffstat (limited to 'include')
-rw-r--r-- | include/telephony/ril.h | 88 |
1 files changed, 87 insertions, 1 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h index 766d5da..803d965 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -19,6 +19,7 @@ #include <stdlib.h> #include <stdint.h> +#include <telephony/ril_cdma_sms.h> #ifndef FEATURE_UNIT_TEST #include <sys/time.h> #endif /* !FEATURE_UNIT_TEST */ @@ -27,7 +28,7 @@ extern "C" { #endif -#define RIL_VERSION 8 /* Current version */ +#define RIL_VERSION 9 /* Current version */ #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 @@ -233,6 +234,28 @@ typedef struct { to point connections. */ } RIL_Data_Call_Response_v6; +typedef enum { + RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ + RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ +} RIL_RadioTechnologyFamily; + +typedef struct { + RIL_RadioTechnologyFamily tech; + unsigned char retry; /* 0 == not retry, nonzero == retry */ + int messageRef; /* Valid field if retry is set to nonzero. + Contains messageRef from RIL_SMS_Response + corresponding to failed MO SMS. + */ + + union { + /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ + RIL_CDMA_SMS_Message* cdmaMessage; + + /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ + char** gsmMessage; + } message; +} RIL_IMS_SMS_Message; + typedef struct { int messageRef; /* TP-Message-Reference for GSM, and BearerData MessageId for CDMA @@ -3498,6 +3521,50 @@ typedef struct { */ #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 +/** + * RIL_REQUEST_IMS_REGISTRATION_STATE + * + * Request current IMS registration state + * + * "data" is NULL + * + * "response" is int * + * ((int *)response)[0] is registration state: + * 0 - Not registered + * 1 - Registered + * ((int *)response)[1] is bitmap of the supported services: + * & 0x1 - SMS supported + * + * If IMS is registered and supports SMS, then ((int *) response)[2] + * must follow with IMS SMS format: + * + * ((int *) response)[2] is of type const RIL_IMS_SMS_Format + */ +#define RIL_REQUEST_IMS_REGISTRATION_STATE 112 + +/** + * RIL_REQUEST_IMS_SEND_SMS + * + * Send a SMS message over IMS + * + * "data" is const RIL_IMS_SMS_Message * + * + * "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, and other errors means no retry. + * In case of retry, data is encoded based on Voice Technology available. + * + * Valid errors: + * SUCCESS + * RADIO_NOT_AVAILABLE + * SMS_SEND_FAIL_RETRY + * FDN_CHECK_FAILURE + * GENERIC_FAILURE + * + */ +#define RIL_REQUEST_IMS_SEND_SMS 113 + /***********************************************************************/ @@ -3988,6 +4055,25 @@ typedef struct { */ #define RIL_UNSOL_CELL_INFO_LIST 1036 +/* + * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED + * + * Called when IMS registration state has changed + * + * "data" is int * + * ((int *)response)[0] is registration state: + * 0 - Not registered + * 1 - Registered + * ((int *)response)[1] is bitmap of the services supported: + * & 0x1 - SMS supported + * + * If IMS is registered and supports SMS, then ((int *) response)[2] + * must follow with IMS SMS format: + * + * ((int *) response)[2] is of type const RIL_IMS_SMS_Format + */ +#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 + /***********************************************************************/ |