|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.system.SMSParameters
net.rim.device.api.system.SMSPacketHeader
public class SMSPacketHeader
A RadioPacketHeader for sending SMS packets. See GSM 03.40 for details.
Field Summary | ||
---|---|---|
static String[] |
INDICATOR_TYPE_NAMES
|
|
static int |
RECORD_STATUS_MS_ORIGINATED
|
|
static int |
RECORD_STATUS_REPORT_RECEIVED
|
|
static int |
RECORD_STATUS_REPORT_REQUESTED
|
|
static int |
RECORD_STATUS_UNREAD
|
|
static int |
SMS_ID_NOT_ON_SIM
|
|
static int |
WAITING_INDICATOR_TYPE_EMAIL
Represents the email wait indicator. |
|
static int |
WAITING_INDICATOR_TYPE_FAX
Represents the fax wait indicator. |
|
static int |
WAITING_INDICATOR_TYPE_OTHER
Represents an "other" wait indicator. |
|
static int |
WAITING_INDICATOR_TYPE_VOICEMAIL
Represents the voicemail waiting indicator. |
Constructor Summary | ||
---|---|---|
SMSPacketHeader()
Constructs a new SMSPacketHeader. |
Method Summary | ||
---|---|---|
static int |
getBitsPerCharacter(int messageCoding)
Returns the number of bits required per character for the specified encoding type. |
|
static int |
getBitsPerSegment(int messageCoding)
Get the number of bits that can fit into a segment. |
|
static int |
getBitsPerSegment(int messageCoding,
int wmaUDHLength)
Get the number of bits that can fit into a segment. |
|
static int |
getBytesPerCharacter(int messageCoding)
Returns the number of bytes required per character for the specified encoding type. |
|
static int |
getCharacters(int segments,
int messageCoding)
Returns the number of characters that can fit into the given number of segments using the given encoding type. |
|
int |
getID()
Returns the SIM ID for this message. |
|
static int |
getMaxNumberOfSegments()
Returns the maximum number of segments supported |
|
int |
getMessageWaitingType()
Returns this message's MWI Group type. |
|
int |
getNumMessages()
Returns the number of messages waiting. |
|
int |
getRecordStatus()
Returns the record status for this message. |
|
static int |
getSegments(int characters,
int messageCoding)
Returns the number of segments required for the given number of characters and the given encoding type. |
|
static int |
getSegments(int characters,
int messageCoding,
int udhLength)
Returns the number of segments required for the given number of characters and the given encoding type. |
|
boolean |
getStatusReportRequest()
Returns the status report request. |
|
long |
getTimestamp()
Returns the timestamp for this message. |
|
boolean |
isDeliveryPeriodDefault()
Returns a boolean indicating whether or not the delivery period is set to the default amount of time. |
|
boolean |
isFromSIMCard()
Determines if this message originated from the device SIM card. |
|
boolean |
isMessageWaitingActive()
Determines if this message's MWI Group is "Active". |
|
boolean |
isMessageWaitingGroup()
Determines if this message is part of the Message Waiting Indication Group. |
|
boolean |
isMessageWaitingStore()
Determines if this message's MWI Group is "Store Message". |
|
boolean |
isReplyPath()
Determines if this message specifies the reply path to use. |
|
static boolean |
isSegmentationSupported()
Returns true if composition of fragmented SMS messages is supported. |
|
static boolean |
isSendSupported()
|
|
boolean |
isUserDataHeaderPresent()
Returns a boolean indicating whether or not a user data header is present. |
|
boolean |
isValidityPeriodDefault()
|
|
void |
reset()
Resets these parameters to default values. |
|
void |
setDeliveryPeriod(int deliveryPeriod)
Sets the delivery period for the message. |
|
void |
setMessageClass(int messageClass)
Sets the message class. |
|
void |
setMessageCoding(int messageCoding)
Sets the message coding. |
|
void |
setMessageWaitingType(int waitingIndType)
Sets this message's MWI Group type. |
|
void |
setNumMessages(int numMessages)
Sets the number of messages waiting. |
|
void |
setProtocolId(int protocolMeaning,
int protocolId)
Sets the protocol meaning and ID. |
|
void |
setStatusReportRequest(boolean statusReportRequest)
Sets the status report request for the message. |
|
void |
setUserDataHeaderPresent(boolean userDataHeaderPresent)
Sets the user data header present for the message. |
|
void |
setValidityPeriod(int validityPeriod)
Sets the validity period for the message. |
|
static boolean |
validateForASCIIMessageCoding(char c)
Validate the given character against the ASCII encoding. |
|
static boolean |
validateForDefaultMessageCoding(char c)
Validate the given character against the default encoding. |
|
static boolean |
validateForDefaultMessageCoding(char c,
int shiftLanguage)
Validate the given character against the default encoding. |
|
static boolean |
validateForISO8859MessageCoding(char c)
Validate the given character against the ISO8859 encoding. |
|
static boolean |
validateForMessageCoding(char c,
int messageCoding)
Determines if the specified character is valid for the given encoding type. |
|
static boolean |
validateForMessageCoding(char c,
int messageCoding,
int shiftLanguage)
Determines if the specified character is valid for the given encoding type. |
|
static boolean |
validateForUCS2MessageCoding(char c)
Validate the given character against the UCS2 encoding. |
|
static boolean |
validateGreekForDefaultMessageCoding(char c)
Validate the given character against the default encoding for certain Greek alphabets |
Methods inherited from class net.rim.device.api.system.SMSParameters |
---|
getCallbackAddress, getCallbackPlan, getCallbackType, getDeliveryPeriod, getLanguage, getMessageClass, getMessageCoding, getPeerAddress, getPeerPlan, getPeerType, getPriority, getPrivacy, getProtocolId, getProtocolMeaning, getSCAddress, getSCPlan, getSCType, getValidityPeriod, setCallbackAddress, setCallbackAddress, setLanguage, setPeerAddress, setPeerAddress, setPriority, setPrivacy, setProtocolId, setProtocolMeaning, setSCAddress, setSCAddress |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WAITING_INDICATOR_TYPE_VOICEMAIL
Indicates that a voicemail is waiting.
public static final int WAITING_INDICATOR_TYPE_FAX
Indicates that a fax is waiting.
public static final int WAITING_INDICATOR_TYPE_EMAIL
Indicates that an email is waiting.
public static final int WAITING_INDICATOR_TYPE_OTHER
public static final String[] INDICATOR_TYPE_NAMES
public static final int RECORD_STATUS_UNREAD
public static final int RECORD_STATUS_MS_ORIGINATED
public static final int RECORD_STATUS_REPORT_REQUESTED
public static final int RECORD_STATUS_REPORT_RECEIVED
public static final int SMS_ID_NOT_ON_SIM
Constructor Detail |
---|
public SMSPacketHeader()
Method Detail |
---|
public void reset()
SMSParameters
reset
in class SMSParameters
public void setProtocolId(int protocolMeaning, int protocolId)
If this is not specified, the default protocol meaning and ID are used.
protocolMeaning
- An integer representing the protocol meaning.protocolId
- An integer representing the protocol Id.public void setMessageCoding(int messageCoding)
If this is not specified, the default message coding is used.
setMessageCoding
in class SMSParameters
messageCoding
- An integer representing the message coding.public void setMessageClass(int messageClass)
If this is not specified, the default message class is used.
setMessageClass
in class SMSParameters
messageClass
- An integer representing the message class.public boolean isUserDataHeaderPresent()
public void setUserDataHeaderPresent(boolean userDataHeaderPresent)
userDataHeaderPresent
- Whether user data header is presentpublic void setValidityPeriod(int validityPeriod)
If this is not specified, the default validity period is used.
setValidityPeriod
in class SMSParameters
validityPeriod
- The validity period.public boolean isValidityPeriodDefault()
public void setDeliveryPeriod(int deliveryPeriod)
If this is not specified, the default delivery period is used.
setDeliveryPeriod
in class SMSParameters
deliveryPeriod
- The delivery period.public boolean isDeliveryPeriodDefault()
public boolean getStatusReportRequest()
public void setStatusReportRequest(boolean statusReportRequest)
statusReportRequest
- The status report request.public boolean isMessageWaitingGroup()
public boolean isMessageWaitingStore()
public boolean isMessageWaitingActive()
public int getMessageWaitingType()
public void setMessageWaitingType(int waitingIndType)
waitingIndType
- An integer representing the message waiting idnication
group type to set.public int getNumMessages()
public void setNumMessages(int numMessages)
numMessages
- The number of messages waiting.public int getID()
public long getTimestamp()
public int getRecordStatus()
public boolean isFromSIMCard()
public boolean isReplyPath()
public static boolean isSendSupported()
public static boolean isSegmentationSupported()
public static int getMaxNumberOfSegments()
public static int getBitsPerCharacter(int messageCoding)
messageCoding
- The encoding type.
public static int getBytesPerCharacter(int messageCoding)
messageCoding
- The encoding type.
public static int getBitsPerSegment(int messageCoding)
public static int getBitsPerSegment(int messageCoding, int wmaUDHLength)
public static int getSegments(int characters, int messageCoding)
characters
- The number of characters.messageCoding
- The encoding type.
public static int getSegments(int characters, int messageCoding, int udhLength)
characters
- The number of characters.messageCoding
- The encoding type.udhLength
- The number of bytes required by user defined data. This
size does not include the UDH length byte. For example, if the
existing UDH is "3ABC", where 3 is the length of the existing UDH,
then the value for for udhLength
would be 3, not 4.
public static int getCharacters(int segments, int messageCoding)
segments
- The number of segments.messageCoding
- The encoding type.
public static boolean validateForMessageCoding(char c, int messageCoding)
c
- The character to validate.messageCoding
- The encoding type.
public static boolean validateForMessageCoding(char c, int messageCoding, int shiftLanguage)
c
- The character to validate.messageCoding
- The encoding type.shiftLanguage
- SMSConstants.NATIONAL_LANGUAGE_IDENTIFIER_??? or 0 if not applicable.
Applies only when messageCoding is 7 bit SMS (0);
public static boolean validateForDefaultMessageCoding(char c)
c
- The character to validate.
public static boolean validateGreekForDefaultMessageCoding(char c)
c
- The character to validate.
public static boolean validateForDefaultMessageCoding(char c, int shiftLanguage)
c
- The character to validate.shiftLanguage
- SMSConstants.NATIONAL_LANGUAGE_IDENTIFIER_??? or 0 if not applicable.
Applies only when default message coding is 7 bit SMS (0);
public static boolean validateForISO8859MessageCoding(char c)
c
- The character to validate.
public static boolean validateForASCIIMessageCoding(char c)
c
- The character to validate.
public static boolean validateForUCS2MessageCoding(char c)
c
- The character to validate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal