* RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
*
* RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
- * strongly versioned version it enforces structure use. New
- * data structures are added, namely RIL_CarrierMatchType,
- * RIL_Carrier, RIL_CarrierRestrictions. New commands added:
- * RIL_REQUEST_SET_CARRIER_RESTRICTIONS, RIL_REQUEST_SET_CARRIER_RESTRICTIONS
+ * strongly versioned version it enforces structure use.
+ * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
+ * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
+ * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
+ * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and
+ * RIL_UNSOL_PCO_DATA
*/
#define RIL_VERSION 12
#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
*/
#define RIL_UNSOL_LCEDATA_RECV 1045
+ /**
+ * RIL_UNSOL_PCO_DATA
+ *
+ * Called when there is new Carrier PCO data received for a data call. Ideally
+ * only new data will be forwarded, though this is not required. Multiple
+ * boxes of carrier PCO data for a given call should result in a series of
+ * RIL_UNSOL_PCO_DATA calls.
+ *
+ * "data" is the RIL_PCO_Data structure.
+ *
+ */
+#define RIL_UNSOL_PCO_DATA 1046
+
/***********************************************************************/
void RIL_requestTimedCallback (RIL_TimedCallback callback,
void *param, const struct timeval *relativeTime);
+typedef struct {
+ int cid; /* Context ID, uniquely identifies this call */
+ char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
+ For example, "IP", "IPV6", "IPV4V6" */
+ int pco_id; /* The protocol ID for this box. Note that only IDs from
+ FF00H - FFFFH are accepted. If more than one is included
+ from the network, multiple calls should be made to send all
+ of them. */
+ int contents_length; /* The number of octets in the contents. */
+ char *contents; /* Carrier-defined content. It is binary, opaque and
+ loosely defined in LTE Layer 3 spec 24.008 */
+} RIL_PCO_Data;
#endif /* RIL_SHLIB */
static int responseLceData(Parcel &p, void *response, size_t responselen);
static int responseActivityData(Parcel &p, void *response, size_t responselen);
static int responseCarrierRestrictions(Parcel &p, void *response, size_t responselen);
+static int responsePcoData(Parcel &p, void *response, size_t responselen);
static int decodeVoiceRadioTechnology (RIL_RadioState radioState);
static int decodeCdmaSubscriptionSource (RIL_RadioState radioState);
memset(&cr, 0, sizeof(RIL_CarrierRestrictions));
- if (s_callbacks.version < 13) {
+ if (s_callbacks.version < 14) {
RLOGE("Unsuppoted RIL version %d, min version expected %d",
- s_callbacks.version, 13);
+ s_callbacks.version, 14);
RIL_onRequestComplete(pRI, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
return;
}
}
if (responselen != sizeof(RIL_CarrierRestrictions)) {
RLOGE("responseCarrierRestrictions: invalid response length %d expecting len: %d",
- sizeof(RIL_CarrierRestrictions), responselen);
+ responselen, sizeof(RIL_CarrierRestrictions));
return RIL_ERRNO_INVALID_RESPONSE;
}
return 0;
}
+static int responsePcoData(Parcel &p, void *response, size_t responselen) {
+ if (response == NULL) {
+ RLOGE("responsePcoData: invalid NULL response");
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+ if (responselen != sizeof(RIL_PCO_Data)) {
+ RLOGE("responsePcoData: invalid response length %d, expecting %d",
+ responselen, sizeof(RIL_PCO_Data));
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ RIL_PCO_Data *p_cur = (RIL_PCO_Data *)response;
+ p.writeInt32(p_cur->cid);
+ writeStringToParcel(p, p_cur->bearer_proto);
+ p.writeInt32(p_cur->pco_id);
+ p.writeInt32(p_cur->contents_length);
+ p.write(p_cur->contents, p_cur->contents_length);
+
+ startResponse;
+ appendPrintBuf("PCO data received: cid %d, id %d, length %d",
+ p_cur->cid, p_cur->pco_id, p_cur->contents_length);
+ closeResponse;
+
+ return 0;
+}
+
/**
* A write on the wakeup fd is done just to pop us out of select()
* We empty the buffer here and then ril_event will reset the timers on the
case RIL_REQUEST_SHUTDOWN: return "SHUTDOWN";
case RIL_UNSOL_RADIO_CAPABILITY: return "RIL_UNSOL_RADIO_CAPABILITY";
case RIL_RESPONSE_ACKNOWLEDGEMENT: return "RIL_RESPONSE_ACKNOWLEDGEMENT";
+ case RIL_UNSOL_PCO_DATA: return "RIL_UNSOL_PCO_DATA";
default: return "<unknown request>";
}
}