|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.objectxp.msg.Message
com.objectxp.msg.SmsMessage
com.objectxp.msg.SEOMessage
This class can be used to send Multimedia Short Messages to Siemens Phones which support the Siemens Exchange Object (SEO) format.
Support for SEO Messages is available for Siemens S45, ME45 and later models.
A SEO Message consists of a object type (e.g. "bmp"), a object name (e.g. "Operator.bmp") and the actual object data. If the object doesn't fit into a single SMS, the object will be sent using multiple SMS.
The bitmap will not be rejected if its size exceeds the display capabilities of the mobile phone. In this case the middle of the bitmap will be adjusted to the middle of the mobile phones display. The parts of the display which exceed the display capabilities will be cut off.
Depending on the capabilities of the individual phones the Bitmaps received can be stored either as a replacement of the operators logo or as a screensaver. The user will be free to decide for which purpose an incoming Bitmap should be used.
VCard object and
pass it to the SEOMessage(VCard) constructor. For other types, construct
an empty SEOMessage, pass the Object Data by calling one of the setUserData()
methods and set the object name and type accordingly.
// Construct a SEO Operator-logo
SEOMessage msg = new SEOMessage();
InputStream bmp = new FileInputStream("/path/to/operator.bmp");
msg.setUserData(bmp);
msg.setObjectType(SEOMessage.TYPE_BMP);
msg.setObjectName("operator.bmp");
// Construct a SEO VCard
VCard vc = new VCard();
vc.setItem(VCard.NAME,"John Doe");
vc.setItem(VCard.TITLE, "CTO");
vc.setItem(VCard.PHONE, "+4123456789");
SEOMessage msg = new SEOMessage(vc);
| Field Summary | |
static java.lang.String |
TYPE_BMP
Object Type: BMP |
static java.lang.String |
TYPE_MIDI
Object Type: MIDI |
static java.lang.String |
TYPE_VCARD
Object Type: VCard |
| Fields inherited from class com.objectxp.msg.SmsMessage |
CLASS_0, CLASS_1, CLASS_2, CLASS_3, DC_8BIT, DC_DEFAULT, DC_GROUP_DATA, DC_GROUP_GENERAL, DC_GROUP_MSG_WAITING_DISCARD, DC_GROUP_MSG_WAITING_STORE, DC_UCS2, INDICATION_ACTIVE, INDICATION_INACTIVE, INDICATION_TYPE_EMAIL, INDICATION_TYPE_FAX, INDICATION_TYPE_OTHER, INDICATION_TYPE_VOICEMAIL, NO_CLASS |
| Fields inherited from class com.objectxp.msg.Message |
ACK_TIME, MT_BINARY, MT_STATUS, MT_TEXT, SENDER_TYPE_ALPHA, SENDER_TYPE_GUESS, SENDER_TYPE_NUMBER |
| Constructor Summary | |
SEOMessage()
Construct a new, empty Siemens Exchange Object Message. |
|
SEOMessage(VCard card)
Construct a new SEOMessage by converting an existing VCard object. |
|
| Method Summary | |
void |
buildParts(java.lang.Class type,
int refnr)
Fragmentize the Multipart message. |
void |
buildParts(int refnr)
This method will be called by SmsService implementations prior to
sending a MultiPartMessage.
|
boolean |
containsUserDataHeader()
This method will always return false since SEO-Messages may not contain a UDH. |
short |
getAlphabet()
This method will always return SmsMessage.DC_8BIT since the SEO
specification requires the alphabet to be set to 8-Bit. |
short |
getCodingGroup()
This method will always return SmsMessage.DC_GROUP_DATA since the
SEO specification requires the coding group to be of type "DATA". |
short |
getMessageClass()
This method will always return SmsMessage.CLASS_1 since the
SEO specification requires the message class to be 1. |
SmsMessage[] |
getParts()
Returns the parts (fragments). |
void |
setObjectName(java.lang.String name)
Set the object name for this message. |
void |
setObjectType(java.lang.String type)
Set the object type for this message. |
void |
setUserData(java.io.InputStream stream)
Set the SEO Object for this message. |
java.lang.String |
toString()
Constructs a string representation of this Message |
| Methods inherited from class com.objectxp.msg.Message |
clone, getProperty, getSenderType, getTimestamp, setID, setProperty, setSenderType |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String TYPE_BMP
public static final java.lang.String TYPE_MIDI
public static final java.lang.String TYPE_VCARD
| Constructor Detail |
public SEOMessage()
public SEOMessage(VCard card)
| Method Detail |
public void setObjectType(java.lang.String type)
type - the object typepublic void setObjectName(java.lang.String name)
name - the object name (e.g. "Operator.bmp")
public void setUserData(java.io.InputStream stream)
throws java.io.IOException
stream - InputStream of the Object to send.
java.io.IOException - if reading from the supplied stream fails.public boolean containsUserDataHeader()
containsUserDataHeader in class SmsMessagepublic short getAlphabet()
SmsMessage.DC_8BIT since the SEO
specification requires the alphabet to be set to 8-Bit.
getAlphabet in class SmsMessageSmsMessage.DC_DEFAULT,
SmsMessage.DC_8BIT,
SmsMessage.DC_UCS2public short getCodingGroup()
SmsMessage.DC_GROUP_DATA since the
SEO specification requires the coding group to be of type "DATA".
getCodingGroup in class SmsMessageSmsMessage.setCodingGroup(short)public short getMessageClass()
SmsMessage.CLASS_1 since the
SEO specification requires the message class to be 1.
getMessageClass in class SmsMessageSmsMessage.NO_CLASS, SmsMessage.CLASS_0, SmsMessage.CLASS_1,
SmsMessage.CLASS_2, SmsMessage.CLASS_3)public SmsMessage[] getParts()
MultiPartMessage
getParts in interface MultiPartMessagepublic final void buildParts(int refnr)
MultiPartMessageSmsService implementations prior to
sending a MultiPartMessage.
buildParts() will split the message into multiple parts if necessary. The
parts can then be accessed by calling MultiPartMessage.getParts().
Please note that there is no need to invoke this method directly since SmsService implementations call this method automatically.
buildParts in interface MultiPartMessagerefnr - the reference-number to use for concatenated messages.
public final void buildParts(java.lang.Class type,
int refnr)
throws java.lang.IllegalArgumentException
MultiPartMessageInvoke this method before sending a Multipart message if you want to specify the type of the resulting fragments.
Example
The following example shows how to set the CIMD2 specific priority flag
on all fragments of a Multipart message:
Ringtone rt = new Ringtone("...");
rt.buildParts(Cimd2Message.class, myRefnr++);
Cimd2Message[] fragments = (Cimd2Message[]) rt.getParts();
for( int i=0; i < fragments.length; i++ ) {
fragments[i].setPriority(new Integer(5));
}
cimd2Service.sendMessage(rt);
buildParts in interface MultiPartMessagetype - the type used for the fragments. Must be an instance of SmsMessage.refnr - the reference-number to use for the concatenated messages.
java.lang.IllegalArgumentException - if the type is not an instance of SmsMessage or
is an instance of MultiPartMessage.public java.lang.String toString()
Message
toString in class SmsMessage
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||