How to parse SMIL data in MMS message body?

  • Thread starter Thread starter Michael Bickel
  • Start date Start date
M

Michael Bickel

Hello,
I'm working on a smartphone 2003 second edition, but my question may be
more
general than this. I'm trying to get the attachment bytes out of an MMS
message. As it seems the attachment is encoded in the body of the
message
(and not nicely accessible with the openAttach from MAPI).

When I receive the body, I get something that is encoded in SMIL 2.0 and
if
we have a JPEG attached for example, the bytes of the JPEG begin after
the
SMIL text. Now my question is if I can retrieve the beginning and ending

position of the attachment? Because I have no clue as where to look and
the
SMIL data contains some bytes that could contain extra info on this.

Anybody who can help me on this matter?

Below a shortened example of the body of an MMS message:
(in attachment is a full message body contained)
O?~jMMS--748644?-ê51825863/TYPE=PLMN-êAka "
³?application/smilS<1.smil>-,lapplication/smil.1.smilÀ"
<1.smil>Z1.smil<smil
xmlns="http://www.w3.org/2000/SMIL20/CR/Language"><head><layout><root-la
yout
backgroundColor="#ffffff"/><region id="first" width="100%" height="50%"
backgroundColor="#ffffff"/><region id="second" top="50%" width="100%"
height="50%" backgroundColor="#ffffff"/></layout></head><body><par
dur="5000ms"><img region="first"
src="IMG_004.jpg"/></par></body></smil>,Ù}z.IMG_004.jpgÀ"<IMG_004.j
pg>ZIMG_004.jpgÿØÿàJFIFHHÿí

.... here begins the attachment data... I can search for the beginning
and
ending JPEG JFIF tags, but this is not a general method, and thus not
any
good in my case.

With kind regards!

Maarten Steenhuyse
 
Right after the SMIL code, you will find the attachment bytes. Before the
actual bytes you find the length with a variable bit coding. It works as
follows:
Only 7 bits of each byte contains the payload. The 8th bit says if you have
to look further. 1 means, you have to parse the next byte to.

My guess is Microsoft didn't find time to implement the MAPI interfaces
before the release of 2003 SE.

Hope this helps you...

Maarrten
 
Back
Top