MmsGetHeader Function

Action

Retrieves the specified header of a MMS. If the header is not a number type header, use MmsGetHeaderString instead.

Include file

MmsLib.bdh

Syntax

MmsGetHeader( in  hMms    : number,
              in  nHeader : number,
              out nValue  : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hMms Handle for the MMS, returned by a call to MmsCreateMms.
nHeader
One of the following constants:
  • MMS_HEADER_ContentType
  • MMS_HEADER_Date
  • MMS_HEADER_DeliveryReport
  • MMS_HEADER_MsgClass
  • MMS_HEADER_MsgType
  • MMS_HEADER_MmsVersion
  • MMS_HEADER_Priority
  • MMS_HEADER_ReadReply
  • MMS_HEADER_ReportAllowed
  • MMS_HEADER_ResponseStatus
  • MMS_HEADER_Status
nValue Variable that retrieves the value of the specified header. Based on the specified header type, one of the following values is used:
Header
Value
nHeader = MMS_HEADER_ContentType
  • WAP_CONTENT_ApplicationVndWapMultipartMixed
  • WAP_CONTENT_ApplicationVndWapMultipartRelated
nHeader = MMS_HEADER_Date
Value equals the number of seconds from 1970-01-01, 00:00:00 GMT. 0 specifies the current date.
nHeader = MMS_HEADER_DeliveryReport
  • MMS_Yes

  • MMS_No

nHeader = MMS_HEADER_MsgClass
  • MMS_MSGCLASS_Personal
  • MMS_MSGCLASS_Advertisement
  • MMS_MSGCLASS_Informational
  • MMS_MSGCLASS_Auto
nHeader = MMS_HEADER_MsgType
  • MMS_M_SEND_REQ
  • MMS_M_SEND_CONF
  • MMS_M_NOTIFICATION_IND
  • MMS_M_NOTIFYRESP_IND
  • MMS_M_RETRIEVE_CONF
  • MMS_M_ACKNOWLEDGE_IND
  • MMS_M_DELIVERY_IND
nHeader = MMS_HEADER_MmsVersion
MMS_MSGVERSION_10
nHeader = MMS_HEADER_Priority
  • MMS_PRIORITY_Low
  • MMS_PRIORITY_Normal
  • MMS_PRIORITY_High
nHeader = MMS_HEADER_ReadReply
  • MMS_Yes

  • MMS_No

nHeader = MMS_HEADER_ReportAllowed
  • MMS_Yes

  • MMS_No

nHeader = MMS_HEADER_ResponseStatus
  • MMS_RESPONSESTATUS_Ok
  • MMS_RESPONSESTATUS_ErrorUnspecified
  • MMS_RESPONSESTATUS_ErrorServiceDenied
  • MMS_RESPONSESTATUS_ErrorMessageFormatCorrupt
  • MMS_RESPONSESTATUS_ErrorSendingAddressUnresolved
  • MMS_RESPONSESTATUS_ErrorMessageNotFound
  • MMS_RESPONSESTATUS_ErrorNetworkProblem
  • MMS_RESPONSESTATUS_ErrorContentNotAccepted
  • MMS_RESPONSESTATUS_ErrorUnsupportedMessage
nHeader = MMS_HEADER_Status
  • MMS_STATUS_Expired
  • MMS_STATUS_Retrieved
  • MMS_STATUS_Rejected
  • MMS_STATUS_Deferred
  • MMS_STATUS_Unrecognised

Example

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