MmsParseMms Function

Action

Parses a MMS from its binary representation. This function can be used to prepare a received MMS for header checking, for example checking response status.

Include file

MmsLib.bdh

Syntax

MmsParseMms( in hMms         : number,
             in sData        : string,
             in nDataLen     : number optional,
             in bHeadersOnly : boolean optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hMms Handle for the MMS returned by a call to MmsCreateMms.
sData Binary representation of the MMS to be parsed.
nDataLen Optional: Length of the binary data.
bHeadersOnly Optional: Specifies whether the parsing process should be stopped after the MMS headers (sufficient for header checking).

A value of false specifies that the entire MMS should be parsed.

Example

dcltrans
  transaction TWap
  var
    sData   : string(0x10000);
    nData   : number;
    hMms    : number;
    sFrom   : string;
  begin
    nData := WapGetContent(sData);
    MmsCreateMms(hMms);
    MmsParseMms(hMms, sData, nData, true);
    MmsGetHeaderString(hMms, MMS_HEADER_From, sFrom);
    MmsDeleteMms(hMms);
    print(sFrom);
  end TWap;