B2G/gecko/dom/mobilemessage/src/ril/MmsPduHelper.jsm
/**
   * @param data
   *        A wrapped object containing raw PDU data.
   * @param options
   *        Extra context for decoding.
   *
   * @return A decoded object containing `uri` and conditional `statusCount`
   *         properties.
   */
@param data
A wrapped object containing raw PDU data.
@param options
Extra context for decoding.

@return A decoded object containing `uri` and conditional `statusCount`
properties.
@param data A wrapped object containing raw PDU data . @param options Extra context for decoding . @return A decoded object containing ` uri ` and conditional ` statusCount ` properties .
function decode(data, options) {
    let type = WSP.ensureHeader(options, "x-mms-message-type");
    let result = {};
    if ((type == MMS_PDU_TYPE_MBOX_DELETE_CONF)
        || (type == MMS_PDU_TYPE_DELETE_CONF)) {
      let length = WSP.ValueLength.decode(data);
      let end = data.offset + length;
      result.statusCount = WSP.IntegerValue.decode(data);
      result.uri = WSP.UriValue.decode(data);
      if (data.offset != end) {
        data.offset = end;
      }
    } else {
      result.uri = WSP.UriValue.decode(data);
    }
    return result;
  }
function decode ( data , options ) { let type = WSP . ensureHeader ( options , "x-mms-message-type" ) ; let result = { } ; if ( ( type == MMS_PDU_TYPE_MBOX_DELETE_CONF ) || ( type == MMS_PDU_TYPE_DELETE_CONF ) ) { let length = WSP . ValueLength . decode ( data ) ; let end = data . offset + length ; result . statusCount = WSP . IntegerValue . decode ( data ) ; result . uri = WSP . UriValue . decode ( data ) ; if ( data . offset != end ) { data . offset = end ; } } else { result . uri = WSP . UriValue . decode ( data ) ; } return result ; }
@param data
        A wrapped object containing raw PDU data.
@param data A wrapped object containing raw PDU data .