MMS parser – push router & client Monky Chen  3/21/2005
Outline Push Router Overview Push Client  Overview Push Client Source Code Review
Push Router & Client (1) What is Push Router ? Receiving, authenticating, and forwarding  all of the incoming WAP push messages  Determining the type of incoming push message  Passing the message to the matching client application  to run the push content.
Push Router & Client (2) What is Push Client ? It is registered for notification with the Push Router  PushRouter_RegisterClient(g_szContentType, g_szAppId, g_szPath, g_szParams); PushRouter_UnRegisterClient(g_szContentType, g_szAppId); PushRouter_Open(g_szContentType, g_szAppId, &evMsgAvailable, &hPushRouter); To receive specific types of push messages on the device for custom processing.
Push Router & Client (3) Push Router APIs : Register UnRegister Open Close GetMessage FreeMessage MmsPush.cpp MMSPushHandler.cpp
MmsPush.cpp MmsHandlePushMsg() MmsCheckTid() MmsPushOpenCreateDB() MmsPushAddNewDB() * Parse PDU,  call MmsNotificationHanler(), MmsDeliveryHandler() * Check if there have redundant messages * Open existed records in DB * Add new records into DB * Register/Unregister Push Client Functional Block Operation WinMain()
MmsPushHandler.cpp EstablishConnection() MmsNotificationHandler() MmsDeliveryHandler() Functional Block Operation * Parse PDUs that except from MmsNotificationHandler() 1) Handle  M-Notification.ind 2) Send  WSP/HTTP GET.req 3) Parse  M-Retrieve.conf   3.1) Save files (JPG,GIF) 4) Send  M-NotifyResp.ind * Operate with  Connection Manager   MmsHandlePushMsg()
Transaction Model –    Sending, Retrieval, Notification & Delivery Report  MMS Overview MMS Architecture Client Transaction Encapsulation Protocol Orig MMS Client Target MMS Client MMS M  (MM1) MMS M  (MM1) MMS R  (MM4) MMS R M-Send.req M-Send.conf M-Notification.ind WSP/HTTP GET.req M-NotifyResp.ind M-Retrieve.conf M-Delivery.ind Orig MMSC Target MMSC
Push Client Flow Diagram
Issues about Porting Into MGO Add functions to handle  M-Acknowledge.ind, M-Send.conf… Porting existed codes into DLL. To support MMS 1.1 ?
Appendix.  Register Customized Messaging Rules Clients Customized messaging rules clients require two separate registry entries. The first one registers the messaging rules client as a COM server, specifying its GUID. The second entry specifies the message transport(s) to use. To register the customized messaging rules client as a COM server Create and save a new registry key with the following registry key structure. In the key, replace {GUID} with the messaging rules client's globally unique identifier (GUID). [HKEY_CLASSES_ROOT\CLSID\{GUID}\InProcServer32]  = REG_SZ: The name of the messaging rules client DLL. [Example] The following example demonstrates how to register a custom messaging rules client with a DLL named &quot;FromSusan.dll&quot;. [HKEY_CLASSES_ROOT\CLSID\{28A42C00-1255-4dc7-9E0A-FA2F77EFB694}\InProcServer32]  = &quot;FromSusan.dll“ To register the list of supported messaging transports Create and save a new registry key with the following registry key structure. In the key, replace <TransportName> with the name of the message tranport that the messages to be processed arrive upon. Replace the <CLSID> key entry with the messaging rules client's class identifier (CLSID). [HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\<TransportName>\Rules]  <CLSID> = dword: 1 Note  Currently, SMS is the only supported value for <TransportName>. [Example] The following example demonstrates how to register a custom messaging rules client that moves incoming Short Message Service (SMS) messages from the Inbox folder to a specified folder. [HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules]  &quot;{28A42C00-1255-4dc7-9E0A-FA2F77EFB694}&quot; = &quot;1&quot;
Reference Windows Mobile Version 5.0 document (Mar.14.2005) Source codes from Beethoven

