1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.dexterim.msn.message;
20
21 import net.sf.dexterim.msn.MsnConnection;
22
23 /***
24 *@author Christoph Walcher
25 */
26 public class PersonalPhoneMessage extends SingleLineMessage {
27 private String phoneNumber;
28 private String type;
29
30 /***
31 * Description of the Field
32 */
33 public final static String WORK = "PHW";
34
35 /***
36 * Description of the Field
37 */
38 public final static String HOME = "PHH";
39
40 /***
41 * Description of the Field
42 */
43 public final static String MOBILE = "PHM";
44
45 /***
46 * Creates a new instance of BuddyPhoneMessage
47 */
48 public PersonalPhoneMessage() {
49 }
50
51 /***
52 * Gets the messageCommand attribute of the PersonalPhoneMessage object
53 *
54 *@return The messageCommand value
55 */
56 public String getMessageCommand() {
57 return net.sf.dexterim.msn.message.MsnMessageFactory.CMD_PERSONAL_PHONE_NUMBER;
58 }
59
60 /***
61 * Getter for property type.
62 *
63 *@return Value of property type.
64 */
65 public java.lang.String getType() {
66 return type;
67 }
68
69 /***
70 * Getter for property phoneNumber.
71 *
72 *@return Value of property phoneNumber.
73 */
74 public java.lang.String getPhoneNumber() {
75 return phoneNumber;
76 }
77
78 /***
79 * Adds a feature to the Line attribute of the PersonalPhoneMessage object
80 *
81 *@param line The feature to be added to the Line attribute
82 *@return Description of the Return Value
83 */
84 public net.sf.dexterim.msn.message.MsnMessage addLine(String line) {
85
86
87 java.util.StringTokenizer st = new java.util.StringTokenizer(line);
88
89 st.nextToken();
90
91
92 st.nextToken();
93
94
95 st.nextToken();
96
97
98 type = st.nextToken();
99
100
101 if (st.hasMoreTokens()) {
102 phoneNumber =
103 net.sf.dexterim.msn.util.SpecialCharacters.getInstance().decode(
104 st.nextToken(),
105 true);
106 }
107
108 return this;
109 }
110
111
112
113
114 public void process(MsnConnection connection) {
115
116
117 }
118 }