|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.objectxp.mms.message.MMSMessage
com.objectxp.mms.message.SMILMessage
public class SMILMessage
The SMILMessage is a MMSMessage extended by a SMIL document to
organise the presentation.
(SMIL = Synchronized Multimedia Integration Language)
The concept of the SMILMessage means the ordering, layout, sequencing and timing of
MMSMessagePart on the terminal screen
and other devices such as a speaker. With SMILMessage, she sender of the MMS has the
possibility to organise the multimedia content to a meaningful order and to instruct how the
MMSMessagePart are rendered at the receiving terminal.
The MMSMessagePart of the SMILMessage
must be referenced by the SMIL document, otherwise they might be ignored at the
target terminal.
Since the smil-document refers to the messageParts, the MMS is called SMILMessage.
Example:
Assuming in your "/tmp" directory you've got a smil document called "smil.xml" which
looks like this:
<smil>
<head>
<layout><root-layout width="160" height="140"/></layout>
</head>
<body>
<par dur="5s">
<text src="blabla.txt"/>
</par>
<par dur="5s">
<img src="picture.jpg"/>
</par>
</body>
</smil>
You may now instantiate the MMSMessage related with this document:
// jSMS will load the refered "blabla.txt" and "picture.jpg" files which must
// also be located in the same directory
MMSMessage msg = new SMILMessage(new File("/tmp/smil.xml").toURL());
// add destination (must be set do send a MMSMessage)
msg.addTO(new MMSAddress(MMSAddress.ADDRESS_TYPE_MSISDN, "0785555555"));
// ready to send the MMSMessage using the MMSService.
mmsService.send(msg);
| Field Summary |
|---|
| Fields inherited from class com.objectxp.mms.message.MMSMessage |
|---|
CLASS_ADVERTISEMENT, CLASS_AUTO, CLASS_INFORMATIONAL, CLASS_PERSONAL, CONTENT_TYPE_MIXED, CONTENT_TYPE_RELATED, PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL, VERSION_1_0, VERSION_1_1, VERSION_1_2, VERSION_1_3 |
| Constructor Summary | |
|---|---|
SMILMessage(SmilDocument doc)
Creates a SMILMessage out of a SmilDocument. |
|
SMILMessage(java.lang.String smil)
Construct a SMIL message. |
|
SMILMessage(java.net.URL path)
Loads a SMIL document form the given URL. |
|
| Method Summary | |
|---|---|
void |
export(java.lang.String directory)
Writes the content of the SMILMessage to the given directory. |
java.lang.String |
getContentType()
Returns the MessageContentType of the Message (also known as PDU type ). |
java.lang.String |
getSmilAsString()
Get the SMIL document in a StringRepresentation. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SMILMessage(SmilDocument doc)
SmilDocument.
The multimedia objects which are referenced by the SMIL-document are stored internally as
MMSMessagePart.
public SMILMessage(java.net.URL path)
throws java.io.IOException
The multimedia objects which are referenced by the SMIL-document are loaded and stored internally as
MMSMessagePart.
Note: only relative referenced media parts are supported!
path - location of smil document
java.io.IOException - if jSMS fails to load smil documment or refered parts
java.lang.IllegalArgumentException - if given path is not validpublic SMILMessage(java.lang.String smil)
addElement method
for each multimedia element.
smil - a String holding the SMIL (XML) document.| Method Detail |
|---|
public void export(java.lang.String directory)
throws java.io.IOException
export in class MMSMessagedirectory - the directory where the message-parts are stored. If
this directory does not exist, it will be created.
java.io.IOException - if an I/O error occurs.public java.lang.String getSmilAsString()
public java.lang.String getContentType()
getContentType in class MMSMessagepublic java.lang.String toString()
toString in class MMSMessage
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||