MMS Parser

  • 1.
    MMS parser –push router & client Monky Chen 3/21/2005
  • 2.
    Outline Push RouterOverview Push Client Overview Push Client Source Code Review
  • 3.
    Push Router &Client (1) What is Push Router ? Receiving, authenticating, and forwarding all of the incoming WAP push messages Determining the type of incoming push message Passing the message to the matching client application to run the push content.
  • 4.
    Push Router &Client (2) What is Push Client ? It is registered for notification with the Push Router PushRouter_RegisterClient(g_szContentType, g_szAppId, g_szPath, g_szParams); PushRouter_UnRegisterClient(g_szContentType, g_szAppId); PushRouter_Open(g_szContentType, g_szAppId, &evMsgAvailable, &hPushRouter); To receive specific types of push messages on the device for custom processing.
  • 5.
    Push Router &Client (3) Push Router APIs : Register UnRegister Open Close GetMessage FreeMessage MmsPush.cpp MMSPushHandler.cpp
  • 6.
    MmsPush.cpp MmsHandlePushMsg() MmsCheckTid()MmsPushOpenCreateDB() MmsPushAddNewDB() * Parse PDU, call MmsNotificationHanler(), MmsDeliveryHandler() * Check if there have redundant messages * Open existed records in DB * Add new records into DB * Register/Unregister Push Client Functional Block Operation WinMain()
  • 7.
    MmsPushHandler.cpp EstablishConnection() MmsNotificationHandler()MmsDeliveryHandler() Functional Block Operation * Parse PDUs that except from MmsNotificationHandler() 1) Handle M-Notification.ind 2) Send WSP/HTTP GET.req 3) Parse M-Retrieve.conf 3.1) Save files (JPG,GIF) 4) Send M-NotifyResp.ind * Operate with Connection Manager MmsHandlePushMsg()
  • 8.
    Transaction Model – Sending, Retrieval, Notification & Delivery Report MMS Overview MMS Architecture Client Transaction Encapsulation Protocol Orig MMS Client Target MMS Client MMS M (MM1) MMS M (MM1) MMS R (MM4) MMS R M-Send.req M-Send.conf M-Notification.ind WSP/HTTP GET.req M-NotifyResp.ind M-Retrieve.conf M-Delivery.ind Orig MMSC Target MMSC
  • 9.
  • 10.
    Issues about PortingInto MGO Add functions to handle M-Acknowledge.ind, M-Send.conf… Porting existed codes into DLL. To support MMS 1.1 ?
  • 11.
    Appendix. RegisterCustomized Messaging Rules Clients Customized messaging rules clients require two separate registry entries. The first one registers the messaging rules client as a COM server, specifying its GUID. The second entry specifies the message transport(s) to use. To register the customized messaging rules client as a COM server Create and save a new registry key with the following registry key structure. In the key, replace {GUID} with the messaging rules client's globally unique identifier (GUID). [HKEY_CLASSES_ROOT\CLSID\{GUID}\InProcServer32] = REG_SZ: The name of the messaging rules client DLL. [Example] The following example demonstrates how to register a custom messaging rules client with a DLL named &quot;FromSusan.dll&quot;. [HKEY_CLASSES_ROOT\CLSID\{28A42C00-1255-4dc7-9E0A-FA2F77EFB694}\InProcServer32] = &quot;FromSusan.dll“ To register the list of supported messaging transports Create and save a new registry key with the following registry key structure. In the key, replace <TransportName> with the name of the message tranport that the messages to be processed arrive upon. Replace the <CLSID> key entry with the messaging rules client's class identifier (CLSID). [HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\<TransportName>\Rules] <CLSID> = dword: 1 Note Currently, SMS is the only supported value for <TransportName>. [Example] The following example demonstrates how to register a custom messaging rules client that moves incoming Short Message Service (SMS) messages from the Inbox folder to a specified folder. [HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules] &quot;{28A42C00-1255-4dc7-9E0A-FA2F77EFB694}&quot; = &quot;1&quot;
  • 12.
    Reference Windows MobileVersion 5.0 document (Mar.14.2005) Source codes from Beethoven