Parsing MMS attachments in order

Login to reply to this topic.
Sat, 2008-05-10 11:29
Joined: 2007-07-10
Forum posts: 10

Hi,

I am developing an application where i need to know the MMS attachments
in the exact order how it was created.

I am not able to find any API to re-order the attachments order.
I have read some forum topics that we have to use SMIL parsing.
I have tried using CSMilParser::ParseL() API.
But i got NULL handle for CSmilPresentation.
I have used the following code.

`````````````````````````````````````````````````````````````````````````
iParser = CSmilParser::NewL(this);
// CONSTANTS
const TReal KLayoutScaleDown = 0.20;
const TReal KLayoutScaleUp = 2.00;
//Set layout scaling mode
iParser->SetMaxDownUpScaling( static_cast( KLayoutScaleDown ),
static_cast( KLayoutScaleUp ) );
iPresentation = iParser->ParseL(aFilename, KNullDesC());
`````````````````````````````````````````````````````````````````````````

Has any one tried any other approach to get the attachments in order?
If smil parsing is the only way, can any one please provide pointers for the same?

Thanks,
Manik...


Mon, 2008-05-12 10:39
Joined: 2003-12-05
Forum posts: 683
Re: Parsing MMS attachments in order

So you need to know if the MMS editor somehow implicitly or explicitly stores the order the user inserted the attachments into the MMS message? It may be, for example, that the editor inserts the attachments to the SMIL file in the order they were created. In this case, the SMIL file would reveal the order. But what if it does not work that way? Maybe the attachments are there in the order of the inserted object name (file name)? Or some random ordering is used. Maybe the editor just creates the SMIL file when the message is actually send, not while the message is edited, and uses a random order? Does this happen the same way in all the phones out there or not?

Sounds a bit unfeasible. If you are really after the order in which the attachments were created, you could look at the file dates. But these can be changed -- an image was taken with the camera two days ago, but when the image is send in an MMS, a smaller image is generated and this inserted into the message. This new image file now has the current datetime. Maybe the MMS has also a sound file cretated this morning. Now the attachment creation dates are the wrong way. Or are you interested in the datetime the attachments were actually inserted into the MMS message?

Have you checked out the MMS standard -- does it say anything about this order you are interested in?

Wed, 2008-05-14 04:45
Joined: 2007-07-10
Forum posts: 10
Re: Parsing MMS attachments in order

Hi Andreas,

I have checked the smil file created after saving the messages to the drafts folder.
The smil file has regions where it specifies the layout information of images, text, or video...
Inside body tag, it has tags which provides objects present in each slide....
I assumed Symbian/Nokia follows the creation of smil file as per the spec written for MMS...
So, I thought it is required to parse the smil file to get the exact order/layout of the attachments...

I am not sure with the approach of modified datetime.....
Is there any API which helps in ordering MMS attachments?
Have you tried any other approach for the same?

Thanks and Regards,
ManInn

  • Login to reply to this topic.