summaryrefslogtreecommitdiffstats
path: root/include/telephony/ril.h
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2014-01-15 13:12:05 -0800
committerJake Hamby <jhamby@google.com>2014-02-03 00:53:32 -0800
commit8a4a233bb9503eddee83569e647c25099a8e15b3 (patch)
tree6fb0d4cd670a04ce280ff2e2b25bc83409bf0130 /include/telephony/ril.h
parentbfb41c60d52805e72734e90c85ac64a9cd96691a (diff)
downloadandroid_hardware_ril-8a4a233bb9503eddee83569e647c25099a8e15b3.tar.gz
android_hardware_ril-8a4a233bb9503eddee83569e647c25099a8e15b3.tar.bz2
android_hardware_ril-8a4a233bb9503eddee83569e647c25099a8e15b3.zip
Add new RIL commands to read, write, and reset NV items.
Add new RIL commands to read, write, and reset NV items, including the CDMA Preferred Roaming List (PRL). Used for device configuration by some CDMA operators. Bug: 12864208 Change-Id: I792e272438b56bca725e6c034baac19244e5563f
Diffstat (limited to 'include/telephony/ril.h')
-rw-r--r--include/telephony/ril.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 9f87bdb..afd6d85 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -20,6 +20,8 @@
#include <stdlib.h>
#include <stdint.h>
#include <telephony/ril_cdma_sms.h>
+#include <telephony/ril_nv_items.h>
+
#ifndef FEATURE_UNIT_TEST
#include <sys/time.h>
#endif /* !FEATURE_UNIT_TEST */
@@ -987,6 +989,17 @@ typedef struct {
RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
} RIL_CDMA_InformationRecords;
+/* See RIL_REQUEST_NV_READ_ITEM */
+typedef struct {
+ RIL_NV_Item itemID;
+} RIL_NV_ReadItem;
+
+/* See RIL_REQUEST_NV_WRITE_ITEM */
+typedef struct {
+ RIL_NV_Item itemID;
+ char * value;
+} RIL_NV_WriteItem;
+
/**
* RIL_REQUEST_GET_SIM_STATUS
*
@@ -3663,6 +3676,96 @@ typedef struct {
*/
#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
+/**
+ * RIL_REQUEST_NV_READ_ITEM
+ *
+ * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is a const RIL_NV_ReadItem *
+ *
+ * "response" is const char * containing the contents of the NV item
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_READ_ITEM 118
+
+/**
+ * RIL_REQUEST_NV_WRITE_ITEM
+ *
+ * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is a const RIL_NV_WriteItem *
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_WRITE_ITEM 119
+
+/**
+ * RIL_REQUEST_NV_WRITE_CDMA_PRL
+ *
+ * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is a const char * containing the PRL as a byte array
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
+
+/**
+ * RIL_REQUEST_NV_RESET_CONFIG
+ *
+ * Reset the radio NV configuration to the factory state.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is 1 for a factory reset (RTN)
+ * ((int *)data)[0] is 2 for a radio reset (SCRTN)
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_RESET_CONFIG 121
+
+/**
+ * RIL_REQUEST_SET_RADIO_MODE
+ *
+ * Set radio mode. The exact meaning of these states is defined by the OEM.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is 0 for "offline mode"
+ * ((int *)data)[0] is 1 for "online mode"
+ * ((int *)data)[0] is 2 for "low-power mode"
+ * ((int *)data)[0] is 3 for "reset radio"
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SET_RADIO_MODE 122
+
/***********************************************************************/