B2G/gecko/dom/mobilemessage/src/ril/MmsPduHelper.jsm
/**
   * @param data
   *        A wrapped object containing raw PDU data.
   * @param msg
   *        A message object to store decoded multipart or octet array content.
   */
@param data
A wrapped object containing raw PDU data.
@param msg
A message object to store decoded multipart or octet array content.
@param data A wrapped object containing raw PDU data . @param msg A message object to store decoded multipart or octet array content .
function parseContent(data, msg) {
    let contentType = msg.headers["content-type"].media;
    if ((contentType == "application/vnd.wap.multipart.related")
        || (contentType == "application/vnd.wap.multipart.mixed")) {
      msg.parts = WSP.PduHelper.parseMultiPart(data);
      return;
    }
    if (data.offset >= data.array.length) {
      return;
    }
    msg.content = WSP.Octet.decodeMultiple(data, data.array.length);
    if (false) {
      for (let begin = 0; begin < msg.content.length; begin += 20) {
        debug("content: " + JSON.stringify(msg.content.subarray(begin, begin + 20)));
      }
    }
  }
function parseContent ( data , msg ) { let contentType = msg . headers [ "content-type" ] . media ; if ( ( contentType == "application/vnd.wap.multipart.related" ) || ( contentType == "application/vnd.wap.multipart.mixed" ) ) { msg . parts = WSP . PduHelper . parseMultiPart ( data ) ; return ; } if ( data . offset >= data . array . length ) { return ; } msg . content = WSP . Octet . decodeMultiple ( data , data . array . length ) ; if ( false ) { for ( let begin = 0 ; begin < msg . content . length ; begin += 20 ) { debug ( "content: " + JSON . stringify ( msg . content . subarray ( begin , begin + 20 ) ) ) ; } } }
@param data
        A wrapped object containing raw PDU data.
@param data A wrapped object containing raw PDU data .