View Javadoc

1   /* ***** BEGIN LICENSE BLOCK *****
2    * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3    *
4    * The contents of this file are subject to the Mozilla Public License Version
5    * 1.1 (the "License"); you may not use this file except in compliance with
6    * the License. You may obtain a copy of the License at
7    * http://www.mozilla.org/MPL/
8    *
9    * Software distributed under the License is distributed on an "AS IS" basis,
10   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11   * for the specific language governing rights and limitations under the
12   * License.
13   *
14   * The Original Code is "SMS Library for the Java platform".
15   *
16   * The Initial Developer of the Original Code is Markus Eriksson.
17   * Portions created by the Initial Developer are Copyright (C) 2002
18   * the Initial Developer. All Rights Reserved.
19   *
20   * Contributor(s):
21   *
22   * Alternatively, the contents of this file may be used under the terms of
23   * either the GNU General Public License Version 2 or later (the "GPL"), or
24   * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
25   * in which case the provisions of the GPL or the LGPL are applicable instead
26   * of those above. If you wish to allow use of your version of this file only
27   * under the terms of either the GPL or the LGPL, and not to allow others to
28   * use your version of this file under the terms of the MPL, indicate your
29   * decision by deleting the provisions above and replace them with the notice
30   * and other provisions required by the GPL or the LGPL. If you do not delete
31   * the provisions above, a recipient may use your version of this file under
32   * the terms of any one of the MPL, the GPL or the LGPL.
33   *
34   * ***** END LICENSE BLOCK ***** */
35  package org.marre.sms;
36  
37  /***
38   * Contains various SMS related constants.
39   * 
40   * @author Markus Eriksson
41   * @version $Id: SmsConstants.java,v 1.14 2005/05/06 13:55:05 c95men Exp $
42   */
43  public final class SmsConstants
44  {
45      /***
46       * Type-Of-Number - Unknown. "Unknown" is used when the user or network has
47       * no a priori information about the numbering plan. In this case, the
48       * Address-Value field is organized according to the network dialling plan,
49       * e.g. prefix or escape digits might be present.
50       */
51      public static final byte TON_UNKNOWN = 0x00;
52      /***
53       * Type-Of-Number - International. The international format shall be
54       * accepted also when the message is destined to a recipient in the same
55       * country as the MSC or as the SGSN.
56       * <p>
57       * Most common.
58       */
59      public static final byte TON_INTERNATIONAL = 0x01;
60      /***
61       * Type-Of-Number - National. Prefix or escape digits shall not be included.
62       */
63      public static final byte TON_NATIONAL = 0x02;
64      /***
65       * Type-Of-Number - Network specific. "Network specific number" is used to
66       * indicate administration/service number specific to the serving network,
67       * e.g. used to access an operator.
68       */
69      public static final byte TON_NETWORK_SPECIFIC = 0x03;
70      /***
71       * Type-Of-Number - Subscriber. "Subscriber number" is used when a specific
72       * short number representation is stored in one or more SCs as part of a
73       * higher layer application. (Note that "Subscriber number" shall only be
74       * used in connection with the proper PID referring to this application).
75       */
76      public static final byte TON_SUBSCRIBER = 0x04;
77      /***
78       * Type-Of-Number - Alphanumeric. Number must be coded according to 3GPP TS
79       * 23.038 GSM 7-bit default alphabet.
80       * <p>
81       * NPI Must be set to UNKNOWN.
82       */
83      public static final byte TON_ALPHANUMERIC = 0x05;
84      /***
85       * Type-Of-Number - Abbreviated.
86       */
87      public static final byte TON_ABBREVIATED = 0x06;
88  
89      /***
90       * Numbering-Plan-Identification - Unknown.
91       */
92      public static final byte NPI_UNKNOWN = 0x00;
93      /***
94       * Numbering-Plan-Identification - ISDN/Telephone. (E.164 /E.163)
95       * <p>
96       * Most common.
97       */
98      public static final byte NPI_ISDN_TELEPHONE = 0x01;
99      /***
100      * Numbering-Plan-Identification - Data Numbering Plan (X.121)
101      */
102     public static final byte NPI_DATA = 0x03;
103     /***
104      * Numbering-Plan-Identification - Telex.
105      */
106     public static final byte NPI_TELEX = 0x04;
107     /***
108      * Numbering-Plan-Identification - National.
109      */
110     public static final byte NPI_NATIONAL = 0x08;
111     /***
112      * Numbering-Plan-Identification - Private.
113      */
114     public static final byte NPI_PRIVATE = 0x09;
115     /***
116      * Numbering-Plan-Identification - Unknown.
117      */
118     public static final byte NPI_ERMES = 0x10;
119 
120     /*** Concatenated short messages, 8-bit reference number. */
121     public static final byte UDH_IEI_CONCATENATED_8BIT = 0x00;
122     /*** Special SMS Message Indication. */
123     public static final byte UDH_IEI_SPECIAL_MESSAGE = 0x01;
124     /*** Application port addressing scheme, 8 bit address. */
125     public static final byte UDH_IEI_APP_PORT_8BIT = 0x04;
126     /*** Application port addressing scheme, 16 bit address. */
127     public static final byte UDH_IEI_APP_PORT_16BIT = 0x05;
128     /*** SMSC Control Parameters. */
129     public static final byte UDH_IEI_SMSC_CONTROL_PARAMS = 0x06;
130     /*** UDH Source Indicator. */
131     public static final byte UDH_IEI_UDH_SOURCE_INDICATOR = 0x07;
132     /*** Concatenated short message, 16-bit reference number. */
133     public static final byte UDH_IEI_CONCATENATED_16BIT = 0x08;
134     /*** Wireless Control Message Protocol. */
135     public static final byte UDH_IEI_WCMP = 0x09;
136 
137     /*** Text Formatting (EMS). */
138     public static final byte UDH_IEI_EMS_TEXT_FORMATTING = 0x0A;
139     /*** Predefined Sound (EMS). */
140     public static final byte UDH_IEI_EMS_PREDEFINED_SOUND = 0x0B;
141     /*** User Defined Sound (iMelody max 128 bytes) (EMS). */
142     public static final byte UDH_IEI_EMS_USER_DEFINED_SOUND = 0x0C;
143     /*** Predefined Animation (EMS). */
144     public static final byte UDH_IEI_EMS_PREDEFINED_ANIMATION = 0x0D;
145     /*** Large Animation (16*16 times 4 = 32*4 =128 bytes) (EMS). */
146     public static final byte UDH_IEI_EMS_LARGE_ANIMATION = 0x0E;
147     /*** Small Animation (8*8 times 4 = 8*4 =32 bytes) (EMS). */
148     public static final byte UDH_IEI_EMS_SMALL_ANIMATION = 0x0F;
149     /*** Large Picture (32*32 = 128 bytes) (EMS). */
150     public static final byte UDH_IEI_EMS_LARGE_PICTURE = 0x10;
151     /*** Small Picture (16*16 = 32 bytes) (EMS). */
152     public static final byte UDH_IEI_EMS_SMALL_PICTURE = 0x11;
153     /*** Variable Picture (EMS). */
154     public static final byte UDH_IEI_EMS_VARIABLE_PICTURE = 0x12;
155     /*** User prompt indicator (EMS). */
156     public static final byte UDH_IEI_EMS_USER_PROMPT = 0x13;
157     /*** Extended Object (EMS). */
158     public static final byte UDH_IEI_EMS_EXTENDED_OBJECT = 0x14;
159     /*** Reused Extended Object (EMS). */
160     public static final byte UDH_IEI_EMS_REUSED_EXTENDED_OBJECT = 0x15;
161     /*** Compression Control (EMS). */
162     public static final byte UDH_IEI_EMS_COMPRESSION_CONTROL = 0x16;
163 
164     /*** RFC 822 E-Mail Header. */
165     public static final byte UDH_IEI_RFC822_EMAIL_HEADER = 0x20;
166     /*** Hyperlink format element. */
167     public static final byte UDH_IEI_HYPERLINK_FORMAT = 0x21;
168 
169     /* MESSAGE INDICATION TYPES FOR UDH_IEI_SPECIAL_MESSAGE */
170 
171     /*** UDH_IEI_SPECIAL_MESSAGE type "Voice Message Waiting". */
172     public static final int UISM_MSG_WAITING_VOICE = 0x00;
173     /*** UDH_IEI_SPECIAL_MESSAGE type "Fax Message Waiting". */
174     public static final int UISM_MSG_WAITING_FAX = 0x01;
175     /*** UDH_IEI_SPECIAL_MESSAGE type "Electronic Mail Message Waiting". */
176     public static final int UISM_MSG_WAITING_EMAIL = 0x02;
177     /***
178      * UDH_IEI_SPECIAL_MESSAGE type "Other Message Waiting". (see 3GPP TS 23.038
179      * [9] for definition of 'other')"
180      */
181     public static final int UISM_MSG_WAITING_OTHER = 0x03;
182 
183     /* PORT NUMBERS */
184 
185     /*** WAP Push. */
186     public static final int PORT_WAP_PUSH = 2948;
187 
188     /*** Nokia Internet access configuration data. */
189     public static final int PORT_NOKIA_IAC = 5503;
190     /*** Nokia Ring Tone. */
191     public static final int PORT_NOKIA_RING_TONE = 5505;
192     /*** Nokia Operator Logo. */
193     public static final int PORT_NOKIA_OPERATOR_LOGO = 5506;
194     /*** Nokia Calling Line Identification Logo. */
195     public static final int PORT_NOKIA_CLI_LOGO = 5507;
196     /*** Nokia Email notification. */
197     public static final int PORT_NOKIA_EMAIL_NOTIFICATION = 5512;
198     /*** Nokia Multipart Message. */
199     public static final int PORT_NOKIA_MULTIPART_MESSAGE = 5514;
200 
201     /*** WAP connectionless session service. */
202     public static final int PORT_WAP_WSP = 9200;
203     /*** WAP session service. */
204     public static final int PORT_WAP_WSP_WTP = 9201;
205 
206     /*** WAP vCard. */
207     public static final int PORT_WAP_VCARD = 9204;
208     /*** WAP vCalendar. */
209     public static final int PORT_WAP_VCALENDAR = 9205;
210 
211     /*** OTA Settings - Browser. */
212     public static final int PORT_OTA_SETTINGS_BROWSER = 49999;
213 
214     /*** OTA Settings - SyncML. */
215     public static final int PORT_OTA_SETTINGS_SYNCML = 49996;
216 
217     /*** EMS - Left aligned text. */
218     public static final byte EMS_TEXT_ALIGN_LEFT = 0x00;
219     /*** EMS - Centered text. */
220     public static final byte EMS_TEXT_ALIGN_CENTER = 0x01;
221     /*** EMS - Right aligned text. */
222     public static final byte EMS_TEXT_ALIGN_RIGHT = 0x02;
223     /*** EMS - Default alignment (language dependent). */
224     public static final byte EMS_TEXT_ALIGN_DEFAULT = 0x03;
225 
226     /*** EMS - Normal size font. */
227     public static final byte EMS_TEXT_SIZE_NORMAL = 0x00;
228     /*** EMS - Large size font. */
229     public static final byte EMS_TEXT_SIZE_LARGE = 0x04;
230     /*** EMS - Small size font. */
231     public static final byte EMS_TEXT_SIZE_SMALL = 0x08;
232 
233     /*** EMS - Normal size font. */
234     public static final byte EMS_TEXT_STYLE_BOLD = (byte) 0x10;
235     /*** EMS - Large size font. */
236     public static final byte EMS_TEXT_STYLE_ITALIC = (byte) 0x20;
237     /*** EMS - Small size font. */
238     public static final byte EMS_TEXT_STYLE_UNDERLINED = (byte) 0x40;
239     /*** EMS - Small size font. */
240     public static final byte EMS_TEXT_STYLE_STRIKETHROUGH = (byte) 0x80;
241 
242     /*** EMS - Color black. */
243     public static final byte EMS_TEXT_COLOR_BLACK = 0x00;
244     /*** EMS - Color dark grey. */
245     public static final byte EMS_TEXT_COLOR_DARK_GREY = 0x01;
246     /*** EMS - Color dark red. */
247     public static final byte EMS_TEXT_COLOR_DARK_RED = 0x02;
248     /*** EMS - Color dark yellow. */
249     public static final byte EMS_TEXT_COLOR_DARK_YELLOW = 0x03;
250     /*** EMS - Color dark green. */
251     public static final byte EMS_TEXT_COLOR_DARK_GREEN = 0x04;
252     /*** EMS - Color dark cyan. */
253     public static final byte EMS_TEXT_COLOR_DARK_CYAN = 0x05;
254     /*** EMS - Color dark blue. */
255     public static final byte EMS_TEXT_COLOR_DARK_BLUE = 0x06;
256     /*** EMS - Color dark magenta. */
257     public static final byte EMS_TEXT_COLOR_DARK_MAGENTA = 0x07;
258     /*** EMS - Color grey. */
259     public static final byte EMS_TEXT_COLOR_GREY = 0x08;
260     /*** EMS - Color white. */
261     public static final byte EMS_TEXT_COLOR_WHITE = 0x09;
262     /*** EMS - Color bright red. */
263     public static final byte EMS_TEXT_COLOR_BRIGHT_RED = 0x0A;
264     /*** EMS - Color bright yellow. */
265     public static final byte EMS_TEXT_COLOR_BRIGHT_YELLOW = 0x0B;
266     /*** EMS - Color bright green. */
267     public static final byte EMS_TEXT_COLOR_BRIGHT_GREEN = 0x0C;
268     /*** EMS - Color bright cyan. */
269     public static final byte EMS_TEXT_COLOR_BRIGHT_CYAN = 0x0D;
270     /*** EMS - Color bright blue. */
271     public static final byte EMS_TEXT_COLOR_BRIGHT_BLUE = 0x0E;
272     /*** EMS - Color bright magenta. */
273     public static final byte EMS_TEXT_COLOR_BRIGHT_MAGENTA = 0x0F;
274 
275     /*** EMS - Predefined sound - Chimes high. */
276     public static final byte EMS_PREDEFINED_SOUND_CHIMES_HIGH = 0x00;
277     /*** EMS - Predefined sound - Chimes low. */
278     public static final byte EMS_PREDEFINED_SOUND_CHIMES_LOW = 0x01;
279     /*** EMS - Predefined sound - Ding. */
280     public static final byte EMS_PREDEFINED_SOUND_DING = 0x02;
281     /*** EMS - Predefined sound - TaDa. */
282     public static final byte EMS_PREDEFINED_SOUND_TADA = 0x03;
283     /*** EMS - Predefined sound - Notify. */
284     public static final byte EMS_PREDEFINED_SOUND_NOTIFY = 0x04;
285     /*** EMS - Predefined sound - Drum. */
286     public static final byte EMS_PREDEFINED_SOUND_DRUM = 0x05;
287     /*** EMS - Predefined sound - Claps. */
288     public static final byte EMS_PREDEFINED_SOUND_CLAPS = 0x06;
289     /*** EMS - Predefined sound - FanFar. */
290     public static final byte EMS_PREDEFINED_SOUND_FANFAR = 0x07;
291     /*** EMS - Predefined sound - Chord high. */
292     public static final byte EMS_PREDEFINED_SOUND_CHORD_HIGH = 0x08;
293     /*** EMS - Predefined sound - Chord low. */
294     public static final byte EMS_PREDEFINED_SOUND_CHORD_LOW = 0x09;
295 
296     /*** EMS - Predefined animation - I am ironic, flirty. */
297     public static final byte EMS_PREDEFINED_ANIM_IRONIC = 0x00;
298     /*** EMS - Predefined animation - I am glad. */
299     public static final byte EMS_PREDEFINED_ANIM_GLAD = 0x01;
300     /*** EMS - Predefined animation - I am sceptic. */
301     public static final byte EMS_PREDEFINED_ANIM_SCEPTIC = 0x02;
302     /*** EMS - Predefined animation - I am sad. */
303     public static final byte EMS_PREDEFINED_ANIM_SAD = 0x03;
304     /*** EMS - Predefined animation - WOW. */
305     public static final byte EMS_PREDEFINED_ANIM_WOW = 0x04;
306     /*** EMS - Predefined animation - I am crying. */
307     public static final byte EMS_PREDEFINED_ANIM_CRYING = 0x05;
308     /*** EMS - Predefined animation - I am winking. */
309     public static final byte EMS_PREDEFINED_ANIM_WINKING = 0x06;
310     /*** EMS - Predefined animation - I am lughing. */
311     public static final byte EMS_PREDEFINED_ANIM_LAUGHING = 0x07;
312     /*** EMS - Predefined animation - I am indifferent. */
313     public static final byte EMS_PREDEFINED_ANIM_INDIFFERENT = 0x08;
314     /*** EMS - Predefined animation - In love/Kissing. */
315     public static final byte EMS_PREDEFINED_ANIM_LOVE = 0x09;
316     /*** EMS - Predefined animation - I am confused. */
317     public static final byte EMS_PREDEFINED_ANIM_CONFUSED = 0x0A;
318     /*** EMS - Predefined animation - Tounge hanging out. */
319     public static final byte EMS_PREDEFINED_ANIM_TOUNGE = 0x0B;
320     /*** EMS - Predefined animation - I am angry. */
321     public static final byte EMS_PREDEFINED_ANIM_ANGRY = 0x0C;
322     /*** EMS - Predefined animation - Wearing glasses. */
323     public static final byte EMS_PREDEFINED_ANIM_GLASSES = 0x0D;
324     /*** EMS - Predefined animation - Devil. */
325     public static final byte EMS_PREDEFINED_ANIM_DEVIL = 0x0E;
326 
327     private SmsConstants()
328     {
329         // Empty
330     }
331 }