4.2 Sample MMS Object

A user creates an MMS message, gives it a subject, types some text, attaches a picture, and sends it. The following is a description of what a client might do to accomplish the user's intentions and the responses a server might return. For more details about ROPs, see [MS-OXCPRPT] and [MS-OXCMSG].

Before manipulating an MMS object, the client asks the server to map the named properties to property IDs by sending a RopGetPropertyIDsFromNames ROP request ([MS-OXCROPS] section 2.2.8.1).

Property

Property set GUID

NameID

PidNameOMSMobileModel (section 2.2.1.6)

{00020329-0000-0000-C00000000046}

OMSMobileModel

PidNameOMSAccountGuid (section 2.2.1.1)

{00020329-0000-0000-C00000000046}

OMSAccountGuid

PidNameOMSServiceType (section 2.2.1.3)

{00020329-0000-0000-C00000000046}

OMSServiceType

PidNameOMSSourceType (section 2.2.1.4)

{00020329-0000-0000-C00000000046}

OMSSourceType

The server might send a RopGetPropertyIDsFromNames ROP response with the following property IDs, which are used in the example that follows. (The actual property IDs are at the discretion of the server.)

Property

Property ID

PidNameOMSMobileModel

0x84CE

PidNameOMSAccountGuid

0x84CF

PidNameOMSServiceType

0x84D0

PidNameOMSSourceType

0x84D1

To create an MMS object, the client uses the RopCreateMessage ROP ([MS-OXCROPS] section 2.2.6.2). The server returns a success code and a handle to an object.

After the user inputs the content for the MMS object, the client transmits the data to the server by using the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6).

Property

Property ID

Data type

Value

PidNameOMSAccountGuid

0x84CF

PtypString ([MS-OXCDATA] section 2.11.1)

{01234567-0123-0123-0123-0123456789AB}

PidNameOMSMobileModel

0x84CE

PtypString

(empty)

PidNameOMSServiceType

0x84D0

PtypInteger32 ([MS-OXCDATA] section 2.11.1)

0x00000004

PidNameOMSSourceType

0x84D1

PtypInteger32

0x00000000

PidTagInternetCodepage ([MS-OXCMSG] section 2.2.1.56.6)

0x3FDE

PtypInteger32

0x0000FDE9

PidTagHtml ([MS-OXCMSG] section 2.2.1.56.9)

0x1013

PtypBinary ([MS-OXCDATA] section 2.11.1)

(The content of this property is given following the table.)

PidTagIconIndex (section 2.2.2.1)

0x1080

PtypInteger32

0xFFFFFFFFFF

PidTagMessageClass ([MS-OXCMSG] section 2.2.1.3)

0x001A

PtypString

IPM.Note.Mobile.MMS

PidTagMessageFlags ([MS-OXCMSG] section 2.2.1.6)

0x0E07

PtypInteger32

Flags: 0x00000018 MSGFLAG_UNSENT MSGFLAG_HASATTACH

PidTagNormalizedSubject ([MS-OXCMSG] section 2.2.1.10)

0x0E1d

PtypString

Here's the photo.

PidTagSubjectPrefix ([MS-OXCMSG] section 2.2.1.9)

0x003d

PtypString

(empty)

The PidTagHtml property is a binary property containing the following text.

 <HTML>
 <BODY>
 <IMG SRC="cid:Att1.jpg@AB1B43B2B0594564.B94EF7ABB12B49BA" border="0">
 <BR>
 This is the photo you asked for.
 <BR>
 <A HREF="cid:Att0.txt@AB1B43B2B0594564.B94EF7ABB12B49BA"></A>
 </BODY>
 </HTML>

The client allocates space for a data file in the message by using the RopCreateAttachment ROP ([MS-OXCROPS] section 2.2.6.13). In response, the server returns a success code and a handle to an Attachment object. The client uses this handle with the RopSetProperties ROP ([MS-OXCROPS] section 2.2.8.6) to transmit data about the attachment to the server.

Property

Property ID

Data type

Value

PidTagAttachmentHidden ([MS-OXCMSG] section 2.2.2.24)

0x7FFE

PtypBoolean ([MS-OXCDATA] section 2.11.1)

0x01

PidTagAttachMethod ([MS-OXCMSG] section 2.2.2.9)

0x3705

PtypInteger32

0x00000001 (ATTACH_BY_VALUE)

PidTagAttachContentId ([MS-OXCMSG] section 2.2.2.29)

0x3712

PtypString

MMS.smil@AB1B43B2B0594564.B94EF7ABB12B49BA

PidTagAttachMimeTag ([MS-OXCMSG] section 2.2.2.29)

0x370E

PtypString

application/smil

PidTagAttachLongFilename ([MS-OXCMSG] section 2.2.2.10)

0x3707

PtypString

MMS.smil

The client sets the contents of the attachment by using the attachment handle with the RopOpenStream ROP ([MS-OXCROPS] section 2.2.9.1), passing in the PidTagAttachDataBinary property ([MS-OXPROPS] section 2.580) as the property to open. With the handle returned from the RopOpenStream ROP, the client calls the RopWriteStream ROP ([MS-OXCROPS] section 2.2.9.3), writing out the contents of the Synchronized Multimedia Integration Language (SMIL) file, the format of which is described in [SMIL2.1], describing the layout of the MMS message. The client follows this with the RopRelease ROP ([MS-OXCROPS] section 2.2.15.3) on the stream handle, then commits the changes by using the RopSaveChangesAttachment ROP ([MS-OXCROPS] section 2.2.6.15), releases the handle to the attachment by using the RopRelease ROP.

The client repeats the process from the RopCreateAttachment ROP ([MS-OXCROPS] section 2.2.6.13) for the RopRelease ROP with the attachment handle twice more, once for a plain-text version of the body, and once for the image. The attachment containing the body uses the following properties and values with the RopSetProperties ROP.

Property

Property ID

Data type

Value

PidTagAttachmentHidden

0x7FFE

PtypBoolean

0x01

PidTagAttachMethod

0x3705

PtypInteger32

0x00000001 (ATTACH_BY_VALUE)

PidTagAttachContentId

0x3712

PtypString

Att0.txt@AB1B43B2B0594564.B94EF7ABB12B49BA

PidTagAttachMimeTag

0x370E

PtypString

text/plain

PidTagAttachLongFilename

0x3707

PtypString

1.txt

The RopOpenStream ROP for the plain-text body is also on the PidTagAttachDataBinary property, but the contents written are Unicode text. The last attachment the client creates contains the image, and the RopSetProperties ROP sends the following data.

Property

Property ID

Data type

Value

PidTagAttachmentHidden

0x7FFE

PtypBoolean

0x01

PidTagAttachMethod

0x3705

PtypInteger32

0x00000001 (ATTACH_BY_VALUE)

PidTagAttachContentId

0x3712

PtypString

Att1.jpg@AB1B43B2B0594564.B94EF7ABB12B49BA

PidTagAttachMimeTag

0x370E

PtypString

image/jpeg

PidTagAttachLongFilename

0x3707

PtypString

photo.jpg

The contents of the PidTagAttachDataBinary property on the image attachment are the binary contents of the image file.

When the user sends the message, the client commits the properties on the server by using the RopSaveChangesMessage ROP ([MS-OXCROPS] section 2.2.6.3) and then releases the MMS object by using the RopRelease ROP. The client then submits the message to an MMS provider by using the RopSubmitMessage ROP ([MS-OXCROPS] section 2.2.7.1).

The values of some properties change during the processing of the RopSaveChangesMessage ROP, but the properties specified in this protocol do not change.

Show: