12
MMS parser – push router & client Monky Chen 3/21/2005

MMS Parser

  • Upload
    mamahow

  • View
    1.267

  • Download
    3

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: MMS Parser

MMS parser –push router & client

Monky Chen

3/21/2005

Page 2: MMS Parser

Outline

• Push Router Overview

• Push Client Overview

• Push Client Source Code Review

Page 3: MMS Parser

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.

Page 4: MMS Parser

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.

Page 5: MMS Parser

Push Router & Client (3)

Push Router APIs :1. Register2. UnRegister3. Open4. Close5. GetMessage6. FreeMessage

MmsPush.cppMMSPushHandler.cpp

Page 6: MMS Parser

MmsPush.cpp

WinMain()

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

Page 7: MMS Parser

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,GI

F)4) Send M-NotifyResp.ind

* Operate with Connection Manager

MmsHandlePushMsg()

Page 8: MMS Parser

Transaction Model – Sending, Retrieval, Notification & Delivery Report

MMS Overview

MMS Architecture

Client TransactionClient TransactionEncapsulation

Protocol

Orig MMS Client Target MMS Client

MMSM (MM1) MMSM (MM1)MMSR (MM4)

MMSR

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

Page 9: MMS Parser

Push Client Flow Diagram

Page 10: MMS Parser

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 ?

Page 11: MMS Parser

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 serverCreate 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 "FromSusan.dll".

[HKEY_CLASSES_ROOT\CLSID\{28A42C00-1255-4dc7-9E0A-FA2F77EFB694}\InProcServer32] = "FromSusan.dll“

• To register the list of supported messaging transportsCreate 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] "{28A42C00-1255-4dc7-9E0A-FA2F77EFB694}" = "1"

Page 12: MMS Parser

Reference

• Windows Mobile Version 5.0 document (Mar.14.2005)

• Source codes from Beethoven