org.marre.sms
Class SmsMsgWaitingMessage

java.lang.Object
  extended byorg.marre.sms.SmsConcatMessage
      extended byorg.marre.sms.SmsTextMessage
          extended byorg.marre.sms.SmsMsgWaitingMessage
All Implemented Interfaces:
SmsMessage

public class SmsMsgWaitingMessage
extends SmsTextMessage

Represents a "Message Waiting" sms. As described in TS 23.040-650 section 9.2.3.24.2 "Special SMS Message Indication". On a Sony-Ericsson T610 these messages can be used to display different types of icons in the notification bar.

Version:
$Id: SmsMsgWaitingMessage.java,v 1.2 2005/05/12 07:50:16 c95men Exp $
Author:
Markus Eriksson

Field Summary
protected  java.util.LinkedList messages_
          List of MsgWaiting "objects".
static int OPT_PROFILE_ID_1
          Profile ID 1.
static int OPT_PROFILE_ID_2
          Profile ID 2.
static int OPT_PROFILE_ID_3
          Profile ID 3.
static int OPT_PROFILE_ID_4
          Profile ID 4.
static int OPT_STORE_MSG
          Store message in the phone memory.
static int TYPE_EMAIL
          Message waiting type : EMAIL
static int TYPE_FAX
          Message waiting type : FAX
static int TYPE_VIDEO
          Message waiting type : VIDEO
static int TYPE_VOICE
          Message waiting type : VOICE
 
Constructor Summary
SmsMsgWaitingMessage()
          Creates an empty message.
SmsMsgWaitingMessage(java.lang.String text)
          Creates an message with the supplied text (GSM charset).
SmsMsgWaitingMessage(java.lang.String text, int alphabet)
          Creates an message with the supplied text and alphabet.
 
Method Summary
 void addMsgWaiting(int type, int count)
          Adds a message waiting.
 void addMsgWaiting(int type, int count, int options)
          Adds a message waiting.
protected  SmsUdhElement getMessageWaitingUdh(org.marre.sms.SmsMsgWaitingMessage.MsgWaiting msgWaiting)
          Creates a "Message waiting" UDH element using UDH_IEI_SPECIAL_MESSAGE.
 SmsUdhElement[] getUdhElements()
          Builds a udh element for this message.
 
Methods inherited from class org.marre.sms.SmsTextMessage
getDcs, getText, getUserData, setText, setText
 
Methods inherited from class org.marre.sms.SmsConcatMessage
getPdus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_VOICE

public static final int TYPE_VOICE
Message waiting type : VOICE

See Also:
Constant Field Values

TYPE_FAX

public static final int TYPE_FAX
Message waiting type : FAX

See Also:
Constant Field Values

TYPE_EMAIL

public static final int TYPE_EMAIL
Message waiting type : EMAIL

See Also:
Constant Field Values

TYPE_VIDEO

public static final int TYPE_VIDEO
Message waiting type : VIDEO

See Also:
Constant Field Values

OPT_PROFILE_ID_1

public static final int OPT_PROFILE_ID_1
Profile ID 1. (Default)

See Also:
Constant Field Values

OPT_PROFILE_ID_2

public static final int OPT_PROFILE_ID_2
Profile ID 2.

See Also:
Constant Field Values

OPT_PROFILE_ID_3

public static final int OPT_PROFILE_ID_3
Profile ID 3.

See Also:
Constant Field Values

OPT_PROFILE_ID_4

public static final int OPT_PROFILE_ID_4
Profile ID 4.

See Also:
Constant Field Values

OPT_STORE_MSG

public static final int OPT_STORE_MSG
Store message in the phone memory.

See Also:
Constant Field Values

messages_

protected java.util.LinkedList messages_
List of MsgWaiting "objects".

Constructor Detail

SmsMsgWaitingMessage

public SmsMsgWaitingMessage()
Creates an empty message.


SmsMsgWaitingMessage

public SmsMsgWaitingMessage(java.lang.String text)
Creates an message with the supplied text (GSM charset).

Parameters:
text - Description of this message.

SmsMsgWaitingMessage

public SmsMsgWaitingMessage(java.lang.String text,
                            int alphabet)
Creates an message with the supplied text and alphabet.

Parameters:
text - Description of this message
alphabet - Alphabet to use. Valid values are SmsDcs.ALPHABET_*.
Method Detail

addMsgWaiting

public void addMsgWaiting(int type,
                          int count)
Adds a message waiting.

Parameters:
type - Type of message that is waiting. Can be any of TYPE_*.
count - Number of messages waiting for retrieval.

addMsgWaiting

public void addMsgWaiting(int type,
                          int count,
                          int options)
Adds a message waiting.

Parameters:
type - Type of message that is waiting. Can be any of TYPE_*.
count - Number of messages waiting for retrieval.
options - Bitfield of OPT_ options.

getMessageWaitingUdh

protected SmsUdhElement getMessageWaitingUdh(org.marre.sms.SmsMsgWaitingMessage.MsgWaiting msgWaiting)
Creates a "Message waiting" UDH element using UDH_IEI_SPECIAL_MESSAGE.

If more than one type of message is required to be indicated within one SMS message, then multiple "Message waiting" UDH elements must be used.

Special handling in concatenated messages:
"In the case where this IEI is to be used in a concatenated SM then the IEI, its associated IEI length and IEI data shall be contained in the first segment of the concatenated SM. The IEI, its associated IEI length and IEI data should also be contained in every subsequent segment of the concatenated SM although this is not mandatory. However, in the case where these elements are not contained in every subsequent segment of the concatenated SM and where an out of sequence segment delivery occurs or where the first segment is not delivered then processing difficulties may arise at the receiving entity which may result in the concatenated SM being totally or partially discarded."

Parameters:
msgWaiting - The MsgWaiting to convert
Returns:
A SmsUdhElement

getUdhElements

public SmsUdhElement[] getUdhElements()
Builds a udh element for this message.

Overrides:
getUdhElements in class SmsTextMessage
See Also:
SmsTextMessage.getUdhElements()


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.